Move stdio.h to common-defs.h
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d02f550d
GB
12014-08-07 Gary Benson <gbenson@redhat.com>
2
3 * server.h: Do not include stdio.h.
4 * linux-low.c: Likewise.
5 * remote-utils.c: Likewise.
6 * spu-low.c: Likewise.
7 * utils.c: Likewise.
8 * wincecompat.c: Likewise.
9
87f6c4e3
GB
102014-08-06 Gary Benson <gbenson@redhat.com>
11
12 * regcache.c (init_register_cache): Move conditionals inside if.
13
7089dca4
GB
142014-08-06 Gary Benson <gbenson@redhat.com>
15
16 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
17
462f517e
GB
182014-07-31 Gary Benson <gbenson@redhat.com>
19
20 * ax.h: Do not include server.h.
21 * gdbthread.h: Likewise.
22 * lynx-low.h: Likewise.
23 * notif.h: Likewise.
24
976411d6
GB
252014-07-30 Gary Benson <gbenson@redhat.com>
26
27 * server.h: Include common-defs.h.
28 Do not include config.h or build-gnulib-gdbserver/config.h.
29
d41f6d8e
GB
302014-07-30 Gary Benson <gbenson@redhat.com>
31
32 * hostio-errno.c: Move server.h to top of includes list.
33 * inferiors.c: Likewise.
34 * linux-x86-low.c: Likewise.
35 * notif.c: Include server.h.
36
314c6a35
TT
372014-07-24 Tom Tromey <tromey@redhat.com>
38 Gary Benson <gbenson@redhat.com>
39
40 * server.h (CORE_ADDR): Now unsigned.
41
69ff6be5
PA
422014-07-16 Pedro Alves <palves@redhat.com>
43
44 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
45
ce9e3fe7
PA
462014-07-15 Pedro Alves <palves@redhat.com>
47
48 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
49 copy.
50
e76126e8
PA
512014-07-11 Pedro Alves <palves@redhat.com>
52
53 * linux-low.c (kill_wait_lwp): New function, based on
54 kill_one_lwp_callback, but use my_waitpid directly.
55 (kill_one_lwp_callback, linux_kill): Use it.
56
8e9db26e
PA
572014-06-23 Pedro Alves <palves@redhat.com>
58
59 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
60 before setting DR0..DR3.
61
698b3e08
GB
622014-06-20 Gary Benson <gbenson@redhat.com>
63
64 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
65 * configure: Regenerated.
66 * config.in: Likewise.
67
125f8a3d
GB
682014-06-20 Gary Benson <gbenson@redhat.com>
69
70 * Makefile.in (SFILES): Update locations for files moved
71 from common to nat.
72 (object file files): Reordered.
73
42995dbd
GB
742014-06-20 Gary Benson <gbenson@redhat.com>
75
76 * i386-low.h (i386_dr_low_can_set_addr): Removed.
77 (i386_dr_low_set_addr): Likewise.
78 (i386_dr_low_get_addr): Likewise.
79 (i386_dr_low_can_set_control): Likewise.
80 (i386_dr_low_set_control): Likewise.
81 (i386_dr_low_get_control): Likewise.
82 (i386_dr_low_get_status): Likewise.
83 (i386_get_debug_register_length): Likewise.
84 * linux-x86-low.c (i386_dr_low_set_addr):
85 Changed signature. Made static.
86 (i386_dr_low_get_addr): Likewise.
87 (i386_dr_low_set_control): Likewise.
88 (i386_dr_low_get_control): Likewise.
89 (i386_dr_low_get_status): Likewise.
90 (i386_dr_low): New global variable.
91 * win32-i386-low.c (i386_dr_low_set_addr):
92 Changed signature. Made static.
93 (i386_dr_low_get_addr): Likewise.
94 (i386_dr_low_set_control): Likewise.
95 (i386_dr_low_get_control): Likewise.
96 (i386_dr_low_get_status): Likewise.
97 (i386_dr_low): New global variable.
98
e1d2394b
MS
992014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
100
101 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
102 * Makefile.in (AR, AR_FLAGS): Define.
103 * configure: Regenerate.
104
3a8ee006
GB
1052014-06-19 Gary Benson <gbenson@redhat.com>
106
107 * Makefile.in (i386-dregs.o): New rule.
108 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
109 * i386-low.c (target.h): Remove include.
110 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
111 (DR_CONTROL_SHIFT): Likewise.
112 (DR_CONTROL_SIZE): Likewise.
113 (DR_RW_EXECUTE): Likewise.
114 (DR_RW_WRITE): Likewise.
115 (DR_RW_READ): Likewise.
116 (DR_RW_IORW): Likewise.
117 (DR_LEN_1): Likewise.
118 (DR_LEN_2): Likewise.
119 (DR_LEN_4): Likewise.
120 (DR_LEN_8): Likewise.
121 (DR_LOCAL_ENABLE_SHIFT): Likewise.
122 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
123 (DR_ENABLE_SIZE): Likewise.
124 (DR_LOCAL_SLOWDOWN): Likewise.
125 (DR_GLOBAL_SLOWDOWN): Likewise.
126 (DR_CONTROL_RESERVED): Likewise.
127 (I386_DR_CONTROL_MASK): Likewise.
128 (I386_DR_VACANT): Likewise.
129 (I386_DR_LOCAL_ENABLE): Likewise.
130 (I386_DR_GLOBAL_ENABLE): Likewise.
131 (I386_DR_DISABLE): Likewise.
132 (I386_DR_SET_RW_LEN): Likewise.
133 (I386_DR_GET_RW_LEN): Likewise.
134 (I386_DR_WATCH_HIT): Likewise.
135 (i386_wp_op_t): Likewise.
136 (i386_show_dr): Likewise.
137 (i386_length_and_rw_bits): Likewise.
138 (i386_insert_aligned_watchpoint): Likewise.
139 (i386_remove_aligned_watchpoint): Likewise.
140 (i386_handle_nonaligned_watchpoint): Likewise.
141 i386_update_inferior_debug_regs(): Likewise.
142 (i386_dr_insert_watchpoint): Likewise.
143 (i386_dr_remove_watchpoint): Likewise.
144 (i386_dr_region_ok_for_watchpoint): Likewise.
145 (i386_dr_stopped_data_address): Likewise.
146 (i386_dr_stopped_by_watchpoint): Likewise.
147
8f26655c
GB
1482014-06-19 Gary Benson <gbenson@redhat.com>
149
150 * i386-low.c (i386_dr_show): Renamed to
151 i386_show_dr and made static. All uses updated.
152 (i386_dr_length_and_rw_bits): Renamed to
153 i386_length_and_rw_bits and made static.
154 All uses updated.
155 (i386_dr_insert_aligned_watchpoint): Renamed to
156 i386_insert_aligned_watchpoint and made static.
157 All uses updated.
158 (i386_dr_remove_aligned_watchpoint): Renamed to
159 i386_remove_aligned_watchpoint and made static.
160 All uses updated.
161 (i386_dr_update_inferior_debug_regs): Renamed to
162 i386_update_inferior_debug_regs and made static.
163 All uses updated.
164
b9228891
GB
1652014-06-18 Gary Benson <gbenson@redhat.com>
166
5171def3
GB
167 * i386-low.h (i386_dr_low_can_set_addr): New macro.
168 (i386_dr_low_can_set_control): Likewise.
169 (i386_get_debug_register_length): Likewise.
170 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
171 (i386_dr_low_can_set_control): Likewise.
172 (i386_get_debug_register_length): Likewise.
173
1742014-06-17 Gary Benson <gbenson@redhat.com>
175
b9228891
GB
176 * i386-low.h (i386-dregs.h): New include.
177 (DR_FIRSTADDR): Now in i386-dregs.h.
178 (DR_LASTADDR): Likewise.
179 (DR_NADDR): Likewise.
180 (DR_STATUS): Likewise.
181 (DR_CONTROL): Likewise.
182 (i386_debug_reg_state): Likewise.
183 (i386_dr_insert_watchpoint): Likewise.
184 (i386_dr_remove_watchpoint): Likewise.
185 (i386_dr_region_ok_for_watchpoint): Likewise.
186 (i386_dr_stopped_data_address): Likewise.
187 (i386_dr_stopped_by_watchpoint): Likewise.
188 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
189
4be83cc2
GB
1902014-06-18 Gary Benson <gbenson@redhat.com>
191
192 * i386-low.h (i386_low_insert_watchpoint): Renamed to
193 i386_dr_insert_watchpoint.
194 (i386_low_remove_watchpoint): Renamed to
195 i386_dr_remove_watchpoint.
196 (i386_low_region_ok_for_watchpoint): Renamed to
197 i386_dr_region_ok_for_watchpoint.
198 (i386_low_stopped_data_address): Renamed to
199 i386_dr_stopped_data_address.
200 (i386_low_stopped_by_watchpoint): Renamed to
201 i386_dr_stopped_by_watchpoint.
202 * i386-low.c (i386_show_dr): Renamed to
203 i386_dr_show and made nonstatic. All uses updated.
204 (i386_length_and_rw_bits): Renamed to
205 i386_dr_length_and_rw_bits and made nonstatic.
206 All uses updated.
207 (i386_insert_aligned_watchpoint): Renamed to
208 i386_dr_insert_aligned_watchpoint and made nonstatic.
209 All uses updated.
210 (i386_remove_aligned_watchpoint): Renamed to
211 i386_dr_remove_aligned_watchpoint and made nonstatic.
212 All uses updated.
213 (i386_update_inferior_debug_regs): Renamed to
214 i386_dr_update_inferior_debug_regs and made nonstatic.
215 All uses updated.
216 (i386_low_insert_watchpoint): Renamed to
217 i386_dr_insert_watchpoint. All uses updated.
218 (i386_low_remove_watchpoint): Renamed to
219 i386_dr_remove_watchpoint. All uses updated.
220 (i386_low_region_ok_for_watchpoint): Renamed to
221 i386_dr_region_ok_for_watchpoint. All uses updated.
222 (i386_low_stopped_data_address): Renamed to
223 i386_dr_stopped_data_address. All uses updated.
224 (i386_low_stopped_by_watchpoint): Renamed to
225 i386_dr_stopped_by_watchpoint. All uses updated.
226
131aa0d4
GB
2272014-06-18 Gary Benson <gbenson@redhat.com>
228
229 * i386-low.c (i386_dr_low_can_set_addr): New macro.
230 (i386_dr_low_can_set_control): Likewise.
231 (i386_insert_aligned_watchpoint): New check.
232
d9305f7f
GB
2332014-06-18 Gary Benson <gbenson@redhat.com>
234
235 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
236 Renamed to state.
237
e927c9fc
GB
2382014-06-18 Gary Benson <gbenson@redhat.com>
239
240 * i386-low.c (i386_length_and_rw_bits): Use internal_error
241 instead of fatal and error.
242 (i386_handle_nonaligned_watchpoint): Likewise.
243
1b6d4134
GB
2442014-06-18 Gary Benson <gbenson@redhat.com>
245
246 * i386-low.c (i386_get_debug_register_length): New macro.
247 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
248 (i386_show_dr): Use debug_printf instead of fprintf. Use
249 phex to format values.
250
6e62758f
GB
2512014-06-18 Gary Benson <gbenson@redhat.com>
252
253 * i386-low.h: Comment changes.
254 * i386-low.c: Likewise.
255
fc6e2f03
GB
2562014-06-18 Gary Benson <gbenson@redhat.com>
257
258 * i386-low.c: Whitespace changes.
259
f9d1eeed
TT
2602014-06-12 Tom Tromey <tromey@redhat.com>
261
262 * utils.c (freeargv): Remove.
263
0b04e523
TT
2642014-06-12 Tom Tromey <tromey@redhat.com>
265
266 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
267 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
268 (parse_debug_format_options): Likewise.
269 (gdbserver_usage): Likewise.
270 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
271 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
272 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
273 against libiberty.
274 ($(LIBGNU)): Depend on libiberty.
275 (all-lib): Recurse into all subdirs.
276 (install-only): Invoke "install" target in subdirs.
277 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
278 targets.
279 * configure: Rebuild.
280 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
281 for vasprintf, vsnprintf, or gettimeofday.
282 * configure.srv: Don't add safe-ctype.o or lbasename.o to
283 srv_tgtobj.
284
270c9937
JB
2852014-06-05 Joel Brobecker <brobecker@adacore.com>
286
287 * development.sh: Delete.
288 * Makefile.in (config.status): Adjust dependency on development.sh.
289 * configure.ac: Adjust development.sh source call.
290 * configure: Regenerate.
291
0a261ed8
PA
2922014-06-02 Pedro Alves <palves@redhat.com>
293
294 * ax.c (gdb_free_agent_expr): New function.
295 * ax.h (gdb_free_agent_expr): New declaration.
296 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
297 list.
298 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
299 static.
300 (clear_breakpoint_conditions_and_commands): New function.
301 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
302 (clear_breakpoint_conditions_and_commands): New declaration.
303
e9dae05e
RR
3042014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
305
306 * linux-aarch64-low.c (asm/ptrace.h): Include.
307
5876f503
JK
3082014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
309
310 Fix TLS access for -static -pthread.
311 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
312 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
313 (thread_db_load_search, try_thread_db_load_1): Initialize it.
314
802e8e6d
PA
3152014-05-20 Pedro Alves <palves@redhat.com>
316
317 * linux-aarch64-low.c (aarch64_insert_point)
318 (aarch64_remove_point): No longer check whether the type is
319 supported here. Adjust to new interface.
320 (the_low_target): Install aarch64_supports_z_point_type as
321 supports_z_point_type method.
322 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
323 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
324 instead of a Z packet char. Adjust.
325 (arm_supports_z_point_type): New function.
326 (arm_insert_point, arm_remove_point): Adjust to new interface.
327 (the_low_target): Install arm_supports_z_point_type.
328 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
329 (cris_insert_point, cris_remove_point): Adjust to new interface.
330 Don't check whether the type is supported here.
331 (the_low_target): Install cris_supports_z_point_type.
332 * linux-low.c (linux_supports_z_point_type): New function.
333 (linux_insert_point, linux_remove_point): Adjust to new interface.
334 * linux-low.h (struct linux_target_ops) <insert_point,
335 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
336 raw_breakpoint pointer parameter.
337 <supports_z_point_type>: New method.
338 * linux-mips-low.c (mips_supports_z_point_type): New function.
339 (mips_insert_point, mips_remove_point): Adjust to new interface.
340 Use mips_supports_z_point_type.
341 (the_low_target): Install mips_supports_z_point_type.
342 * linux-ppc-low.c (the_low_target): Install NULL as
343 supports_z_point_type method.
344 * linux-s390-low.c (the_low_target): Install NULL as
345 supports_z_point_type method.
346 * linux-sparc-low.c (the_low_target): Install NULL as
347 supports_z_point_type method.
348 * linux-x86-low.c (x86_supports_z_point_type): New function.
349 (x86_insert_point): Adjust to new insert_point interface. Use
350 insert_memory_breakpoint. Adjust to new
351 i386_low_insert_watchpoint interface.
352 (x86_remove_point): Adjust to remove_point interface. Use
353 remove_memory_breakpoint. Adjust to new
354 i386_low_remove_watchpoint interface.
355 (the_low_target): Install x86_supports_z_point_type.
356 * lynx-low.c (lynx_target_ops): Install NULL as
357 supports_z_point_type callback.
358 * nto-low.c (nto_supports_z_point_type): New.
359 (nto_insert_point, nto_remove_point): Adjust to new interface.
360 (nto_target_ops): Install nto_supports_z_point_type.
361 * mem-break.c: Adjust intro comment.
362 (struct raw_breakpoint) <raw_type, size>: New fields.
363 <inserted>: Update comment.
364 <shlib_disabled>: Delete field.
365 (enum bkpt_type) <gdb_breakpoint>: Delete value.
366 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
367 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
368 (raw_bkpt_type_to_target_hw_bp_type): New function.
369 (find_enabled_raw_code_breakpoint_at): New function.
370 (find_raw_breakpoint_at): New type and size parameters. Use them.
371 (insert_memory_breakpoint): New function, based off
372 set_raw_breakpoint_at.
373 (remove_memory_breakpoint): New function.
374 (set_raw_breakpoint_at): Reimplement.
375 (set_breakpoint): New, based on set_breakpoint_at.
376 (set_breakpoint_at): Reimplement.
377 (delete_raw_breakpoint): Go through the_target->remove_point
378 instead of assuming memory breakpoints.
379 (find_gdb_breakpoint_at): Delete.
380 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
381 (find_gdb_breakpoint): New function.
382 (set_gdb_breakpoint_at): Delete.
383 (z_type_supported): New function.
384 (set_gdb_breakpoint_1): New function, loosely based off
385 set_gdb_breakpoint_at.
386 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
387 (delete_gdb_breakpoint_at): Delete.
388 (delete_gdb_breakpoint_1): New function, loosely based off
389 delete_gdb_breakpoint_at.
390 (delete_gdb_breakpoint): New function.
391 (clear_gdb_breakpoint_conditions): Rename to ...
392 (clear_breakpoint_conditions): ... this. Don't handle a NULL
393 breakpoint.
394 (add_condition_to_breakpoint): Make static.
395 (add_breakpoint_condition): Take a struct breakpoint pointer
396 instead of an address. Adjust.
397 (gdb_condition_true_at_breakpoint): Rename to ...
398 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
399 z_type parameter.
400 (gdb_condition_true_at_breakpoint): Reimplement.
401 (add_breakpoint_commands): Take a struct breakpoint pointer
402 instead of an address. Adjust.
403 (gdb_no_commands_at_breakpoint): Rename to ...
404 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
405 parameter. Return true if no breakpoint was found. Change debug
406 output.
407 (gdb_no_commands_at_breakpoint): Reimplement.
408 (run_breakpoint_commands): Rename to ...
409 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
410 and change return type to boolean.
411 (run_breakpoint_commands): New function.
412 (gdb_breakpoint_here): Also check for Z1 breakpoints.
413 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
414 breakpoint. Go through the_target->remove_point instead of
415 assuming memory breakpoint.
416 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
417 software and hardware breakpoints.
418 (reinsert_raw_breakpoint): Go through the_target->insert_point
419 instead of assuming memory breakpoint.
420 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
421 software and hardware breakpoints.
422 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
423 Check both software and hardware breakpoints.
424 (validate_inserted_breakpoint): Assert the breakpoint is a
425 software breakpoint. Set the inserted flag to -1 instead of
426 setting shlib_disabled.
427 (delete_disabled_breakpoints): Adjust.
428 (validate_breakpoints): Only validate software breakpoints.
429 Adjust to inserted flag change.
430 (check_mem_read, check_mem_write): Skip breakpoint types other
431 than software breakpoints. Adjust to inserted flag change.
432 * mem-break.h (enum raw_bkpt_type): New enum.
433 (raw_breakpoint, struct process_info): Forward declare.
434 (Z_packet_to_target_hw_bp_type): Delete declaration.
435 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
436 (set_gdb_breakpoint, delete_gdb_breakpoint)
437 (clear_breakpoint_conditions): New declarations.
438 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
439 (breakpoint_inserted_here): Update comment.
440 (add_breakpoint_condition, add_breakpoint_commands): Replace
441 address parameter with a breakpoint pointer parameter.
442 (gdb_breakpoint_here): Update comment.
443 (delete_gdb_breakpoint_at): Delete.
444 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
445 * server.c (process_point_options): Take a struct breakpoint
446 pointer instead of an address. Adjust.
447 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
448 delete_gdb_breakpoint.
449 * spu-low.c (spu_target_ops): Install NULL as
450 supports_z_point_type method.
451 * target.h: Include mem-break.h.
452 (struct target_ops) <prepare_to_access_memory>: Update comment.
453 <supports_z_point_type>: New field.
454 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
455 instead of a char. Also take a raw breakpoint pointer.
456 * win32-arm-low.c (the_low_target): Install NULL as
457 supports_z_point_type.
458 * win32-i386-low.c (i386_supports_z_point_type): New function.
459 (i386_insert_point, i386_remove_point): Adjust to new interface.
460 (the_low_target): Install i386_supports_z_point_type.
461 * win32-low.c (win32_supports_z_point_type): New function.
462 (win32_insert_point, win32_remove_point): Adjust to new interface.
463 (win32_target_ops): Install win32_supports_z_point_type.
464 * win32-low.h (struct win32_target_ops):
465 <supports_z_point_type>: New method.
466 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
467 instead of a char. Also take a raw breakpoint pointer.
468
932539e3
PA
4692014-05-20 Pedro Alves <palves@redhat.com>
470
471 * mem-break.h: Include break-common.h.
472 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
473 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
474 (Z_packet_to_target_hw_bp_type): New declaration.
475 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
476 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
477 (Z_PACKET_ACCESS_WP): Delete macros.
478 (Z_packet_to_hw_type): Delete function.
479 * i386-low.h: Don't include break-common.h here.
480 (Z_packet_to_hw_type): Delete declaration.
481 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
482 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
483 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
484 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
485 * linux-aarch64-low.c: Don't include break-common.h here.
486 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
487 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
488 (Z_packet_to_target_hw_bp_type): Delete function.
489 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
490 function.
491 (mips_insert_point, mips_remove_point): Use
492 Z_packet_to_target_hw_bp_type.
493
4ff0d3d8
PA
4942014-05-20 Pedro Alves <palves@redhat.com>
495
496 * linux-aarch64-low.c: Include break-common.h.
497 (enum target_point_type): Delete.
498 (Z_packet_to_point_type): Rename to ...
499 (Z_packet_to_target_hw_bp_type): ... this, and return a
500 target_hw_bp_type instead.
501 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
502 instead of an enum target_point_type.
503 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
504 breakpoint type.
505 (aarch64_dr_state_insert_one_point)
506 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
507 (aarch64_handle_aligned_watchpoint)
508 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
509 Take an enum target_hw_bp_type instead of an enum
510 target_point_type.
511 (aarch64_supports_z_point_type): New function.
512 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
513 use Z_packet_to_target_hw_bp_type.
514
786dc519
JB
5152014-05-20 Joel Brobecker <brobecker@adacore.com>
516
517 * configure.ac: Only use -Werror by default when DEVELOPMENT
518 is true.
519 * configure: Regenerate.
520
9e0aa64f
JK
5212014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
522
523 Fix gdbserver qGetTLSAddr for x86_64 -m32.
524 * linux-x86-low.c (X86_64_USER_REGS): New.
525 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
526
2b577b92
YQ
5272014-04-28 Yao Qi <yao@codesourcery.com>
528
529 * Makefile.in (i386-avx512.c): Fix the typo of generated file
530 name.
531
94611da2
PA
5322014-04-25 Pedro Alves <palves@redhat.com>
533
534 PR server/16255
535 * linux-low.c (linux_attach_fail_reason_string): New function.
536 (linux_attach_lwp): Delete.
537 (linux_attach_lwp_1): Rename to ...
538 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
539 argument. Remove "initial" parameter. Return int instead of
540 void. Don't error or warn here.
541 (linux_attach): Adjust to call linux_attach_lwp. Call error on
542 failure to attach to the tgid. Call warning when failing to
543 attach to an lwp.
544 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
545 argument. Remove "initial" parameter. Return int instead of
546 void. Don't error or warn here.
547 (linux_attach_fail_reason_string): New declaration.
548 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
549 interface change. Use linux_attach_fail_reason_string.
550
01f9f808
MS
5512014-04-24 Michael Sturm <michael.sturm@mintel.com>
552 Walfred Tedeschi <walfred.tedeschi@intel.com>
553
554 * Makefile.in: Added rules to handle new files
555 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
556 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
557 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
558 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
559 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
560 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
561 x32-avx512-linux.o.
562 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
563 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
564 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
565 i386/x32-avx512.xml.
566 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
567 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
568 i386/x32-avx512-linux.xml.
569 * i387-fp.c (num_avx512_k_registers): New constant for number
570 of K registers.
571 (num_avx512_zmmh_low_registers): New constant for number of
572 lower ZMM registers (0-15).
573 (num_avx512_zmmh_high_registers): New constant for number of
574 higher ZMM registers (16-31).
575 (num_avx512_ymmh_registers): New contant for number of higher
576 YMM registers (ymm16-31 added by avx521 on x86_64).
577 (num_avx512_xmm_registers): New constant for number of higher
578 XMM registers (xmm16-31 added by AVX512 on x86_64).
579 (struct i387_xsave): Add space for AVX512 registers.
580 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
581 Add code to handle AVX512 registers.
582 (i387_xsave_to_cache): Add code to handle AVX512 registers.
583 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
584 prototypei from generated file.
585 (tdesc_amd64_avx512_linux): Likewise.
586 (init_registers_x32_avx512_linux): Likewise.
587 (tdesc_x32_avx512_linux): Likewise.
588 (init_registers_i386_avx512_linux): Likewise.
589 (tdesc_i386_avx512_linux): Likewise.
590 (x86_64_regmap): Add AVX512 registers.
591 (x86_linux_read_description): Add code to handle AVX512 XSTATE
592 mask.
593 (initialize_low_arch): Add code to initialize AVX512 registers.
594
51aa91f9
PA
5952014-04-23 Pedro Alves <palves@redhat.com>
596
597 * mem-break.c (find_gdb_breakpoint_at): Make static.
598 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
599
a4165e94
PA
6002014-04-23 Pedro Alves <palves@redhat.com>
601
602 * i386-low.c: Don't include break-common.h here.
603 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
604 prototype to take target_hw_bp_type as argument instead of a Z
605 packet char.
606 * i386-low.h: Include break-common.h here.
607 (Z_packet_to_hw_type): Declare.
608 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
609 prototypes.
610 * linux-x86-low.c (x86_insert_point): Convert the packet number to
611 a target_hw_bp_type before calling i386_low_insert_watchpoint.
612 (x86_remove_point): Convert the packet number to a
613 target_hw_bp_type before calling i386_low_remove_watchpoint.
614 * win32-i386-low.c (i386_insert_point): Convert the packet number
615 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
616 (i386_remove_point): Convert the packet number to a
617 target_hw_bp_type before calling i386_low_remove_watchpoint.
618
b8acf843
PA
6192014-04-23 Pedro Alves <palves@redhat.com>
620
621 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
622
d708bcd1
PA
6232014-04-10 Pedro Alves <palves@redhat.com>
624
625 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
626 Check if the condition or command is NULL before checking if the
627 breakpoint is known. On success, return true.
628 * mem-break.h (add_breakpoint_condition): Document return.
629 (add_breakpoint_commands): Add describing comment.
630 * server.c (skip_to_semicolon): New function.
631 (process_point_options): Use it.
632
2eec7d5b
PA
6332014-04-09 Pedro Alves <palves@redhat.com>
634
635 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
636 to lwpid_of.
637
fa96cb38
PA
6382014-02-27 Pedro Alves <palves@redhat.com>
639
640 PR 12702
641 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
642 macros.
643 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
644 output.
645 (last_thread_of_process_p): Take a PID argument instead of a
646 thread pointer.
647 (linux_wait_for_lwp): Delete.
648 (num_lwps, check_zombie_leaders, not_stopped_callback): New
649 functions.
650 (linux_low_filter_event): New function, party factored out from
651 linux_wait_for_event.
652 (linux_wait_for_event): Rename to ...
653 (linux_wait_for_event_filtered): ... this. Add new filter ptid
654 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
655 sigsuspend. Check for zombie leaders.
656 (linux_wait_for_event): Reimplement as wrapper around
657 linux_wait_for_event_filtered.
658 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
659 a normal or signal exit is seen, it's the whole process exiting.
660 (wait_for_sigstop): No longer a for_each_inferior callback.
661 Rewrite on top of linux_wait_for_event_filtered.
662 (stop_all_lwps): Call wait_for_sigstop directly.
663 * server.c (resume, handle_target_event): Handle
664 TARGET_WAITKIND_NO_RESUMED.
665
d763de10
JB
6662014-02-26 Joel Brobecker <brobecker@adacore.com>
667
668 * win32-low.c (psapi_get_dll_name,
669 * win32_CreateToolhelp32Snapshot): Delete.
670 (win32_CreateToolhelp32Snapshot, win32_Module32First)
671 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
672 Delete.
673 (handle_load_dll): Add function description.
674 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
675
850a0f76
JB
6762014-02-26 Joel Brobecker <brobecker@adacore.com>
677
678 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
679 Add comment.
680 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
681 base address when calling win32_add_one_solib.
682 (handle_load_dll): Delete local variable load_addr.
683 Remove 0x1000 offset applied to DLL base address when calling
684 win32_add_one_solib.
685 (handle_unload_dll): Add comment.
686
f25b3fc3
JB
6872014-02-26 Joel Brobecker <brobecker@adacore.com>
688
689 * win32-low.c (win32_add_all_dlls): Renames
690 win32_ensure_ntdll_loaded. Rewrite function documentation.
691 Adjust implementation to always load all DLLs.
692 Add 0x1000 offset to DLL base address when calling
693 win32_add_one_solib.
694 (child_initialization_done): New static global.
695 (do_initial_child_stuff): Set child_initialization_done to
696 zero during child initialization, and 1 after. Replace call
697 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
698 Add comment.
699 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
700 (handle_unload_dll): Add function documentation.
701 (get_child_debug_event): Ignore load and unload DLL events
702 during child initialization.
703
d86d4aaf
DE
7042014-02-20 Doug Evans <dje@google.com>
705
3bc32da3 706 Remove global all_lwps.
d86d4aaf
DE
707 * inferiors.h (ptid_of): Move here from linux-low.h.
708 (pid_of, lwpid_of): Ditto.
709 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
710 parameter is a struct thread_info * now.
711 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
712 directly. Pass &all_threads to find_inferior instead of &all_lwps.
713 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
714 directly.
715 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
716 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
717 * linux-arm-low.c (update_registers_callback): Update, "entry"
718 parameter is a struct thread_info * now.
719 Fetch lwpid from current_inferior directly.
720 (arm_insert_point): Pass &all_threads to find_inferior instead of
721 &all_lwps.
722 (arm_remove_point): Ditto.
723 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
724 (arm_prepare_to_resume): Fetch pid from thread.
725 (arm_read_description): Fetch lwpid from current_inferior directly.
726 * linux-low.c (all_lwps): Delete.
727 (delete_lwp): Delete call to remove_inferior.
728 (handle_extended_wait): Fetch lwpid from thread.
729 (add_lwp): Don't set lwp->entry.id. Remove call to
730 add_inferior_to_list.
731 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
732 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
733 (kill_one_lwp_callback): Ditto.
734 (linux_kill): Don't dereference NULL pointer.
735 Fetch ptid,lwpid from thread.
736 (get_detach_signal): Fetch ptid from thread.
737 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
738 Simplify call to regcache_invalidate_thread.
739 (delete_lwp_callback): Update, "entry" parameter is a
740 struct thread_info * now. Fetch pid from thread.
741 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
742 (status_pending_p_callback): Update, "entry" parameter is a
743 struct thread_info * now. Fetch ptid from thread.
744 (find_lwp_pid): Update, "entry" parameter is a
745 struct thread_info * now.
746 (linux_wait_for_lwp): Fetch pid from thread.
747 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
748 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
749 (enqueue_one_deferred_signal): Fetch lwpid from thread.
750 (dequeue_one_deferred_signal): Ditto.
751 (cancel_breakpoint): Fetch ptid from current_inferior.
752 (linux_wait_for_event): Pass &all_threads to find_inferior,
753 not &all_lwps. Fetch ptid, lwpid from thread.
754 (count_events_callback): Update, "entry" parameter is a
755 struct thread_info * now.
756 (select_singlestep_lwp_callback): Ditto.
757 (select_event_lwp_callback): Ditto.
758 (cancel_breakpoints_callback): Ditto.
759 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
760 not &all_lwps.
761 (select_event_lwp): Ditto. Fetch ptid from event_thread.
762 (unsuspend_one_lwp): Update, "entry" parameter is a
763 struct thread_info * now.
764 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
765 not &all_lwps.
766 (linux_stabilize_threads): Ditto. And for for_each_inferior.
767 Fetch lwpid from thread, not lwp.
768 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
769 Pass &all_threads to find_inferior, not &all_lwps.
770 (send_sigstop): Fetch lwpid from thread, not lwp.
771 (send_sigstop_callback): Update, "entry" parameter is a
772 struct thread_info * now.
773 (suspend_and_send_sigstop_callback): Ditto.
774 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
775 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
776 struct thread_info * now.
777 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
778 from thread, lwp.
779 (lwp_running): Update, "entry" parameter is a
780 struct thread_info * now.
781 (stop_all_lwps): Fetch ptid from thread.
782 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
783 (linux_resume_one_lwp): Fetch lwpid from thread.
784 (linux_set_resume_request): Update, "entry" parameter is a
785 struct thread_info * now. Fetch pid, lwpid from thread.
786 (resume_status_pending_p): Update, "entry" parameter is a
787 struct thread_info * now.
788 (need_step_over_p): Ditto. Fetch lwpid from thread.
789 (start_step_over): Fetch lwpid from thread.
790 (linux_resume_one_thread): Update, "entry" parameter is a
791 struct thread_info * now. Fetch lwpid from thread.
792 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
793 (proceed_one_lwp): Update, "entry" parameter is a
794 struct thread_info * now. Fetch lwpid from thread.
795 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
796 struct thread_info * now.
797 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
798 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
799 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
800 directly.
801 (regsets_store_inferior_registers): Ditto.
802 (fetch_register, store_register): Ditto.
803 (linux_read_memory, linux_write_memory): Ditto.
804 (linux_request_interrupt): Ditto.
805 (linux_read_auxv): Ditto.
806 (linux_xfer_siginfo): Ditto.
807 (linux_qxfer_spu): Ditto.
808 (linux_qxfer_libraries_svr4): Ditto.
809 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
810 moved to inferiors.h.
811 (get_lwp): Delete.
812 (get_thread_lwp): Update.
813 (struct lwp_info): Delete member "entry". Simplify comment for
814 member "thread".
815 (all_lwps): Delete.
816 * linux-mips-low.c (mips_read_description): Fetch lwpid from
817 current_inferior directly.
818 (update_watch_registers_callback): Update, "entry" parameter is a
819 struct thread_info * now. Fetch pid from thread.
820 (mips_linux_prepare_to_resume): Fetch ptid from thread.
821 (mips_insert_point): Fetch lwpid from current_inferior.
822 Pass &all_threads to find_inferior, not &all_lwps.
823 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
824 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
825 directly.
826 (mips_stopped_data_address): Ditto.
827 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
828 directly.
829 * linux-tile-low.c (tile_arch_setup): Ditto.
830 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
831 (update_debug_registers_callback): Update, "entry" parameter is a
832 struct thread_info * now. Fetch pid from thread.
833 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
834 Pass &all_threads to find_inferior, not &all_lwps.
835 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
836 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
837 Pass &all_threads to find_inferior, not &all_lwps.
838 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
839 (i386_dr_low_get_status): Ditto.
840 (x86_linux_prepare_to_resume): Fetch ptid from thread.
841 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
842 (x86_linux_read_description): Ditto.
843 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
844
3b8361aa
DE
8452014-02-20 Doug Evans <dje@google.com>
846
847 * inferiors.c (get_first_inferior): Fix buglet.
848
f7667f0d
DE
8492014-02-19 Doug Evans <dje@google.com>
850
851 * gdbthread.h (add_thread): Change result type to struct thread_info *.
852 * inferiors.c (add_thread): Change result type to struct thread_info *.
853 All callers updated.
854 (add_lwp): Call add_thread here instead of in callers.
855 All callers updated.
856 * linux-low.h (get_lwp_thread): Rewrite.
857 (struct lwp_info): New member "thread".
858
b3312d80
DE
8592014-02-19 Doug Evans <dje@google.com>
860
861 * linux-low.c (add_lwp): Change result to struct lwp_info *.
862 All callers updated.
863
ecc6f45c
DE
8642014-02-19 Doug Evans <dje@google.com>
865
866 * inferiors.c (add_thread): Fix whitespace.
867
649ebbca
DE
8682014-02-19 Doug Evans <dje@google.com>
869
870 * dll.c (clear_dlls): Replace accessing list implemention details
871 with API function.
872 * gdbthread.h (get_first_thread): Declare.
873 * inferiors.c (for_each_inferior_with_data): New function.
874 (get_first_thread): New function.
875 (find_thread_ptid): Simplify.
876 (get_first_inferior): New function.
877 (clear_list): Delete.
878 (one_inferior_p): New function.
879 (clear_inferior_list): New function.
880 (clear_inferiors): Update.
881 * inferiors.h (for_each_inferior_with_data): Declare.
882 (clear_inferior_list): Declare.
883 (one_inferior_p): Declare.
884 (get_first_inferior): Declare.
885 * linux-low.c (linux_wait_for_event): Replace accessing list
886 implemention details with API function.
887 * server.c (target_running): Ditto.
888 (accumulate_file_name_length): New function.
889 (emit_dll_description): New function.
890 (handle_qxfer_libraries): Replace accessing list implemention
891 details with API function.
892 (handle_qxfer_threads_worker): New function.
893 (handle_qxfer_threads_proper): Replace accessing list implemention
894 details with API function.
895 (handle_query): Ditto.
896 (visit_actioned_threads_callback_ftype): New typedef.
897 (visit_actioned_threads_data): New struct.
898 (visit_actioned_threads): Rewrite to be find_inferior callback.
899 (resume): Call find_inferior.
900 (handle_status): Replace accessing list implemention
901 details with API function.
902 (process_serial_event): Replace accessing list implemention details
903 with API function.
904 * target.c (set_desired_inferior): Replace accessing list implemention
905 details with API function.
906 * tracepoint.c (same_process_p): New function.
907 (gdb_agent_about_to_close): Replace accessing list implemention
908 details with API function.
909 * win32-low.c (child_delete_thread): Replace accessing list
910 implemention details with API function.
911 (match_dll_by_basename): New function.
912 (dll_is_loaded_by_basename): New function.
913 (win32_ensure_ntdll_loaded): Replace accessing list implemention
914 details call to dll_is_loaded_by_basename.
915
80894984
DE
9162014-02-19 Doug Evans <dje@google.com>
917
918 * dll.h (struct dll_info): Add comment.
919 * gdbthread.h (struct thread_info): Add comment.
920 (current_ptid): Simplify.
921 * inferiors.c (add_process): Update.
922 (remove_process): Update.
923 * inferiors.h (struct process_info): Rename member "head" to "entry".
924 * linux-low.c (delete_lwp): Update.
925 (add_lwp): Update.
926 (last_thread_of_process_p): Update.
927 (kill_one_lwp_callback, linux_kill): Update.
928 (status_pending_p_callback): Update.
929 (wait_for_sigstop): Update. Simplify read of ptid.
930 (start_step_over): Update.
931 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
932 (get_lwp_thread): Update.
933 (struct lwp_info): Rename member "head" to "entry".
934 * regcache.h (inferior_list_entry): Delete.
935 * server.c (kill_inferior_callback): Update.
936 (detach_or_kill_inferior_callback): Update.
937 (print_started_pid): Update.
938 (print_attached_pid): Update.
939 (process_serial_event): Simplify read of ptid.
940 * thread-db.c (thread_db_create_event): Update.
941 (thread_db_get_tls_address): Update.
942 * win32-low.c (current_inferior_ptid): Simplify.
943
46917d26
TT
9442014-02-19 Tom Tromey <tromey@redhat.com>
945
946 * target.h (struct target_ops) <supports_btrace>: Add target_ops
947 argument.
948 (target_supports_btrace): Update.
949
0759a81e
YQ
9502014-02-14 Yao Qi <yao@codesourcery.com>
951
952 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
953 (rsp-low-ipa.o): New target.
954
a7191e8b
TT
9552014-02-12 Tom Tromey <tromey@redhat.com>
956
957 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
958 convert_ascii_to_int.
959 * regcache.c (registers_to_string): Likewise.
960 * remote-utils.c (decode_M_packet): Likewise.
961 * server.c (process_serial_event): Likewise.
962
ff0e980e
TT
9632014-02-12 Tom Tromey <tromey@redhat.com>
964
965 * server.c (handle_query, handle_v_run): Use hex2bin, not
966 unhexify.
967 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
968
e9371aff
TT
9692014-02-12 Tom Tromey <tromey@redhat.com>
970
971 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
972 convert_int_to_ascii.
973 * regcache.c (registers_to_string, collect_register_as_string):
974 Likewise.
975 * remote-utils.c (look_up_one_symbol, relocate_instruction):
976 Likewise.
977 * server.c (process_serial_event): Likewise.
978 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
979 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
980
971dc0b8
TT
9812014-02-12 Tom Tromey <tromey@redhat.com>
982
983 * remote-utils.c (look_up_one_symbol, monitor_output): Use
984 bin2hex, not hexify.
985 * tracepoint.c (cmd_qtstatus): Likewise.
986
0a822afb
TT
9872014-02-12 Tom Tromey <tromey@redhat.com>
988
989 * remote-utils.c (monitor_output): Pass explicit length to
990 hexify.
991
9c3d6531
TT
9922014-02-12 Tom Tromey <tromey@redhat.com>
993
994 * tracepoint.c: Include rsp-low.h.
995 * server.c: Include rsp-low.h.
996 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
997 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
998 declare.
999 * remote-utils.c: Include rsp-low.h.
1000 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1001 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1002 (convert_int_to_ascii, convert_ascii_to_int): Move to
1003 common/rsp-low.c.
1004 * regcache.c: Include rsp-low.h.
1005 * ax.c: Include rsp-low.h.
1006 * Makefile.in (SFILES): Add common/rsp-low.c.
1007 (OBS): Add rsp-low.o.
1008 (rsp-low.o): New target.
1009
01fd3ea5
TT
10102014-02-12 Tom Tromey <tromey@redhat.com>
1011
1012 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1013 Include print-utils.h.
1014 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1015 (plongest, thirty_two, phex_nz): Remove.
1016 * Makefile.in (SFILES): Add common/print-utils.c.
1017 (OBS): Add print-utils.o.
1018 (print-utils-ipa.o): New target.
1019 (print-utils.o): New target.
1020 (IPA_OBJS): Add print-utils-ipa.o.
1021
e99dc820
TT
10222014-02-06 Tom Tromey <tromey@redhat.com>
1023
1024 * Makefile.in (SFILES): Fix indentation.
1025
ee1e2d4f
DE
10262014-02-05 Doug Evans <dje@google.com>
1027
1028 * linux-low.c (linux_wait_for_event): Improve comment.
1029 (linux_wait_1): Keep current_inferior in sync with event_child.
1030
f5a02773
DE
10312014-01-22 Doug Evans <dje@google.com>
1032
1033 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1034
87ce2a04
DE
10352014-01-22 Doug Evans <dje@google.com>
1036
1037 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1038 * configure: Regenerate.
1039 * config.in: Regenerate.
1040 * Makefile.in (SFILES): Add debug.c.
1041 (OBS): Add debug.o.
1042 * debug.c: New file.
1043 * debug.h: New file.
1044 * linux-aarch64-low.c (*): Update all debugging printfs to use
1045 debug_printf instead of fprintf.
1046 * linux-arm-low.c (*): Ditto.
1047 * linux-cris-low.c (*): Ditto.
1048 * linux-crisv32-low.c (*): Ditto.
1049 * linux-m32r-low.c (*): Ditto.
1050 * linux-sparc-low.c (*): Ditto.
1051 * linux-x86.c (*): Ditto.
1052 * linux-low.c (*): Ditto.
1053 (linux_wait_1): Add calls to debug_enter, debug_exit.
1054 (linux_wait): Remove redundant debugging printf.
1055 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1056 (linux_resume, unstop_all_lwps): Ditto.
1057 * mem-break.c (*): Update all debugging printfs to use
1058 debug_printf instead of fprintf.
1059 * remote-utils.c (*): Ditto.
1060 * thread-db.c (*): Ditto.
1061 * server.c #include <ctype.h>, "gdb_vecs.h".
1062 (debug_threads): Moved to debug.c.
1063 (*): Update all debugging printfs to use debug_printf instead of
1064 fprintf.
1065 (start_inferior): Replace call to fflush with call to debug_flush.
1066 (monitor_show_help): Mention set debug-format.
1067 (parse_debug_format_options): New function.
1068 (handle_monitor_command): Handle "monitor set debug-format".
1069 (gdbserver_usage): Mention --debug-format.
1070 (main): Parse --debug-format.
1071 * server.h (debug_threads): Declaration moved to debug.h.
1072 #include "debug.h".
1073 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1074 trace_debug_1 that uses debug_printf.
1075 (tracepoint_look_up_symbols): Update all debugging printfs to use
1076 debug_printf instead of fprintf.
1077
e671835b
BS
10782014-01-20 Baruch Siach <baruch@tkos.co.il>
1079
1080 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1081 sys/ptrace.h.
1082
b5737fa9
PA
10832014-01-17 Pedro Alves <palves@redhat.com>
1084
ea38d2a9 1085 PR build/16445
c7faa97a
PA
1086 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1087 defined after including gdb_proc_service.h.
b5737fa9 1088
40ed484e
DE
10892014-01-16 Doug Evans <dje@google.com>
1090
1091 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1092 (match_dll): Use it.
1093
969c39fb
MM
10942014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1095
1096 * target.h (target_ops) <read_btrace>: Change parameters and
1097 return type to allow error reporting.
1098 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1099 trace reading errors on.
1100 * linux-low.c (linux_low_read_btrace): Pass trace reading
1101 errors on.
1102 (linux_low_disable_btrace): New.
1103
ab7f45ba
DE
11042014-01-15 Doug Evans <dje@google.com>
1105
1106 * inferiors.c (thread_id_to_gdb_id): Delete.
1107 * inferiors.h (thread_id_to_gdb_id): Delete.
1108
66af0f44
EZ
11092014-01-13 Eli Zaretskii <eliz@gnu.org>
1110
1111 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1112 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1113 versions.
1114
9939e131
PA
11152014-01-08 Pedro Alves <palves@redhat.com>
1116
1117 * server.c (handle_status): Don't discard previous queued stop
1118 replies or thread's pending status here.
1119 (main) <disconnection>: Do it here instead.
1120
b7ea362b
PA
11212014-01-08 Pedro Alves <palves@redhat.com>
1122
1123 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1124 * server.c (visit_actioned_threads, handle_pending_status): New
1125 function.
1126 (handle_v_cont): Factor out parts to ...
1127 (resume): ... this new function. If in all-stop, and a thread
1128 being resumed has a pending status, report it without actually
1129 resuming.
1130 (myresume): Adjust to use the new 'resume' function.
1131 (clear_pending_status_callback, set_pending_status_callback)
1132 (find_status_pending_thread_callback): New functions.
1133 (handle_status): Handle the case of multiple threads having
1134 interesting statuses to report. Report threads' real last signal
1135 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1136 with an interesting thread to report the status for, instead of
1137 always reporting the status of the first thread.
1138
28498c42
JB
11392014-01-01 Joel Brobecker <brobecker@adacore.com>
1140
1141 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1142 * gdbreplay.c (gdbreplay_version): Likewise.
1143
f45c82da
YZ
11442013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1145
1146 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1147 iov.iov_len with the real length in use.
1148
379a5e2d
JB
11492013-12-13 Joel Brobecker <brobecker@adacore.com>
1150
1151 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1152 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1153 for all targets that use win32-low.c.
1154 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1155 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1156
4210d83e
PA
11572013-12-13 Pedro Alves <palves@redhat.com>
1158
1159 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1160 if equal to TARGET_WAITKIND_LOADED.
1161 * win32-low.c (cached_status): New static global.
1162 (win32_wait): Add declaration.
1163 (do_initial_child_stuff): Flush all initial pending debug events
1164 up to the initial breakpoint.
1165 (win32_wait): If CACHED_STATUS was set, return that instead
1166 of doing a real wait. Remove the code resuming the execution
1167 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1168 during the initial phase. Also remove the code changing
1169 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1170 TARGET_WAITKIND_STOPPED.
1171
e7f0d979
YQ
11722013-12-11 Yao Qi <yao@codesourcery.com>
1173
1174 * notif.c (handle_notif_ack): Return 0 if no notification
1175 matches.
1176
ebcf782c
DE
11772013-11-20 Doug Evans <dje@google.com>
1178
1179 * linux-low.c (linux_set_resume_request): Fix comment.
1180
20ad9378
DE
11812013-11-20 Doug Evans <dje@google.com>
1182
1183 * linux-low.c (resume_status_pending_p): Tweak comment.
1184
a196ebeb
WT
11852013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1186
1187 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1188 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1189 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1190 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1191 (srv_amd64_regobj): Add amd64-mpx.o.
1192 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1193 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1194 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1195 * i387-fp.c (num_pl_bnd_register) Added constant.
1196 (num_pl_bnd_cfg_registers) Added constant.
1197 (struct i387_xsave) Added reserved area and MPX fields.
1198 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1199 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1200 function.
1201 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1202 (init_registers_amd64_mpx_linux): Declare new function.
1203 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1204 (x86_64_regmap): Add MPX registers.
1205 (x86_linux_read_description): Add MPX case.
1206 (initialize_low_arch): Initialize MPX targets.
1207
0080a2f6
TT
12082013-11-18 Tom Tromey <tromey@redhat.com>
1209
1210 * configure: Rebuild.
1211 * configure.ac: Don't check for stdlib.h.
1212 * gdbreplay.c: Unconditionally include stdlib.h.
1213
2978b111
TT
12142013-11-18 Tom Tromey <tromey@redhat.com>
1215
1216 * config.in: Rebuild.
1217 * configure: Rebuild.
1218 * configure.ac: Don't use AC_HEADER_DIRENT.
1219
a3d08894
TT
12202013-11-18 Tom Tromey <tromey@redhat.com>
1221
1222 * server.h: Don't check HAVE_STRING_H.
1223 * gdbreplay.c: Don't check HAVE_STRING_H.
1224 * configure: Rebuild.
1225
0a5dd17d
TT
12262013-11-18 Tom Tromey <tromey@redhat.com>
1227
1228 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1229 LIBGNU.
1230
1bd2f0ba
TT
12312013-11-08 Tom Tromey <tromey@redhat.com>
1232
1233 * configure, config.in: Rebuild.
1234 * configure.ac: Remove unused configury.
1235
3266f10b
TT
12362013-11-08 Tom Tromey <tromey@redhat.com>
1237
1238 * acinclude.m4: Include common.m4, codeset.m4.
1239 * configure, config.in: Rebuild.
1240 * configure.ac: Use GDB_AC_COMMON.
1241
6682d959
AA
12422013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1243
1244 * linux-s390-low.c (HWCAP_S390_TE): New define.
1245 (s390_arch_setup): Consider the TE field in the HWCAP for
1246 determining 'have_regset_tdb'.
1247
fd0a4d76
SDJ
12482013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1249
1250 PR gdb/16014
1251 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1252 call to sizeof.
1253
1a3d890b
PA
12542013-10-02 Pedro Alves <palves@redhat.com>
1255
1256 * server.c (process_serial_event): Don't output "GDBserver
1257 exiting" if GDB is connected through stdio.
1258 * target.c (mywait): Likewise, be silent if GDB is connected
1259 through stdio.
1260
97ad4581
JB
12612013-10-01 Joel Brobecker <brobecker@adacore.com>
1262
1263 * lynx-low.c (lynx_add_threads_after_attach): New function.
1264 (lynx_attach): Remove call to add_thread. Add call to
1265 lynx_add_threads_after_attach instead.
1266
5b4e221c
MF
12672013-09-28 Mike Frysinger <vapier@gentoo.org>
1268
1269 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1270 * config.in, configure: Regenerated.
1271
ee47b2f8
YQ
12722013-09-18 Yao Qi <yao@codesourcery.com>
1273
1274 PR server/15959
1275 * server.c (start_inferior): Clear 'resume_info'.
1276
d6707650 12772013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1278
d6707650
JW
1279 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1280 for each register.
1281
9243dd0e 12822013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1283
9243dd0e
JW
1284 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1285 linux-tile-low.o to srv_tgtobj.
1286
c623a6ef
WN
12872013-09-16 Will Newton <will.newton@linaro.org>
1288
1289 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1290 out regs.
1291
fb71d39e
PA
12922013-09-06 Pedro Alves <palves@redhat.com>
1293
1294 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1295 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1296 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1297 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1298 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1299 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1300
8e7e9910
PA
13012013-09-06 Pedro Alves <palves@redhat.com>
1302
1303 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1304 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1305
7c3a12ca
PA
13062013-09-06 Pedro Alves <palves@redhat.com>
1307
1308 * linux-amd64-ipa.c: Include tracepoint.h.
1309 * linux-i386-ipa.c: Include tracepoint.h.
1310
8eb3d7b6
RW
13112013-09-06 Ricard Wanderlof <ricardw@axis.com>
1312
1313 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1314 (ps_get_thread_area): New function.
1315
eddddb9d
RW
13162013-09-06 Ricard Wanderlof <ricardw@axis.com>
1317
1318 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1319 (initialize_low_arch): Call init_registers_crisv32 rather than
1320 init_register_crisv32.
1321
533b0600
PA
13222013-09-05 Pedro Alves <palves@redhat.com>
1323
1324 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1325 to ...
1326 * hostio.h: ... this new file.
1327 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1328 win32-low.c: Include hostio.h.
1329
0ce3d3b5
PA
13302013-09-05 Pedro Alves <palves@redhat.com>
1331
1332 * server.h (gdb_client_data, handler_func, callback_handler_func)
1333 (delete_file_handler, add_file_handler, append_callback_event)
1334 (delete_callback_event, start_event_loop, initialize_event_loop):
1335 Move to event-loop.h and include it.
1336 * event-loop.h: New file.
1337
799cdc37
PA
13382013-09-05 Pedro Alves <palves@redhat.com>
1339
1340 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1341 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1342 (loaded_dll, unloaded_dll): Move to ...
1343 * dll.h: ... this new file.
1344 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1345
6a6bbd9d
PA
13462013-09-05 Pedro Alves <palves@redhat.com>
1347
1348 * server.h (current_process, get_thread_process, all_processes)
1349 (add_inferior_to_list, for_each_inferior, current_inferior)
1350 (remove_inferior, add_process, remove_process, find_process_pid)
1351 (have_started_inferiors_p, have_attached_inferiors_p)
1352 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1353 (clear_inferiors, find_inferior, find_inferior_id)
1354 (inferior_target_data, set_inferior_target_data)
1355 (inferior_regcache_data, set_inferior_regcache_data): Move to
1356 inferiors.h, and include it.
1357 * inferiors.h: New file.
1358
f699aaba
PA
13592013-09-05 Pedro Alves <palves@redhat.com>
1360
1361 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1362 Move ...
1363 * ax.h: ... here.
1364
c144c7a0
PA
13652013-09-05 Pedro Alves <palves@redhat.com>
1366
1367 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1368 tracepoint.h.
1369 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1370 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1371 (handle_tracepoint_general_set, handle_tracepoint_query)
1372 (tracepoint_finished_step, tracepoint_was_hit)
1373 (release_while_stepping_state_list, current_traceframe)
1374 (in_readonly_region, traceframe_read_mem)
1375 (fetch_traceframe_registers, traceframe_read_sdata)
1376 (traceframe_read_info, struct fast_tpoint_collect_status)
1377 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1378 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1379 (supply_fast_tracepoint_registers)
1380 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1381 (ipa_tdesc, claim_trampoline_space)
1382 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1383 (agent_mem_read, agent_get_trace_state_variable_value)
1384 (agent_set_trace_state_variable_value, agent_tsv_read)
1385 (agent_mem_read_string, get_raw_reg_func_addr)
1386 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1387 * tracepoint.h: ... this new file.
1388
ff42e6ab
PA
13892013-09-05 Pedro Alves <palves@redhat.com>
1390
1391 * server.h (perror_with_name, error, fatal, warning, paddress)
1392 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1393 include it.
1394 * utils.h: New file.
1395
541af0f4
PA
13962013-09-05 Pedro Alves <palves@redhat.com>
1397
1398 * server.h (remote_debug, noack_mode, transport_is_reliable)
1399 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1400 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1401 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1402 (write_enn, initialize_async_io, enable_async_io)
1403 (disable_async_io, check_remote_input_interrupt_request)
1404 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1405 (dead_thread_notify, prepare_resume_reply)
1406 (decode_address_to_semicolon, decode_address, decode_m_packet)
1407 (decode_M_packet, decode_X_packet, decode_xfer_write)
1408 (decode_search_memory_packet, unhexify, hexify)
1409 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1410 (look_up_one_symbol, relocate_instruction)
1411 (monitor_output): Move to remote-utils.h, and include it.
1412 * remote-utils.h: New file.
1413
eebdf26b
PA
14142013-09-05 Pedro Alves <palves@redhat.com>
1415
1416 * server.h (_): Delete.
1417
3aafd2ff
PA
14182013-09-02 Pedro Alves <palves@redhat.com>
1419
1420 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1421 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1422 allocated.
1423 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1424
cee83bcb
PM
14252013-09-02 Pierre Muller <muller@sourceware.org>
1426
1427 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1428 or WriteProcessMemory complete successfully and handle
1429 ERROR_PARTIAL_COPY error.
1430
9a13b2fa
PA
14312013-09-02 Pedro Alves <palves@redhat.com>
1432
1433 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1434 error instead of EIO.
1435
602e3198
JK
14362013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1437
1438 PR server/15604
1439 * linux-low.c: Include filestuff.h.
1440 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1441 * lynx-low.c: Include filestuff.h.
1442 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1443 * server.c: Include filestuff.h.
1444 (main): Call notice_open_fds.
1445 * spu-low.c: Include filestuff.h.
1446 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1447
96d7229d
LM
14482013-08-22 Luis Machado <lgustavo@codesourcery.com>
1449
1450 * Makefile.in: Explain why ../target and ../nat are not
1451 listed as include file search paths.
1452 (linux-waitpid.o): New object file rule.
1453 * configure.srv (srv_native_linux_obj): New variable.
1454 Replace all occurrences of linux native object files with
1455 $srv_native_linux_obj.
1456 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1457 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1458 (linux_enable_event_reporting): Remove declaration.
1459 (my_waitpid): Moved to common/linux-waitpid.c.
1460 (linux_wait_for_event): Pass ptid when calling
1461 linux_enable_event_reporting.
1462 (linux_supports_tracefork_flag): Remove.
1463 (linux_enable_event_reporting): Likewise.
1464 (linux_tracefork_grandchild): Remove.
1465 (STACK_SIZE): Moved to common/linux-ptrace.c.
1466 (linux_tracefork_child): Remove.
1467 (linux_test_for_tracefork): Remove.
1468 (linux_look_up_symbols): Call linux_supports_traceclone.
1469 (initialize_low): Remove call to linux_test_for_tracefork.
1470 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1471 common/linux-ptrace.h.
1472 (PTRACE_TYPE_ARG4): Likewise.
1473 Include linux-ptrace.h.
1474
32940073
PA
14752013-08-21 Pedro Alves <palves@redhat.com>
1476
1477 * config.in: Renegerate.
1478
33b60d58 14792013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 1480
33b60d58
LM
1481 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1482 (SFILES): Remove $(srcdir)/common/target-common.c and
1483 add $(srcdir)/target/waitstatus.c.
1484 (OBS): Remove target-common.o and add waitstatus.o.
1485 (server_h): Remove $(srcdir)/../common/target-common.h and
1486 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1487 and $(srcdir)/../target/waitstatus.h.
1488 (target-common.o): Remove.
1489 (waitstatus.o): New target object file.
1490 * target.h: Do not include target-common.h and
1491 include target/resume.h, target/wait.h and
1492 target/waitstatus.h.
1493
b8e1b30e
LM
14942013-08-13 Luis Machado <lgustavo@codesourcery.com>
1495
1496 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1497 to PTRACE_TYPE_ARG3.
1498 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1499 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1500 PTRACE_TYPE_ARG4.
1501 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1502 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1503
7a60ad40
YQ
15042013-07-27 Jie Zhang <jie@codesourcery.com>
1505 Daniel Jacobowitz <dan@codesourcery.com>
1506 Yao Qi <yao@codesourcery.com>
1507
1508 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1509 (mips-linux-watch.o): New rule.
1510 (mips_linux_watch_h): New variable.
1511 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1512 srv_tgtobj.
1513 * linux-mips-low.c: Include mips-linux-watch.h.
1514 (struct arch_process_info, struct arch_lwp_info): New.
1515 (update_watch_registers_callback): New function.
1516 (mips_linux_new_process, mips_linux_new_thread) New functions.
1517 (mips_linux_prepare_to_resume, mips_insert_point): New
1518 functions.
1519 (mips_remove_point, mips_stopped_by_watchpoint): New
1520 functions.
1521 (rsp_bp_type_to_target_hw_bp_type): New function.
1522 (mips_stopped_data_address): New function.
1523 (the_low_target): Add watchpoint support functions.
1524
de6f69ad
YQ
15252013-07-27 Yao Qi <yao@codesourcery.com>
1526
1527 * i386-low.c: Include break-common.h.
1528 (enum target_hw_bp_type): Remove.
1529
3360c0bf
LM
15302013-07-24 Luis Machado <lgustavo@codesourcery.com>
1531
1532 * Makefile.in (SFILES): /common/target-common.c.
1533 (OBS): Add target-common.o.
1534 (server_h): Add $(srcdir)/../common/target-common.h.
1535 (target-common.o): New target.
1536 * server.c (queue_stop_reply_callback): Free
1537 status string after use.
1538 * target.c (target_waitstatus_to_string): Remove.
1539 * target.h: Include target-common.h.
1540 (resume_kind): Likewise.
1541 (target_waitkind): Likewise.
1542 (target_waitstatus): Likewise.
1543 (TARGET_WNOHANG): Likewise.
1544
bd885420
YQ
15452013-07-04 Yao Qi <yao@codesourcery.com>
1546
1547 * Makefile.in (host_alias): Use @host_noncanonical@.
1548 (target_alias): Use @target_noncanonical@.
1549 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1550 ACX_NONCANONICAL_HOST.
1551 * configure: Regenerated.
1552
1553 Revert:
1554 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1555
1556 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1557 * configure: Rebuild.
1558 * Makefile.in (version_host, version_target): Get from configure.
1559 (version.c): Use $(version_host) and $(version_target).
1560
17ef446e
PA
15612013-07-03 Pedro Alves <palves@redhat.com>
1562
1563 * Makefile.in (config.status): Depend on development.sh.
1564 * acinclude.m4: Include libmcheck.m4.
1565 * configure: Regenerate.
1566
7a9a7487
MG
15672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1568
1569 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1570 attribute inside the parentheses.
1571 (winapi_DebugSetProcessKillOnExit): Ditto.
1572 (winapi_DebugBreakProcess): Ditto.
1573 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 1574
49b64de6
MG
15752013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1576
1577 * notif.h (notif_event): Add a dummy member to avoid compiler
1578 errors.
1579
d5749ee7
PA
15802013-07-01 Pedro Alves <palves@redhat.com>
1581
1582 * hostio.c (HOSTIO_PATH_MAX): Define.
1583 (require_filename, handle_open, handle_unlink, handle_readlink):
1584 Use it.
1585
d8d2a3ee
PA
15862013-07-01 Pedro Alves <palves@redhat.com>
1587
1588 * server.h: Include "pathmax.h".
1589 * linux-low.c: Don't include sys/param.h.
1590 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1591 MAXPATHLEN.
1592 * win32-low.c: Don't include sys/param.h.
1593 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1594
bc7dea8d
PA
15952013-07-01 Pedro Alves <palves@redhat.com>
1596
1597 * event-loop.c: Don't check HAVE_UNISTD_H before including
1598 <unistd.h>.
1599 * gdbreplay.c: Likewise.
1600 * remote-utils.c: Likewise.
1601 * server.c: Likewise.
1602 * configure.ac: Don't check for unistd.h.
1603 * configure: Regenerate.
1604
d6c2da54
TT
16052013-06-28 Tom Tromey <tromey@redhat.com>
1606
1607 * Makefile.in (version.c): Use version.in, not
1608 common/version.in.
1609
257b6bec
MG
16102013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1611
1612 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1613 * configure: Rebuild.
1614 * Makefile.in (version_host, version_target): Get from configure.
1615 (version.c): Use $(version_host) and $(version_target).
1616
86ebe149
DK
16172013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1618
1619 Fix trace-status to output user name without trailing colon.
1620 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1621
f30aa5af
DK
16222013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1623
1624 Fix trace-status to output proper start-time and stop-time.
1625 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1626 output start time and stop time in hex as gdb expects.
1627
28a93511
YQ
16282013-06-26 Pedro Alves <pedro@codesourcery.com>
1629
1630 * tracepoint.c (build_traceframe_info_xml): Output trace state
1631 variables present in the trace buffer.
1632
01208463
TT
16332013-06-24 Tom Tromey <tromey@redhat.com>
1634
1635 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1636 create-version.sh.
1637 (version.o): Remove.
1638 * gdbreplay.c: Include version.h.
1639 (version, host_name): Don't declare.
1640 * server.h: Include version.h.
1641 (version, host_name): Don't declare.
1642
760256f9
PA
16432013-06-12 Pedro Alves <palves@redhat.com>
1644
1645 * linux-x86-low.c (linux_is_elf64): Delete global.
1646 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1647 with local linux_pid_exe_is_elf_64_file use.
1648
030031ee
PA
16492013-06-11 Pedro Alves <palves@redhat.com>
1650
1651 * linux-low.c (regset_disabled, disable_regset): New functions.
1652 (regsets_fetch_inferior_registers)
1653 (regsets_store_inferior_registers): Use them.
1654 (initialize_regsets_info); Don't allocate the disabled_regsets
1655 array here.
1656 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1657 comment.
1658
5da6eb0a
PA
16592013-06-11 Pedro Alves <palves@redhat.com>
1660
1661 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1662 xmalloc.
1663
7e5aaa09
PA
16642013-06-11 Pedro Alves <palves@redhat.com>
1665
1666 * linux-x86-low.c (initialize_low_arch): Call
1667 init_registers_x32_avx_linux.
1668
d878444c
JK
16692013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1670
1671 Fix compatibility with Android Bionic.
1672 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1673 it is not empty.
1674
3aee8918
PA
16752013-06-07 Pedro Alves <palves@redhat.com>
1676
5f2b57b5 1677 PR server/14823
3aee8918
PA
1678 * Makefile.in (OBS): Add tdesc.o.
1679 (IPA_OBJS): Add tdesc-ipa.o.
1680 (tdesc-ipa.o): New rule.
1681 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1682 interface.
1683 * linux-low.c (new_inferior): Delete.
1684 (disabled_regsets, num_regsets): Delete.
1685 (linux_add_process): Adjust to set the new per-process
1686 new_inferior flag.
1687 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1688 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1689 was a stop. When calling arch_setup, switch the current inferior
1690 to the thread that got an event.
1691 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1692 (regsets_fetch_inferior_registers)
1693 (regsets_store_inferior_registers): New regsets_info parameter.
1694 Adjust to use it.
1695 (linux_register_in_regsets): New regs_info parameter. Adjust to
1696 use it.
1697 (register_addr, fetch_register, store_register): New usrregs_info
1698 parameter. Adjust to use it.
1699 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1700 parameter regs_info. Adjust to use it.
1701 (linux_fetch_registers): Get the current inferior's regs_info, and
1702 adjust to use it.
1703 (linux_store_registers): Ditto.
1704 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1705 (initialize_low): Don't initialize the target_regsets here. Call
1706 initialize_low_arch.
1707 * linux-low.h (target_regsets): Delete declaration.
1708 (struct regsets_info): New.
1709 (struct usrregs_info): New.
1710 (struct regs_info): New.
1711 (struct process_info_private) <new_inferior>: New field.
1712 (struct linux_target_ops): Delete the num_regs, regmap, and
1713 regset_bitmap fields. New field regs_info.
1714 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1715 * i387-fp.c (num_xmm_registers): Delete.
1716 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1717 calls to new interface.
1718 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1719 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1720 Infer the number of xmm registers from the regcache's target
1721 description.
1722 * i387-fp.h (num_xmm_registers): Delete.
1723 * inferiors.c (add_thread): Don't install the thread's regcache
1724 here.
1725 * proc-service.c (gregset_info): Fetch the current inferior's
1726 regs_info. Adjust to use it.
1727 * regcache.c: Include tdesc.h.
1728 (register_bytes, reg_defs, num_registers)
1729 (gdbserver_expedite_regs): Delete.
1730 (get_thread_regcache): If the thread doesn't have a regcache yet,
1731 create one, instead of aborting gdbserver.
1732 (regcache_invalidate_one): Rename to ...
1733 (regcache_invalidate_thread): ... this.
1734 (regcache_invalidate_one): New.
1735 (regcache_invalidate): Only invalidate registers of the current
1736 process.
1737 (init_register_cache): Add target_desc parameter, and use it.
1738 (new_register_cache): Ditto. Assert the target description has a
1739 non zero registers_size.
1740 (regcache_cpy): Add assertions. Adjust.
1741 (realloc_register_cache, set_register_cache): Delete.
1742 (registers_to_string, registers_from_string): Adjust.
1743 (find_register_by_name, find_regno, find_register_by_number)
1744 (register_cache_size): Add target_desc parameter, and use it.
1745 (free_register_cache_thread, free_register_cache_thread_one)
1746 (regcache_release, register_cache_size): New.
1747 (register_size): Add target_desc parameter, and use it.
1748 (register_data, supply_register, supply_register_zeroed)
1749 (supply_regblock, supply_register_by_name, collect_register)
1750 (collect_register_as_string, collect_register_by_name): Adjust.
1751 * regcache.h (struct target_desc): Forward declare.
1752 (struct regcache) <tdesc>: New field.
1753 (init_register_cache, new_register_cache): Add target_desc
1754 parameter.
1755 (regcache_invalidate_thread): Declare.
1756 (regcache_invalidate_one): Delete declaration.
1757 (regcache_release): Declare.
1758 (find_register_by_number, register_cache_size, register_size)
1759 (find_regno): Add target_desc parameter.
1760 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1761 declarations.
1762 * remote-utils.c: Include tdesc.h.
1763 (outreg, prepare_resume_reply): Adjust.
1764 * server.c: Include tdesc.h.
1765 (gdbserver_xmltarget): Delete declaration.
1766 (get_features_xml, process_serial_event): Adjust.
1767 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1768 declare.
1769 (struct process_info) <tdesc>: New field.
1770 (ipa_tdesc): Declare.
1771 * tdesc.c: New file.
1772 * tdesc.h: New file.
1773 * tracepoint.c: Include tdesc.h.
1774 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1775 (get_context_regcache): Adjust to pass ipa_tdesc down.
1776 (do_action_at_tracepoint): Adjust to get the register cache size
1777 from the context regcache's description.
1778 (traceframe_walk_blocks): Adjust to get the register cache size
1779 from the current trace frame's description.
1780 (traceframe_get_pc): Adjust to get current trace frame's
1781 description and pass it down.
1782 (gdb_collect): Adjust to get the register cache size from the
1783 IPA's description.
1784 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1785 (gdbserver_xmltarget): Delete.
1786 (initialize_low_tracepoint): Set the ipa's target description.
1787 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1788 (initialize_low_tracepoint): Set the ipa's target description.
1789 * linux-x86-low.c: Include tdesc.h.
1790 [__x86_64__] (is_64bit_tdesc): New.
1791 (ps_get_thread_area, x86_get_thread_area): Use it.
1792 (i386_cannot_store_register): Rename to ...
1793 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1794 (i386_cannot_fetch_register): Rename to ...
1795 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1796 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1797 to new interface.
1798 (target_regsets): Rename to ...
1799 (x86_regsets): ... this.
1800 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1801 interface.
1802 (x86_siginfo_fixup): Use is_64bit_tdesc.
1803 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1804 (tdesc_x32_avx_linux, tdesc_x32_linux)
1805 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1806 Declare.
1807 (x86_linux_update_xmltarget): Delete.
1808 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1809 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1810 (AMD64_LINUX_USER64_CS): New.
1811 (x86_linux_read_description): New, based on
1812 x86_linux_update_xmltarget.
1813 (same_process_callback): New.
1814 (x86_arch_setup_process_callback): New.
1815 (x86_linux_update_xmltarget): New.
1816 (x86_regsets_info): New.
1817 (amd64_linux_regs_info): New.
1818 (i386_linux_usrregs_info): New.
1819 (i386_linux_regs_info): New.
1820 (x86_linux_regs_info): New.
1821 (x86_arch_setup): Reimplement.
1822 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1823 (x86_emit_ops): Ditto.
1824 (the_low_target): Adjust. Install x86_linux_regs_info,
1825 x86_cannot_fetch_register, and x86_cannot_store_register.
1826 (initialize_low_arch): New.
1827 * linux-ia64-low.c (tdesc_ia64): Declare.
1828 (ia64_fetch_register): Adjust.
1829 (ia64_usrregs_info, regs_info): New globals.
1830 (ia64_regs_info): New function.
1831 (the_low_target): Adjust.
1832 (initialize_low_arch): New function.
1833 * linux-sparc-low.c (tdesc_sparc64): Declare.
1834 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1835 Adjust.
1836 (sparc_arch_setup): New function.
1837 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1838 (the_low_target): Adjust.
1839 (initialize_low_arch): New function.
1840 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1841 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1842 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1843 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1844 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1845 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1846 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1847 (tdesc_powerpc_isa205_vsx64l): Declare.
1848 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1849 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1850 (ppc_set_pc, ppc_get_hwcap): Adjust.
1851 (ppc_usrregs_info): Forward declare.
1852 (!__powerpc64__) ppc_regmap_adjusted: New global.
1853 (ppc_arch_setup): Adjust to the current process'es target
1854 description.
1855 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1856 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1857 (ppc_store_evrregset): Adjust.
1858 (target_regsets): Rename to ...
1859 (ppc_regsets): ... this, and make static.
1860 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1861 (ppc_regs_info): New function.
1862 (the_low_target): Adjust.
1863 (initialize_low_arch): New function.
1864 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1865 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1866 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1867 (tdesc_s390x_linux64v2): Declare.
1868 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1869 (s390_fill_gregset, s390_store_last_break): Adjust.
1870 (target_regsets): Rename to ...
1871 (s390_regsets): ... this, and make static.
1872 (s390_get_pc, s390_set_pc): Adjust.
1873 (s390_get_hwcap): New target_desc parameter, and use it.
1874 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1875 (s390_arch_setup): Adjust to set the current process'es target
1876 description. Don't adjust the regmap.
1877 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1878 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1879 (regs_info_3264): New globals.
1880 (s390_regs_info): New function.
1881 (the_low_target): Adjust.
1882 (initialize_low_arch): New function.
1883 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1884 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1885 [__mips64] (init_registers_mips_linux)
1886 (init_registers_mips_dsp_linux): Delete defines.
1887 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1888 (have_dsp): New global.
1889 (mips_read_description): New, based on mips_arch_setup.
1890 (mips_arch_setup): Reimplement.
1891 (get_usrregs_info): New function.
1892 (mips_cannot_fetch_register, mips_cannot_store_register)
1893 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1894 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1895 (target_regsets): Rename to ...
1896 (mips_regsets): ... this, and make static.
1897 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1898 (dsp_regs_info, regs_info): New globals.
1899 (mips_regs_info): New function.
1900 (the_low_target): Adjust.
1901 (initialize_low_arch): New function.
1902 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1903 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1904 Declare.
1905 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1906 (arm_read_description): New, with bits factored from
1907 arm_arch_setup.
1908 (arm_arch_setup): Reimplement.
1909 (target_regsets): Rename to ...
1910 (arm_regsets): ... this, and make static.
1911 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1912 (arm_regs_info): New function.
1913 (the_low_target): Adjust.
1914 (initialize_low_arch): New function.
1915 * linux-m68k-low.c (tdesc_m68k): Declare.
1916 (target_regsets): Rename to ...
1917 (m68k_regsets): ... this, and make static.
1918 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1919 (m68k_regs_info): New function.
1920 (m68k_arch_setup): New function.
1921 (the_low_target): Adjust.
1922 (initialize_low_arch): New function.
1923 * linux-sh-low.c (tdesc_sharch): Declare.
1924 (target_regsets): Rename to ...
1925 (sh_regsets): ... this, and make static.
1926 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1927 (sh_regs_info, sh_arch_setup): New functions.
1928 (the_low_target): Adjust.
1929 (initialize_low_arch): New function.
1930 * linux-bfin-low.c (tdesc_bfin): Declare.
1931 (bfin_arch_setup): New function.
1932 (bfin_usrregs_info, regs_info): New globals.
1933 (bfin_regs_info): New function.
1934 (the_low_target): Adjust.
1935 (initialize_low_arch): New function.
1936 * linux-cris-low.c (tdesc_cris): Declare.
1937 (cris_arch_setup): New function.
1938 (cris_usrregs_info, regs_info): New globals.
1939 (cris_regs_info): New function.
1940 (the_low_target): Adjust.
1941 (initialize_low_arch): New function.
1942 * linux-cris-low.c (tdesc_crisv32): Declare.
1943 (cris_arch_setup): New function.
1944 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1945 (cris_regs_info): New function.
1946 (the_low_target): Adjust.
1947 (initialize_low_arch): New function.
1948 * linux-m32r-low.c (tdesc_m32r): Declare.
1949 (m32r_arch_setup): New function.
1950 (m32r_usrregs_info, regs_info): New globals.
1951 (m32r_regs_info): Adjust.
1952 (initialize_low_arch): New function.
1953 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1954 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1955 (tic6x_usrregs_info): Forward declare.
1956 (tic6x_read_description): New function, based on ...
1957 (tic6x_arch_setup): ... this. Reimplement.
1958 (target_regsets): Rename to ...
1959 (tic6x_regsets): ... this, and make static.
1960 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1961 (tic6x_regs_info): New function.
1962 (the_low_target): Adjust.
1963 (initialize_low_arch): New function.
1964 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1965 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1966 (target_regsets): Rename to ...
1967 (xtensa_regsets): ... this, and make static.
1968 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1969 globals.
1970 (xtensa_arch_setup, xtensa_regs_info): New functions.
1971 (the_low_target): Adjust.
1972 (initialize_low_arch): New function.
1973 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1974 (nios2_arch_setup): Set the current process'es tdesc.
1975 (target_regsets): Rename to ...
1976 (nios2_regsets): ... this.
1977 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1978 (nios2_regs_info): New function.
1979 (the_low_target): Adjust.
1980 (initialize_low_arch): New function.
a261b8f5
PA
1981 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1982 (aarch64_arch_setup): Set the current process'es tdesc.
1983 (target_regsets): Rename to ...
1984 (aarch64_regsets): ... this.
1985 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1986 (aarch64_regs_info): New function.
1987 (the_low_target): Adjust.
1988 (initialize_low_arch): New function.
3aee8918
PA
1989 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1990 globals.
1991 (target_regsets): Rename to ...
1992 (tile_regsets): ... this.
1993 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1994 (tile_regs_info): New function.
1995 (tile_arch_setup): Set the current process'es tdesc.
1996 (the_low_target): Adjust.
1997 (initialize_low_arch): New function.
1998 * spu-low.c (tdesc_spu): Declare.
1999 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2000 * win32-arm-low.c (tdesc_arm): Declare.
2001 (arm_arch_setup): New function.
2002 (the_low_target): Install arm_arch_setup instead of
2003 init_registers_arm.
2004 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2005 (init_windows_x86): Rename to ...
2006 (i386_arch_setup): ... this. Set `win32_tdesc'.
2007 (the_low_target): Adjust.
2008 * win32-low.c (win32_tdesc): New global.
2009 (child_add_thread): Don't create the thread cache here.
2010 (do_initial_child_stuff): Set the new process'es tdesc.
2011 * win32-low.h (struct target_desc): Forward declare.
2012 (win32_tdesc): Declare.
2013 * lynx-i386-low.c (tdesc_i386): Declare global.
2014 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2015 * lynx-low.c (lynx_tdesc): New global.
2016 (lynx_add_process): Set the new process'es tdesc.
2017 * lynx-low.h (struct target_desc): Forward declare.
2018 (lynx_tdesc): Declare global.
2019 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2020 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2021 * nto-low.c (nto_tdesc): New global.
2022 (do_attach): Set the new process'es tdesc.
2023 * nto-low.h (struct target_desc): Forward declare.
2024 (nto_tdesc): Declare.
2025 * nto-x86-low.c (tdesc_i386): Declare.
2026 (nto_x86_arch_setup): Set `nto_tdesc'.
2027
b1fbec62
GB
20282013-06-04 Gary Benson <gbenson@redhat.com>
2029
2030 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2031 to qSupported response when appropriate.
2032 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2033 with nonzero-length annex.
2034 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2035 arguments supplied in annex.
2036
d1ec4ce7
DE
20372013-05-31 Doug Evans <dje@google.com>
2038
ac44adcb 2039 PR server/15594
d1ec4ce7
DE
2040 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2041 64 bits in 64-cross-32 environment.
2042
9b25f2d3
PA
20432013-05-28 Pedro Alves <palves@redhat.com>
2044
2045 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2046 (aarch64-without-fpu.c): Delete rule.
2047 * configure.srv (aarch64*-*-linux*): Remove references to
2048 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2049 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2050 declaration.
2051
6740dc9c
PA
20522013-05-24 Pedro Alves <palves@redhat.com>
2053
2054 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2055 instead of strchr/decode_address. Error if the range isn't split
2056 with a ','. Don't assume there's be a ':' in the action.
2057
c2d6af84
PA
20582013-05-23 Yao Qi <yao@codesourcery.com>
2059 Pedro Alves <palves@redhat.com>
2060
2061 * linux-low.c (lwp_in_step_range): New function.
2062 (linux_wait_1): If the thread was range stepping and stopped
2063 outside the stepping range, report the stop to GDB. Otherwise,
2064 continue stepping. Add range stepping debug output.
2065 (linux_set_resume_request): Copy the step range from the resume
2066 request to the lwp.
2067 (linux_supports_range_stepping): New.
2068 (linux_target_ops) <supports_range_stepping>: Set to
2069 linux_supports_range_stepping.
2070 * linux-low.h (struct linux_target_ops)
2071 <supports_range_stepping>: New field.
2072 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2073 * linux-x86-low.c (x86_supports_range_stepping): New.
2074 (the_low_target) <supports_range_stepping>: Set to
2075 x86_supports_range_stepping.
2076 * server.c (handle_v_cont): Handle 'r' action.
2077 (handle_v_requests): Append ";r" if the target supports range
2078 stepping.
2079 * target.h (struct thread_resume) <step_range_start,
2080 step_range_end>: New fields.
2081 (struct target_ops) <supports_range_stepping>:
2082 New field.
2083 (target_supports_range_stepping): New macro.
2084
58794e1a
JB
20852013-05-17 Joel Brobecker <brobecker@adacore.com>
2086
2087 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2088 confusion in comment.
2089
d631c5a7
JB
20902013-05-17 Joel Brobecker <brobecker@adacore.com>
2091
2092 * lynx-low.c (struct process_info_private): New type.
2093 (lynx_add_process): New function.
2094 (lynx_create_inferior, lynx_attach): Replace calls to
2095 add_process by calls to lynx_add_process.
2096 (lynx_resume): If PTID is null, then try using
2097 current_process()->private->last_wait_event_ptid.
2098 Add comments.
2099 (lynx_clear_inferiors): Delete. The contents of that function
2100 has been inlined in lynx_mourn;
2101 (lynx_wait_1): Save the ptid in the process's private data.
2102 (lynx_mourn): Free the process' private data. Replace call
2103 to lynx_clear_inferiors by call to clear_inferiors.
2104
96f7a20f
YQ
21052013-05-17 Yao Qi <yao@codesourcery.com>
2106
2107 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2108 the right place.
2109
db0dfaa0
LM
21102013-05-16 Luis Machado <lgustavo@codesourcery.com>
2111
2112 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2113 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2114 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2115 PT_TEXT_END_ADDR guards. Update comments.
2116 (linux_target_op) <read_offsets>: Conditionally define to
2117 linux_read_offsets if the target is UCLIBC and if it defines
2118 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2119
68f5f838
SL
21202013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2121 Andrew Jenner <andrew@codesourcery.com>
2122
2123 * Makefile.in (SFILES): Add linux-nios2-low.c.
2124 (clean): Add action to delete nios2-linux.c.
2125 (nios2-linux.c): New rule.
2126 * configure.srv: Add nios2*-*-linux*.
2127 * linux-nios2-low.c: New.
2128
1ebff1fd
HAQ
21292013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2130
2131 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2132
f6150862
HZ
21332013-04-25 Hui Zhu <hui@codesourcery.com>
2134
2135 PR gdb/15186
f6150862
HZ
2136 * ax.c (ax_printf): Add fflush.
2137
614c279d
TT
21382013-04-22 Tom Tromey <tromey@redhat.com>
2139
2140 * Makefile.in (SFILES): Add filestuff.c.
2141 (OBS): Add filestuff.o.
2142 (filestuff.o): New target.
2143 * config.in, configure: Rebuild.
2144 * configure.ac: Check for fdwalk, pipe2.
2145
7d4e5717
PA
21462013-04-17 Pedro Alves <palves@redhat.com>
2147
2148 * configure.ac (USE_THREAD_DB): Delete variable.
2149 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2150 Don't AC_SUBST USE_THREAD_DB.
2151 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2152 * config.in, configure: Regenerate.
2153
d5c93e41
PA
21542013-04-16 Pedro Alves <palves@redhat.com>
2155
2156 * linux-low.h (struct lwp_info) <thread_known>: Move under
2157 the USE_THREAD_DB #ifdef.
2158
04f5fe89
PA
21592013-04-16 Pedro Alves <palves@redhat.com>
2160
2161 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2162 (linux-low.o): Delete rule.
2163 * linux-low.h: Always include "gdb_thread_db.h" instead of
2164 conditionally including thread_db.h.
2165 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2166 HAVE_THREAD_DB_H.
2167
480b27bf
JK
21682013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2169
2170 * Makefile.in (install-only): Fix make install regression.
2171
43662968
JK
21722013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2173
2174 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2175 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2176 installation.
2177 * gdbserver.1: Remove.
2178
3e74e146
PA
21792013-03-22 Pedro Alves <palves@redhat.com>
2180
2181 * linux-low.c (handle_extended_wait): Don't call
2182 linux_enable_event_reporting.
2183
a8347a2a
TT
21842013-03-15 Tony Theodore <tonyt@logyst.com>
2185
2186 PR build/9098:
2187 * Makefile.in (SHELL): Use @SHELL@.
2188
eeb56fa7
SDJ
21892013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2190
2191 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2192 compiler warning.
2193
4fa7e2ff
JB
21942013-03-13 Joel Brobecker <brobecker@adacore.com>
2195
2196 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2197 Remove extraneous NULL element.
2198
8ddb1965
YQ
21992013-03-13 Yao Qi <yao@codesourcery.com>
2200
2201 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2202 'V' block in trace frame.
2203
9accd112
MM
22042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2205
2206 * target.h (struct target_ops): Add btrace ops.
2207 (target_supports_btrace): New macro.
2208 (target_enable_btrace): New macro.
2209 (target_disable_btrace): New macro.
2210 (target_read_btrace): New macro.
2211 * gdbthread.h (struct thread_info): Add btrace field.
2212 * server.c: Include btrace-common.h.
2213 (handle_btrace_general_set): New function.
2214 (handle_btrace_enable): New function.
2215 (handle_btrace_disable): New function.
2216 (handle_general_set): Call handle_btrace_general_set.
2217 (handle_qxfer_btrace): New function.
2218 (struct qxfer qxfer_packets[]): Add btrace entry.
2219 * inferiors.c (remove_thread): Disable btrace.
2220 * linux-low: Include linux-btrace.h.
2221 (linux_low_enable_btrace): New function.
2222 (linux_low_read_btrace): New function.
2223 (linux_target_ops): Add btrace ops.
2224 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2225 Add srv_linux_btrace=yes.
2226 (x86_64-*-linux*): Add linux-btrace.o.
2227 Add srv_linux_btrace=yes.
2228 * configure.ac: Define HAVE_LINUX_BTRACE.
2229 * config.in: Regenerated.
2230 * configure: Regenerated.
2231
5cc22e4c
MM
22322013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2233
2234 * server.c (handle_qxfer): Preserve error message if -3 is
2235 returned.
2236 (qxfer): Document the -3 return value.
2237
7c97f91e
MM
22382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2239
2240 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2241 (linux_btrace_h): New variable.
2242 (linux-btrace.o): New rule.
2243
be9a119c 22442013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2245 Hafiz Abid Qadeer <abidh@codesourcery.com>
2246
2247 * tracepoint.c (trace_buffer_size): New global.
2248 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2249 (init_trace_buffer): Change to one-argument function. Allocate
2250 trace buffer memory.
2251 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2252 handle QTBuffer:size packet.
2253 (cmd_bigqtbuffer_size): New function.
2254 (initialize_tracepoint): Call init_trace_buffer with
2255 DEFAULT_TRACE_BUFFER_SIZE.
2256 * server.c (handle_query): Add QTBuffer:size in the
2257 supported packets.
2258
e64f7499
YQ
22592013-03-07 Yao Qi <yao@codesourcery.com>
2260
2261 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2262 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2263 of -1.
2264 (cmd_qtsp): Adjust condition. Do post increment.
2265 Set cur_action and cur_step_action back to 0.
2266
f0ae6fc3
PA
22672013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2268
2269 PR server/15236
2270 * linux-low.c (linux_write_memory): Return early success if LEN is
2271 zero.
2272
b5b0b0af
CV
22732013-03-05 Corinna Vinschen <vinschen@redhat.de>
2274
334ad4a8 2275 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2276
589bc927
TT
22772013-02-28 Tom Tromey <tromey@redhat.com>
2278
2279 * configure.ac: Invoke AC_SYS_LARGEFILE.
2280 * configure, config.in: Rebuild.
2281
dfe07582
CV
22822013-02-28 Corinna Vinschen <vinschen@redhat.com>
2283
2284 * win32-low.c: Throughout, fix format strings and casts of
2285 printf-like functions to avoid type related warnings on all
2286 platforms.
2287 (get_child_debug_event): Print dwDebugEventCode as hex since
2288 that's how it's usually documented.
2289
736cd585
YQ
22902013-02-28 Yao Qi <yao@codesourcery.com>
2291
2292 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2293 pulongest.
2294
e1f58301
JW
22952013-02-27 Jiong Wang <jiwang@tilera.com>
2296
2297 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2298 (reg-tilegx32.c): New rule.
2299 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2300 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2301 different register info initializer according to elf class.
2302 (init_registers_tilgx32): New function. The tilegx32 register info
2303 initializer.
2304 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2305 (tile_store_gregset): Likewise.
2306
d171ca78
YQ
23072013-02-27 Yao Qi <yao@codesourcery.com>
2308
2309 * server.c (process_point_options): Print debug message when
2310 debug_threads is true.
2311
282bbdf3
YQ
23122013-02-26 Yao Qi <yao@codesourcery.com>
2313
2314 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2315
aca22551
PA
23162013-02-19 Pedro Alves <palves@redhat.com>
2317 Kai Tietz <ktietz@redhat.com>
2318
2319 PR gdb/15161
2320
2321 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2322 instead of strtoul to extract address from packet.
2323 (process_serial_event) <'z'>: Likewise.
2324
4f3cee1c
YQ
23252013-02-18 Yao Qi <yao@codesourcery.com>
2326
2327 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2328
8e1d55a3
PA
23292013-02-14 Pedro Alves <palves@redhat.com>
2330
2331 Plug memory leak.
2332
2333 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2334 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2335
458820da
PA
23362013-02-14 Pedro Alves <palves@redhat.com>
2337
2338 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2339
baea0dae
PA
23402013-02-14 Pedro Alves <palves@redhat.com>
2341
2342 * tracepoint.c (save_string): Delete.
2343 (add_tracepoint_action): Use savestring instead of save_string.
2344
0b1afbb3
PA
23452013-02-12 Pedro Alves <palves@redhat.com>
2346
2347 * linux-xtensa-low.c: Ditto.
2348 * xtensa-xtregs.c: Ditto.
2349
8a4ac37e
PA
23502013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2351
2352 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2353 thread_db.
2354
148de6bb
MS
23552013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2356
2357 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2358 aarch64_num_wp_regs and aarch64_num_bp_regs to
2359 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2360
55fac6e0
MS
23612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2362
2363 * linux-aarch64-low.c (ps_get_thread_area): Replace
2364 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2365
176eb98c
MS
23662013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2367 Marcus Shawcroft <marcus.shawcroft@arm.com>
2368 Nigel Stephens <nigel.stephens@arm.com>
2369 Yufeng Zhang <yufeng.zhang@arm.com>
2370
2371 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2372 (aarch64.c, aarch64-without-fpu.c): New targets.
2373 * configure.srv (aarch64*-*-linux*): New.
2374 * linux-aarch64-low.c: New file.
2375
56f7af9c
MS
23762013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2377
43aaf8b6 2378 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
2379 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2380 (dequeue_one_deferred_signal, linux_resume_one_thread)
2381 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2382 (linux_tracefork_grandchild, linux_test_for_tracefork)
2383 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2384 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2385 where the argument is 0.
2386
60f662b0
YQ
23872013-01-25 Yao Qi <yao@codesourcery.com>
2388
2389 * event-loop.c: Include "queue.h".
2390 (gdb_event_p): New typedef.
2391 (struct gdb_event) <next_event>: Remove.
2392 (event_queue): Change to QUEUE(gdb_event_p).
2393 (async_queue_event): Remove.
2394 (gdb_event_xfree): New.
2395 (initialize_event_loop): New.
2396 (process_event): Use API from QUEUE.
2397 (wait_for_event): Likewise.
2398 * server.c (main): Call initialize_event_loop.
2399 * server.h (initialize_event_loop): Declare.
2400
5ae4861a
YQ
24012013-01-18 Yao Qi <yao@codesourcery.com>
2402
2403 * ax.h (struct eval_agent_expr_context): New.
2404 (gdb_eval_agent_expr): Update declaration.
2405 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2406 TFRAME. Add new argument CTX.
2407 * server.h (struct eval_agent_expr_context): Declare.
2408 (agent_mem_read, agent_tsv_read): Update declaration.
2409 (agent_mem_read_string): Likewise.
2410 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2411 (add_traceframe_block): Add new argument TPOINT.
2412 Increase TPOINT->traceframe_usage.
2413 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2414 eval_tracepoint_agent_expr.
2415 (condition_true_at_tracepoint): Likewise.
2416 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2417 (agent_mem_read_string, agent_tsv_read): Likewise.
2418
85e00e85
YQ
24192013-01-16 Yao Qi <yao@codesourcery.com>
2420
2421 * linux-low.c (linux_resume_one_lwp): Don't check
2422 'lwp->bp_reinsert != 0'.
2423
4039cf45
JB
24242013-01-07 Joel Brobecker <brobecker@adacore.com>
2425 Pedro Alves <palves@redhat.com>
2426
2427 * lynx-low.c (ptrace_request_to_str): Define a temporary
2428 macro and use it to simplify this function's implementation.
2429
9044dee2
JB
24302013-01-07 Joel Brobecker <brobecker@adacore.com>
2431
2432 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2433 sets errno.
2434
e6352c8f
JB
24352013-01-07 Joel Brobecker <brobecker@adacore.com>
2436
2437 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2438
50681a27
JB
24392013-01-07 Joel Brobecker <brobecker@adacore.com>
2440
2441 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2442
3f6e77ef
JB
24432013-01-07 Joel Brobecker <brobecker@adacore.com>
2444
2445 * lynx-low.c (lynx_resume): Use the resume_info parameter
2446 to determine the ptid for the lynx_ptrace call, unless
2447 it is equal to minus_one_ptid, in which case we use the
2448 ptid of the current_inferior.
2449 (lynx_wait_1): After having received a thread create/exit
2450 event, resume the inferior's execution using the signaling
2451 thread's ptid, rather than the old ptid.
2452
7fda33ae
JB
24532013-01-07 Joel Brobecker <brobecker@adacore.com>
2454
2455 * lynx-low.c (lynx_resume): Delete variable ret.
2456
b9786c74
JB
24572013-01-01 Joel Brobecker <brobecker@adacore.com>
2458
2459 * gdbreplay.c (gdbreplay_version): Update copyright year.
2460 * server.c (gdbserver_version): Likewise.
2461
8b93d60f
JB
24622012-12-17 Joel Brobecker <brobecker@adacore.com>
2463
2464 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2465 new thread.
2466
037335a7
JB
24672012-12-17 Joel Brobecker <brobecker@adacore.com>
2468
2469 * lynx-low.c (ptrace_request_to_str): Add handling for
2470 PTRACE_GETTRACESIG.
2471
52d4cbd8
JB
24722012-12-17 Joel Brobecker <brobecker@adacore.com>
2473
2474 * lynx-low.c (lynx_attach): Delete variable new_process.
2475
ab8f6ca9
JB
24762012-12-17 Joel Brobecker <brobecker@adacore.com>
2477
2478 * lynx-low.c (lynx_create_inferior): Delete variable
2479 new_process.
2480
78cbc024
JB
24812012-12-17 Joel Brobecker <brobecker@adacore.com>
2482
2483 * lynx-low.c (ptrace_request_to_str): Do not handle
2484 PTRACE_GETTHREADLIST if this macro does not exist.
2485
14a00470
YQ
24862012-12-15 Yao Qi <yao@codesourcery.com>
2487
2488 * Makefile.in (OBS): Add notif.o.
2489 * notif.c, notif.h: New.
2490 * server.c: Include "notif.h".
2491 (struct vstop_notif) <next>: Remove.
2492 <base>: New field.
2493 (queue_stop_reply): Update.
2494 (push_event, send_next_stop_reply): Remove.
2495 (discard_queued_stop_replies): Update.
2496 (notif_stop): New variable.
2497 (handle_v_stopped): Remove.
2498 (handle_v_requests): Don't call handle_v_stopped. Call
2499 handle_ack_notif instead.
2500 (queue_stop_reply_callback): Call notif_event_enque instead
2501 of queue_stop_reply.
2502 (handle_status): Don't call send_next_stop_reply, call
2503 notif_write_event instead.
2504 (kill_inferior_callback): Likewise.
2505 (detach_or_kill_inferior_callback): Likewise.
2506 (main): Call initialize_notif.
2507 (process_serial_event): Call QUEUE_is_empty.
2508 (handle_target_event): Call notif_push instead of push event.
2509 * server.h (push_event): Remove declaration.
2510
61c125b9
TT
25112012-12-10 Tom Tromey <tromey@redhat.com>
2512
2513 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2514 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2515 macros.
2516 (.c.o): Rewrite.
2517 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2518 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2519 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2520 (amd64-linux-ipa.o, ax.o): Rewrite.
2521 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2522 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2523 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2524 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2525 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2526 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2527 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2528 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2529 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2530 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2531 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2532 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2533 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2534 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2535 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2536 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2537 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2538 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2539 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2540 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2541 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2542 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2543 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2544 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2545 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2546 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2547 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2548 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2549 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2550 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2551 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2552 (reg-tilegx.o): Remove.
2553 (all_object_files): New macro.
2554 Include .deps files.
2555 * aclocal.m4, configure: Rebuild.
2556 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2557 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2558 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2559
e90e9ad9
TT
25602012-12-05 Tom Tromey <tromey@redhat.com>
2561
2562 PR gdb/14917:
2563 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2564
02d403bf 25652012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
2566
2567 * configure.ac: Check for linux/perf_event.h.
2568 * config.in: Regenerated.
2569 * configure: Regenerated.
2570
0270a750
PA
25712012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2572
2573 * hostio.c (handle_readlink): Decrease buffer size
2574 parameter passed to readlink by one byte.
2575
8c29b58e
YQ
25762012-11-26 Yao Qi <yao@codesourcery.com>
2577
2578 * configure.ac (build_warnings): Append '-Wempty-body'.
2579 * configure: Regenerated.
2580 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2581 body.
2582
8bdce1ff
PM
25832012-11-15 Pierre Muller <muller@sourceware.org>
2584
2585 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2586 * config.in: Regenerate.
2587 * configure: Regenerate.
2588 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2589 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2590 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2591 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2592 header.
2593 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2594 instead of <sys/wait.h> header.
2595 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2596
02d403bf 25972012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
2598
2599 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2600 (various make rules): Remove -DGDBSERVER
2601
fbd5db48
YQ
26022012-11-09 Yao Qi <yao@codesourcery.com>
2603
2604 * spu-low.c (current_ptid): Move it to ..
2605 * gdbthread.h: ... here. New.
2606 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2607 * server.c (myresume, process_serial_event): Likewise.
2608 * thread-db.c (thread_db_find_new_threads): Likewise.
2609 * tracepoint.c (run_inferior_command): Likewise.
2610
b3dc46ff
AB
26112012-10-01 Andrew Burgess <aburgess@broadcom.com>
2612
2613 * server.c (handle_search_memory_1): Include access length in
2614 warning message.
2615
07c04788
HPN
26162012-09-05 Michael Brandt <michael.brandt@axis.com>
2617
2618 * linux-crisv32-low.c: Fix compile errors.
2619
918d227b
YQ
26202012-09-04 Yao Qi <yao@codesourcery.com>
2621
2622 * tracepoint.c (cmd_qtsv): Adjust debug message.
2623 Don't check CUR_TPOINT.
2624
18c1b81a
YQ
26252012-08-28 Yao Qi <yao@codesourcery.com>
2626
2627 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2628 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2629 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2630 Remove declarations of xmalloc, xreallloc, xstrdup and
2631 freeargv.
2632 * Makefile.in (libiberty_h): New.
2633 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2634 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2635
dc82f37b
YQ
26362012-08-23 Yao Qi <yao@codesourcery.com>
2637
2638 * server.h: Remove declaration of 'xsnprintf'.
2639
406b1477
KS
26402012-08-22 Keith Seitz <keiths@redhat.com>
2641
2642 * server.h: Include build-gnulib-gbserver/config.h.
2643 * gdbreplay.c: Likewise.
2644
e6712ff1
DE
26452012-08-08 Doug Evans <dje@google.com>
2646
2647 * Makefile.in (SFILES): Add gdb_vecs.c.
2648 (OBS): Add gdb_vecs.o.
2649 (gdb_vecs_h, host_defs_h): New variables.
2650 (thread-db.o): Add $(gdb_vecs_h) dependency.
2651 (gdb_vecs.o): New rule.
2652 * thread-db.c: #include "gdb_vecs.h".
2653 (thread_db_load_search): Use a vector to iterate over path elements.
2654 Handle text appearing after "$pdir".
2655
2656 * configure.ac: Add check for strstr.
2657 * config.in: Regenerate.
2658 * configure: Regenerate.
2659
7c3270ae
UW
26602012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2661
2662 * hostio.c (handle_pread): If pread fails, fall back to attempting
2663 lseek/read.
2664 (handle_pwrite): Likewise for pwrite.
2665
b62e2b27
UW
26662012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2667
2668 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2669 between unsupported TYPE and unimplementable ADDR/LEN combination.
2670 (arm_insert_point): Act on new return value.
2671
78a99e91
PA
26722012-07-31 Pedro Alves <palves@redhat.com>
2673
2674 * server.c (process_point_options): Only skip tokens if we find
2675 one that is unrecognized. Don't treat 'X' specially while
2676 skipping unrecognized tokens.
2677
fcf303ab
UW
26782012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2679
2680 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2681 to 4-byte-align HW breakpoint addresses for Thumb.
2682
7255706c
YQ
26832012-07-27 Yao Qi <yao@codesourcery.com>
2684
2685 PR remote/14161.
2686
2687 * server.h: Declare gdb_agent_about_to_close.
2688 * target.c (kill_inferior): Include "agent.h".
2689 New. Send command 'kill'.
2690 * target.h (kill_inferior): Removed macro.
2691 * tracepoint.c (gdb_agent_about_to_close): New.
2692 (gdb_agent_helper_thread): Handle command 'close'.
2693 Wait endlessly until the inferior stops.
2694 Install gdb_agent_remove_socket to atexit hook.
2695 (agent_socket_name): New static variable.
2696 (gdb_agent_socket_init): Replace local variable 'name' with
2697 'agent_socket_name'.
2698 (gdb_agent_remove_socket): New.
2699
5a3f286f
YQ
27002012-07-27 Yao Qi <yao@codesourcery.com>
2701
2702 * server.c (process_point_options): Stop at 'X' when parsing.
2703
961bd387
ME
27042012-07-19 Michael Eager <eager@eagercon.com>
2705
a261b8f5 2706 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
2707 to hw_execute.
2708 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2709 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2710 hardware breakpoint.
2711
aa7c7447
JK
27122012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2713
2714 * gdbserver/linux-low.c (initialize_low): Call
2715 linux_ptrace_init_warnings.
2716
7f216e7c
DE
27172012-07-02 Doug Evans <dje@google.com>
2718
2719 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2720 pointer to int.
2721
d3ce09f5
SS
27222012-07-02 Stan Shebs <stan@codesourcery.com>
2723
2724 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2725 (ax.o): Add it to build rule.
2726 (ax-ipa.o): Ditto.
2727 (OBS): Add format.o.
2728 (IPA_OBS): Add format.o.
2729 * server.c (handle_query): Claim support for breakpoint commands.
2730 (process_point_options): Add command case.
2731 (process_serial_event): Leave running if there are printfs in
2732 effect.
2733 * mem-break.h (any_persistent_commands): Declare.
2734 (add_breakpoint_commands): Declare.
2735 (gdb_no_commands_at_breakpoint): Declare.
2736 (run_breakpoint_commands): Declare.
2737 * mem-break.c (struct point_command_list): New struct.
2738 (struct breakpoint): New field command_list.
2739 (any_persistent_commands): New function.
2740 (add_commands_to_breakpoint): New function.
2741 (add_breakpoint_commands): New function.
2742 (gdb_no_commands_at_breakpoint): New function.
2743 (run_breakpoint_commands): New function.
2744 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2745 locally.
2746 * ax.c: Include format.h.
2747 (ax_printf): New function.
2748 (gdb_eval_agent_expr): Add printf opcode.
2749
2f8f6aed
YQ
27502012-06-13 Yao Qi <yao@codesourcery.com>
2751
2752 * server.c (start_inferior): Remove duplicated writes to fields
2753 'last_resume_kind' and 'last_status' of 'current_inferior'.
2754
0c9070b3
YQ
27552012-06-12 Yao Qi <yao@codesourcery.com>
2756 Pedro Alves <palves@redhat.com>
2757
2758 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2759 comment.
2760 * server.c (handle_v_cont): Extend comment.
2761
c52daf70
YQ
27622012-06-11 Yao Qi <yao@codesourcery.com>
2763
2764 * linux-low.c (linux_attach): Add 'static'.
2765
d38bbb0a
YQ
27662012-06-06 Yao Qi <yao@codesourcery.com>
2767
2768 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2769
89dc0afd
JK
27702012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2771
2772 Fix gcc -flto compilation warning.
2773 * server.c (main): Make variable multi_mode and attach volatile.
2774
75f62ce7
TJB
27752012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2776
2777 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2778 if the platform doesn't know about it.
2779
65f479b6
PA
27802012-05-30 Jeff Kenton <jkenton@tilera.com>
2781
2782 * Makefile.in (SFILES): Add linux-tile-low.c.
2783 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2784 * configure.srv: Handle tilegx-*-linux*.
2785 * linux-tile-low.c: New file.
2786
0c5bf5a9
JK
27872012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2788
2789 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2790
a493e3e2
PA
27912012-05-24 Pedro Alves <palves@redhat.com>
2792
2793 PR gdb/7205
2794
43aaf8b6 2795 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 2796
2ea28649
PA
27972012-05-24 Pedro Alves <palves@redhat.com>
2798
2799 PR gdb/7205
2800
2801 Replace target_signal with gdb_signal throughout.
2802
8d409d16
MR
28032012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2804
2805 * linux-low.c (linux_store_registers): Avoid the copying sequence
2806 when no data has been retrieved by ptrace.
2807
23512c01
MGD
28082012-05-22 Will Deacon <will.deacon@arm.com>
2809
2810 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2811 Include asm/ptrace.h.
2812 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2813 already defined.
2814
4934b29e
MR
28152012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2816
2817 * linux-low.c (linux_store_registers): Don't re-retrieve data
2818 with ptrace that has already been obtained from /proc. Always
2819 copy any data retrieved with ptrace to the buffer supplied.
2820
bde24c0a
PA
28212012-05-11 Yao Qi <yao@codesourcery.com>
2822 Pedro Alves <palves@redhat.com>
2823
2824 * linux-low.c (enum stopping_threads_kind): New.
2825 (stopping_threads): Change type to `enum stopping_threads_kind'.
2826 (handle_extended_wait): If stopping and suspending threads, leave
2827 the new_lwp suspended too.
2828 (linux_wait_for_event): Adjust.
2829 (stop_all_lwps): Set `stopping_threads' to
2830 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2831 whether we're suspending threads or just stopping them. Assert no
2832 recursion happens.
2833
623b6bdf
YQ
28342012-04-29 Yao Qi <yao@codesourcery.com>
2835
2836 * server.h: Move some code to ...
2837 * gdbthread.h: ... here. New.
2838 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2839 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2840 (nto-low.o, win32-low.o): Likewise.
2841 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2842 * regcache.c, remote-utils.c, server.c: Likewise.
2843 * target.c, tracepoint.c, win32-low.c: Likewise.
2844
f15f9948
TJB
28452012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2846
2847 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2848 (PTRACE_ARG4_TYPE): Likewise.
2849 (PTRACE_XFER_TYPE): Likewise.
2850 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2851 ptrace to PTRACE_ARG3_TYPE.
2852 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2853 (PTRACE_ARG4_TYPE): Likewise.
2854 (PTRACE_XFER_TYPE): Likewise.
2855 (linux_detach_one_lwp): Cast fourth argument of
2856 ptrace to long then PTRACE_ARG4_TYPE.
2857 (regsets_fetch_inferior_registers): Cast third argument of
2858 ptrace to long then PTRACE_ARG3_TYPE.
2859 (regsets_store_inferior_registers): Likewise.
2860
38ea300a
PA
28612012-04-20 Pedro Alves <palves@redhat.com>
2862
2863 * configure: Regenerate.
2864
c971b7fa
PA
28652012-04-19 Pedro Alves <palves@redhat.com>
2866
43aaf8b6 2867 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 2868 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
2869 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2870 (all, install-only, uninstall, clean-info, all-lib, clean): No
2871 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2872 (maintainer-clean realclean distclean): Use subdir_do.
2873 (subdir_do): New.
2874 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 2875 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
2876 * acinclude.m4: Include acx_configure_dir.m4.
2877 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2878 calls. Call AC_PROG_RANLIB. Configure gnulib using
2879 ACX_CONFIGURE_DIR.
2880 (GNULIB): New.
2881 (GNULIB_STDINT_H): Adjust.
2882 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2883 * gdbreplay.c: Include build-gnulib/config.h.
2884 * server.h: Likewise.
2885 * aclocal.m4: Regenerate.
2886 * config.in: Regenerate.
2887 * configure: Regenerate.
c971b7fa 2888
809277f8
PA
28892012-04-19 Pedro Alves <palves@redhat.com>
2890
2891 * Makefile.in (LIBGNU, INCGNU): Adjust.
2892 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2893 (all, install-only, uninstall, clean-info, all-lib, clean)
2894 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2895 * configure.ac: Adjust AC_OUTPUT output.
2896 * aclocal.m4: Regenerate.
2897 * configure: Regenerate.
2898
fd9bb8b8
PA
28992012-04-19 Pedro Alves <palves@redhat.com>
2900
2901 * Makefile.in (generated_files): New.
2902 (server_h): Remove the explicit dependency on config.h, and depend
2903 on $generated_files.
2904
1c298c66
PA
29052012-04-19 Pedro Alves <palves@redhat.com>
2906
2907 * Makefile.in (INCGNU): Add -Ignulib.
2908
57c4b50b
PA
29092012-04-19 Pedro Alves <palves@redhat.com>
2910
2911 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2912 (INCGNU): ... this, and spell out -I here.
2913 (GNULIB_LIB): Rename to ...
2914 (LIBGNU): ... this.
2915 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2916
1030e047
PA
29172012-04-19 Pedro Alves <palves@redhat.com>
2918
2919 * config.in: Regenerate.
2920
447d4319
PA
29212012-04-19 Pedro Alves <palves@redhat.com>
2922
2923 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2924 * server.h (memmem): Remove declaration.
2925 * config.in: Regenerate.
2926 * configure: Regenerate.
2927
aad9eab9
YQ
29282012-04-19 Yao Qi <yao@codesourcery.com>
2929
2930 * Makefile.in (SFILES): Add common/vec.c.
2931 (OBS): Add vec.o.
2932 (vec.o): New rule.
2933
3e10640f
YQ
29342012-04-19 Yao Qi <yao@codesourcery.com>
2935
2936 * remote-utils.c (prepare_resume_reply): Replace with macro
2937 target_core_of_thread.
2938 * server.c (handle_qxfer_threads_proper): Likewise.
2939 * target.h (traget_core_of_thread): New macro.
2940
71622373
PA
29412012-04-18 Pedro Alves <palves@redhat.com>
2942
2943 * aclocal.m4: Regenerate.
2944 * configure: Regenerate.
2945
80d26939
YQ
29462012-04-16 Yao Qi <yao@codesourcery.com>
2947
2948 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2949 duplicated on address.
2950
42476b70
YQ
29512012-04-16 Yao Qi <yao@codesourcery.com>
2952
2953 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2954 (struct tracepoint_action_ops) <send>: New field.
2955 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2956 (agent_expr_send, x_tracepoint_action_send): New.
2957 (l_tracepoint_action_send): New.
2958 (cmd_qtdp): Download and install tracepoint
2959 according to `use_agent'.
2960 (run_inferior_command): Add one more parameter `len'.
2961 Update callers.
2962 (tracepoint_send_agent): New.
2963 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2964
7bc83639
YQ
29652012-04-16 Yao Qi <yao@codesourcery.com>
2966
2967 * tracepoint.c (download_tracepoints): Moved to ...
2968 (cmd_qtstart): ... here.
2969
5f18041e
YQ
29702012-04-14 Yao Qi <yao@codesourcery.com>
2971
2972 * tracepoint.c: Include inttypes.h.
2973 (struct collect_memory_action): Use sized types.
2974 (struct tracepoint): Likewise.
2975 (cmd_qtdp, stop_tracing): Update print specifiers.
2976 (cmd_qtp, response_tracepoint): Likewise.
2977 (collect_data_at_tracepoint): Likewise.
2978 (collect_data_at_step): Likewise.
2979
55a8c076
YQ
29802012-04-14 Yao Qi <yao@codesourcery.com>
2981
2982 Import gnulib module inttypes.
2983 * aclocal.m4, config.in, configure: Regenerated.
2984
dc750257
YQ
29852012-04-14 Yao Qi <yao@codesourcery.com>
2986
2987 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2988 Makefile and config.status at last.
2989
0ab5faf9
YQ
29902012-04-13 Yao Qi <yao@codesourcery.com>
2991
2992 * tracepoint.c: Include stdint.h unconditionally.
2993
18f5fd81
TJB
29942012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2995
2996 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2997 on BFD_HAVE_SYS_PROCFS_TYPE.
2998 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2999 * configure: Regenerate.
3000 * config.in: Likewise.
3001
4d47af5c
L
30022012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3003
3004 * Makefile.in (clean): Also remove x32.c x32-linux.c
3005 x32-avx.c x32-avx-linux.c.
3006 (x32.o): New target.
3007 (x32.c): Likewise.
3008 (x32-linux.o): Likewise.
3009 (x32-linux.c): Likewise.
3010 (x32-avx.o): Likewise.
3011 (x32-avx.c): Likewise.
3012 (x32-avx-linux.o): Likewise.
3013 (x32-avx-linux.c): Likewise.
3014
3015 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3016 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3017 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3018 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3019 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3020 i386/x32-avx-linux.xml.
3021
3022 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3023 (init_registers_x32_avx_linux): Likwise.
3024 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3025 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3026
ecedbe58
PA
30272012-04-13 Pedro Alves <palves@redhat.com>
3028
3029 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3030 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3031 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3032 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3033 the sub-make.
3034
c92b5177
L
30352012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3036
3037 * linux-x86-low.c (compat_x32_clock_t): New.
3038 (compat_x32_siginfo_t): Likewise.
3039 (compat_x32_siginfo_from_siginfo): Likewise.
3040 (siginfo_from_compat_x32_siginfo): Likewise.
3041 (linux_is_elf64): Likewise.
3042 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3043 and siginfo_from_compat_x32_siginfo for x32.
3044 (x86_arch_setup): Set linux_is_elf64.
3045
214d508e
L
30462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3047
3048 PR gdb/13969
3049 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3050 e_machine field.
3051 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3052 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3053 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3054 compatible with process.
3055
c9a1864a
YQ
30562012-04-12 Yao Qi <yao@codesourcery.com>
3057
3058 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3059 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3060 (install-only, install-info, clean): Handle sub dir gnulib.
3061 (all-lib, am--refresh): New targets.
3062 (memmem.o): Remove target.
3063 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3064 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3065 (AC_REPLACE_FUNCS): Remove memmem.
3066 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3067 (AC_OUTPUT): Generate Makefile in gnulib/.
3068 * aclocal.m4, config.in, configure: Regenerated.
3069
367ba2c2
MR
30702012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3071
3072 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3073
9d236627
PA
30742012-04-05 Pedro Alves <palves@redhat.com>
3075
3076 -Werror=strict-aliasing
3077
3078 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3079 pointer.
3080
111217b3
PA
30812012-04-04 Pedro Alves <palves@redhat.com>
3082
3083 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3084 (sparc_store_gregset_from_stack, sparc_store_gregset)
3085 (sparc_breakpoint_at): Fix formatting.
3086
8365dcf5
TJB
30872012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3088
3089 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3090 are available.
3091 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3092 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3093 * config.in: Regenerate.
3094 * configure: Likewise.
3095
689cc2ae
PA
30962012-03-29 Pedro Alves <palves@redhat.com>
3097
3098 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3099 Correct ptrace arguments.
3100
c14dfd32
PA
31012012-03-28 Pedro Alves <palves@redhat.com>
3102
3103 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3104 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3105 (IA64_FR1_REGNUM): New defines.
3106 (ia64_fetch_register): New.
3107 (the_low_target): Install it.
3108 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3109 field.
3110 * linux-low.c (linux_fetch_registers): Try the
3111 the_low_target.fetch_register hook first.
3112
3113 * linux-arm-low.c (the_low_target): Adjust.
3114 * linux-bfin-low.c (the_low_target): Adjust.
3115 * linux-cris-low.c (the_low_target): Adjust.
3116 * linux-crisv32-low.c (the_low_target): Adjust.
3117 * linux-m32r-low.c (the_low_target): Adjust.
3118 * linux-m68k-low.c (the_low_target): Adjust.
3119 * linux-mips-low.c (the_low_target): Adjust.
3120 * linux-ppc-low.c (the_low_target): Adjust.
3121 * linux-s390-low.c (the_low_target): Adjust.
3122 * linux-sh-low.c (the_low_target): Adjust.
3123 * linux-sparc-low.c (the_low_target): Adjust.
3124 * linux-tic6x-low.c (the_low_target): Adjust.
3125 * linux-x86-low.c (the_low_target): Adjust.
3126 * linux-xtensa-low.c (the_low_target): Adjust.
3127
63c88e13
PA
31282012-03-26 Pedro Alves <palves@redhat.com>
3129
3130 * server.c (handle_qxfer_libraries): Don't bail early if
3131 the_target->qxfer_libraries_svr4 is not NULL.
3132
fb723180
PA
31332012-03-26 Pedro Alves <palves@redhat.com>
3134
3135 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3136
0afae3cf
PA
31372012-03-23 Pedro Alves <palves@redhat.com>
3138
3139 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3140 "library-list-svr4" element's start tag when the the DSO list is
3141 empty.
3142
485f1ee4
PA
31432012-03-23 Pedro Alves <palves@redhat.com>
3144
3145 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3146 a variable whose type size is the same as the inferior's pointer
3147 size.
3148
a5362b9a
TS
31492012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3150
3151 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3152 struct siginfo.
3153 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3154 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3155 * linux-low.h: Include <signal.h>.
3156 (struct siginfo): Remove forward declaration.
3157 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3158 struct siginfo.
3159
d226c142
MF
31602012-03-21 Mike Frysinger <vapier@gentoo.org>
3161
3162 * .gitignore: Ignore more files.
3163
122f36ef
PA
31642012-03-19 Pedro Alves <palves@redhat.com>
3165 Jan Kratochvil <jan.kratochvil@redhat.com>
3166
3167 * server.c (cont_thread, general_thread): Add describing comments.
3168 (start_inferior): Clear `cont_thread'.
3169 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3170 of a process.
3171
fc3e5175
YQ
31722012-03-15 Yao Qi <yao@codesourcery.com>
3173
3174 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3175 handling to ...
3176 (cmd_qtdp): ... here.
3177
8d0d92cd
YQ
31782012-03-15 Yao Qi <yao@codesourcery.com>
3179
3180 * tracepoint.c (struct tracepoint_action_ops): New.
3181 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3182 (m_tracepoint_action_download): New.
3183 (r_tracepoint_action_download): New.
3184 (x_tracepoint_action_download): New.
3185 (l_tracepoint_action_download): New.
3186 (add_tracepoint_action): Install `action->ops' according type.
3187 (download_tracepoint_1): Move code `download' function pointer
3188 of various tracepoint_action_ops.
3189
87b0bb13
JK
31902012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3191
3192 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3193 linux_ptrace_attach_warnings.
3194
5f572dec
JK
31952012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3196
3197 * Makefile.in (linux-ptrace.o): New.
3198 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3199 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3200 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3201 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3202 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3203 of these targets.
3204 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3205
f4647387
YQ
32062012-03-08 Yao Qi <yao@codesourcery.com>
3207 Pedro Alves <palves@redhat.com>
3208
3209 Fix PR server/13392.
3210 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3211 offset of JMP insn.
3212 * tracepoint.c (remove_tracepoint): New.
3213 (cmd_qtdp): Call remove_tracepoint when failed to install.
3214
9b224c5e
PA
32152012-03-07 Pedro Alves <palves@redhat.com>
3216
3217 * linux-low.c (get_detach_signal): New.
3218 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3219 Pass on pending signals to PTRACE_DETACH. Check the result of the
3220 ptrace call.
3221 * server.c (program_signals, program_signals_p): New.
3222 (handle_general_set): Handle QProgramSignals.
3223 * server.h (program_signals, program_signals_p): Declare.
3224
e237a7e2
JK
32252012-03-05 Pedro Alves <palves@redhat.com>
3226 Jan Kratochvil <jan.kratochvil@redhat.com>
3227
3228 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3229 New comment why.
3230
5808517f
YQ
32312012-03-03 Yao Qi <yao@codesourcery.com>
3232
3233 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3234 agent_look_up_symbols.
3235
58b4daa5
YQ
32362012-03-03 Yao Qi <yao@codesourcery.com>
3237
3238 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3239 (linux-x86-low.o): Likewise.
3240 * server.h: Remove in_process_agent_loaded.
3241 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3242 common/agent.c.
3243 Update callers.
3244
8ffcbaaf
YQ
32452012-03-03 Yao Qi <yao@codesourcery.com>
3246
3247 * tracepoint.c (gdb_agent_capability): New global.
3248 (in_process_agent_loaded_ust): Renamed to
3249 `in_process_agent_supports_ust'.
3250 Update callers.
3251 (in_process_agent_supports_ust): Call agent_capability_check.
3252 (clear_installed_tracepoints): Assert that agent supports
3253 agent.
3254
d1feda86
YQ
32552012-03-03 Yao Qi <yao@codesourcery.com>
3256
3257 * linux-low.c (linux_supports_agent): New.
3258 (linux_target_ops): Initialize field `supports_agent' with
3259 linux_supports_agent.
3260 * target.h (struct target_ops) <supports_agent>: New.
3261 (target_supports_agent): New macro.
3262 * server.c (handle_general_set): Handle packet 'QAgent'.
3263 (handle_query): Send `QAgent+'.
3264 * Makefile.in (server.o): Depends on agent.h.
3265
2fa291ac
YQ
32662012-03-03 Yao Qi <yao@codesourcery.com>
3267
3268 * Makefile.in (OBS): Add agent.o.
3269 Add new rule for agent.o.
3270 Track dependence of tracepoint.c on agent.h.
3271 * tracepoint.c (run_inferior_command_1):
3272 (run_inferior_command): Call agent_run_command.
3273 (gdb_ust_connect_sync_socket): Deleted. Move it to
3274 common/agent.c.
3275 (resume_thread, stop_thread): Likewise.
3276 (gdb_ust_socket_init): Renamed to ...
3277 (gdb_agent_socket_init): ... New.
3278 (gdb_ust_thread): Renamed to ...
3279 (gdb_agent_helper_thread): ... New.
3280 (gdb_ust_init): Move some code to ...
3281 (gdb_agent_init): ... here. New.
3282 [HAVE_UST]: Call gdb_ust_init.
3283 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3284 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3285 * config.in, configure: Regenerated.
3286
05044653
PA
32872012-03-02 Pedro Alves <palves@redhat.com>
3288
3289 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3290 * linux-low.c (struct simple_pid_list): New.
3291 (stopped_pids): New a struct simple_pid_list pointer.
3292 (add_to_pid_list, pull_pid_from_list): New.
3293 (handle_extended_wait): Don't assume the first signal new children
3294 report is SIGSTOP. Adjust call to pull_pid_from_list.
3295 (linux_wait_for_lwp): Adjust.
3296
8d00225b
YQ
32972012-03-02 Yao Qi <yao@codesourcery.com>
3298
3299 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3300 debug log.
3301
19560ba5
YQ
33022012-03-02 Yao Qi <yao@codesourcery.com>
3303
3304 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3305 `stop_pc' and `tpoint'. Update caller.
3306
1faeff08
MR
33072012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3308
3309 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3310 * linux-low.c (use_linux_regsets): New macro.
3311 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3312 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3313 (linux_register_in_regsets): New function.
3314 (usr_fetch_inferior_registers): Skip registers covered by
3315 regsets.
3316 (usr_store_inferior_registers): Likewise.
3317 (usr_fetch_inferior_registers): New macro.
3318 (usr_store_inferior_registers): Likewise.
3319 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3320 (linux_store_registers): Likewise.
3321 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3322 prototype.
3323 (init_registers_mips64_dsp_linux): Likewise.
3324 (init_registers_mips_linux): New macro.
3325 (init_registers_mips_dsp_linux): Likewise.
3326 (mips_dsp_num_regs): Likewise.
3327 (DSP_BASE, DSP_CONTROL): New fallback macros.
3328 (mips_base_regs): New macro.
3329 (mips_regmap): Use it. Fix the size.
3330 (mips_dsp_regmap): New variable.
3331 (mips_dsp_regset_bitmap): Likewise.
3332 (mips_arch_setup): New function.
3333 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3334 than mips_regmap.
3335 (mips_cannot_store_register): Likewise.
3336 (the_low_target): Update .arch_setup, .num_regs and .regmap
3337 initializers. Add .regset_bitmap initializer.
3338 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3339 initializer.
3340 * linux-bfin-low.c (the_low_target): Likewise.
3341 * linux-cris-low.c (the_low_target): Likewise.
3342 * linux-crisv32-low.c (the_low_target): Likewise.
3343 * linux-ia64-low.c (the_low_target): Likewise.
3344 * linux-m32r-low.c (the_low_target): Likewise.
3345 * linux-m68k-low.c (the_low_target): Likewise.
3346 * linux-ppc-low.c (the_low_target): Likewise.
3347 * linux-s390-low.c (the_low_target): Likewise.
3348 * linux-sh-low.c (the_low_target): Likewise.
3349 * linux-sparc-low.c (the_low_target): Likewise.
3350 * linux-tic6x-low.c (the_low_target): Likewise.
3351 * linux-x86-low.c (the_low_target): Likewise.
3352 * linux-xtensa-low.c (the_low_target): Likewise.
3353 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3354 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3355 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3356 srv_xmlfiles.
3357 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3358 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3359
c03e6ccc
YQ
33602012-02-29 Yao Qi <yao@codesourcery.com>
3361 Pedro Alves <palves@redhat.com>
3362
3363 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3364 `step_over_finished' is true.
3365
644cebc9
PA
33662012-02-27 Pedro Alves <palves@redhat.com>
3367
3368 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3369 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3370
c14d7ab2
PA
33712012-02-27 Pedro Alves <palves@redhat.com>
3372
3373 PR server/9684
3374 * linux-low.c (pid_is_stopped): New.
3375 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3376
412c89dd
LM
33772012-02-25 Luis Machado <lgustavo@codesourcery.com>
3378
3379 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3380 of conditions.
3381
b745defe
MR
33822012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3383
3384 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3385
9f3a5c85
LM
33862012-02-24 Luis Machado <lgustavo@codesourcery>
3387
3388 * server.c (handle_query): Advertise support for target-side
3389 breakpoint condition evaluation.
3390 (process_point_options): New function.
3391 (process_serial_event): When inserting a breakpoint, check for
3392 a target-side condition that should be evaluated.
3393
3394 * mem-break.c: Include regcache.h and ax.h.
3395 (point_cond_list_t): New data structure.
3396 (breakpoint) <cond_list>: New field.
3397 (find_gdb_breakpoint_at): Make non-static.
3398 (delete_gdb_breakpoint_at): Clear any target-side
3399 conditions.
3400 (clear_gdb_breakpoint_conditions): New function.
3401 (add_condition_to_breakpoint): Likewise.
3402 (add_breakpoint_condition): Likewise.
3403 (gdb_condition_true_at_breakpoint): Likewise.
3404 (gdb_breakpoint_here): Return result directly instead
3405 of going through a local variable.
3406
3407 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3408 (clear_gdb_breakpoint_conditions): Likewise.
3409 (add_breakpoint_condition): Likewise.
3410 (gdb_condition_true_at_breakpoint): Likewise.
3411
3412 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3413 (need_step_over_p): Take target-side breakpoint condition into
3414 consideration.
3415
5e1dc496
LM
34162012-02-24 Luis Machado <lgustavo@codesourcery>
3417
3418 * server.h: Include tracepoint.h.
3419 (agent_mem_read, agent_get_trace_state_variable_value,
3420 agent_set_trace_state_variable_value,
3421 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3422 get_set_tsv_func_addr): New prototypes.
3423
3424 * ax.h: New include file.
3425 * ax.c: New source file.
3426
3427 * tracepoint.c: Include ax.h.
3428 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3429 agent_expr, eval_result_type): Move to ax.h.
3430 (parse_agent_expr): Rename to ...
3431 (gdb_parse_agent_expr): ... this, make it non-static and move
3432 to ax.h.
3433 (unparse_agent_expr) Rename to ...
3434 (gdb_unparse_agent_expr): ... this, make it non-static and move
3435 to ax.h.
3436 (eval_agent_expr): Rename to ...
3437 (eval_tracepoint_agent_expr): ... this.
3438 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3439 forward declarations.
3440 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3441 (agent_get_trace_state_variable_value): New function.
3442 (agent_set_trace_state_variable_value): New function.
3443 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3444 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3445 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3446 (condition_true_at_tracepoint): Likewise.
3447 (parse_agent_expr): Rename to ...
3448 (gdb_parse_agent_expr): ... this and move to ax.c.
3449 (unparse_agent_expr): Rename to ...
3450 (gdb_unparse_agent_expr): ... this and move to ax.c.
3451 (gdb_agent_op_name): Move to ax.c.
3452 (eval_agent_expr): Rename to ...
3453 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3454 and move to ax.c.
3455 (eval_tracepoint_agent_expr): New function.
3456 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 3457 non-static.
5e1dc496
LM
3458 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3459 ax.c.
3460 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3461 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3462 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3463 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3464 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3465 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3466 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3467 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3468 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3469 (compile_bytecodes): Remove forward declaration.
3470 (is_goto_target): Move to ax.c.
3471 (compile_bytecodes): Move to ax.c and call
3472 agent_get_trace_state_variable_value (...) and
3473 agent_set_trace_state_variable_value (...).
3474
3475 * Makefile.in: Update ax.c and IPA dependencies.
3476
277e4e52
PA
34772012-02-24 Pedro Alves <palves@redhat.com>
3478
3479 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3480 (cmd_bigqtbuffer_circular): ... this. Only handle
3481 'QTBuffer:circular:'.
3482 (handle_tracepoint_general_set): Adjust.
3483
bf4c19f7
YQ
34842012-02-16 Yao Qi <yao@codesourcery.com>
3485
3486 * inferiors.c: Move code to ...
3487 * dll.c: .... here. New.
3488 * server.h: Declare clear_dlls.
3489 * Makefile.in (SFILES): Add dll.c.
3490 (OBS): Add dll.o
3491 (dll.o): New rule.
3492
d73f2619
YQ
34932012-02-11 Yao Qi <yao@codesourcery.com>
3494
3495 * server.c: (handle_monitor_command): Add a new parameter
3496 `own_buf'.
3497 (handle_query): Update caller.
3498
f8255c2a
JB
34992012-02-09 Joel Brobecker <brobecker@adacore.com>
3500
3501 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3502 * configure, config.in: Regenerate.
3503 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3504 is not defined.
3505
da84f473
PA
35062012-02-02 Pedro Alves <palves@redhat.com>
3507
3508 Try SIGKILL first, then PTRACE_KILL.
3509 * linux-low.c (linux_kill_one_lwp): New.
3510 (linux_kill_one_lwp): Rename to ...
3511 (kill_one_lwp_callback): ... this. Use the new
3512 linux_kill_one_lwp.
3513
e886a173
PA
35142012-02-02 Pedro Alves <palves@redhat.com>
3515
3516 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3517 inferior.
3518
be07f1a2
PA
35192012-01-27 Pedro Alves <palves@redhat.com>
3520
3521 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3522 (elf_64_file_p): Make static.
3523 (linux_pid_exe_is_elf_64_file): New.
3524 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3525 Delete declarations.
3526 (linux_pid_exe_is_elf_64_file): Declare.
3527 * linux-x86-low.c (x86_arch_setup): Use
3528 linux_pid_exe_is_elf_64_file.
3529
d8301ad1
JK
35302012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3531
3532 * linux-low.c (linux_wait_for_event_1): Rename to ...
3533 (linux_wait_for_event): ... here and merge it with former
3534 linux_wait_for_event - new variable wait_ptid, use it.
3535 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3536
01b17894
PA
35372012-01-23 Pedro Alves <palves@redhat.com>
3538
3539 * server.c (main): Avoid yet another case of infinite loop while
3540 detaching/killing after a longjmp.
3541
e825046f
JK
35422012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3543
3544 Code cleanup.
3545 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3546
b9e7b9c3
UW
35472012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3548
3549 * hostio.c (handle_readlink): New function.
3550 (handle_vFile): Call it to handle "vFile:readlink" packets.
3551
901f9912
UW
35522012-01-20 Pedro Alves <palves@redhat.com>
3553 Ulrich Weigand <ulrich.weigand@linaro.org>
3554
3555 * server.c (handle_v_requests): Only support vAttach and vRun to
3556 start multiple processes when in extended protocol mode.
3557
fc1ab1a0
PA
35582012-01-17 Pedro Alves <palves@redhat.com>
3559
3560 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3561 memalign plus mprotect to allocate the scratch buffer.
3562
7d5d4e98
PA
35632012-01-13 Pedro Alves <palves@redhat.com>
3564
3565 * server.c (attach_inferior): Clear `cont_thread'.
3566
f128d5e9
PA
35672012-01-13 Pedro Alves <palves@redhat.com>
3568
3569 * server.c (main): Avoid infinite loop while detaching/killing
3570 after a longjmp.
3571
06db92f0
DE
35722012-01-09 Doug Evans <dje@google.com>
3573
3574 * server.c (start_inferior): Set last_ptid in --wrapper case.
3575
32d92999
YQ
35762012-01-06 Yao Qi <yao@codesourcery.com>
3577
3578 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3579 defined.
3580 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3581
5e0a92a9
YQ
35822012-01-04 Yao Qi <yao@codesourcery.com>
3583
3584 * tracepoint.c (cmd_qtdp): Print debug message
3585 for static tracepoint.
3586
ae639e8c
YQ
35872012-01-04 Yao Qi <yao@codesourcery.com>
3588
3589 * tracepoint.c (trace_vdebug): Differentiate debug message
3590 between gdbserver and IPA.
3591
f72429c5
YQ
35922012-01-03 Yao Qi <yao@codesourcery.com>
3593
3594 * tracepoint.c (tracepoint_was_hit): Don't collect for
3595 static tracepoint.
3596
12c3e59c
JB
35972012-01-02 Joel Brobecker <brobecker@adacore.com>
3598
3599 * terminal.h: Reformat copyright header.
3600
67827812
JB
36012012-01-02 Joel Brobecker <brobecker@adacore.com>
3602
3603 * server.c (gdbserver_version): Update copyright year.
3604 * gdbreplay.c (gdbreplay_version): Likewise.
3605
3e52c33d
JK
36062011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3607
3608 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3609
3610 Revert:
3611 2011-12-18 Hui Zhu <teawater@gmail.com>
3612 * linux-low.c (linux_create_inferior): Save return value to ret.
3613
66f1260e
HZ
36142011-12-18 Hui Zhu <teawater@gmail.com>
3615
3616 * linux-low.c (linux_create_inferior): Save return value to ret.
3617
e77616d7
DE
36182011-12-16 Doug Evans <dje@google.com>
3619
e7b06c57
DE
3620 * linux-low.c (linux_create_inferior): If stdio connection,
3621 redirect stdin from /dev/null, stdout to stderr.
3622 * remote-utils.c (remote_is_stdio): New static global.
3623 (remote_connection_is_stdio): New function.
3624 (remote_prepare): Handle stdio connection.
3625 (remote_open): Ditto.
3626 (remote_close): Don't close stdin for stdio connections.
3627 (read_prim,write_prim): New functions. Replace all calls to
3628 read/write to these.
3629 * server.c (main): Watch for "-" argument. Move call to
3630 remote_prepare before start_inferior.
3631 * server.h (STDIO_CONNECTION_NAME): New macro.
3632 (remote_connection_is_stdio): Declare.
3633
e77616d7
DE
3634 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3635 in debugging output.
3636
82067193
YQ
36372011-12-15 Yao Qi <yao@codesourcery.com>
3638
3639 * tracepoint.c: Include sys/syscall.h.
3640 (gdb_ust_thread): Remove preprocessor conditional.
3641
82bfbe7e
PA
36422011-12-14 Pedro Alves <pedro@codesourcery.com>
3643
3644 * linux-low.c (linux_detach_one_lwp): Call
3645 the_low_target.prepare_to_resume before detaching.
3646
712c6575
YQ
36472011-12-14 Yao Qi <yao@codesourcery.com>
3648
3649 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3650 of write.
3651
d54d1edf
YQ
36522011-12-14 Yao Qi <yao@codesourcery.com>
3653
3654 * i386-low.c (i386_low_stopped_data_address): Initialize local
3655 variable `control'.
3656
6210a125
PA
36572011-12-13 Pedro Alves <pedro@codesourcery.com>
3658
3659 PR remote/13492
3660
3661 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3662 DR_CONTROL unless necessary. Extend comments.
3663 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3664 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3665
2ece8244
YQ
36662011-12-13 Yao Qi <yao@codesourcery.com>
3667
3668 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3669 macros.
3670 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3671
784867a5
JK
36722011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3673
3674 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3675 Print new debug message for such case.
3676
6bf36717
JK
36772011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3678
3679 Fix overlapping memcpy.
3680 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3681 the read_inferior_memory transfer.
3682 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3683 write_inferior_memory transfer.
3684 (set_fast_tracepoint_jump): New variable buf. Use it for the
3685 read_inferior_memory and write_inferior_memory transfers.
3686 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3687 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3688 Use it for the write_inferior_memory transfer.
3689 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3690 buffers.
3691
50275556
MR
36922011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3693
3694 * linux-low.c (fetch_register, store_register): Make code
3695 consistent, fix formatting.
3696
7325beb4
MR
36972011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3698
3699 * linux-low.c (usr_store_inferior_registers): Factor out code
3700 to handle individual registers into...
3701 (store_register): ... this new function.
3702
c642a434
UW
37032011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3704
3705 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3706 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3707 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3708 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3709 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3710 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3711 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3712 (srv_xmlfiles): Add new XML files.
3713
3714 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3715 and <sys/uio.h>.
3716 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3717 (init_registers_s390_linux32v1): Add prototype.
3718 (init_registers_s390_linux32v2): Likewise.
3719 (init_registers_s390_linux64v1): Likewise.
3720 (init_registers_s390_linux64v2): Likewise.
3721 (init_registers_s390x_linux64v1): Likewise.
3722 (init_registers_s390x_linux64v2): Likewise.
3723 (s390_num_regs): Increment to 52.
3724 (s390_regmap): Add orig_r2 register.
3725 (s390_num_regs_3264): Increment to 68.
3726 (s390_regmap_3264): Add orig_r2 register.
3727 (s390_collect_ptrace_register): Handle orig_r2 register.
3728 (s390_supply_ptrace_register): Likewise.
3729 (s390_fill_last_break): New function.
3730 (s390_store_last_break): Likewise.
3731 (s390_fill_system_call): New function.
3732 (s390_store_system_call): Likewise.
3733 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3734 register sets.
3735 (s390_check_regset): New function.
3736 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3737 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3738 Update target_regsets for available register sets.
3739
2268b414
JK
37402011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3741 Jan Kratochvil <jan.kratochvil@redhat.com>
3742
3743 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3744 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3745 New.
3746 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3747 * linux-low.h (struct process_info_private): New member r_debug.
3748 * server.c (handle_qxfer_libraries): Call
3749 the_target->qxfer_libraries_svr4.
3750 (handle_qxfer_libraries_svr4): New function.
3751 (qxfer_packets): New entry "libraries-svr4".
3752 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3753 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3754 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3755 PACKET_qXfer_libraries_svr4.
3756
d6db1fab
UW
37572011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3758
3759 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3760 PSW address/mask between 8-byte and 16-byte formats.
3761 (s390_supply_ptrace_register): Likewise.
3762 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3763 basic addressing mode bit.
3764
242f5f1c
SS
37652011-11-24 Stan Shebs <stan@codesourcery.com>
3766
3767 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3768
f196051f
SS
37692011-11-17 Stan Shebs <stan@codesourcery.com>
3770
3771 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3772 (tracing_start_time): New global.
3773 (tracing_stop_time): New global.
3774 (tracing_user_name): New global.
3775 (tracing_notes): New global.
3776 (tracing_stop_note): New global.
3777 (cmd_qtstart): Set traceframe_usage, start_time.
3778 (stop_tracing): Set stop_time.
3779 (cmd_qtstatus): Report additional status.
3780 (cmd_qtp): New function.
3781 (handle_tracepoint_query): Call it.
3782 (cmd_qtnotes): New function.
3783 (handle_tracepoint_general_set): Call it.
3784 (get_timestamp): Rename from tsv_get_timestamp.
3785
405f8e94
SS
37862011-11-14 Stan Shebs <stan@codesourcery.com>
3787 Kwok Cheung Yeung <kcy@codesourcery.com>
3788
3789 * linux-x86-low.c (small_jump_insn): New.
3790 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3791 trampoline and error message, build a trampoline and issue a small
3792 jump instruction to it.
3793 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3794 trampoline and error message.
3795 (x86_get_min_fast_tracepoint_insn_len): New.
3796 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3797 * linux-low.h (struct linux_target_ops): Add arguments to
3798 install_fast_tracepoint_jump_pad operation, add new operation.
3799 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3800 arguments.
3801 (linux_get_min_fast_tracepoint_insn_len): New function.
3802 (linux_target_op): Add new operation.
3803 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3804 (gdb_trampoline_buffer_end): Ditto.
3805 (gdb_trampoline_buffer_error): Ditto.
3806 (struct ipa_sym_addresses): Add fields for new IPA variables.
3807 (symbol_list): Add entries for new IPA variables.
3808 (struct tracepoint): Add fields to hold the address range of the
3809 trampoline used by the tracepoint.
3810 (trampoline_buffer_head): New static variable.
3811 (trampoline_buffer_tail): Ditto.
3812 (claim_trampoline_space): New function.
3813 (have_fast_tracepoint_trampoline_buffer): New function.
3814 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3815 structure.
3816 (install_fast_tracepoint): Ditto, also add error buffer argument.
3817 (cmd_qtminftpilen): New function.
3818 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3819 (fast_tracepoint_from_trampoline_address): New function.
3820 (fast_tracepoint_collecting): Handle trampoline as part of jump
3821 pad space.
3822 (set_trampoline_buffer_space): New function.
3823 (initialize_tracepoint): Initialize new IPA variables.
3824 * target.h (struct target_ops): Add arguments to
3825 install_fast_tracepoint_jump_pad operation, add new
3826 get_min_fast_tracepoint_insn_len operation.
3827 (target_get_min_fast_tracepoint_insn_len): New.
3828 (install_fast_tracepoint_jump_pad): Add arguments.
3829 * server.h (IPA_BUFSIZ): Define.
3830 * linux-i386-ipa.c: Include extra header files.
3831 (initialize_fast_tracepoint_trampoline_buffer): New function.
3832 (initialize_low_tracepoint): Call it.
3833 * server.h (set_trampoline_buffer_space): Declare.
3834 (claim_trampoline_space): Ditto.
3835 (have_fast_tracepoint_trampoline_buffer): Ditto.
3836
1e4d1764
YQ
38372011-11-14 Yao Qi <yao@codesourcery.com>
3838
3839 * server.c (handle_query): Handle InstallInTrace for qSupported.
3840 * tracepoint.c (add_tracepoint): Sort list.
3841 (install_tracepoint, download_tracepoint): New.
3842 (cmd_qtdp): Call them to install and download tracepoints.
3843 (sort_tracepoints): Removed.
3844 (cmd_qtstart): Update.
3845
5c73ff4e
YQ
38462011-11-14 Yao Qi <yao@codesourcery.com>
3847
3848 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3849 * mem-break.h: Declare.
3850 * tracepoint.c (cmd_qtstart): Move some code to ...
3851 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3852 New.
3853 (download_tracepoints): Move some code to ...
3854 (download_tracepoint_1): ... here. New.
3855
86a30030
YQ
38562011-11-08 Yao Qi <yao@codesourcery.com>
3857
3858 * remote-utils.c (relocate_instruction): A comment fix.
3859
8d26e50c
JB
38602011-11-07 Joel Brobecker <brobecker@adacore.com>
3861
3862 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3863 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3864 dr_status_mirror and dr_control_mirror from debug_reg_state.
3865 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3866 (i386_initial_stuff): Remove use of deleted globals.
3867 (i386_get_thread_context, i386_set_thread_context,
3868 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3869 from debug_reg_state.
3870
a59306a3
YQ
38712011-11-05 Yao Qi <yao@codesourcery.com>
3872
3873 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3874 address as TPOINT's.
3875
3065dfb6
SS
38762011-11-02 Stan Shebs <stan@codesourcery.com>
3877
3878 * tracepoint.c (agent_mem_read_string): New function.
3879 (eval_agent_expr): Call it for tracenz.
3880 * server.c (handle_query): Report support for tracenz.
3881
fd0d8c7c
YQ
38822011-11-02 Yao Qi <yao@codesourcery.com>
3883
3884 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3885
609086b1
YQ
38862011-11-02 Yao Qi <yao@codesourcery.com>
3887
3888 * target.h: Fix a typo in comment.
3889
b9fd1791
PA
38902011-10-31 Pedro Alves <pedro@codesourcery.com>
3891
3892 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3893 clobber the breakpoints' shadows with fast tracepoint jumps.
3894 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3895 * target.c (write_inferior_memory): Also pass MYADDR down to
3896 check_mem_write.
3897
03583c20
UW
38982011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3899
3900 * configure.ac: Check support for personality routine.
3901 * configure: Regenerate.
3902 * config.in: Likewise.
3903 * linux-low.c: Include <sys/personality.h>.
3904 Define ADDR_NO_RANDOMIZE if necessary.
3905 (linux_create_inferior): Disable address space randomization when
3906 forking inferior, if requested.
3907 (linux_supports_disable_randomization): New function.
3908 (linux_target_ops): Install it.
3909 * server.h (disable_randomization): Declare.
3910 * server.c (disable_randomization): New global variable.
3911 (handle_general_set): Handle QDisableRandomization.
3912 (handle_query): Likewise for qSupported.
3913 (main): Support --disable-randomization and --no-disable-randomization
3914 command line arguments.
3915 * target.h (struct target_ops): Add supports_disable_randomization.
3916 (target_supports_disable_randomization): New macro.
3917
723b724b
MF
39182011-09-29 Mike Frysinger <vapier@gentoo.org>
3919
3920 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3921 ifdef check.
3922 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3923 [!PT_GETDSBT] (target_loadmap): New definition.
3924 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3925 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3926 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3927 and PT_GETDSBT to LINUX_LOADMAP.
3928 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3929 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3930
55329a5c 39312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
3932
3933 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3934 (arm_linux_hwbp_cap): New static variable.
3935 (arm_linux_get_hwbp_cap): Replace by ...
3936 (arm_linux_init_hwbp_cap): ... this new function.
3937 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3938 (arm_linux_get_hw_watchpoint_count): Likewise.
3939 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3940 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3941 (arm_prepare_to_resume): Use perror_with_name instead of error.
3942
55329a5c 39432011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
3944
3945 * linux-arm-low.c: Include <signal.h>.
3946 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3947 (struct arm_linux_hwbp_cap): New data type.
3948 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3949 (struct arm_linux_hw_breakpoint): New data type.
3950 (MAX_BPTS, MAX_WPTS): Define.
3951 (struct arch_process_info, struct arch_lwp_info): New data types.
3952 (arm_linux_get_hwbp_cap): New function.
3953 (arm_linux_get_hw_breakpoint_count): Likewise.
3954 (arm_linux_get_hw_watchpoint_count): Likewise.
3955 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3956 (arm_hwbp_control_initialize): Likewise.
3957 (arm_hwbp_control_is_enabled): Likewise.
3958 (arm_hwbp_control_is_initialized): Likewise.
3959 (arm_hwbp_control_disable): Likewise.
3960 (arm_linux_hw_breakpoint_equal): Likewise.
3961 (arm_linux_hw_point_initialize): Likewise.
3962 (struct update_registers_data): New data structure.
3963 (update_registers_callback: New function.
3964 (arm_insert_point): Likewise.
3965 (arm_remove_point): Likewise.
3966 (arm_stopped_by_watchpoint): Likewise.
3967 (arm_stopped_data_address): Likewise.
3968 (arm_new_process): Likewise.
3969 (arm_new_thread): Likewise.
3970 (arm_prepare_to_resume): Likewise.
3971 (the_low_target): Register arm_insert_point, arm_remove_point,
3972 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3973 arm_new_thread, and arm_prepare_to_resume.
3974
6b9801d4
SS
39752011-09-15 Stan Shebs <stan@codesourcery.com>
3976
3977 * server.h (struct emit_ops): Add compare-goto fields.
3978 * tracepoint.c (gdb_agent_op_sizes): New table.
3979 (emit_eq_goto): New function.
3980 (emit_ne_goto): New function.
3981 (emit_lt_goto): New function.
3982 (emit_le_goto): New function.
3983 (emit_gt_goto): New function.
3984 (emit_ge_goto): New function.
3985 (is_goto_target): New function.
3986 (compile_bytecodes): Recognize special cases of compare-goto
3987 combinations and call specialized emitters for them.
3988 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3989 (amd64_emit_ne_goto): New function.
3990 (amd64_emit_lt_goto): New function.
3991 (amd64_emit_le_goto): New function.
3992 (amd64_emit_gt_goto): New function.
3993 (amd64_emit_ge_goto): New function.
3994 (amd64_emit_ops): Add the new functions.
3995 (i386_emit_eq_goto): New function.
3996 (i386_emit_ne_goto): New function.
3997 (i386_emit_lt_goto): New function.
3998 (i386_emit_le_goto): New function.
3999 (i386_emit_gt_goto): New function.
4000 (i386_emit_ge_goto): New function.
4001 (i386_emit_ops): Add the new functions.
4002
bf15cbda
SS
40032011-09-08 Stan Shebs <stan@codesourcery.com>
4004
4005 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4006 (i386_emit_epilogue): Restore %ebx.
4007
943ca1dd
JZ
40082011-08-31 Jie Zhang <jzhang918@gmail.com>
4009
4010 * server.c (step_thread): Remove definition.
4011 (process_serial_event): Don't handle Hs.
4012 * server.h (step_thread): Remove declaration.
4013 * target.c (set_desired_inferior): Remove use of step_thread.
4014
e3deef73
LM
40152011-08-24 Luis Machado <lgustavo@codesourcery.com>
4016
4017 * linux-low.c: Include linux-procfs.h.
4018 (linux_attach_lwp_1): Update comments.
4019 (linux_attach): Scan for existing threads when attaching to a
4020 process that is the tgid.
4021 * Makefile.in: Update dependencies.
4022
13da1c97
LM
40232011-08-24 Luis Machado <lgustavo@codesourcery.com>
4024
4025 * configure.srv: Add linux-procfs.o dependencies.
4026
881127c9
YQ
40272011-08-14 Yao Qi <yao@codesourcery.com>
4028
4029 * target.h (struct target_ops): Fix indent.
4030 * win32-low.c (win32_target_ops): Fix comment.
4031
58dbd541
YQ
40322011-08-14 Andrew Jenner <andrew@codesourcery.com>
4033 Yao Qi <yao@codesourcery.com>
4034
4035 * Makefile.in (clean): Remove tic6x-*.c files.
4036 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4037 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4038 (tic6x-c64xp-linux.c): Likewise.
4039 * configure.srv: Add support for tic6x-*-uclinux.
4040 * linux-tic6x-low.c: New.
4041 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4042
78d85199
YQ
40432011-08-14 Andrew Stubbs <ams@codesourcery.com>
4044 Yao Qi <yao@codesourcery.com>
4045
4046 * target.h (struct target_ops): Add read_loadmap.
4047 * linux-low.c (struct target_loadseg): New type.
4048 (struct target_loadmap): New type.
4049 (linux_read_loadmap): New function.
4050 (linux_target_ops): Add linux_read_loadmap.
4051 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4052 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4053 to NULL.
78d85199 4054
a959a88d
EZ
40552011-08-05 Eli Zaretskii <eliz@gnu.org>
4056
4057 * win32-low.c: Include <stdint.h>.
4058
1ced966e
PA
40592011-07-22 Pedro Alves <pedro@codesourcery.com>
4060
4061 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4062 to the inferior here.
4063 (i386_remove_aligned_watchpoint): Ditto.
4064 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4065 fit part of the watchpoint in the debug registers.
4066 (i386_update_inferior_debug_regs): New.
4067 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4068 registers, and only update the inferior on success.
4069 (i386_low_remove_watchpoint): Ditto.
4070
d26e3629
KY
40712011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4072
4073 * linux-low.c (compare_ints, unique, list_threads, show_process,
4074 linux_core_of_thread): Delete.
4075 (linux_target_ops): Change linux_core_of_thread to
4076 linux_common_core_of_thread.
4077 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4078 * utils.c (malloc_failure): Change type of argument.
4079 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4080 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4081 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4082 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4083 (IPA_OBJS): Add common-utils-ipa.o.
4084 (ptid_h, linux_osdata_h): New macros.
4085 (server_h): Add common/common-utils.h, common/xml-utils.h,
4086 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4087 common/ptid.h.
4088 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4089 ptid.o, buffer.o): New rules.
4090 (linux-low.o): Add common/linux-osdata.h as a dependency.
4091 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4092 * configure.ac: Add AC_HEADER_DIRENT check.
4093 * config.in: Regenerate.
4094 * configure: Regenerate.
4095 * remote-utils.c (xml_escape_text): Delete.
4096 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4097 buffer_xml_printf): Move to common/buffer.c.
4098 * server.c (main): Remove call to initialize_inferiors.
4099 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4100 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4101 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4102 internal_error, gdb_assert, gdb_assert_fail): Delete.
4103 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4104 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4105 common/buffer.h.
4106 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4107 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4108 initialize_inferiors): Delete.
4109
2275a1a7
PA
41102011-07-20 Pedro Alves <pedro@codesourcery.com>
4111
4112 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4113 symbol error.
4114
0a5b1e09
PA
41152011-05-31 Pedro Alves <pedro@codesourcery.com>
4116
4117 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4118 assertion.
4119 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4120
6938fd34
YQ
41212011-05-26 Yao Qi <yao@codesourcery.com>
4122
4123 * Makefile.in (thread-db.o): Track dependence to
4124 common/gdb_thread_db.h.
4125 * thread-db.c: include gdb_thread_db.h from right place.
4126
b481f9e0
TT
41272011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4128
4129 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4130 __FILE__ and __LINE__ to internal_error.
4131
98a5dd13
DE
41322011-05-13 Doug Evans <dje@google.com>
4133
4134 * thread-db.c (try_thread_db_load_from_sdir): New function.
4135 (try_thread_db_load_from_dir): New function.
4136 (thread_db_load_search): Handle $sdir, ignore $pdir.
4137 Remove trying of system directories if search of
4138 libthread-db-search-path fails, that is now done via $sdir.
4139
d248b706
KY
41402011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4141
4142 * server.c (handle_query): Add EnableDisableTracepoints to the list
4143 of supported features.
43aaf8b6 4144 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4145 tracepoints.
43aaf8b6
PA
4146 (cmd_qtenable_disable): New.
4147 (cmd_qtstart): Install tracepoints even if disabled.
4148 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4149 receiving a QTEnable or QTDisable packet.
4150 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4151 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4152 tracepoints.
4153 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4154
84e578fb
DE
41552011-05-10 Doug Evans <dje@google.com>
4156
4157 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4158
71f55dd8
DE
41592011-05-04 Doug Evans <dje@google.com>
4160
4161 * linux-low.c (linux_join): Skip process lookup.
4162 * spu-low.c (spu_join): Ditto.
4163 * server.c (join_inferiors_callback): Delete.
4164 (process_serial_event): For 'D' packet (detach) call join_inferior
4165 directly.
4166
4d393d60
JM
41672011-05-04 Joseph Myers <joseph@codesourcery.com>
4168
4169 * README: Don't mention xscale*-*-linux*.
4170 * configure.srv (xscale*-*-linux*): Don't handle target.
4171
b00ad6ff
NF
41722011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4173
4174 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4175 casting pointers.
4176 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4177 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4178 (i386_emit_void_call_2): Likewise.
4179
af96c192
YQ
41802011-04-26 Yao Qi <yao@codesourcery.com>
4181
43aaf8b6
PA
4182 * linux-low.c: Move common macros to linux-ptrace.h.
4183 Include linux-ptrace.h.
af96c192
YQ
4184 * Makefile.in (linux_ptrace_h): New.
4185 (linux-low.o): Depends on linux-ptrace.h.
4186
03f2bd59
JK
41872011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4188
4189 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4190 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4191 (remote_prepare): New function with most of the TCP code from ...
4192 (remote_open): ... here. Detect PORT here unconditionally. Move also
4193 setting transport_is_reliable.
4194 * server.c (run_once): New variable.
4195 (gdbserver_usage): Document it.
4196 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4197 the first run if RUN_ONCE.
4198 * server.h (run_once, remote_prepare): New declarations.
4199
7a9dd1b2
TT
42002011-04-19 Tom Tromey <tromey@redhat.com>
4201
4202 * win32-low.c (handle_load_dll): Remove duplicate "the".
4203
81239425
PM
42042011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4205
4206 Remove support for old Cygwin 1.5 versions.
4207 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4208 function to avoid warning.
4209 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4210 warning.
4211
9e0627f1
PM
42122011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4213
4214 * gdbserver/server.h (Macro _): Define it if not available.
4215
588eebee
MS
42162011-03-14 Michael Snyder <msnyder@vmware.com>
4217
348af9f7 4218 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4219
43f70d4c
JB
42202011-03-10 Joel Brobecker <brobecker@adacore.com>
4221
4222 * Makefile.in (maintainer-clean realclean distclean): Remove
4223 "make ... subdir_do" command.
4224
348af9f7
MS
42252011-03-10 Michael Snyder <msnyder@vmware.com>
4226
4227 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4228
4229 * server.c (handle_v_run): Free alloced buffer on early return.
4230
e637a4f5
YQ
42312011-03-09 Yao Qi <yao@codesourcery.com>
4232
4233 Revert:
4234 2011-03-04 Yao Qi <yao@codesourcery.com>
4235
4236 * Makefile.in: Remove GNU make feature --directory.
4237
4238 2011-03-05 Yao Qi <yao@codesourcery.com>
4239
4240 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4241 (subdir_do): New make target. Copied from gdb/Makefile.
4242 (maintainer-clean, realclean, distclean, clean): Call corresponding
4243 make targets in common/Makefile.
4244
4245 2011-02-11 Yao Qi <yao@codesourcery.com>
4246
4247 * configure.ac: Call AC_PROG_RANLIB.
4248 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4249 * configure: Regenerate.
4250
e6edda56
JK
42512011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4252
4253 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4254
e5141119
JB
42552011-03-06 Yao Qi <yao@codesourcery.com>
4256
4257 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4258
64794aa4
JB
42592011-03-05 Yao Qi <yao@codesourcery.com>
4260
4261 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4262 (subdir_do): New make target. Copied from gdb/Makefile.
4263 (maintainer-clean, realclean, distclean, clean): Call corresponding
4264 make targets in common/Makefile.
4265
7a762829
YQ
42662011-03-04 Yao Qi <yao@codesourcery.com>
4267
4268 * Makefile.in: Remove GNU make feature --directory.
4269
348af9f7
MS
42702011-03-04 Michael Snyder <msnyder@vmware.com>
4271
4272 * server.c (queue_stop_reply): Call xmalloc not malloc.
4273
42742011-03-02 Michael Snyder <msnyder@vmware.com>
4275
4276 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4277
9f72fee2
MS
42782011-02-28 Michael Snyder <msnyder@vmware.com>
4279
588eebee
MS
4280 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4281 (cmd_qtframe): Ditto.
4282 (cmd_qtbuffer): Ditto.
4283 (cmd_bigqtbuffer): Ditto.
4284
9f72fee2
MS
4285 * utils.c (decimal2str): Initialize 'width' to nine, then
4286 don't mess with it.
4287
8040bd49
UW
42882011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4289
4290 * hostio.c (require_data): Free *data, not data.
4291
7e52cbd0
JK
42922011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4293
4294 * hostio.c (require_data): Use free, not xfree.
4295
9130f83e
MS
42962011-02-27 Michael Snyder <msnyder@vmware.com>
4297
4b812f4e
MS
4298 * server.c (handle_query): Discard unused value.
4299
9130f83e
MS
4300 * hostio.c (require_data): Free malloc memory before returning
4301 error.
4302
69d37113
MS
43032011-02-26 Michael Snyder <msnyder@vmware.com>
4304
4305 * linux-low.c (list_threads): Call closedir for dirent.
4306
35f5825a
MS
43072011-02-27 Michael Snyder <msnyder@vmware.com>
4308
2a589cef
MS
4309 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4310 a case statement falls through.
4311
0adea5f7
MS
4312 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4313
35f5825a
MS
4314 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4315 in comparison.
4316
238f1c74
MS
43172011-02-26 Michael Snyder <msnyder@vmware.com>
4318
4319 * utils.c (decimal2str): Eliminate dead code and dead param.
4320 (pulongest): Drop dead param from call to decimal2str.
4321 (plongest): Ditto.
4322
633ff500
JB
43232011-02-24 Joel Brobecker <brobecker@adacore.com>
4324
4325 Revert the following patch (not approved yet):
4326 2011-02-21 Hui Zhu <teawater@gmail.com>
4327 * tracepoint.c (tp_printf): New function.
4328 (eval_agent_expr): Handle gdb_agent_op_printf.
4329
f9c6ff72
HZ
43302011-02-21 Hui Zhu <teawater@gmail.com>
4331
4332 * tracepoint.c (tp_printf): New function.
4333 (eval_agent_expr): Handle gdb_agent_op_printf.
4334
94d5e490
TT
43352011-02-18 Tom Tromey <tromey@redhat.com>
4336
4337 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4338 (tracepoint.o): Likewise.
4339 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4340 (gdb_agent_op_names): Likewise.
4341
c7f96d2b
TT
43422011-02-18 Tom Tromey <tromey@redhat.com>
4343
4344 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4345 gdb_agent_op_rot>: New constants.
4346 (gdb_agent_op_names): Add pick and roll.
4347 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4348 cases.
4349
0feedb2c
JK
43502011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4351
4352 * aclocal.m4: Regenerated with aclocal-1.11.1.
4353
b3b9301e
PA
43542011-02-14 Pedro Alves <pedro@codesourcery.com>
4355
4356 * server.c (handle_qxfer_traceframe_info): New.
4357 (qxfer_packets): Register "traceframe-info".
4358 (handle_query): Report support for qXfer:traceframe-info:read+.
4359 * tracepoint.c (match_blocktype): New.
4360 (traceframe_find_block_type): Rename to ...
4361 (traceframe_walk_blocks): ... this. Add callback filter argument,
4362 and use it.
4363 (traceframe_find_block_type): New, reimplemented on top of
4364 traceframe_walk_blocks.
4365 (build_traceframe_info_xml): New.
4366 (traceframe_read_info): New.
4367 * server.h (traceframe_read_info): Declare.
4368
4f3e6fb7
YQ
43692011-02-11 Yao Qi <yao@codesourcery.com>
4370
4371 * configure.ac: Call AC_PROG_RANLIB.
4372 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4373 * configure: Regenerate.
4374
764880b7
PA
43752011-02-07 Pedro Alves <pedro@codesourcery.com>
4376
4377 * server.c (gdb_read_memory): Change return semantics to allow
4378 partial transfers.
4379 (handle_search_memory_1): Adjust.
4380 (process_serial_event) <'m' packet>: Handle partial transfers.
4381 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4382
1c79eb8a
PA
43832011-01-28 Pedro Alves <pedro@codesourcery.com>
4384
4385 * regcache.c (init_register_cache): Initialize
4386 regcache->register_status.
4387 (free_register_cache): Release regcache->register_status.
4388 (regcache_cpy): Copy register_status.
4389 (registers_to_string): Print 'x's for unavailable registers.
4390 (supply_register): Mark the register's status valid or
4391 unavailable, depending on whether a buffer was passed in or not.
4392 (supply_register_zeroed): New.
4393 (supply_regblock): Mark the registers' status valid or
4394 unavailable, depending on whether a buffer was passed in or not.
4395 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4396 (struct regcache): New `register_status' field.
4397 (supply_register_zeroed): Declare.
4398 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4399 supply_register_zeroed, rather than passing a NULL buffer to
4400 supply_register.
4401 * tracepoint.c (fetch_traceframe_registers): Update comment.
4402
85724a0e
PA
44032011-01-28 Pedro Alves <pedro@codesourcery.com>
4404
4405 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4406 buffer explicit.
4407
d08aafef
PA
44082011-01-25 Pedro Alves <pedro@codesourcery.com>
4409
4410 * server.h (decode_xfer_write): Change prototype.
4411 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4412 and don't extract the annex here.
4413 * server.c (decode_xfer_read): Remove `annex' parameter,
4414 and don't extract the annex here.
4415 (decode_xfer): New.
4416 (struct qxfer): New.
4417 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4418 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4419 (handle_qxfer_statictrace): New functions, abstracted out from
4420 handle_query, and made to use the struct qxfer interface.
4421 (handle_threads_qxfer_proper): Rename to ...
4422 (handle_qxfer_threads_proper): ... this.
4423 (handle_threads_qxfer): Rename to ...
4424 (handle_qxfer_threads): ... this. Adjust.
4425 (qxfer_packets): New array.
4426 (handle_qxfer): New function.
4427 (handle_query): Use handle_qxfer.
4428
493e2a69
MS
44292011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4430
4431 * gdbreplay.c: Shorten lines of >= 80 columns.
4432 * linux-low.c: Ditto.
4433 * linux-ppc-low.c: Ditto.
4434 * linux-s390-low.c: Ditto.
4435 * linux-sparc-low.c: Ditto.
4436 * linux-x86-low.c: Ditto.
4437 * linux-xtensa-low.c: Ditto.
4438 * mem-break.c: Ditto.
4439 * nto-low.c: Ditto.
4440 * regcache.h: Ditto.
4441 * remote-utils.c: Ditto.
4442 * server.c: Ditto.
4443 * server.h: Ditto.
4444 * thread-db.c: Ditto.
4445 * tracepoint.c: Ditto.
4446 * utils.c: Ditto.
4447 * win32-low.h: Ditto.
4448
44944448
JB
44492011-01-05 Joel Brobecker <brobecker@adacore.com>
4450
4451 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4452 update.
4453
71ce852c
JB
44542011-01-01 Joel Brobecker <brobecker@adacore.com>
4455
4456 * server.c (gdbserver_version): Update copyright year in version
4457 output.
4458 * gdbreplay.c (gdbreplay_version): Ditto.
4459
eb826dc6
MF
44602010-12-29 Jie Zhang <jie.zhang@analog.com>
4461
4462 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4463 * linux-bfin-low.c: New file.
4464 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4465 PT_DATA_ADDR for BFIN targets.
4466 * Makefile.in (SFILES): Add linux-bfin-low.c.
4467 (clean): Remove reg-bfin.c.
4468 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4469 * README: Mention supported Blackfin targets.
4470
39ab222a
MF
44712010-12-23 Mike Frysinger <vapier@gentoo.org>
4472
4473 * .gitignore: New file.
4474
a1f2ce7d
MF
44752010-11-16 Mike Frysinger <vapier@gentoo.org>
4476
4477 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4478
f474844c
JZ
44792010-10-22 Jie Zhang <jie@codesourcery.com>
4480
4481 * Makefile.in: Add FLAGS_TO_PASS variable.
4482 (install): Remove dependency of install-only and recursively
4483 invoke make for install-only.
4484
f1048712
DE
44852010-10-04 Doug Evans <dje@google.com>
4486
4487 * Makefile.in (uninstall): Use $(DESTDIR).
4488
b53a1623
PA
44892010-09-24 Pedro Alves <pedro@codesourcery.com>
4490
e6ee044d
PA
4491 PR gdb/11842
4492
b53a1623
PA
4493 * linux-x86-low.c (compat_siginfo_from_siginfo)
4494 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4495 si_code is < 0. Check for si_code == SI_TIMER before checking for
4496 si_code < 0.
4497
fa1bd1e4
JB
44982010-09-13 Joel Brobecker <brobecker@adacore.com>
4499
4500 * lynx-i386-low.c: New file.
4501 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4502
47fac8f8
JB
45032010-09-13 Joel Brobecker <brobecker@adacore.com>
4504
4505 * lynx-low.c (ptrace_request_to_str): Remove handling for
4506 request values that have been removed in LynxOS 5.x.
4507
1adfc54d
JB
45082010-09-13 Joel Brobecker <brobecker@adacore.com>
4509
4510 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4511 <ptrace.h>
4512
c2a66c29
NS
45132010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4514
4515 * configure.ac: Add --enable-inprocess-agent option.
4516 * configure: Rebuilt.
4517
32fcada3
YQ
45182010-09-06 Yao Qi <yao@codesourcery.com>
4519
4520 * linux-low.c (linux_kill): Remove unused variable.
4521 (linux_stabilize_threads): Likewise.
4522 * server.c (start_inferior): Likewise.
4523 (queue_stop_reply_callback): Likewise.
4524 * tracepoint.c (do_action_at_tracepoint): Likewise.
4525
0cccb683
YQ
45262010-09-06 Yao Qi <yao@codesourcery.com>
4527
4528 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4529 on return.
4530
423ec54c
JK
45312010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4532
4533 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4534
12ac6819
PA
45352010-09-06 Pedro Alves <pedro@codesourcery.com>
4536
4537 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4538 "$(IPA_DEPFILES)".
4539
8ed54b31
JB
45402010-09-01 Joel Brobecker <brobecker@adacore.com>
4541
4542 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4543 gdbserver/lynx-ppc-low.c: New files.
4544 * Makefile.in (lynx_low_h): New variable.
4545 (lynx-low.o, lynx-ppc-low.o): New rules.
4546 * configure.ac: On LynxOS, link with -lnetinet.
4547 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4548 * configure: regenerate.
4549
bb0116a4
JB
45502010-09-01 Joel Brobecker <brobecker@adacore.com>
4551
4552 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4553 * configure.ac: Add check for vasprintf and vsnprintf.
4554 * configure, config.in: Regenerate.
4555 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4556
a778ab81 45572010-09-01 Joel Brobecker <brobecker@adacore.com>
4558
4559 * gdbreplay.c: Move include of alloca.h up, next to include of
4560 malloc.h.
4561 * server.h: Add include of malloc.h.
4562 * mem-break.c: Remove include of malloc.h.
4563 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4564
8b034a19 45652010-09-01 Joel Brobecker <brobecker@adacore.com>
4566
4567 * Makefile.in (memmem.o): Build with -Wno-error.
4568
45692010-09-01 Joel Brobecker <brobecker@adacore.com>
4570
4571 * utils.c (xsnprintf): Make non-static.
4572 * server.h: Add xsnprintf declaration.
4573 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4574 replace calls to snprintf by calls to xsnprintf throughout.
4575
45762010-09-01 Joel Brobecker <brobecker@adacore.com>
4577
4578 * configure.ac: Add configure check for alloca.
4579 * configure, config.in: Regenerate.
4580 * server.h: Include alloca.h if it exists.
4581 * gdbreplay.c: Include alloca.h if it exists.
4582
1a981360
PA
45832010-08-28 Pedro Alves <pedro@codesourcery.com>
4584
4585 * linux-low.c (__SIGRTMIN): Define if not already defined.
4586 (linux_create_inferior): Check for __ANDROID__ rather than
4587 __SIGRTMIN.
4588 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4589 are already deferred.
4590 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4591 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4592 stopped and already has a pending signal to report.
4593 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4594 a pending signal to report or is moving out of a jump pad.
4595 (linux_init_signals): Check for __ANDROID__ rather than
4596 __SIGRTMIN.
4597
b4d51a55
PA
45982010-08-28 Pedro Alves <pedro@codesourcery.com>
4599
4600 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4601 debug_threads check. Avoid a linear search when not doing debug
4602 output.
4603
ec48365d
PA
46042010-08-27 Pedro Alves <pedro@codesourcery.com>
4605
4606 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4607 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4608 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4609 (process_event): Change local fd's type to gdb_fildes_t.
4610 (create_file_handler): Adjust prototype.
4611 (delete_file_handler): Adjust prototype.
4612 (handle_file_event): Adjust prototype. Use pfildes.
4613 (create_file_event): Adjsut prototype.
4614 * remote-utils.c (remote_desc, listen_desc): Change type to
4615 gdb_fildes_t.
4616 * server.h: New gdb_fildes_t typedef.
4617 [USE_WIN32API]: Include winsock2.h.
4618 (delete_file_handler, add_file_handler): Adjust prototypes.
4619 (pfildes): Declare.
4620 * utils.c (pfildes): New.
4621
854d88f0
PA
46222010-08-27 Pedro Alves <pedro@codesourcery.com>
4623
4624 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4625 * configure: Regenerate.
4626
0146f85b
PA
46272010-08-27 Pedro Alves <pedro@codesourcery.com>
4628
4629 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4630 (linux_done_accessing_memory): ... this.
4631 (linux_target_ops): Adjust.
4632 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4633 * nto-low.c (nto_target_ops): Adjust comment.
4634 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4635 * spu-low.c (spu_target_ops): Adjust comment.
4636 * target.h (target_ops): Rename unprepare_to_access_memory field
4637 to done_accessing_memory.
4638 (unprepare_to_access_memory): Rename to ...
4639 (done_accessing_memory): ... this.
4640
90d74c30
PA
46412010-08-26 Pedro Alves <pedro@codesourcery.com>
4642
4643 * linux-low.c (linux_prepare_to_access_memory): New.
4644 (linux_unprepare_to_access_memory): New.
4645 (linux_target_ops): Install them.
4646 * server.c (read_memory): Rename to ...
4647 (gdb_read_memory): ... this. Use
4648 prepare_to_access_memory/prepare_to_access_memory.
4649 (write_memory): Rename to ...
4650 (gdb_write_memory): ... this. Use
4651 prepare_to_access_memory/prepare_to_access_memory.
4652 (handle_search_memory_1): Adjust.
4653 (process_serial_event): Adjust.
4654 * target.h (struct target_ops): New fields
4655 prepare_to_access_memory and unprepare_to_access_memory.
4656 (prepare_to_access_memory, unprepare_to_access_memory): New.
4657 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4658 prepare_to_access_memory/prepare_to_access_memory.
4659 * nto-low.c (nto_target_ops): Adjust.
4660 * spu-low.c (spu_target_ops): Adjust.
4661 * win32-low.c (win32_target_ops): Adjust.
4662
fd467969
PA
46632010-08-26 Pedro Alves <pedro@codesourcery.com>
4664
4665 * Makefile.in (WARN_CFLAGS): Get it from configure.
4666 (WERROR_CFLAGS): New.
4667 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4668 * configure.ac: Introduce --enable-werror, which adds -Werror to
4669 the compiler command line. Enabled by default. Disable with
4670 --disable-werror. Add -Wdeclaration-after-statement
4671 Wpointer-arith and -Wformat-nonliteral to warning flags.
4672 * configure: Regenerate.
4673
331e2f5f
PA
46742010-08-26 Pedro Alves <pedro@codesourcery.com>
4675
4676 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4677
e581f2b4
PA
46782010-08-26 Pedro Alves <pedro@codesourcery.com>
4679
4680 * gdbreplay.c (remote_error): New.
4681 (gdbchar): New.
4682 (expect): Use gdbchar. Check for error reading from GDB.
4683 Clarify sync error output.
4684 (play): Check for errors writing to GDB.
4685 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4686 * remote-utils.c (getpkt): Check for errors writing to the remote
4687 descriptor.
4688
3c11dd79
PA
46892010-08-25 Pedro Alves <pedro@codesourcery.com>
4690
4691 * linux-low.c (linux_wait_1): Move non-debugging code out of
4692 `debug_threads' control.
4693
d20a8ad9
PA
46942010-08-25 Pedro Alves <pedro@codesourcery.com>
4695
4696 * linux-low.c (linux_wait_1): Don't set last_status here.
4697 * server.c (push_event, queue_stop_reply_callback): Assert we're
4698 not pushing a TARGET_WAITKIND_IGNORE event.
4699 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4700 (myresume, handle_target_event): Set the thread's last_resume_kind
4701 and last_status from the target returned status.
4702
964e4306
PA
47032010-08-25 Pedro Alves <pedro@codesourcery.com>
4704
4705 PR threads/10729
4706
4707 * linux-x86-low.c (update_debug_registers_callback): New.
4708 (i386_dr_low_set_addr): Use it.
4709 (i386_dr_low_get_addr): New.
4710 (i386_dr_low_set_control): Use update_debug_registers_callback.
4711 (i386_dr_low_get_control): New.
4712 (i386_dr_low_get_status): Adjust.
4713 * linux-low.c (linux_stop_lwp): New.
4714 * linux-low.h (linux_stop_lwp): Declare.
4715
4716 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4717 argument instead of a i386_debug_reg_state.
4718 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4719 a i386_debug_reg_state.
4720 (i386_insert_aligned_watchpoint): Adjust.
4721 (i386_remove_aligned_watchpoint): Adjust.
4722 (i386_low_stopped_data_address): Read the debug registers from the
4723 inferior instead of from the mirrors.
4724 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4725 (i386_dr_low_get_addr): Declare.
4726 (i386_dr_low_get_control): Declare.
4727 (i386_dr_low_get_status): Change prototype.
4728
4729 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4730 (i386_dr_low_get_addr): New.
4731 (i386_dr_low_get_control): New.
4732 (i386_dr_low_get_status): Adjust prototype. Return
4733 dr_status_mirror.
4734 (i386_initial_stuff): Clear dr_status_mirror and
4735 dr_control_mirror.
4736 (i386_get_thread_context): Adjust.
4737 (i386_set_thread_context): Adjust.
4738 (i386_thread_added): Adjust.
4739
5f21a75b
PA
47402010-08-24 Pedro Alves <pedro@codesourcery.com>
4741
4742 * linux-low.h (linux_thread_area): Delete declaration.
4743
3e4c1235
TS
47442010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4745
4746 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4747 after its termination.
4748
1971b033
PA
47492010-08-09 Pedro Alves <pedro@codesourcery.com>
4750
4751 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4752 (gdb_wants_all_stopped): Delete.
4753 (linux_wait_1): Don't call them.
4754 * server.c (handle_v_cont): Tag all threads as want-stopped.
4755 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4756 stopped as "client-wants-stopped".
4757
310444ac
PA
47582010-07-31 Pedro Alves <pedro@codesourcery.com>
4759
4760 * Makefile.in (signals_h): New.
4761 (server_h): Depend on it.
4762 (server.o): Don't depend on $(signals_def).
4763 (signals.o): Depend on $(signals_def).
4764
a19cae16
JK
47652010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4766
4767 * Makefile.in (signals_def): New.
4768 (server_h): Append include/gdb/signals.h and signals_def.
4769 (server.o): Append signals_def.
4770
30d50328
JK
47712010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4772
4773 * server.c (handle_target_event): Use target_signal_to_host for
4774 resume_info.sig initialization.
4775 * target.h (struct thread_resume) <sig>: New comment.
4776
5c3216e2
OS
47772010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4778
c6f46ca0
OS
4779 * server.c (handle_query): strcpy() the returned string from paddress()
4780 instead of sprintf().
5c3216e2
OS
4781 * utils.c (paddress): Return phex_nz().
4782
6bd31874
JB
47832010-07-07 Joel Brobecker <brobecker@adacore.com>
4784
4785 * server.c (handle_v_cont): Call mourn_inferior if process
4786 just exited.
4787 (myresume): Likewise.
4788
0fb4aa4b
PA
47892010-07-01 Pedro Alves <pedro@codesourcery.com>
4790
4791 Static tracepoints, and integration with UST.
4792
4793 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4794 * mem-break.c (uninsert_all_breakpoints)
4795 (reinsert_all_breakpoints): New.
4796 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4797 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4798 (gdb_agent_ust_loaded, helper_thread_id)
4799 (gdb_agent_helper_thread_id): New macros.
4800 (struct ipa_sym_addresses): Add addr_ust_loaded,
4801 addr_helper_thread_id, addr_cmd_buf.
4802 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4803 (in_process_agent_loaded_ust): New.
4804 (write_e_ust_not_loaded): New.
4805 (maybe_write_ipa_ust_not_loaded): New.
4806 (struct collect_static_trace_data_action): New.
4807 (enum tracepoint_type) <static_tracepoint>: New.
4808 (struct tracepoint) <handle>: Mention static tracepoints.
4809 (struct static_tracepoint_ctx): New.
4810 (CMD_BUF_SIZE): New.
4811 (add_tracepoint_action): Handle static tracepoint actions.
4812 (unprobe_marker_at): New.
4813 (clear_installed_tracepoints): Handle static tracepoints.
4814 (cmd_qtdp): Handle static tracepoints.
4815 (probe_marker_at): New.
4816 (cmd_qtstart): Handle static tracepoints.
4817 (response_tracepoint): Handle static tracepoints.
4818 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4819 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4820 (get_context_regcache): Handle static tracepoints.
4821 (do_action_at_tracepoint): Handle static tracepoint actions.
4822 (traceframe_find_block_type): Handle static trace data blocks.
4823 (traceframe_read_sdata): New.
4824 (download_tracepoints): Download static tracepoint actions.
4825 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4826 (GDB_PROBE_NAME): New.
4827 (ust_ops): New.
4828 (GET_UST_SYM): New.
4829 (USTF): New.
4830 (dlsym_ust): New.
4831 (ust_marker_to_static_tracepoint): New.
4832 (gdb_probe): New.
4833 (collect_ust_data_at_tracepoint): New.
4834 (gdb_ust_probe): New.
4835 (UNIX_PATH_MAX, SOCK_DIR): New.
4836 (gdb_ust_connect_sync_socket): New.
4837 (resume_thread, stop_thread): New.
4838 (run_inferior_command): New.
4839 (init_named_socket): New.
4840 (gdb_ust_socket_init): New.
4841 (cstr_to_hexstr): New.
4842 (next_st): New.
4843 (first_marker, next_marker): New.
4844 (response_ust_marker): New.
4845 (cmd_qtfstm, cmd_qtsstm): New.
4846 (unprobe_marker_at, probe_marker_at): New.
4847 (cmd_qtstmat, gdb_ust_thread): New.
4848 (gdb_ust_init): New.
4849 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4850 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4851 (ST_REGENTRY): New.
4852 (x86_64_st_collect_regmap): New.
4853 (X86_64_NUM_ST_COLLECT_GREGS): New.
4854 (AMD64_RIP_REGNUM): New.
4855 (supply_static_tracepoint_registers): New.
4856 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4857 (ST_REGENTRY): New.
4858 (i386_st_collect_regmap): New.
4859 (i386_NUM_ST_COLLECT_GREGS): New.
4860 (supply_static_tracepoint_registers): New.
4861 * server.c (handle_query): Handle qXfer:statictrace:read.
4862 <qSupported>: Report support for StaticTracepoints, and
4863 qXfer:statictrace:read features.
4864 * server.h (traceframe_read_sdata)
4865 (supply_static_tracepoint_registers): Declare.
4866 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4867 (unpack_varlen_hex): Include in IPA build.
4868 * Makefile.in (ustlibs, ustinc): New.
4869 (IPA_OBJS): Add remote-utils-ipa.o.
4870 ($(IPA_LIB)): Link -ldl and -lpthread.
4871 (UST_CFLAGS): New.
4872 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4873 * config.in, configure: Regenerate.
4874
9e4344e5
PA
48752010-06-20 Ian Lance Taylor <iant@google.com>
4876 Pedro Alves <pedro@codesourcery.com>
4877
4878 * linux-x86-low.c (always_true): Delete.
4879 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4880 trying to fool the compiler with always_true.
4881
c6beb2cb
PA
48822010-06-20 Pedro Alves <pedro@codesourcery.com>
4883
4884 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4885 conditions in gdbserver.
4886
d2ed6730
UW
48872010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4888
4889 * spu-low.c (spu_read_memory): Wrap around local store limit.
4890 (spu_write_memory): Likewise.
4891
4e29fb54
PA
48922010-06-15 Pedro Alves <pedro@codesourcery.com>
4893
4894 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4895 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4896 LONGEST uses.
4897 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4898 uses.
4899 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4900 uses with LONGEST uses.
4901
6a271cae
PA
49022010-06-14 Stan Shebs <stan@codesourcery.com>
4903 Pedro Alves <pedro@codesourcery.com>
4904
4905 Bytecode compiler.
4906
4907 * linux-x86-low.c: Include limits.h.
4908 (add_insns): New.
4909 (always_true): New.
4910 (EMIT_ASM): New.
4911 (EMIT_ASM32): New.
4912 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4913 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4914 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4915 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4916 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4917 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4918 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4919 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4920 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4921 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4922 (amd64_emit_void_call_2): New.
4923 (amd64_emit_ops): New.
4924 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4925 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4926 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4927 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4928 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4929 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4930 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4931 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4932 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4933 (i386_emit_stack_adjust, i386_emit_int_call_1)
4934 (i386_emit_void_call_2): New.
4935 (i386_emit_ops): New.
4936 (x86_emit_ops): New.
4937 (the_low_target): Install x86_emit_ops.
4938 * server.h (struct emit_ops): New.
4939 (get_raw_reg_func_addr): Declare.
4940 (current_insn_ptr, emit_error): Declare.
4941 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4942 (set_trace_state_variable_value): New defines.
4943 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4944 addr_get_trace_state_variable_value and
4945 addr_set_trace_state_variable_value.
4946 (symbol_list): New fields for get_raw_reg,
4947 get_trace_state_variable_value and set_trace_state_variable_value.
4948 (condfn): New typedef.
4949 (struct tracepoint): New field `compiled_cond'.
4950 (do_action_at_tracepoint): Clear compiled_cond.
4951 (get_trace_state_variable_value, set_trace_state_variable_value):
4952 Export in the IPA.
4953 (condition_true_at_tracepoint): If there's a compiled condition,
4954 run that.
4955 (current_insn_ptr, emit_error): New globals.
4956 (struct bytecode_address): New.
4957 (get_raw_reg_func_addr): New.
4958 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4959 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4960 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4961 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4962 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4963 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4964 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4965 (compile_tracepoint_condition, compile_bytecodes): New.
4966 * target.h (emit_ops): Forward declare.
4967 (struct target_ops): New field emit_ops.
4968 (target_emit_ops): New.
4969 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4970 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4971 * linux-low.c (linux_emit_ops): New.
4972 (linux_target_ops): Install it.
4973 * linux-low.h (struct linux_target_ops): New field emit_ops.
4974
92b72907
UW
49752010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4976
4977 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4978 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4979
fa593d66
PA
49802010-06-01 Pedro Alves <pedro@codesourcery.com>
4981 Stan Shebs <stan@codesourcery.com>
4982
4983 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4984 (all): Depend on $(extra_libraries).
4985 (install-only): Install the IPA.
4986 (IPA_OBJS, IPA_LIB): New.
4987 (clean): Remove the IPA lib.
4988 (IPAGENT_CFLAGS): New.
4989 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4990 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4991 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4992 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4993 * configure.ac: Check for atomic builtins support in the compiler.
4994 (IPA_DEPFILES, extra_libraries): Define.
4995 * configure.srv (ipa_obj): Add description.
4996 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4997 (i[34567]86-*-linux*): Set ipa_obj.
4998 (x86_64-*-linux*): Set ipa_obj.
4999 * linux-low.c (stabilizing_threads): New.
5000 (supports_fast_tracepoints): New.
5001 (linux_detach): Stabilize threads before detaching.
5002 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5003 the lwp is either not stabilizing, or is moving out of a jump pad.
5004 (linux_fast_tracepoint_collecting): New.
5005 (maybe_move_out_of_jump_pad): New.
5006 (enqueue_one_deferred_signal): New.
5007 (dequeue_one_deferred_signal): New.
5008 (linux_wait_for_event_1): If moving out of a jump pad, defer
5009 pending signals to later.
5010 (linux_stabilize_threads): New.
5011 (linux_wait_1): Check if threads need moving out of jump pads, and
5012 do it if so.
5013 (stuck_in_jump_pad_callback): New.
5014 (move_out_of_jump_pad_callback): New.
5015 (lwp_running): New.
5016 (linux_resume_one_lwp): Handle moving out of jump pads.
5017 (linux_set_resume_request): Dequeue deferred signals.
5018 (need_step_over_p): Also step over fast tracepoint jumps.
5019 (start_step_over): Also uninsert fast tracepoint jumps.
5020 (finish_step_over): Also reinsert fast tracepoint jumps.
5021 (linux_install_fast_tracepoint_jump): New.
5022 (linux_target_ops): Install linux_stabilize_threads and
5023 linux_install_fast_tracepoint_jump_pad.
5024 * linux-low.h (linux_target_ops) <get_thread_area,
5025 install_fast_tracepoint_jump_pad>: New fields.
5026 (struct lwp_info) <collecting_fast_tracepoint,
5027 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5028 (linux_get_thread_area): Declare.
5029 * linux-x86-low.c (jump_insn): New.
5030 (x86_get_thread_area): New.
5031 (append_insns): New.
5032 (push_opcode): New.
5033 (amd64_install_fast_tracepoint_jump_pad): New.
5034 (i386_install_fast_tracepoint_jump_pad): New.
5035 (x86_install_fast_tracepoint_jump_pad): New.
5036 (the_low_target): Install x86_get_thread_area and
5037 x86_install_fast_tracepoint_jump_pad.
5038 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5039 (struct fast_tracepoint_jump): New.
5040 (fast_tracepoint_jump_insn): New.
5041 (fast_tracepoint_jump_shadow): New.
5042 (find_fast_tracepoint_jump_at): New.
5043 (fast_tracepoint_jump_here): New.
5044 (delete_fast_tracepoint_jump): New.
5045 (set_fast_tracepoint_jump): New.
5046 (uninsert_fast_tracepoint_jumps_at): New.
5047 (reinsert_fast_tracepoint_jumps_at): New.
5048 (set_breakpoint_at): Use write_inferior_memory.
5049 (uninsert_raw_breakpoint): Use write_inferior_memory.
5050 (check_mem_read): Mask out fast tracepoint jumps.
5051 (check_mem_write): Mask out fast tracepoint jumps.
5052 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5053 (set_fast_tracepoint_jump): Declare.
5054 (delete_fast_tracepoint_jump)
5055 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5056 (reinsert_fast_tracepoint_jumps_at): Declare.
5057 * regcache.c: Don't compile many functions when building the
5058 in-process agent library.
5059 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5060 the register buffer in the heap.
5061 (free_register_cache): If the register buffer isn't owned by the
5062 regcache, don't free it.
5063 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5064 pre-existing register caches.
5065 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5066 type.
5067 (convert_ascii_to_int): : Constify `from' parameter type.
5068 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5069 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5070 the needed buffer in-place.
5071 (relocate_instruction): New.
5072 * server.c (handle_query) <qSymbols>: If the target supports
5073 tracepoints, give it a chance of looking up symbols. Report
5074 support for fast tracepoints.
5075 (handle_status): Stabilize threads.
5076 (process_serial_event): Adjust.
5077 * server.h (struct fast_tracepoint_jump): Forward declare.
5078 (struct process_info) <fast_tracepoint_jumps>: New field.
5079 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5080 (decode_X_packet, decode_M_packet): Adjust.
5081 (relocate_instruction): Declare.
5082 (in_process_agent_loaded): Declare.
5083 (tracepoint_look_up_symbols): Declare.
5084 (struct fast_tpoint_collect_status): Declare.
5085 (fast_tracepoint_collecting): Declare.
5086 (force_unlock_trace_buffer): Declare.
5087 (handle_tracepoint_bkpts): Declare.
5088 (initialize_low_tracepoint)
5089 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5090 * target.h (struct target_ops) <stabilize_threads,
5091 install_fast_tracepoint_jump_pad>: New fields.
5092 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5093 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5094 [HAVE_STDINT_H]: Include stdint.h.
5095 (trace_debug_1): Rename to ...
5096 (trace_vdebug): ... this.
5097 (trace_debug): Rename to ...
5098 (trace_debug_1): ... this. Add `level' parameter.
5099 (trace_debug): New.
5100 (ATTR_USED, ATTR_NOINLINE): New.
5101 (IP_AGENT_EXPORT): New.
5102 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5103 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5104 (about_to_request_buffer_space, trace_buffer_is_full)
5105 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5106 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5107 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5108 (traceframe_write_count, traceframes_created)
5109 (trace_state_variables)
5110 New renaming defines.
5111 (struct ipa_sym_addresses): New.
5112 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5113 (symbol_list): New.
5114 (ipa_sym_addrs): New.
5115 (all_tracepoint_symbols_looked_up): New.
5116 (in_process_agent_loaded): New.
5117 (write_e_ipa_not_loaded): New.
5118 (maybe_write_ipa_not_loaded): New.
5119 (tracepoint_look_up_symbols): New.
5120 (debug_threads) [IN_PROCESS_AGENT]: New.
5121 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5122 (UNKNOWN_SIDE_EFFECTS): New.
5123 (stop_tracing): New.
5124 (flush_trace_buffer): New.
5125 (stop_tracing_bkpt): New.
5126 (flush_trace_buffer_bkpt): New.
5127 (read_inferior_integer): New.
5128 (read_inferior_uinteger): New.
5129 (read_inferior_data_pointer): New.
5130 (write_inferior_data_pointer): New.
5131 (write_inferior_integer): New.
5132 (write_inferior_uinteger): New.
5133 (struct collect_static_trace_data_action): Delete.
5134 (enum tracepoint_type): New.
5135 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5136 <actions_str, step_actions, step_actions_str>: Only include in
5137 GDBserver.
fa593d66
PA
5138 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5139 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5140 (tracepoints): Use IP_AGENT_EXPORT.
5141 (last_tracepoint): Don't include in the IPA.
5142 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5143 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5144 (alloced_trace_state_variables): New.
5145 (trace_state_variables): Use IP_AGENT_EXPORT.
5146 (traceframe_t): Delete unused variable.
5147 (circular_trace_buffer): Don't include in the IPA.
5148 (trace_buffer_start): Delete.
5149 (struct trace_buffer_control): New.
5150 (trace_buffer_free): Delete.
5151 (struct ipa_trace_buffer_control): New.
5152 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5153 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5154 New.
5155 (trace_buffer_ctrl): New.
5156 (TRACE_BUFFER_CTRL_CURR): New.
5157 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5158 Reimplement as macros.
5159 (trace_buffer_wrap): Delete.
5160 (traceframe_write_count, traceframe_read_count)
5161 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5162 (struct tracepoint_hit_ctx) <type>: New field.
5163 (struct fast_tracepoint_ctx): New.
5164 (memory_barrier): New.
5165 (cmpxchg): New.
5166 (record_tracepoint_error): Update atomically in the IPA.
5167 (clear_inferior_trace_buffer): New.
5168 (about_to_request_buffer_space): New.
5169 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5170 updating the same buffer.
5171 (add_tracepoint): Default the tracepoint's type to trap
5172 tracepoint, and orig_size to -1.
5173 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5174 internal variables.
5175 (create_trace_state_variable): New parameter `gdb'. Handle it.
5176 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5177 (cmd_qtdp): Handle fast tracepoints.
5178 (cmd_qtdv): Adjust.
5179 (max_jump_pad_size): New.
5180 (gdb_jump_pad_head): New.
5181 (get_jump_space_head): New.
5182 (claim_jump_space): New.
5183 (sort_tracepoints): New.
5184 (MAX_JUMP_SIZE): New.
5185 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5186 IPA.
5187 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5188 support. Upload fast traceframes, and delete internal IPA
5189 breakpoints.
5190 (stop_tracing_handler): New.
5191 (flush_trace_buffer_handler): New.
5192 (cmd_qtstop): Upload fast tracepoints.
5193 (response_tracepoint): Handle fast tracepoints.
5194 (tracepoint_finished_step): Upload fast traceframes. Set the
5195 tracepoint hit context's tracepoint type.
5196 (handle_tracepoint_bkpts): New.
5197 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5198 type. Add comment about fast tracepoints.
5199 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5200 non-existing action_str field.
5201 (get_context_regcache): Handle fast tracepoints.
5202 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5203 to the regcache.
5204 (fast_tracepoint_from_jump_pad_address): New.
5205 (fast_tracepoint_from_ipa_tpoint_address): New.
5206 (collecting_t): New.
5207 (force_unlock_trace_buffer): New.
5208 (fast_tracepoint_collecting): New.
5209 (collecting): New.
5210 (gdb_collect): New.
5211 (write_inferior_data_ptr): New.
5212 (target_tp_heap): New.
5213 (target_malloc): New.
5214 (download_agent_expr): New.
5215 (UALIGN): New.
5216 (download_tracepoints): New.
5217 (download_trace_state_variables): New.
5218 (upload_fast_traceframes): New.
5219 (IPA_FIRST_TRACEFRAME): New.
5220 (IPA_NEXT_TRACEFRAME_1): New.
5221 (IPA_NEXT_TRACEFRAME): New.
5222 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5223 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5224 (gdb_jump_pad_buffer_end): New.
5225 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5226 (initialize_tracepoint): Adjust.
5227 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5228 buffer. Initialize the low module.
5229 * utils.c (PREFIX, TOOLNAME): New.
5230 (malloc_failure): Use PREFIX.
5231 (error): In the IPA, an error causes an exit.
5232 (fatal, warning): Use PREFIX.
5233 (internal_error): Use TOOLNAME.
5234 (NUMCELLS): Increase to 10.
5235 * configure, config.in: Regenerate.
5236
d149dd1d
PA
52372010-06-01 Pedro Alves <pedro@codesourcery.com>
5238
5239 * server.c (handle_query) <qSupported>: Do two passes over the
5240 qSupported string to avoid nesting strtok.
5241
f6528abd
JK
52422010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5243
5244 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5245 (CDEPS): New.
5246 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5247 -Wl,--dynamic-list.
5248 * configure: Regenerate.
5249 * proc-service.list: New.
5250
ca2a87a0
JK
52512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5252
5253 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5254 New comment.
5255
363a6e9f
OS
52562010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5257
5258 * gdbreplay.c (remote_open): Check error return from socket() call by
5259 its equality to -1 not by it being negative.
5260 * remote-utils.c (remote_open): Likewise.
5261
d23b6cb1
PA
52622010-05-23 Pedro Alves <pedro@codesourcery.com>
5263
5264 * config.h: Regenerate.
5265
28d3cf85
MK
52662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5267
5268 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5269 doesn't provide PTRACE_GET_THREAD_AREA.
5270
fea36a59
MK
52712010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5272
5273 * linux-m68k-low.c: Include <asm/ptrace.h>
5274 (ps_get_thread_area): Implement.
5275
24b066ba
DE
52762010-05-03 Doug Evans <dje@google.com>
5277
5278 * event-loop.c (struct callback_event): New struct.
5279 (callback_list): New global.
5280 (append_callback_event, delete_callback_event): New functions.
5281 (process_callback): New function.
5282 (start_event_loop): Call it.
5283 * remote-utils.c (NOT_SCHEDULED): Define.
5284 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5285 moved out of readchar.
5286 (readchar): Rewrite. Call reschedule before returning.
5287 (reset_readchar): New function.
5288 (remote_close): Call it.
5289 (process_remaining, reschedule): New functions.
5290 * server.h (callback_handler_func): New typedef.
5291 (append_callback_event, delete_callback_event): Declare.
5292
9836d6ea
PA
52932010-05-03 Pedro Alves <pedro@codesourcery.com>
5294
5295 * proc-service.c (ps_pglobal_lookup): Use
5296 thread_db_look_up_one_symbol.
5297 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5298 parameter. Use it instead of all_symbols_looked_up.
5299 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5300 field.
5301 (all_symbols_looked_up): Don't declare.
5302 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5303 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5304 field.
5305 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5306 Set all_symbols_looked_up here.
5307 (thread_db_look_up_one_symbol): New.
5308 (thread_db_get_tls_address): Adjust.
5309 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5310 thread_db object on the heap, and tentatively set it in the
5311 process structure.
5312 (thread_db_init): Don't set all_symbols_looked_up here.
5313 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5314
7984d532
PA
53152010-05-03 Pedro Alves <pedro@codesourcery.com>
5316
5317 * linux-low.c (linux_kill, linux_detach): Adjust.
5318 (status_pending_p_callback): Remove redundant statement. Check
5319 for !TARGET_WAITIKIND_IGNORE, instead of
5320 TARGET_WAITKIND_STOPPED.
5321 (handle_tracepoints): Make sure LWP is locked. Adjust.
5322 (linux_wait_for_event_1): Adjust.
5323 (linux_cancel_breakpoints): New.
5324 (unsuspend_one_lwp): New.
5325 (unsuspend_all_lwps): New.
5326 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5327 (send_sigstop_callback): Change return type to int, add new
5328 `except' parameter and handle it.
5329 (suspend_and_send_sigstop_callback): New.
5330 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5331 pass them down. If SUSPEND, also increment the lwp's suspend
5332 count.
5333 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5334 (need_step_over_p): Don't consider suspended LWPs.
5335 (start_step_over): Adjust.
5336 (proceed_one_lwp): Change return type to int, add new `except'
5337 parameter and handle it.
5338 (unsuspend_and_proceed_one_lwp): New.
5339 (proceed_all_lwps): Use find_inferior instead of
5340 for_each_inferior.
5341 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5342 also decrement the suspend count of LWPs. Pass `except' down,
5343 instead of hacking its suspend count.
5344 (linux_pause_all): Add `freeze' parameter. Adjust.
5345 (linux_unpause_all): New.
5346 (linux_target_ops): Install linux_unpause_all.
5347 * server.c (handle_status): Adjust.
5348 * target.h (struct target_ops): New fields `unpause_all' and
5349 `cancel_breakpoints'. Add new parameter to `pause_all'.
5350 (pause_all): Add new `freeze' parameter.
5351 (unpause_all): New.
5352 (cancel_breakpoints): New.
5353 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5354 cancel breakpoints.
5355 (cmd_qtstart): Pause threads.
5356 (stop_tracing): Pause threads, and cancel breakpoints.
5357 * win32-low.c (win32_target_ops): Adjust.
5358
e471f25b
PA
53592010-05-03 Pedro Alves <pedro@codesourcery.com>
5360
5361 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5362 the inferior right away from here...
5363 (linux_wait_1): ... to here, and adjust to check the thread's
5364 last_resume_kind instead of the lwp's step or stop_expected flags.
5365
1915ef4f
PA
53662010-05-02 Pedro Alves <pedro@codesourcery.com>
5367
5368 * README: Use consistent `GDB' and `GDBserver' spellings.
5369
f9e39928
PA
53702010-05-02 Pedro Alves <pedro@codesourcery.com>
5371
5372 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5373 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5374 (linux_detach_one_lwp): Assume the lwp is stopped.
5375 (any_thread_of): Delete.
5376 (linux_detach): Stop all lwps here. Don't blindly delete all
5377 breakpoints.
5378 (delete_lwp_callback): New.
5379 (linux_mourn): Delete all lwps of the process that is gone.
5380 (linux_wait_1): Don't delete the last lwp of the process here.
5381 * mem-break.h (mark_breakpoints_out): Declare.
5382 * mem-break.c (mark_breakpoints_out): New.
5383 (free_all_breakpoints): Use it.
5384 * server.c (handle_target_event): If the process is gone, mark
5385 breakpoints out.
5386 * thread-db.c (struct thread_db) <create_bp>: New field.
5387 (thread_db_enable_reporting): Fix prototype. Store a thread event
5388 breakpoint reference in the thread_db struct.
5389 (thread_db_load_search): Clear the thread_db object.
5390 (try_thread_db_load_1): Ditto.
5391 (switch_to_process): New.
5392 (disable_thread_event_reporting): Use it.
5393 (remove_thread_event_breakpoints): New.
5394 (thread_db_detach, thread_db_mourn): Use it.
5395
1e7fc18c
PA
53962010-05-01 Pedro Alves <pedro@codesourcery.com>
5397
5398 * linux-low.c (linux_enable_event_reporting): New.
5399 (linux_wait_for_event_1, handle_extended_wait): Use it.
5400
02fc4de7
PA
54012010-04-30 Pedro Alves <pedro@codesourcery.com>
5402
5403 * linux-low.c (linux_kill_one_lwp, linux_kill)
5404 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5405 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5406 SIGSTOP even if the LWP is stopped.
5407 (send_sigstop_callback): New.
5408 (stop_all_lwps): Use send_sigstop_callback instead.
5409 (linux_resume_one_thread): Adjust.
5410 (proceed_one_lwp): Still proceed an LWP that the client has
5411 requested to stop, if we haven't reported it as stopped yet. Make
5412 sure that LWPs the client want stopped, have a pending SIGSTOP.
5413
bc3b5632
DE
54142010-04-26 Doug Evans <dje@google.com>
5415
ae1ada35
DE
5416 * server.c (handle_general_set): Make static.
5417
bc3b5632
DE
5418 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5419 Print received char after testing for error/eof instead of before.
5420 (input_interrupt): Tweak comment.
5421
65730243
DE
54222010-04-23 Doug Evans <dje@google.com>
5423
5424 * server.c (start_inferior): Print inferior argv if --debug.
5425
a8ae7dc0
AR
54262010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5427
5428 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5429 * nto-x86-low.c: Include server.h
5430
1c07cc19
PM
54312010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5432
5433 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5434 be consistent with other sources of this directory.
5435 (init_registers_amd64): Correct name of source file of this function
5436 in the comment.
5437
e0a61e09
PM
54382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5439
5440 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5441 64-bit executables.
5442
54709339
PM
54432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5444
5445 * win32-i386-low.c: Add 64-bit support.
5446 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5447 (init_registers_amd64): Declare.
5448 (mappings): Add 64-bit version of array.
5449 (init_windows_x86): New function.
5450 (the_low_target): Change init_arch field to init_windows_x86.
5451
e8f0053d
PM
54522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5453
5454 * win32-low.c: Adapt to support also 64-bit architecture.
5455 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5456 (get_image_name): Use SIZE_T type for local variable `done'.
5457 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5458 (toolhelp_get_dll_name): Idem.
5459 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5460 Use uintptr_t typecast to avoid warning.
5461 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5462 (handle_exception): Use phex_nz to avoid warning.
5463 (win32_wait): Remove unused local variable `process'.
5464
c481e77e
PM
54652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5466
5467 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5468 `amd64-avx.o'.
5469
12ea4b69
PM
54702010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5471
5472 * configure.ac: Use `ws2_32' library for srv_mingw.
5473 * configure: Regenerate.
5474 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5475 * remote-utils.c: Likewise.
5476
f6d1620c
L
54772010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5478
5479 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5480 if __x86_64__ is defined.
5481
8e642873
PM
54822010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5483
5484 * configure: Regenerate.
5485
711e434b
PM
54862010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5487
5488 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5489 * target.h (target_ops): New get_tib_address field.
5490 * win32-low.h (win32_thread_info): Add thread_local_base field.
5491 * win32-low.c (child_add_thread): Add tlb argument.
5492 Set thread_local_base field to TLB.
5493 (get_child_debug_event): Adapt to child_add_thread change.
5494 (win32_get_tib_address): New function.
5495 (win32_target_ops): Set get_tib_address field to
5496 win32_get_tib_address.
5497 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5498
505106cd
PA
54992010-04-12 Pedro Alves <pedro@codesourcery.com>
5500
505106cd
PA
5501 * linux-low.c (linux_mourn): Also remove the process.
5502 * server.c (handle_target_event): Don't remove the process here.
5503 * nto-low.c (nto_mourn): New.
5504 (nto_target_ops): Install it.
5505 * spu-low.c (spu_mourn): New.
5506 (spu_target_ops): Install it.
5507 * win32-low.c (win32_mourn): New.
5508 (win32_target_ops): Install it.
5509
e8470a06
PA
55102010-04-12 Pedro Alves <pedro@codesourcery.com>
5511
5512 * server.h (buffer_xml_printf): Remove redundant `;'.
5513
45ba0d02
PA
55142010-04-12 Pedro Alves <pedro@codesourcery.com>
5515
5516 * regcache.c (set_register_cache): Invalidate regcaches before
5517 changing the register cache layout.
5518 (regcache_invalidate_one): Allow a NULL regcache.
5519 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5520 regcaches before changing the register cache layout or the target
5521 regsets.
5522
59e04013
L
55232010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5524
5525 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5526 variable warning on Linux/x86-64.
5527
8336d594
PA
55282010-04-11 Pedro Alves <pedro@codesourcery.com>
5529
5530 GDBserver disconnected tracing support.
5531
5532 * linux-low.c (linux_remove_process): Delete.
5533 (add_lwp): Don't set last_resume_kind here.
5534 (linux_kill): Use `mourn'.
5535 (linux_detach): Use `thread_db_detach', and `mourn'.
5536 (linux_mourn): New.
5537 (linux_attach_lwp_1): Adjust comment.
5538 (linux_attach): last_resume_kind moved the thread_info; adjust.
5539 (status_pending_p_callback): Adjust.
5540 (linux_wait_for_event_1): Adjust.
5541 (count_events_callback, select_singlestep_lwp_callback)
5542 (select_event_lwp_callback, cancel_breakpoints_callback)
5543 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5544 (proceed_one_lwp): Adjust.
5545 (linux_async): Add debug output.
5546 (linux_thread_stopped): New.
5547 (linux_pause_all): New.
5548 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5549 linux_pause_all.
5550 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5551 (thread_db_free): Delete declaration.
5552 (thread_db_detach, thread_db_mourn): Declare.
5553 * thread-db.c (thread_db_init): Use thread_db_mourn.
5554 (thread_db_free): Delete, split in two.
5555 (disable_thread_event_reporting): New.
5556 (thread_db_detach): New.
5557 (thread_db_mourn): New.
5558
5559 * server.h (struct thread_info) <last_resume_kind>: New field.
5560 <attached>: Add comment.
5561 <gdb_detached>: New field.
5562 (handler_func): Change return type to int.
5563 (handle_serial_event, handle_target_event): Ditto.
5564 (gdb_connected): Declare.
5565 (tracing): Delete.
5566 (disconnected_tracing): Declare.
5567 (stop_tracing): Declare.
5568
5569 * server.c (handle_query) <qSupported>: Report support for
5570 disconnected tracing.
5571 (queue_stop_reply_callback): Account for running threads.
5572 (gdb_wants_thread_stopped): New.
5573 (gdb_wants_all_threads_stopped): New.
5574 (gdb_reattached_process): New.
5575 (handle_status): Clear the `gdb_detached' flag of all processes.
5576 In all-stop, stop all threads.
5577 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5578 (process_serial_event): If the remote connection breaks, or if an
5579 exit was forced with "monitor exit", force an event loop exit.
5580 Handle disconnected tracing on detach.
5581 (handle_serial_event): Adjust.
5582 (handle_target_event): If GDB isn't connected, forward events back
5583 to the inferior, unless the last process exited, in which case,
5584 exit gdbserver. Adjust interface.
5585
5586 * remote-utils.c (remote_open): Don't block in accept. Instead
5587 register an event loop source on the listen socket file
5588 descriptor. Refactor bits into ...
5589 (listen_desc): ... this new global.
5590 (gdb_connected): ... this new function.
5591 (enable_async_notification): ... this new function.
5592 (handle_accept_event): ... this new function.
5593 (remote_close): Clear remote_desc.
5594
5595 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5596
5597 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5598 New fields.
5599 (mourn_inferior): Define.
5600 (target_process_qsupported): Avoid the dangling else problem.
5601 (thread_stopped): Define.
5602 (pause_all): Define.
5603 (target_waitstatus_to_string): Declare.
5604 * target.c (target_waitstatus_to_string): New.
5605
5606 * tracepoint.c (tracing): Make extern.
5607 (disconnected_tracing): New.
5608 (stop_tracing): Make extern. Handle tracing stops due to GDB
5609 disconnecting.
5610 (cmd_qtdisconnected): New.
5611 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5612 (handle_tracepoint_general_set): Handle QTDisconnected.
5613
5614 * event-loop.c (event_handler_func): Change return type to int.
5615 (process_event): Bail out if the event handler wants the event
5616 loop to stop.
5617 (handle_file_event): Ditto.
5618 (start_event_loop): Bail out if the event handler wants the event
5619 loop to stop.
5620
5621 * nto-low.c (nto_target_ops): Adjust.
5622 * spu-low.c (spu_wait): Don't remove the process here.
5623 (spu_target_ops): Adjust.
5624 * win32-low.c (win32_wait): Don't remove the process here.
5625 (win32_target_ops): Adjust.
5626
5d267c4c
PA
56272010-04-11 Pedro Alves <pedro@codesourcery.com>
5628
5629 * regcache.c (realloc_register_cache): Invalidate inferior's
5630 regcache before recreating it.
5631
623ccd72
PA
56322010-04-09 Pedro Alves <pedro@codesourcery.com>
5633
5634 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5635
219f2f23
PA
56362010-04-09 Stan Shebs <stan@codesourcery.com>
5637 Pedro Alves <pedro@codesourcery.com>
5638
5639 * server.h (LONGEST): New.
5640 (struct thread_info) <while_stepping>: New field.
5641 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5642 Declare.
5643 (initialize_tracepoint, handle_tracepoint_general_set)
5644 (handle_tracepoint_query, tracepoint_finished_step)
5645 (tracepoint_was_hit, release_while_stepping_state_list):
5646 (current_traceframe): Declare.
5647 * server.c (handle_general_set): Handle tracepoint packets.
5648 (read_memory): New.
5649 (write_memory): New.
5650 (handle_search_memory_1): Use read_memory.
5651 (handle_query): Report support for conditional tracepoints, trace
5652 state variables, and tracepoint sources. Handle tracepoint
5653 queries.
5654 (main): Initialize the tracepoints module.
5655 (process_serial_event): Handle traceframe reads/writes.
5656
5657 * linux-low.c (handle_tracepoints): New.
5658 (linux_wait_1): Call it.
5659 (linux_resume_one_lwp): Handle while-stepping.
5660 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5661 (linux_target_ops): Install them.
5662 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5663 New field.
5664 * linux-x86-low.c (x86_supports_tracepoints): New.
5665 (the_low_target). Install it.
5666
5667 * mem-break.h (delete_breakpoint): Declare.
5668 * mem-break.c (delete_breakpoint): Make external.
5669
5670 * target.h (struct target_ops): Add `supports_tracepoints',
5671 `read_pc', and `write_pc' fields.
5672 (target_supports_tracepoints): Define.
5673 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5674 (phex_nz): New.
5675
5676 * regcache.h (struct regcache) <registers_owned>: New field.
5677 (init_register_cache, regcache_cpy): Declare.
5678 (regcache_read_pc, regcache_write_pc): Declare.
5679 (register_cache_size): Declare.
5680 (supply_regblock): Declare.
5681 * regcache.c (init_register_cache): New.
5682 (new_register_cache): Use it.
5683 (regcache_cpy): New.
5684 (register_cache_size): New.
5685 (supply_regblock): New.
5686 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 5687
219f2f23
PA
5688 * tracepoint.c: New.
5689
5690 * Makefile.in (OBS): Add tracepoint.o.
5691 (tracepoint.o): New rule.
5692
3a13a53b
L
56932010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5694
5695 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5696 (i386-mmx.o): New.
5697 (i386-mmx.c): Likewise.
5698 (i386-mmx-linux.o): Likewise.
5699 (i386-mmx-linux.c): Likewise.
5700
5701 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5702 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5703 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5704 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5705
5706 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5707 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5708 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5709
1570b33e
L
57102010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5711
5712 * Makefile.in (clean): Updated.
5713 (i386-avx.o): New.
5714 (i386-avx.c): Likewise.
5715 (i386-avx-linux.o): Likewise.
5716 (i386-avx-linux.c): Likewise.
5717 (amd64-avx.o): Likewise.
5718 (amd64-avx.c): Likewise.
5719 (amd64-avx-linux.o): Likewise.
5720 (amd64-avx-linux.c): Likewise.
5721
5722 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5723 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5724 (srv_amd64_regobj): Add amd64-avx.o.
5725 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5726 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5727 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5728 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5729 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5730 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5731 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5732
5733 * i387-fp.c: Include "i386-xstate.h".
5734 (i387_xsave): New.
5735 (i387_cache_to_xsave): Likewise.
5736 (i387_xsave_to_cache): Likewise.
5737 (x86_xcr0): Likewise.
5738
5739 * i387-fp.h (i387_cache_to_xsave): Likewise.
5740 (i387_xsave_to_cache): Likewise.
5741 (x86_xcr0): Likewise.
5742
5743 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5744 * linux-crisv32-low.c (target_regsets): Likewise.
5745 * linux-m68k-low.c (target_regsets): Likewise.
5746 * linux-mips-low.c (target_regsets): Likewise.
5747 * linux-ppc-low.c (target_regsets): Likewise.
5748 * linux-s390-low.c (target_regsets): Likewise.
5749 * linux-sh-low.c (target_regsets): Likewise.
5750 * linux-sparc-low.c (target_regsets): Likewise.
5751 * linux-xtensa-low.c (target_regsets): Likewise.
5752
5753 * linux-low.c: Include <sys/uio.h>.
5754 (regsets_fetch_inferior_registers): Support nt_type.
5755 (regsets_store_inferior_registers): Likewise.
5756 (linux_process_qsupported): New.
5757 (linux_target_ops): Add linux_process_qsupported.
5758
5759 * linux-low.h (regset_info): Add nt_type.
5760 (linux_target_ops): Add process_qsupported.
5761
5762 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5763 and <sys/uio.h>.
5764 (init_registers_i386_avx_linux): New.
5765 (init_registers_amd64_avx_linux): Likewise.
5766 (xmltarget_i386_linux_no_xml): Likewise.
5767 (xmltarget_amd64_linux_no_xml): Likewise.
5768 (PTRACE_GETREGSET): Likewise.
5769 (PTRACE_SETREGSET): Likewise.
5770 (x86_fill_xstateregset): Likewise.
5771 (x86_store_xstateregset): Likewise.
5772 (use_xml): Likewise.
5773 (x86_linux_update_xmltarget): Likewise.
5774 (x86_linux_process_qsupported): Likewise.
5775 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5776 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5777 init_registers_i386_linux here. Call
5778 x86_linux_update_xmltarget.
5779 (the_low_target): Add x86_linux_process_qsupported.
5780
5781 * server.c (handle_query): Call target_process_qsupported.
5782
5783 * target.h (target_ops): Add process_qsupported.
5784 (target_process_qsupported): New.
5785
fc7238bb
PA
57862010-04-03 Pedro Alves <pedro@codesourcery.com>
5787
5788 * inferiors.c (add_thread): Set last_status kind to
5789 TARGET_WAITKIND_IGNORE.
5790 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5791 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5792 (linux_wait_1): Move `thread' local definition to block that uses
5793 it. Don't NULL initialize `event_child'.
5794 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5795 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5796 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5797
bdabb078
PA
57982010-04-01 Pedro Alves <pedro@codesourcery.com>
5799
5800 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5801 an extended waitstatus, or by a watchpoint.
5802 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5803 thread was stepping or has been stopped by a watchpoint.
5804
d3bbe7a0
PA
58052010-04-01 Pedro Alves <pedro@codesourcery.com>
5806
5807 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5808 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5809 of another, then delete the previous, and validate all
5810 breakpoints.
5811 (validate_inserted_breakpoint): New.
5812 (delete_disabled_breakpoints): New.
5813 (validate_breakpoints): New.
5814 (check_mem_read): Validate breakpoints before trusting their
5815 shadow. Delete disabled breakpoints.
5816 (check_mem_write): Validate breakpoints before trusting they
5817 should be inserted. Delete disabled breakpoints.
5818 * mem-break.h (validate_breakpoints):
5819 * server.c (handle_query): Validate breakpoints when we see a
5820 qSymbol query.
5821
8b07ae33
PA
58222010-04-01 Pedro Alves <pedro@codesourcery.com>
5823
5824 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5825 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5826 if we could tell there's a GDB breakpoint at stop_pc.
5827 (need_step_over_p): Don't do a step over if we find a GDB
5828 breakpoint at the resume PC.
5829
5830 * mem-break.c (struct raw_breakpoint): New.
5831 (enum bkpt_type): New type `gdb_breakpoint'.
5832 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5833 fields. New field `raw'.
5834 (find_raw_breakpoint_at): New.
5835 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5836 breakpoint instead.
5837 (set_breakpoint_at): Adjust.
5838 (delete_raw_breakpoint): New.
5839 (release_breakpoint): New.
5840 (delete_breakpoint): Rename to...
5841 (delete_breakpoint_1): ... this. Add proc parameter. Use
5842 release_breakpoint. Return ENOENT.
5843 (delete_breakpoint): Reimplement.
5844 (find_breakpoint_at): Delete.
5845 (find_gdb_breakpoint_at): New.
5846 (delete_breakpoint_at): Delete.
5847 (set_gdb_breakpoint_at): New.
5848 (delete_gdb_breakpoint_at): New.
5849 (gdb_breakpoint_here): New.
5850 (set_reinsert_breakpoint): Use release_breakpoint.
5851 (uninsert_breakpoint): Rename to ...
5852 (uninsert_raw_breakpoint): ... this.
5853 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5854 (reinsert_raw_breakpoint): Change parameter type to
5855 raw_breakpoint.
5856 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5857 instead.
5858 (check_breakpoints): Adjust. Use release_breakpoint.
5859 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5860 (breakpoint_inserted_here): Ditto.
5861 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5862 Don't trust the breakpoint's shadow if it is not inserted.
5863 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5864 (delete_all_breakpoints): Adjust.
5865 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5866 use delete_breakpoint_1.
5867
5868 * mem-break.h (breakpoints_supported): Delete declaration.
5869 (set_gdb_breakpoint_at): Declare.
5870 (gdb_breakpoint_here): Declare.
5871 (delete_breakpoint_at): Delete.
5872 (delete_gdb_breakpoint_at): Declare.
5873
5874 * server.h (struct raw_breakpoint): Forward declare.
5875 (struct process_info): New field `raw_breakpoints'.
5876
5877 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5878 breakpoints.
5879
6bf5e0ba
PA
58802010-03-24 Pedro Alves <pedro@codesourcery.com>
5881
5882 * linux-low.c (status_pending_p_callback): Fix comment.
5883 (linux_wait_for_event_1): Move most of the internal breakpoint
5884 handling from here...
5885 (linux_wait_1): ... to here.
5886 (count_events_callback): New.
5887 (select_singlestep_lwp_callback): New.
5888 (select_event_lwp_callback): New.
5889 (cancel_breakpoints_callback): New.
5890 (select_event_lwp): New.
5891 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5892 priority to all LWPs that have had events that should be reported
5893 to the client. Cancel breakpoints when about to reporting the
5894 event to the client, not while stopping lwps. No longer cancel
5895 finished single-steps here.
5896 (cancel_finished_single_step): Delete.
5897 (cancel_finished_single_steps): Delete.
5898
414a389f
PA
58992010-03-24 Pedro Alves <pedro@codesourcery.com>
5900
5901 * mem-break.c (enum bkpt_type): New.
5902 (struct breakpoint): New field `type'.
5903 (set_breakpoint_at): Change return type to struct breakpoint
5904 pointer. Set type to `other_breakpoint' by default.
5905 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5906 in the breakpoint list.
5907 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5908 (reinsert_breakpoint): Rename to ...
5909 (reinsert_raw_breakpoint): ... this.
5910 (reinsert_breakpoints_at): Adjust.
5911 * mem-break.h (struct breakpoint): Declare.
5912 (set_breakpoint_at): Change return type to struct breakpoint
5913 pointer.
5914
2280c721
PA
59152010-03-24 Pedro Alves <pedro@codesourcery.com>
5916
5917 * server.c (handle_query): Assign, not compare.
5918
d50171e4
PA
59192010-03-24 Pedro Alves <pedro@codesourcery.com>
5920
5921 Teach linux gdbserver to step-over-breakpoints.
5922
5923 * linux-low.c (can_hardware_single_step): New.
5924 (supports_breakpoints): New.
5925 (handle_extended_wait): If stopping threads, read the stop pc of
5926 the new cloned LWP.
5927 (get_pc): New.
5928 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5929 low target doesn't support retrieving the PC.
5930 (add_lwp): Set last_resume_kind to resume_continue.
5931 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5932 (linux_attach): Don't clear stop_expected. Set the lwp's
5933 last_resume_kind to resume_stop.
5934 (linux_detach_one_lwp): Don't check for removed breakpoints.
5935 (check_removed_breakpoint): Delete.
5936 (status_pending_p): Rename to ...
5937 (status_pending_p_callback): ... this. Don't check for removed
5938 breakpoints. Don't consider threads that are stopped from GDB's
5939 perspective.
5940 (linux_wait_for_lwp): Always read the stop_pc here.
5941 (cancel_breakpoint): New.
5942 (step_over_bkpt): New global.
5943 (linux_wait_for_event_1): Implement stepping over breakpoints.
5944 (gdb_wants_lwp_stopped): New.
5945 (gdb_wants_all_stopped): New.
5946 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5947 single-step traps here. Store the thread's last reported target
5948 wait status.
5949 (send_sigstop): Don't clear stop_expected. Always set it,
5950 instead.
5951 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5952 (cancel_finished_single_step): New.
5953 (cancel_finished_single_steps): New.
5954 (wait_for_sigstop): Don't cancel finished single-step traps here.
5955 (linux_resume_one_lwp): Don't check for removed breakpoints.
5956 Don't set `step' on non-hardware step archs.
5957 (linux_set_resume_request): Ignore resume_stop requests if already
5958 stopping or stopped. Set the lwp's last_resume_kind.
5959 (resume_status_pending_p): Don't check for removed breakpoints.
5960 (need_step_over_p): New.
5961 (start_step_over): New.
5962 (finish_step_over): New.
5963 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5964 requests. Clear the thread's last reported target waitstatus.
5965 Don't use the `suspended' flag. Don't consider pending breakpoints.
5966 (linux_resume): Start a step-over if necessary.
5967 (proceed_one_lwp): New.
5968 (proceed_all_lwps): New.
5969 (unstop_all_lwps): New.
5970 * linux-low.h (struct lwp_info): Rewrite comment for the
5971 `suspended' flag. Add the `stop_pc' field. Delete the
5972 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5973 Add `'last_resume_kind' and `need_step_over' fields.
5974 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5975 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5976 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5977 (set_raw_breakpoint_at): New.
5978 (set_breakpoint_at): Rewrite to use it.
5979 (reinsert_breakpoint_handler): Delete.
5980 (set_reinsert_breakpoint): New.
5981 (reinsert_breakpoint_by_bp): Delete.
5982 (delete_reinsert_breakpoints): New.
5983 (uninsert_breakpoint): Rewrite.
5984 (uninsert_breakpoints_at): New.
5985 (reinsert_breakpoint): Rewrite.
5986 (reinsert_breakpoints_at): New.
5987 (check_breakpoints): Rewrite.
5988 (breakpoint_here): New.
5989 (breakpoint_inserted_here): New.
5990 (check_mem_read): Adjust.
5991 * mem-break.h (breakpoints_supported, breakpoint_here)
5992 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5993 (reinsert_breakpoint_by_bp): Delete declaration.
5994 (delete_reinsert_breakpoints): Declare.
5995 (reinsert_breakpoint): Delete declaration.
5996 (reinsert_breakpoints_at): Declare.
5997 (uninsert_breakpoint): Delete declaration.
5998 (uninsert_breakpoints_at): Declare.
5999 (check_breakpoints): Adjust prototype.
6000 * server.h: Adjust include order.
6001 (struct thread_info): Declare here. Add a `last_status' field.
6002
30ba68cb
MS
60032010-03-23 Michael Snyder <msnyder@vmware.com>
6004
6005 * server.c (crc32): New function.
6006 (handle_query): Add handling for 'qCRC:' request.
6007
b9a881c2
PA
60082010-03-23 Pedro Alves <pedro@codesourcery.com>
6009
6010 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6011 lwp had been stopped by a watchpoint.
6012
e92d13d5
PA
60132010-03-16 Pedro Alves <pedro@codesourcery.com>
6014
6015 * server.h (internal_error): Declare.
6016 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6017 * utils.c (internal_error): New function.
6018
64daa791
AS
60192010-03-15 Andreas Schwab <schwab@redhat.com>
6020
6021 * configure.srv: Fix typo setting srv_regobj.
6022
f52cd8cd
PA
60232010-03-15 Pedro Alves <pedro@codesourcery.com>
6024
6025 * linux-low.c (fetch_register): Avoid passing a non string literal
6026 format to `error'.
6027 (usr_store_inferior_registers): Ditto.
6028
93ae6fdc
PA
60292010-03-14 Pedro Alves <pedro@codesourcery.com>
6030
6031 * linux-low.c (linux_write_memory): Bail out early if peeking
6032 memory failed.
6033
c3adc08c
PA
60342010-03-14 Pedro Alves <pedro@codesourcery.com>
6035
6036 * linux-low.h (struct lwp_info): New fields
6037 `stopped_by_watchpoint' and `stopped_data_address'.
6038 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6039 here, and cache them in the lwp object.
6040 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6041 directly.
6042 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6043 field.
6044 (linux_stopped_by_watchpoint): Rewrite.
6045 (linux_stopped_data_address): Rewrite.
6046
bce522a2
PA
60472010-03-06 Simo Melenius <simo.melenius@iki.fi>
6048
6049 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6050 switching the current inferior, not before.
6051
90884b2b
L
60522010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6053
6054 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6055 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6056 i386-linux.c and amd64-linux.c.
6057 (reg-i386.o): Removed.
6058 (reg-i386.c): Likewise.
6059 (reg-i386-linux.o): Likewise.
6060 (reg-i386-linux.c): Likewise.
6061 (reg-x86-64.o): Likewise.
6062 (reg-x86-64.c): Likewise.
6063 (reg-x86-64-linux.o): Likewise.
6064 (reg-x86-64-linux.c): Likewise.
6065 (i386.o): New.
6066 (i386.c): Likewise.
6067 (i386-linux.o): Likewise.
6068 (i386-linux.c): Likewise.
6069 (amd64.o): Likewise.
6070 (amd64.c): Likewise.
6071 (amd64-linux.o): Likewise.
6072 (amd64-linux.c): Likewise.
6073
6074 * configure.srv (srv_i386_regobj): New.
6075 (srv_i386_linux_regobj): Likewise.
6076 (srv_amd64_regobj): Likewise.
6077 (srv_amd64_linux_regobj): Likewise.
6078 (srv_i386_32bit_xmlfiles): Likewise.
6079 (srv_i386_64bit_xmlfiles): Likewise.
6080 (srv_i386_xmlfiles): Likewise.
6081 (srv_amd64_xmlfiles): Likewise.
6082 (srv_i386_linux_xmlfiles): Likewise.
6083 (srv_amd64_linux_xmlfiles): Likewise.
6084 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6085 srv_xmlfiles to $srv_i386_xmlfiles.
6086 (i[34567]86-*-mingw32ce*): Likewise.
6087 (i[34567]86-*-mingw*): Likewise.
6088 (i[34567]86-*-nto*): Likewise.
6089 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6090 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6091 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6092 (x86_64-*-linux*): Likewise.
6093
6094 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6095 (init_registers_amd64_linux): New.
6096 (x86_arch_setup): Replace init_registers_x86_64_linux with
6097 init_registers_amd64_linux.
6098
193f13e6
MK
60992010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6100
6101 * configure.ac: Check for libdl. If it is not available link against
6102 static libthread_db.
6103 * configure: Regenerate.
6104
85d721b8
PA
61052010-02-22 Pedro Alves <pedro@codesourcery.com>
6106
6107 PR9605
6108
6109 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6110 handing a read watchpoint.
6111 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6112
6076632b
DE
61132010-02-12 Doug Evans <dje@google.com>
6114
6115 * linux-low.c (linux_supports_tracefork_flag): Document.
6116 (linux_look_up_symbols): Add comment.
6117
3327ccf7
L
61182010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6119
6120 * regcache.c (supply_register): Clear regcache if buf is NULL.
6121
0718675c 61222010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6123 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6124
6125 * inferiors.c (find_inferior): Add function documentation.
6126 (unloaded_dll): Handle the case where the unloaded dll has not
6127 been previously registered in the dll list.
6128
177321bd
DJ
61292010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6130
6131 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6132 (thumb2_breakpoint): New.
6133 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6134
2b009048
DJ
61352010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6136
6137 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6138 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6139 breakpoints.
6140
3be029c7
PA
61412010-01-21 Pedro Alves <pedro@codesourcery.com>
6142
6143 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6144
18f5de3b
JK
61452010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6146
6147 * linux-s390-low.c (s390_collect_ptrace_register)
6148 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6149
3743bb4f
DE
61502010-01-21 Doug Evans <dje@google.com>
6151
14ce3065
DE
6152 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6153 (PTRACE_ARG4_TYPE): New macro.
6154 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6155 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6156 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6157 (usr_store_inferior_registers): Ditto.
6158 (linux_read_memory, linux_write_memory): Ditto.
6159 (linux_test_for_tracefork): Ditto.
6160
3743bb4f
DE
6161 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6162 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6163
8b315be5
PA
61642010-01-21 Pedro Alves <pedro@codesourcery.com>
6165
6166 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6167 target.
6168
85492558
PA
61692010-01-21 Pedro Alves <pedro@codesourcery.com>
6170
6171 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6172 prototype to take a regcache. Adjust.
6173
442ea881
PA
61742010-01-20 Pedro Alves <pedro@codesourcery.com>
6175
6176 * regcache.h (struct thread_info): Forward declare.
6177 (struct regcache): New.
6178 (new_register_cache): Adjust prototype.
6179 (get_thread_regcache): Declare.
6180 (free_register_cache): Adjust prototype.
6181 (registers_to_string, registers_from_string): Ditto.
6182 (supply_register, supply_register_by_name, collect_register)
6183 (collect_register_as_string, collect_register_by_name): Ditto.
6184 * regcache.c (struct inferior_regcache_data): Delete.
6185 (get_regcache): Rename to ...
6186 (get_thread_regcache): ... this. Adjust. Switch inferior before
6187 fetching registers.
6188 (regcache_invalidate_one): Adjust.
6189 (regcache_invalidate): Fix prototype.
6190 (new_register_cache): Return the new register cache.
6191 (free_register_cache): Change prototype.
6192 (realloc_register_cache): Adjust.
6193 (registers_to_string): Change prototype to take a regcache. Adjust.
6194 (registers_from_string): Ditto.
6195 (register_data): Ditto.
6196 (supply_register): Ditto.
6197 (supply_register_by_name): Ditto.
6198 (collect_register): Ditto.
6199 (collect_register_as_string): Ditto.
6200 (collect_register_by_name): Ditto.
6201 * server.c (process_serial_event): Adjust.
6202 * linux-low.h (regset_fill_func, regset_store_func): Change
6203 prototype.
6204 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6205 Change prototype.
6206 * linux-low.c (get_stop_pc): Adjust.
6207 (check_removed_breakpoint): Adjust.
6208 (linux_wait_for_event): Adjust.
6209 (linux_resume_one_lwp): Adjust.
6210 (fetch_register): Add regcache parameter. Adjust.
6211 (usr_store_inferior_registers): Ditto.
6212 (regsets_fetch_inferior_registers): Ditto.
6213 (regsets_store_inferior_registers): Ditto.
6214 (linux_fetch_registers, linux_store_registers): Ditto.
6215 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6216 regcache. Adjust.
43aaf8b6
PA
6217 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6218 Ditto.
442ea881
PA
6219 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6220 prototype to take a regcache.
6221 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6222 * remote-utils.c (convert_ascii_to_int, outreg)
6223 (prepare_resume_reply): Change prototype to take a regcache.
6224 Adjust.
6225 * target.h (struct target_ops) <fetch_registers, store_registers>:
6226 Change prototype to take a regcache.
6227 (fetch_inferior_registers, store_inferior_registers): Change
6228 prototype to take a regcache. Adjust.
6229 * proc-service.c (ps_lgetregs): Adjust.
6230 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6231 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6232 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6233 take a regcache. Adjust.
6234 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6235 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6236 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6237 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6238 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6239 (cris_cannot_fetch_register):
6240 (cris_breakpoint_at): Change prototype to take a regcache.
6241 Adjust.
6242 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6243 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6244 to take a regcache. Adjust.
6245 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6246 Adjust.
6247 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6248 take a regcache. Adjust.
6249 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6250 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6251 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6252 * linux-mips-low.c (mips_get_pc):
6253 (mips_set_pc): Change prototype to take a regcache. Adjust.
6254 (mips_reinsert_addr): Adjust.
6255 (mips_collect_register): Change prototype to take a regcache.
6256 Adjust.
6257 (mips_supply_register):
6258 (mips_collect_register_32bit, mips_supply_register_32bit)
6259 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6260 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6261 * linux-ppc-low.c (ppc_supply_ptrace_register)
6262 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6263 (parse_spufs_run): Adjust.
6264 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6265 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6266 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6267 take a regcache. Adjust.
6268 * linux-s390-low.c (s390_collect_ptrace_register)
6269 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6270 (s390_set_pc): Change prototype to take a regcache. Adjust.
6271 (s390_arch_setup): Adjust.
6272 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6273 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6274 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6275 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6276 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6277 regcache. Adjust.
6278 (sparc_breakpoint_at): Adjust.
6279 * linux-xtensa-low.c (xtensa_fill_gregset):
6280 (xtensa_store_gregset):
6281 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6282 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6283 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6284 prototype to take a regcache. Adjust.
6285 * win32-arm-low.c (arm_fetch_inferior_register)
6286 (arm_store_inferior_register): Change prototype to take a
6287 regcache. Adjust.
6288 * win32-i386-low.c (i386_fetch_inferior_register)
6289 (i386_store_inferior_register): Change prototype to take a
6290 regcache. Adjust.
6291 * win32-low.c (child_fetch_inferior_registers)
6292 (child_store_inferior_registers): Change prototype to take a
6293 regcache. Adjust.
6294 (win32_wait): Adjust.
6295 (win32_fetch_inferior_registers): Change prototype to take a
6296 regcache. Adjust.
6297 (win32_store_inferior_registers): Adjust.
6298 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6299 store_inferior_register>: Change prototype to take a regcache.
6300
60c3d7b0
DE
63012010-01-20 Doug Evans <dje@google.com>
6302
6303 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6304 #ifdef.
6305 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6306 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6307
dc146f7c
VP
63082010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6309
6310 * linux-low.c (linux_core_of_thread): New.
6311 (compare_ints, show_process, list_threads): New.
6312 (linux_qxfer_osdata): Report threads and cores.
6313 (linux_target_op): Register linux_core_of_thread.
6314 * remote-utils.c (prepare_resume_reply): Report the core.
6315 (buffer_xml_printf): Support %d specifier.
6316 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6317 New.
6318 (handle_query): Handle qXfer:threads. Announce availability
6319 thereof.
6320 * target.h (struct target_ops): New field core_of_thread.
6321
7803799a
UW
63222010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6323
6324 * Makefile.in (clean): Remove new generated files.
6325 (reg-s390.o, reg-s390.c): Remove rules.
6326 (reg-s390x.o, reg-s390x.c): Likewise.
6327 (s390-linux32.o, s390-linux32.c): Add rules.
6328 (s390-linux64.o, s390-linux64.c): Likewise.
6329 (s390x-linux64.o, s390x-linux64.c): Likewise.
6330 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6331 * linux-s390-low.c: Include <elf.h>.
6332 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6333 (init_registers_s390): Remove prototype.
6334 (init_registers_s390x): Likewise.
6335 (init_registers_s390_linux32): Add prototype.
6336 (init_registers_s390_linux64): Likewise.
6337 (init_registers_s390x_linux64): Likewise.
6338 (s390_num_regs_3264): New define.
6339 (s390_regmap_3264): New global variable.
6340 (s390_cannot_fetch_register): Remove obsolete check.
6341 (s390_cannot_store_register): Likewise.
6342 (s390_collect_ptrace_register): Handle upper/lower register halves.
6343 (s390_supply_ptrace_register): Likewise.
6344 (s390_fill_gregset): Update to register number changes.
6345 (s390_get_hwcap): New routine.
6346 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6347 Install appropriate regmap and register set.
6348
6e7ffa39
JB
63492010-01-01 Joel Brobecker <brobecker@adacore.com>
6350
6351 * server.c (gdbserver_version): Update copyright year to 2010.
6352 * gdbreplay.c (gdbreplay_version): Likewise.
6353
957f3f49
DE
63542009-12-28 Doug Evans <dje@google.com>
6355
6356 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6357 elf/external.h. Include <elf.h> instead but only if necessary.
6358
ca5c370d
PA
63592009-12-28 Pedro Alves <pedro@codesourcery.com>
6360
6361 * linux-low.c (linux_remove_process): Remove `detaching'
6362 parameter. Don't release/detach from thread_db here.
6363 (linux_kill): Release/detach from thread_db here, ...
6364 (linux_detach): ... and here, before actually detaching.
6365 (linux_wait_1): ... and here, when a process exits.
6366 * thread-db.c (any_thread_of): New.
6367 (thread_db_free): Switch the current inferior to a thread of the
6368 passed in process.
6369
4ee62156
DE
63702009-12-21 Doug Evans <dje@google.com>
6371
d90e6a88
DE
6372 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6373
c5f62d5f
DE
6374 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6375 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6376 warning ifndef __NR_tkill. Move setting of errno there too.
6377 Delete unnecessary resetting of errno after syscall.
6378 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6379
10e86dd7
DE
6380 * configure.ac: Check for dladdr.
6381 * config.in: Regenerate.
6382 * configure: Regenerate.
6383 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6384 (try_thread_db_load): Update.
6385
4ee62156
DE
6386 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6387
00f515da
DE
63882009-12-18 Doug Evans <dje@google.com>
6389
e9464885
DE
6390 * event-loop.c: Include unistd.h if it exists.
6391
07d4f67e
DE
6392 * linux-low.c (my_waitpid): Move definition away from being in
6393 between linux_tracefork_child/linux_test_for_tracefork.
6394
00f515da
DE
6395 * gdb_proc_service.h (psaddr_t): Fix type.
6396 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6397 signature to match glibc.
6398
1de1badb
DE
63992009-12-16 Doug Evans <dje@google.com>
6400
6401 * linux-low.c (linux_read_memory): Fix argument to read.
6402
aeeb81d1
PA
64032009-11-26 Pedro Alves <pedro@codesourcery.com>
6404
6405 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6406 events, don't leave current_inferior pointing at null.
6407
10357975
PA
64082009-11-26 Pedro Alves <pedro@codesourcery.com>
6409
6410 * win32-low.c (LOG): Delete.
6411 (OUTMSG): Output to stderr.
6412 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6413 on compile time LOG macro.
6414 (win32_wait): Fix debug output.
6415
cf6e3471
PA
64162009-11-26 Pedro Alves <pedro@codesourcery.com>
6417
6418 * win32-low.c (win32_add_one_solib): If the dll name is
6419 "ntdll.dll", prepend the system directory to the dll path.
6420
0c85e18e
MK
64212009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6422
6423 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6424
9ac544ce 64252009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 6426 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
6427
6428 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6429 * configure.ac: Check for __mcoldfire__ and set
6430 gdb_cv_m68k_is_coldfire.
6431 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6432 reg-cf.o and reg-m68k.o.
6433 * configure: Regenerated.
6434
fd7dd3e6
PA
64352009-11-16 Pedro Alves <pedro@codesourcery.com>
6436
6437 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6438 Pass it to thread_db_free.
6439 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6440 proper `detaching' argument to linux_remove_process.
6441 * linux-low.h (thread_db_free): Add `detaching' parameter.
6442 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6443 to thread_db_free.
6444 (thread_db_free): Add `detaching' parameter. Only
6445 call td_ta_clear_event if detaching from process.
6446
75aa492e
MK
64472009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6448
6449 * thread-db.c (thread_db_free): Fix typo.
6450
21e1bee4
PP
64512009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6452
6453 PR gdb/10838
6454 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6455
8838b45e
NS
64562009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6457
6458 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6459 with an i686 compiler.
6460 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6461 needed.
6462 * configure: Rebuilt.
6463
8a35fb51
SL
64642009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6465
6466 PR gdb/10783
6467
6468 * server.c (handle_search_memory_1): Correct read_addr initialization
6469 in loop for searching subsequent chunks.
6470
96f15937
PP
64712009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6472
6473 * configure.ac: New --with-libthread-db option.
6474 * thread-db.c: Allow direct dependence on libthread_db.
6475 (thread_db_free): Adjust.
6476 * config.in: Regenerate.
6477 * configure: Likewise.
889bf7c5 6478
5f7d1694
PP
64792009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6480
6481 PR gdb/10757
6482 * thread-db.c (attach_thread): New function.
6483 (maybe_attach_thread): Return success/failure.
6484 (find_new_threads_callback): Adjust.
889bf7c5
PA
6485 (thread_db_find_new_threads): Loop until no new threads.
6486
88e3b899
PA
64872009-10-13 Pedro Alves <pedro@codesourcery.com>
6488
6489 * proc-service.c (ps_lgetregs): Formatting.
6490
cdbfd419
PP
64912009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6492
6493 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6494 * configure.ac: Adjust.
6495 * linux-low.h (struct process_info_private): Move members to struct
6496 thread_db.
6497 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6498 * linux-low.c (linux_remove_process): Adjust.
6499 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6500 * server.c (handle_query): Move code ...
6501 (handle_monitor_command): ... here. New function.
6502 * target.h (struct target_ops): New member.
6503 * thread-db.c (struct thread_db): New.
6504 (libthread_db_search_path): New variable.
6505 (thread_db_create_event, thread_db_enable_reporting)
6506 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6507 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6508 (try_thread_db_load_1, dladdr_to_soname): New functions.
6509 (try_thread_db_load, thread_db_load_search): New functions.
6510 (thread_db_init): Search for libthread_db.
6511 (thread_db_free): New function.
6512 (thread_db_handle_monitor_command): Likewise.
6513 * config.in: Regenerate.
6514 * configure: Regenerate.
889bf7c5 6515
4168d2d6
UW
65162009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6517
6518 * spu-low.c (spu_kill): Wait for inferior to terminate.
6519 Call clear_inferiors.
6520 (spu_detach): Call clear_inferiors.
6521
81ecdfbb
RW
65222009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6523
6524 * aclocal.m4: Regenerate.
6525 * config.in: Likewise.
6526 * configure: Likewise.
6527
0b9ff2c0
UW
65282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6529
6530 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6531 (parse_spufs_run): New function.
6532 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6533 (ppc_breakpoint_at): Handle SPU breakpoints.
6534
efcbbd14
UW
65352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6536
6537 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6538 (SPUFS_MAGIC): Define.
6539 (spu_enumerate_spu_ids): New function.
6540 (linux_qxfer_spu): New function.
6541 (linux_target_ops): Install linux_qxfer_spu.
6542
f4d9bade
UW
65432009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6544
6545 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6546 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6547 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6548 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6549 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6550 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6551 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6552 (init_registers_powerpc_cell32l): Add prototype.
6553 (init_registers_powerpc_cell64l): Likewise.
6554 (ppc_arch_setup): Detect Cell/B.E. architecture.
6555
96e946ca
RW
65562009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6557
6558 * Makefile.in (datarootdir): New variable.
6559
58d6951d
DJ
65602009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6561
6562 * linux-low.c (linux_write_memory): Update debugging output.
6563 * Makefile.in (clean): Add new descriptions.
6564 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6565 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6566 * configure.srv: Add new files for arm*-*-linux*.
6567 * linux-arm-low.c: Add new declarations.
6568 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6569 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6570 (HWCAP_VFPv3D16): New.
6571 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6572 instead of __IWMMXT__.
6573 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6574 (arm_arch_setup): New.
6575 (target_regsets): Remove #ifdef. Add VFP regset.
6576 (the_low_target): Use arm_arch_setup.
6577
12b42a12
DJ
65782009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6579
6580 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6581 the main thread again.
6582
ac8c974e
AR
65832009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6584
6585 Adding Neutrino gdbserver.
6586 * configure: Regenerated.
6587 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6588 * configure.srv (i[34567]86-*-nto*): New target.
6589 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6590 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6591 (nto_comctrl) [__QNX__]: New function.
6592 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6593
4424e0c3 65942009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
6595
6596 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6597 srv_tgtobj.
6598
912cf4ba
PA
65992009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6600 Pedro Alves <pedro@codesourcery.com>
6601
6602 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6603 don't support CONTEXT_EXTENDED_REGISTERS.
6604 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6605 (the_low_target): Install them.
6606 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6607 failing with ERROR_PIPE_NOT_CONNECTED.
6608
aa5ca48f
DE
66092009-06-30 Doug Evans <dje@google.com>
6610 Pierre Muller <muller@ics.u-strasbg.fr>
6611
6612 Add h/w watchpoint support to x86-linux, win32-i386.
6613 * Makefile.in (SFILES): Add i386-low.c
6614 (i386_low_h): Define.
6615 (i386-low.o): Add dependencies.
6616 (linux-x86-low.o): Add i386-low.h dependency.
6617 (win32-i386-low.o): Ditto.
6618 * i386-low.c: New file.
6619 * i386-low.h: New file.
6620 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6621 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6622 * linux-low.c (linux_add_process): Initialize arch_private.
6623 (linux_remove_process): Free arch_private.
6624 (add_lwp): Initialize arch_private.
6625 (delete_lwp): Free arch_private.
6626 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6627 provided.
6628 * linux-low.h (process_info_private): New member arch_private.
6629 (lwp_info): New member arch_private.
6630 (linux_target_ops): New members new_process, new_thread,
6631 prepare_to_resume.
6632 (ptid_of): New macro.
6633 * linux-x86-low.c: Include stddef.h, i386-low.h.
6634 (arch_process_info): New struct.
6635 (arch_lwp_info): New struct.
6636 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6637 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6638 (i386_dr_low_get_status): New function.
6639 (x86_insert_point, x86_remove_point): New functions.
6640 (x86_stopped_by_watchpoint): New function.
6641 (x86_stopped_data_address): New function.
6642 (x86_linux_new_process, x86_linux_new_thread): New functions.
6643 (x86_linux_prepare_to_resume): New function.
6644 (the_low_target): Add entries for insert_point, remove_point,
6645 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6646 prepare_to_resume.
6647 * server.c (debug_hw_points): New global.
6648 (monitor_show_help): Document set debug-hw-points.
6649 (handle_query): Process "set debug-hw-points".
6650 * server.h (debug_hw_points): Declare.
6651 (paddress): Declare.
6652 * utils.c (NUMCELLS, CELLSIZE): New macros.
6653 (get_sell, xsnprintf, paddress): New functions.
6654 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6655 remove_point, stopped_by_watchpoint, stopped_data_address.
6656 * win32-i386-low.c: Include i386-low.h.
6657 (debug_reg_state): Replaces dr.
6658 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6659 (i386_dr_low_get_status): New function.
6660 (i386_insert_point, i386_remove_point): New functions.
6661 (i386_stopped_by_watchpoint): New function.
6662 (i386_stopped_data_address): New function.
6663 (i386_initial_stuff): Update.
6664 (get_thread_context,set_thread_context,i386_thread_added): Update.
6665 (the_low_target): Add entries for insert_point,
6666 remove_point, stopped_by_watchpoint, stopped_data_address.
6667 * win32-low.c (win32_insert_watchpoint): New function.
6668 (win32_remove_watchpoint): New function.
6669 (win32_stopped_by_watchpoint): New function.
6670 (win32_stopped_data_address): New function.
6671 (win32_target_ops): Add entries for insert_watchpoint,
6672 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6673 * win32-low.h (win32_target_ops): New members insert_point,
6674 remove_point, stopped_by_watchpoint, stopped_data_address.
6675
d993e290
PA
66762009-06-25 Pedro Alves <pedro@codesourcery.com>
6677
6678 * server.c (process_serial_event): Re-return unsupported, not
6679 error, if the type isn't recognized. Re-allow supporting only
6680 insert or remove packets. Also call require_running for
6681 breakpoints. Add missing break statement to default case. Tidy.
6682 * target.h (struct target_ops): Rename insert_watchpoint to
6683 insert_point, and remove_watchpoint to remove_point.
6684
6685 * linux-low.h (struct linux_target_ops): Likewise.
6686 * linux-low.c (linux_insert_watchpoint): Rename to ...
6687 (linux_insert_point): ... this. Adjust.
6688 (linux_remove_watchpoint): Rename to ...
6689 (linux_remove_point): ... this. Adjust.
6690 (linux_target_ops): Adjust.
6691 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6692 (cris_insert_point): ... this.
6693 (cris_remove_watchpoint): Rename to ...
6694 (cris_remove_point): ... this.
6695 (the_low_target): Adjust.
6696
0f54c268
PM
66972009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6698
6699 * server.c (handle_v_kill): Pass signal_pid to
6700 kill_inferior if multi_process is zero.
6701
c6314022
AR
67022009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6703
6704 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6705 * target.h (target_ops): Comment for *_watchpoint to make it clear
6706 the functions can get types '0' and '1'.
6707
4463ce24
AR
67082009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6709
6710 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6711 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6712 * regcache.c (get_regcache): Likewise.
6713 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6714 * win32-low.c (child_fetch_inferior_registers): Remove check for
6715 regno 0.
6716
cf8fd78b
PA
67172009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6718 Pedro Alves <pedro@codesourcery.com>
6719
6720 * target.h (struct target_ops) <supports_multi_process>: New
6721 callback.
6722 (target_supports_multi_process): New.
6723 * server.c (handle_query): Even if GDB reports support, only
6724 enable multi-process if the target also supports it. Report
6725 multi-process support only if the target backend supports it.
6726 * linux-low.c (linux_supports_multi_process): New function.
6727 (linux_target_ops): Install it as target_supports_multi_process
6728 callback.
6729
47c0c975
DE
67302009-05-24 Doug Evans <dje@google.com>
6731
e09875d4
DE
6732 Global renaming of find_thread_pid to find_thread_ptid.
6733 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6734 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6735 All callers updated.
6736
e27d73f6
DE
6737 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6738 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6739 directly.
6740
47c0c975
DE
6741 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6742 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6743 (linux_resume_one_lwp): Ditto.
6744
2acc282a
DE
67452009-05-23 Doug Evans <dje@google.com>
6746
6747 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6748 from struct inferior_list_entry * to struct lwp_info *.
6749 All callers updated.
6750
9f1036c1
DE
67512009-05-13 Doug Evans <dje@google.com>
6752
6753 * linux-x86-low.c: Don't include assert.h.
6754 (x86_siginfo_fixup): Use fatal, not assert.
6755 (x86_arch_setup): Fix comment.
6756
d0722149
DE
67572009-05-12 Doug Evans <dje@google.com>
6758
6759 Biarch support for i386/amd64 gdbserver.
6760 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6761 Add linux-x86-low.c.
6762 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6763 (linux-x86-low.o): Add.
6764 * linux-x86-64-low.c: Delete.
6765 * linux-i386-low.c: Delete.
6766 * linux-x86-low.c: New file.
6767 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6768 linux-x86-low.o.
6769 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6770 linux-x86-low.o.
6771 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6772 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6773 (linux_child_pid_to_exec_file): New function.
6774 (elf_64_header_p, elf_64_file_p): New functions.
6775 (siginfo_fixup): New function.
6776 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6777 give target a chance to convert layout.
6778 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6779 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6780
fdeb2a12
DE
67812009-05-07 Doug Evans <dje@google.com>
6782
6783 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6784 (regsets_store_inferior_registers): Ditto.
6785
a6dbe5df
PA
67862009-05-06 Pedro Alves <pedro@codesourcery.com>
6787
6788 PR server/10048
6789
6790 * linux-low.c (must_set_ptrace_flags): Delete.
6791 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6792 of the global.
6793 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6794 `lwp->must_set_ptrace_flags' instead.
ba42693b 6795 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
6796 (linux_wait_1): ... not here.
6797
5091eb23
DE
67982009-04-30 Doug Evans <dje@google.com>
6799
9f767825
DE
6800 * inferiors.c (started_inferior_callback): New function.
6801 (attached_inferior_callback): New function.
6802 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6803 * server.c (print_started_pid, print_attached_pid): New functions.
6804 (detach_or_kill_for_exit): New function.
6805 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6806 * server.h (have_started_inferiors_p): Declare.
6807 (have_attached_inferiors_p): Declare.
6808
5091eb23
DE
6809 * inferiors.c (remove_process): Fix memory leak, free process.
6810 * linux-low.c (linux_remove_process): New function.
6811 (linux_kill): Call it instead of remove_process.
6812 (linux_detach, linux_wait_1): Ditto.
6813
155c8968
PA
68142009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6815
6816 * configure.srv: Add x86 Windows CE target.
6817
7fe519cb
UW
68182009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6819
6820 * inferiors.c (get_thread_process): Make global.
6821 * server.h (get_thread_process): Add prototype.
6822 * thread-db.c (find_one_thread): Use get_thread_process
6823 instead of current_process.
6824 (thread_db_get_tls_address): Do not crash if called when
6825 thread layer is not yet initialized.
6826
5472f405
UW
68272009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6828
6829 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6830 * spu-low.c (current_tid): Rename to ...
6831 (current_ptid): ... this.
6832 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6833 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6834 ptid_get_lwp (current_ptid) instead of current_tid.
6835 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6836 instead of current_tid. Use find_process_pid to verify pid
6837 argument is valid. Pass proper argument to remove_process.
6838 (spu_thread_alive): Compare current_ptid instead of current_tid.
6839 (spu_resume): Likewise.
6840
55ac2b99
PA
68412009-04-02 Pedro Alves <pedro@codesourcery.com>
6842
6843 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6844 variable.
6845
95954743
PA
68462009-04-01 Pedro Alves <pedro@codesourcery.com>
6847
6848 Implement the multiprocess extensions, and add linux multiprocess
6849 support.
6850
6851 * server.h (ULONGEST): Declare.
6852 (struct ptid, ptid_t): New.
6853 (minus_one_ptid, null_ptid): Declare.
6854 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6855 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6856 (struct inferior_list_entry): Change `id' type from unsigned from
6857 to ptid_t.
6858 (struct sym_cache, struct breakpoint, struct
6859 process_info_private): Forward declare.
6860 (struct process_info): Declare.
6861 (current_process): Declare.
6862 (all_processes): Declare.
6863 (initialize_inferiors): Declare.
6864 (add_thread): Adjust to use ptid_t.
6865 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6866 (add_process, remove_process, find_thread_pid): Declare.
6867 (find_inferior_id): Adjust to use ptid_t.
6868 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6869 (multi_process): Declare.
6870 (push_event): Adjust to use ptid_t.
6871 (read_ptid, write_ptid): Declare.
6872 (prepare_resume_reply): Adjust to use ptid_t.
6873 (clear_symbol_cache): Declare.
6874 * inferiors.c (all_processes): New.
6875 (null_ptid, minus_one_ptid): New.
6876 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6877 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6878 (add_thread): Change unsigned long to ptid. Remove gdb_id
6879 parameter. Adjust.
6880 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6881 (gdb_id_to_thread): Rename to ...
6882 (find_thread_pid): ... this. Change unsigned long to ptid.
6883 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6884 (loaded_dll, pull_pid_from_list): Adjust.
6885 (add_process, remove_process, find_process_pid)
6886 (get_thread_process, current_process, initialize_inferiors): New.
6887 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6888 (struct target_waitstatus) <related_pid>: Ditto.
6889 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6890 return type to int.
6891 (struct target_ops) <join>: Add `pid' argument.
6892 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6893 (struct target_ops) <wait>: Add `ptid' field. Change return type
6894 to ptid.
6895 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6896 (mywait): Add `ptid' argument. Change return type to ptid_t.
6897 (target_pid_to_str): Declare.
6898 * target.c (set_desired_inferior): Adjust to use ptids.
6899 (mywait): Add new `ptid' argument. Adjust.
6900 (target_pid_to_str): New.
6901 * mem-break.h (free_all_breakpoints): Declare.
6902 * mem-break.c (breakpoints): Delelete.
6903 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6904 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6905 to use per-process breakpoint list.
6906 (free_all_breakpoints): New.
6907 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6908 (symbol_cache, all_symbols_looked_up): Delete.
6909 (hexchars): New.
6910 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6911 read_ptid): New.
6912 (prepare_resume_reply): Change ptid argument's type from unsigned
6913 long to ptid_t. Adjust. Implement W;process and X;process.
6914 (free_sym_cache, clear_symbol_cache): New.
6915 (look_up_one_symbol): Adjust to per-process symbol cache. *
6916 * server.c (cont_thread, general_thread, step_thread): Change type
6917 to ptid_t.
6918 (attached): Delete.
6919 (multi_process): New.
6920 (last_ptid): Change type to ptid_t.
6921 (struct vstop_notif) <ptid>: Change type to ptid_t.
6922 (queue_stop_reply, push_event): Change `ptid' argument's type to
6923 ptid_t.
6924 (discard_queued_stop_replies): Add `pid' argument.
6925 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6926 changes. Don't reference the `attached' global.
6927 (attach_inferior): Adjust to mywait interface changes.
6928 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6929 features. Handle and report "multiprocess+". Handle
6930 "qAttached:PID".
6931 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6932 changes.
6933 (handle_v_kill): New.
6934 (handle_v_stopped): Adjust to use target_pid_to_str.
6935 (handle_v_requests): Allow multiple attaches and runs when
6936 multiprocess extensions are in effect. Handle "vKill".
6937 (myresume): Adjust to use ptids.
6938 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6939 (handle_status): Adjust to discard_queued_stop_replies interface
6940 change.
6941 (first_thread_of, kill_inferior_callback)
6942 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6943 (main): Call initialize_inferiors. Adjust to use ptids, killing
6944 and detaching from all inferiors. Handle multiprocess packet
6945 variants.
6946 * linux-low.h: Include gdb_proc_service.h.
6947 (struct process_info_private): New.
6948 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6949 <lwpid_of>: Use ptid_get_lwp.
6950 (get_lwp_thread): Adjust.
6951 (struct lwp_info): Add `dead' member.
6952 (find_lwp_pid): Declare.
6953 * linux-low.c (thread_db_active): Delete.
6954 (new_inferior): Adjust comment.
6955 (inferior_pid): Delete.
6956 (linux_add_process): New.
6957 (handle_extended_wait): Adjust.
6958 (add_lwp): Change unsigned long to ptid.
6959 (linux_create_inferior): Add process to processes table. Adjust
6960 to use ptids. Don't set new_inferior here.
6961 (linux_attach_lwp): Rename to ...
6962 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6963 it. Adjust to use ptids.
6964 (linux_attach_lwp): New.
6965 (linux_attach): Add process to processes table. Don't set
6966 new_inferior here.
6967 (struct counter): New.
6968 (second_thread_of_pid_p, last_thread_of_process_p): New.
6969 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6970 multiple processes.
6971 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6972 processes. Remove process from process table.
6973 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6974 to multiple processes.
6975 (any_thread_of): New.
6976 (linux_detach): Add `pid' argument, and handle it. Remove process
6977 from processes table.
6978 (linux_join): Add `pid' argument. Handle it.
6979 (linux_thread_alive): Change unsighed long argument to ptid_t.
6980 Consider dead lwps as not being alive.
6981 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6982 threads we're not interested in.
6983 (same_lwp, find_lwp_pid): New.
6984 (linux_wait_for_lwp): Change `pid' argument's type from int to
6985 ptid_t. Adjust.
6986 (linux_wait_for_event): Rename to ...
6987 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6988 from int to ptid_t. Adjust.
6989 (linux_wait_for_event): New.
6990 (linux_wait_1): Add `ptid' argument. Change return type to
6991 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6992 that exit from the process table.
6993 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6994 Adjust.
6995 (mark_lwp_dead): New.
6996 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6997 stopping all threads, mark its main lwp as dead.
6998 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6999 ptids.
7000 (fetch_register, usr_store_inferior_registers)
7001 (regsets_fetch_inferior_registers)
7002 (regsets_store_inferior_registers, linux_read_memory)
7003 (linux_write_memory): Inline `inferior_pid'.
7004 (linux_look_up_symbols): Adjust to use per-process
7005 `thread_db_active'.
7006 (linux_request_interrupt): Adjust to use ptids.
7007 (linux_read_auxv): Inline `inferior_pid'.
7008 (initialize_low): Don't reference thread_db_active.
7009 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7010 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7011 (ps_getpid): Return the pid of the current inferior.
7012 * thread-db.c (proc_handle, thread_agent): Delete.
7013 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7014 per-process data.
7015 (find_one_thread): Change argument type to ptid_t. Adjust to
7016 per-process data.
7017 (maybe_attach_thread): Adjust to per-process data and ptids.
7018 (thread_db_find_new_threads): Ditto.
7019 (thread_db_init): Ditto.
7020 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7021 processes table. Adjust to use ptids.
7022 (spu_kill, spu_detach): Adjust interface. Remove process from
7023 processes table.
7024 (spu_join, spu_thread_alive): Adjust interface.
7025 (spu_wait): Adjust interface. Remove process from processes
7026 table. Adjust to use ptids.
7027 * win32-low.c (current_inferior_tid): Delete.
7028 (current_inferior_ptid): New.
7029 (debug_event_ptid): New.
7030 (thread_rec): Take a ptid. Adjust.
7031 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7032 (child_delete_thread): Ditto.
7033 (do_initial_child_stuff): Add `attached' argument. Add process to
7034 processes table.
7035 (child_fetch_inferior_registers, child_store_inferior_registers):
7036 Adjust.
7037 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7038 (win32_attach): Pass 1 to do_initial_child_stuff.
7039 (win32_kill): Adjust interface. Remove process from processes
7040 table.
7041 (win32_detach): Ditto.
7042 (win32_join): Adjust interface.
7043 (win32_thread_alive): Take a ptid.
7044 (win32_resume): Adjust to use ptids.
7045 (get_child_debug_event): Ditto.
7046 (win32_wait): Adjust interface. Remove exiting process from
7047 processes table.
7048
bd99dc85
PA
70492009-04-01 Pedro Alves <pedro@codesourcery.com>
7050
7051 Non-stop mode support.
7052
7053 * server.h (non_stop): Declare.
7054 (gdb_client_data, handler_func): Declare.
7055 (delete_file_handler, add_file_handler, start_event_loop):
7056 Declare.
7057 (handle_serial_event, handle_target_event, push_event)
7058 (putpkt_notif): Declare.
7059 * target.h (enum resume_kind): New.
7060 (struct thread_resume): Replace `step' field by `kind' field.
7061 (TARGET_WNOHANG): Define.
7062 (struct target_ops) <wait>: Add `options' argument.
7063 <supports_non_stop, async, start_non_stop>: New fields.
7064 (target_supports_non_stop, target_async): New.
7065 (start_non_stop): Declare.
7066 (mywait): Add `options' argument.
7067 * target.c (mywait): Add `options' argument. Print child exit
7068 notifications here.
7069 (start_non_stop): New.
7070 * server.c (non_stop, own_buf, mem_buf): New globals.
7071 (struct vstop_notif): New.
7072 (notif_queue): New global.
7073 (queue_stop_reply, push_event, discard_queued_stop_replies)
7074 (send_next_stop_reply): New.
7075 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7076 interface changes.
7077 (attach_inferior): In non-stop mode, don't wait for the target
7078 here.
7079 (handle_general_set): Handle QNonStop.
7080 (handle_query): When handling qC, return the current general
7081 thread, instead of the first thread of the list.
7082 (handle_query): If the backend supports non-stop mode, include
7083 QNonStop+ in the qSupported query response.
7084 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7085 and non-stop mode.
7086 (handle_v_attach, handle_v_run): Handle non-stop mode.
7087 (handle_v_stopped): New.
7088 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7089 (myresume): Adjust to use resume_kind. Handle non-stop.
7090 (queue_stop_reply_callback): New.
7091 (handle_status): Handle non-stop mode.
7092 (main): Clear non_stop flag on reconnection. Use the event-loop.
7093 Refactor serial protocol handling from here ...
7094 (process_serial_event): ... to this new function. When GDB
7095 selects any thread, select one here. In non-stop mode, wait until
7096 GDB acks all pending events before exiting.
7097 (handle_serial_event, handle_target_event): New.
7098 * remote-utils.c (remote_open): Install remote_desc in the event
7099 loop.
7100 (remote_close): Remove remote_desc from the event loop.
7101 (putpkt_binary): Rename to...
7102 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7103 (putpkt_binary): New as wrapper around putpkt_binary_1.
7104 (putpkt_notif): New.
7105 (prepare_resume_reply): In non-stop mode, don't change the
7106 general_thread.
7107 * event-loop.c: New.
7108 * Makefile.in (OBJ): Add event-loop.o.
7109 (event-loop.o): New rule.
7110
7111 * linux-low.h (pid_of): Moved here.
7112 (lwpid_of): New.
7113 (get_lwp_thread): Use lwpid_of.
7114 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7115 * linux-low.c (pid_of): Delete.
7116 (inferior_pid): Use lwpid_of.
7117 (linux_event_pipe): New.
7118 (target_is_async_p): New.
7119 (delete_lwp): New.
7120 (handle_extended_wait): Use lwpid_of.
7121 (add_lwp): Don't set lwpid field.
7122 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7123 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7124 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7125 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7126 first. Adjust to linux_wait_for_event interface changes. Use
7127 lwpid_of.
7128 (linux_detach): Don't delete the main lwp here.
7129 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7130 (status_pending_p): Don't consider explicitly suspended lwps.
7131 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7132 pointer. Add OPTIONS argument. Change return type to int. Use
7133 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7134 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7135 pointer. Add status pointer argument. Return a pid instead of a
7136 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7137 changes. In non-stop mode, don't switch to a random thread.
7138 (linux_wait): Rename to...
7139 (linux_wait_1): ... this. Add target_options argument, and handle
7140 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7141 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7142 clean exit and signal exit code. Don't stop all threads in
7143 non-stop mode. In all-stop mode, only stop all threads when
7144 reporting a stop to GDB. Handle explicit thread stop requests.
7145 (async_file_flush, async_file_mark): New.
7146 (linux_wait): New.
7147 (send_sigstop): Use lwpid_of.
7148 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7149 interface changes. In non-stop mode, don't switch to a random
7150 thread.
7151 (linux_resume_one_lwp): Use lwpid_of.
7152 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7153 (linux_resume_one_thread): ... this. Handle resume_stop. In
7154 non-stop mode, don't look for pending flag in all threads.
7155 (resume_status_pending_p): Don't consider explicitly suspended
7156 threads.
7157 (my_waitpid): Reimplement. Emulate __WALL.
7158 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7159 Use lwpid_of.
7160 (sigchld_handler, linux_supports_non_stop, linux_async)
7161 (linux_start_non_stop): New.
7162 (linux_target_ops): Register linux_supports_non_stop, linux_async
7163 and linux_start_non_stop.
7164 (initialize_low): Install SIGCHLD handler.
7165 * thread-db.c (thread_db_create_event, find_one_thread)
7166 (thread_db_get_tls_address): Use lwpid_of.
7167 * win32-low.c (win32_detach): Adjust to use resume_kind.
7168 (win32_wait): Add `options' argument.
7169 * spu-low.c (spu_resume): Adjust to use resume_kind.
7170 (spu_wait): Add `options' argument.
7171
5b1c542e
PA
71722009-04-01 Pedro Alves <pedro@codesourcery.com>
7173
7174 Decouple target code from remote protocol.
7175
7176 * target.h (enum target_waitkind): New.
7177 (struct target_waitstatus): New.
7178 (struct target_ops) <wait>: Return an unsigned long. Take a
7179 target_waitstatus pointer instead of a char pointer.
7180 (mywait): Likewise.
7181 * target.c (mywait): Change prototype to return an unsigned long.
7182 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7183 * server.h (thread_from_wait, old_thread_from_wait): Delete
7184 declarations.
7185 (prepare_resume_reply): Change prototype to take a
7186 target_waitstatus.
7187 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7188 (last_status, last_ptid): New.
7189 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7190 pid instead of a signal.
7191 (attach_inferior): Remove "status" and "signal" parameters.
7192 Adjust.
7193 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7194 not as an address.
7195 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7196 (handle_v_requests, myresume): Remove "status" and "signal"
7197 parameters. Adjust.
7198 (handle_status): New.
7199 (main): Delete local `status'. Adjust.
7200 * remote-utils.c: Include target.h.
7201 (prepare_resume_reply): Change prototype to take a
7202 target_waitstatus. Adjust.
7203
7204 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7205 interface.
7206 * spu-low.c (spu_wait): Adjust.
7207 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7208 Delete.
7209 (win32_wait): Adjust.
7210
2bd7c093
PA
72112009-04-01 Pedro Alves <pedro@codesourcery.com>
7212
7213 * target.h (struct thread_resume): Delete leave_stopped member.
7214 (struct target_ops): Add a `n' argument to the `resume' callback.
7215 * server.c (start_inferior): Adjust.
7216 (handle_v_cont, myresume): Adjust.
7217 * linux-low.c (check_removed_breakpoint): Adjust to resume
7218 interface change, and to removed leave_stopped field.
7219 (resume_ptr): Delete.
7220 (struct thread_resume_array): New.
7221 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7222 resume interface change.
7223 (linux_continue_one_thread, linux_queue_one_thread)
7224 (resume_status_pending_p): Check if the resume field is NULL
7225 instead of checking the leave_stopped member.
7226 (linux_resume): Adjust to the target resume interface change.
7227 * spu-low.c (spu_resume): Adjust to the target resume interface
7228 change.
7229 * win32-low.c (win32_detach, win32_resume): Ditto.
7230
c35fafde
PA
72312009-04-01 Pedro Alves <pedro@codesourcery.com>
7232
7233 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7234 flag.
7235 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7236 pending.
7237 (linux_continue_one_thread): Only preserve the stepping flag if
7238 there's a pending breakpoint.
7239
0a59d50b
PA
72402009-03-31 Pedro Alves <pedro@codesourcery.com>
7241
7242 * server.c (main): After the inferior having exited, call
7243 remote_close before exiting gdbserver.
7244
f04c6d38
TJB
72452009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7246
7247 Fix size of FPSCR in Power 7 processors.
7248 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7249 (PPC_FEATURE_HAS_DFP): New #define.
7250 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7251 size of the FPSCR.
7252
78e5cee6
PA
72532009-03-23 Pedro Alves <pedro@codesourcery.com>
7254
7255 * server.c (handle_query) Whitespace and formatting.
7256
1b3f6016
PA
72572009-03-22 Pedro Alves <pedro@codesourcery.com>
7258
7259 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7260 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7261 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7262 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7263 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7264 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7265 Makefile.in, configure.ac: Fix whitespace throughout.
7266 * configure: Regenerate.
7267
a07b2135
PA
72682009-03-22 Pedro Alves <pedro@codesourcery.com>
7269
7270 * inferiors.c (find_inferior): Make it safe for the callback
7271 function to delete the currently iterated inferior.
7272
67cc2626
PA
72732009-03-22 Pedro Alves <pedro@codesourcery.com>
7274
7275 * Makefile.in (linuw_low_h): Move higher.
7276 (thread-db.o): Depend on $(linux_low_h).
7277
54a0b537
PA
72782009-03-17 Pedro Alves <pedro@codesourcery.com>
7279
7280 Rename "process" to "lwp" throughout.
7281
7282 * linux-low.c (all_processes): Rename to...
7283 (all_lwps): ... this.
7284 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7285 (add_process): Rename to ...
7286 (add_lwp): ... this. Adjust.
7287 (linux_create_inferior): Adjust.
7288 (linux_attach_lwp): Adjust.
7289 (linux_attach): Adjust.
7290 (linux_kill_one_process): Rename to ...
7291 (linux_kill_one_lwp): ... this. Adjust.
7292 (linux_kill): Adjust.
7293 (linux_detach_one_process): Rename to ...
7294 (linux_detach_one_lwp): ... this. Adjust.
7295 (linux_detach): Adjust.
7296 (check_removed_breakpoint): Adjust.
7297 (status_pending_p): Adjust.
7298 (linux_wait_for_process): Rename to ...
7299 (linux_wait_for_lwp): ... this. Adjust.
7300 (linux_wait_for_event): Adjust.
7301 (send_sigstop): Adjust.
7302 (wait_for_sigstop): Adjust.
7303 (stop_all_processes): Rename to ...
7304 (stop_all_lwps): ... this.
7305 (linux_resume_one_process): Rename to ...
7306 (linux_resume_one_lwp): ... this. Adjust.
7307 (linux_set_resume_request, linux_continue_one_thread)
7308 (linux_queue_one_thread, resume_status_pending_p)
7309 (usr_store_inferior_registers, regsets_store_inferior_registers)
7310 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7311 Adjust.
7312 * linux-low.h (get_process): Rename to ...
7313 (get_lwp): ... this. Adjust.
7314 (get_thread_process): Rename to ...
7315 (get_thread_lwp): ... this. Adjust.
7316 (get_process_thread): Rename to ...
7317 (get_lwp_thread): ... this. Adjust.
7318 (struct process_info): Rename to ...
7319 (struct lwp_info): ... this.
7320 (all_processes): Rename to ...
7321 (all_lwps): ... this.
7322 * proc-service.c (ps_lgetregs): Adjust.
7323 * thread-db.c (thread_db_create_event, find_one_thread)
7324 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7325
0b16c5cf
PA
73262009-03-14 Pedro Alves <pedro@codesourcery.com>
7327
7328 * server.c (handle_query): Handle "qAttached".
7329
32de4b9d
NS
73302009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7331
7332 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7333 GPLv3, update license URL.
7334
2aecd87f
DE
73352009-03-01 Doug Evans <dje@google.com>
7336
93efd302 7337 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7338 (server_h): Add gdb_signals.h.
7339 (signals.o): Update.
7340 * server.h (target_signal_from_host,target_signal_to_host_p)
7341 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7342
86b1f9c5
PM
73432009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7344
7345 * remote-utils.c (getpkt): Also generate remote-debug
7346 information if noack_mode is set.
7347
4aa995e1
PA
73482009-02-06 Pedro Alves <pedro@codesourcery.com>
7349
7350 * server.c (handle_query): Report qXfer:siginfo:read and
7351 qXfer:siginfo:write as supported and handle them.
7352 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7353 * linux-low.c (linux_xfer_siginfo): New.
7354 (linux_target_ops): Set it.
7355
62709adf
PA
73562009-01-26 Pedro Alves <pedro@codesourcery.com>
7357
7358 * server.c (gdbserver_usage): Mention --remote-debug.
7359 (main): Accept '--remote-debug' switch.
7360
aef93bd7
DE
73612009-01-18 Doug Evans <dje@google.com>
7362
7363 * regcache.c (new_register_cache): No need to check result of xcalloc.
7364 * server.c (handle_search_memory): Back out calls to xmalloc,
7365 result is checked and error is returned to user upon failure.
7366 (handle_query): Ditto. Add more checks for result of malloc.
7367 (handle_v_cont): Check result of malloc, report error back to
7368 user upon failure.
7369 (handle_v_run): Ditto. Call freeargv.
7370 * server.h (freeargv): Declare.
7371 * utils.c (freeargv): New fn.
7372
54363045
DE
73732009-01-15 Doug Evans <dje@google.com>
7374
f626972c
DE
7375 * gdbreplay.c (perror_with_name): Make arg const char *.
7376 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7377 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 7378 * utils.c (perror_with_name): Make arg const char *.
54363045 7379
18aae699
PA
73802009-01-14 Pedro Alves <pedro@codesourcery.com>
7381
7382 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7383 when handling a EXIT_PROCESS_DEBUG_EVENT.
7384
ff703abe
JB
73852009-01-06 Joel Brobecker <brobecker@adacore.com>
7386
7387 * gdbreplay.c (gdbreplay_version): Update copyright year.
7388 * server.c (gdbserver_version): Likewise.
7389
f21cc1a2 73902009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
7391
7392 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 7393 (handle_extended_wait): Improve comment.
0e21c1ec 7394
bca929d3
DE
73952008-12-13 Doug Evans <dje@google.com>
7396
7397 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7398 * server.h (ATTR_MALLOC): New macro.
7399 (xmalloc,xcalloc,xstrdup): Declare.
7400 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7401 * inferiors.c: Ditto.
7402 * linux-low.c: Ditto.
7403 * mem-break.c: Ditto.
7404 * regcache.c: Ditto.
7405 * remote-utils.c: Ditto.
7406 * server.c: Ditto.
7407 * target.c: Ditto.
7408 * win32-low.c: Ditto.
7409
97438e3f
DE
74102008-12-12 Doug Evans <dje@google.com>
7411
896c7fbb
DE
7412 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7413 in debugging printf.
7414
97438e3f
DE
7415 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7416
e3b886f8
DE
74172008-12-09 Doug Evans <dje@google.com>
7418
7419 * linux-low.h (struct process_info): Delete member tid, unused.
7420 * thread-db.c (find_one_thread): Update.
7421 (maybe_attach_thread): Update.
7422
07e059b5
VP
74232008-12-02 Pedro Alves <pedro@codesourcery.com>
7424
889bf7c5
PA
7425 * target.h (struct target_ops): Add qxfer_osdata member.
7426 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7427 and dirent.h.
7428 (linux_qxfer_osdata): New functions.
7429 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7430 callback.
7431 * server.c (handle_query): Handle "qXfer:osdata:read:".
7432 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7433 (buffer_xml_printf): New functions.
7434 * server.h (struct buffer): New.
7435 (buffer_grow_str, buffer_grow_str0): New macros.
7436 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7437 (buffer_xml_printf): Declare.
07e059b5 7438
4cab47ab
DE
74392008-11-24 Doug Evans <dje@google.com>
7440
7441 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7442
f142445f
DJ
74432008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7444
7445 * server.c (handle_v_run): Always use the supplied argument list.
7446
d0107bb6 74472008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 7448
d0107bb6
BW
7449 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7450 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 7451
2c4ad781
TJB
74522008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7453
7454 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7455 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7456 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7457 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7458 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7459 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7460 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7461 XML target descriptions.
7462 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7463 when inferior is running on an ISA 2.05 or later processor. Add
7464 special case to return offset for full 64-bit slot of FPSCR when
7465 in 32-bits.
7466
dfb64f85
DJ
74672008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7468
7469 * Makefile.in (SFILES, clean): Added sparc64 files.
7470 (reg-sparc64.o, reg-sparc64.c): New.
7471 * configure.srv (sparc*-*-linux*): New configuration.
7472 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7473 syscall arguments for SPARC.
7474 (regsets_store_inferior_registers): Likewise.
7475 * linux-sparc-low.c: New file.
7476
66b6e1dd
DE
74772008-10-21 Doug Evans <dje@google.com>
7478
7479 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7480 (READLINE_DIR,READLINE_DEP): Delete.
7481 (INTERNAL_CFLAGS): Update.
7482 (LINTFLAGS): Update.
7483
9b710a42
PA
74842008-10-10 Pedro Alves <pedro@codesourcery.com>
7485
7486 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7487 whole argv from the last run, not just argv[0].
7488
5822d809
PA
74892008-09-08 Pedro Alves <pedro@codesourcery.com>
7490
7491 * regcache.c (new_register_cache): Return NULL if the register
7492 cache size isn't known yet.
7493 (free_register_cache): Avoid dereferencing a NULL regcache.
7494
74aac56f
DJ
74952008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7496
7497 * configure.srv: Merge MIPS and MIPS64.
7498
400b20f5
MR
74992008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7500
7501 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7502
677c5bb1
LM
75032008-08-18 Luis Machado <luisgpm@br.ibm.com>
7504
7505 * Makefile.in: Add required vsx dependencies.
7506
7507 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7508 Declare init_registers_powerpc_vsx32l.
7509 Declare init_registers_powerpc_vsx64l.
7510 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7511 (ppc_arch_setup): Check for VSX in hwcap.
7512 (ppc_fill_vsxregset): New function.
7513 (ppc_store_vsxregset): New function.
7514 Add new VSX entry in regset_info target_regsets.
7515
7516 * configure.srv: Add new VSX dependencies.
7517
a6f3e723
SL
75182008-08-12 Pedro Alves <pedro@codesourcery.com>
7519
7520 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7521 (remote_open): Set or clear transport_is_reliable.
7522 (putpkt_binary): Don't expect acks in noack mode.
7523 (getpkt): Don't send ack/nac in noack mode.
7524 * server.c (handle_general_set): Handle QStartNoAckMode.
7525 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7526 qSupported.
7527 (main): Reset noack_mode on every connection.
7528 * server.h (noack_mode): Declare.
7529
a417dc56
RW
75302008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7531
7532 * Makefile.in (GDBREPLAY_OBS): New variable.
7533 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7534
3221518c
UW
75352008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7536 Daniel Jacobowitz <dan@codesourcery.com>
7537
7538 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7539 (usr_store_inferior_registers): Likewise.
7540 (regsets_store_inferior_registers): Likewise.
7541
ec56be1b
PA
75422008-07-31 Rolf Jansen <rj@surtec.com>
7543 Pedro Alves <pedro@codesourcery.com>
7544
7545 * configure.ac: Check for memmem declaration.
7546 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7547 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7548 (disable_packet_qfThreadInfo): Unconditionally compile.
7549 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7550 * configure, config.in: Regenerate.
7551
2fe5e3ff
DE
75522008-07-28 Doug Kwan <dougkwan@google.com>
7553
7554 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7555 (linux_write_memory): Remove declaration of errno.
7556
836acd6d
UW
75572008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7558
7559 * linux-low.c (handle_extended_wait): Do not use "status"
7560 variable uninitialized.
7561
aeba519e
PA
75622008-07-07 Pedro Alves <pedro@codesourcery.com>
7563
7564 * server.c (handle_v_attach): Inhibit reporting dll changes.
7565
db42f210
PA
75662008-06-27 Pedro Alves <pedro@codesourcery.com>
7567
7568 * remote-utils.c (prepare_resume_reply): If requested, don't
7569 output "thread:TID" in the T stop reply.
7570
7571 * server.c (disable_packet_vCont, disable_packet_Tthread)
7572 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7573 (handle_query): If requested, disable support for qC, qfThreadInfo
7574 and qsThreadInfo.
7575 (handle_v_requests): If requested, disable support for vCont.
7576 (gdbserver_show_disableable): New.
7577 (main): Handle --disable-packet and --disable-packet=LIST.
7578
7579 * server.h (disable_packet_vCont, disable_packet_Tthread)
7580 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7581
8e4c5421
CD
75822008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7583
7584 * server.c (gdbserver_usage): Mention --version.
7585
6e23a804
DJ
75862008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7587
7588 * Makefile.in (gdbreplay.o): New rule.
7589
90aa6a40
JM
75902008-06-06 Joseph Myers <joseph@codesourcery.com>
7591
7592 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7593 message, not gdbserver.
7594
c16158bc 75952008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
7596 Nathan Sidwell <nathan@codesourcery.com>
7597 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
7598
7599 * acinclude.m4: Include ../../config/acx.m4.
7600 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7601 * configure, config.in: Regenerate.
7602 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7603 * server.c (gdbserver_version): Print PKGVERSION.
7604 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7605 (main): Adjust gdbserver_usage calls.
7606 * gdbreplay.c (version, host_name): Add declarations.
7607 (gdbreplay_version, gdbreplay_usage): New.
7608 (main): Accept --version and --help options.
7609
aeb75bf5
DJ
76102008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7611
7612 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7613 (arm_breakpoint_at): Handle Thumb.
7614 (the_low_target): Add comment.
7615
76b233dd
UW
76162008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7617
7618 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7619
08388c79
DE
76202008-05-09 Doug Evans <dje@google.com>
7621
a3c83fae
DE
7622 * server.h (decode_search_memory_packet): Declare.
7623 * remote-utils.c (decode_search_memory_packet): New fn.
7624 * server.c (handle_search_memory_1): New fn.
08388c79
DE
7625 (handle_search_memory): New fn.
7626 (handle_query): Process qSearch:memory packets.
7627
bb9c3d36
UW
76282008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7629
7630 * regcache.c (registers_length): Remove.
7631 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7632 full register packet.
7633 * regcache.h (registers_length): Remove prototype.
7634 * server.h (PBUFSIZ): Define to 16384.
7635
7284e1be
UW
76362008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7637
7638 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7639 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7640 powerpc-64l.o, and powerpc-altivec64l.o.
7641 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7642 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7643 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7644 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7645 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7646 to srv_xmlfiles.
7647
7648 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7649 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7650 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7651 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7652 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7653 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7654 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7655 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7656 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7657 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7658 (clean): Update.
7659
7660 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7661 (init_registers_powerpc_32l): ... this new prototype.
7662 (init_registers_powerpc_32): Remove, replace by ...
7663 (init_registers_powerpc_altivec32l): ... this new prototype.
7664 (init_registers_powerpc_e500): Remove, replace by ...
7665 (init_registers_powerpc_e500l): ... this new prototype.
7666 (init_registers_ppc64): Remove, replace by ...
7667 (init_registers_powerpc_64l): ... this new prototype.
7668 (init_registers_powerpc_64): Remove, replace by ...
7669 (init_registers_powerpc_altivec64l): ... this new prototype.
7670 (ppc_num_regs): Set to 73.
7671 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7672 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7673 (ppc_cannot_store_register): Handle orig_r3 and trap.
7674 (ppc_arch_setup): Update init_registers_... calls.
7675 (ppc_fill_gregset): Handle orig_r3 and trap.
7676
7677 * inferiors.c (clear_inferiors): Reset current_inferior.
7678
fdc59709
PB
76792008-04-23 Paolo Bonzini <bonzini@gnu.org>
7680
889bf7c5
PA
7681 * acinclude.m4: Add override.m4.
7682 * configure: Regenerate.
fdc59709 7683
c9b2f845
UW
76842008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7685
7686 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7687 initial call to init_register_ppc64.
7688
550512b8
UW
76892008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7690
43aaf8b6
PA
7691 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7692 single powerpc*-*-linux* case.
550512b8
UW
7693 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7694
b6430ec3
UW
76952008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7696
7697 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 7698 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
7699 from reg_xmlfiles.
7700 * linux-ppc-low.c: Include <elf.h>.
7701 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7702 (ppc_hwcap): New global variable.
7703 (ppc_regmap): Remove __SPE__ #ifdef sections.
7704 (ppc_regmap_e500): New global variable.
7705 (ppc_cannot_store_register): Update __SPE__ special case.
7706 (ppc_get_hwcap): New function.
7707 (ppc_arch_setup): Use it to determine whether inferior supports
7708 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7709 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7710 Do not access registers if target does not support AltiVec.
7711 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7712 Do not access registers if target does not support SPE.
7713 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7714
52fa2412
UW
77152008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7716
7717 * linux-low.c (disabled_regsets, num_regsets): New.
7718 (use_regsets_p): Delete.
7719 (linux_wait_for_process): Clear disabled_regsets.
7720 (regsets_fetch_inferior_registers): Check and set it.
7721 (regsets_store_inferior_registers): Likewise.
7722 (linux_fetch_registers, linux_store_registers): Do not use
7723 use_regsets_p.
7724 (initialize_low): Allocate disabled_regsets.
7725
e28b3332
DJ
77262008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7727
7728 * Makefile.in (LIBOBJS): New.
7729 (OBS): Use LIBOBJS.
7730 (memmem.o): New rule.
7731 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7732 * configure: Regenerated.
7733
4536995d
UW
77342008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7735
7736 * server.c (handle_query): Never return "unsupported" for
7737 qXfer:features:read queries.
7738
221c031f
UW
77392008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7740
7741 * server.c (get_features_xml): Fix inverted condition.
7742 (handle_query): Always support qXfer:feature:read.
7743
ccd213ac
DJ
77442008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7745
7746 * server.c (wrapper_argv): New.
7747 (start_inferior): Handle wrapper_argv. If set, expect an extra
7748 trap.
7749 (gdbserver_usage): Document --wrapper.
7750 (main): Parse --wrapper.
7751
6fe305f7
UW
77522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7753
7754 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7755 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7756 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7757 (ppc_set_pc): Likewise.
7758 (ppc_arch_setup): New function.
7759 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7760 of collect_register.
889bf7c5 7761 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 7762
5b0a002e
UW
77632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7764
7765 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7766 instead of linux-ppc64-low.o.
7767 * linux-ppc64-low.c: Remove file.
7768 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7769 (linux-ppc64-low.o): Remove rule.
7770
7771 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7772 (init_registers_powerpc_64): Likewise.
7773 (ppc_regmap): Conditionally define depending on __powerpc64__.
7774 (ppc_cannot_store_register): Do not special-case "fpscr" when
7775 compiled on __powerpc64__.
7776 (ppc_collect_ptrace_register): New function.
7777 (ppc_supply_ptrace_register): New function.
7778 (ppc_breakpoint): Change type to "unsigned int".
7779 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7780 (the_low_target): Conditionally provide initializers for the
889bf7c5 7781 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
7782 collect_ptrace_register and supply_ptrace_register members.
7783
9b4b61c8
UW
77842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7785
7786 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7787 * server.c (gdbserver_xmltarget): Define.
7788 (get_features_xml): Use it to replace "target.xml" and arch_string.
7789
7790 * configure.srv: Remove srv_xmltarget. Add XML files that were
7791 mentioned there to srv_xmlfiles instead. Remove conditional tests
7792 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7793 srv_xmlfiles and srv_regobj to include all possible choices.
7794 * configure.ac (srv_xmltarget): Remove.
7795 (srv_xmlfiles): Do not add "target.xml".
7796 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7797 checks for supplementary target information.
7798 * configure: Regenerate.
7799 * Makefile.in (XML_TARGET): Remove.
7800 (target.xml): Remove rule.
7801 (clean): Do not clean up target.xml.
7802 (.PRECIOUS): Do not mention target.xml.
7803
7804 * target.h (struct target_ops): Remove arch_string member.
7805 * linux-low.c (linux_arch_string): Remove.
7806 (linux_target_ops): Remove arch_string initializer.
7807 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7808 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7809 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7810 * spu-low.c (spu_arch_string): Remove.
7811 (spu_target_ops): Remove arch_string initializer.
7812 * win32-low.c (win32_arch_string): Remove.
7813 (win32_target_ops): Remove arch_string initializer.
7814 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7815 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7816 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7817
ee1a7ae4
UW
78182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7819
7820 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7821 by collect_ptrace_register and supply_ptrace_register hooks.
7822 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7823 instead of checking for the_low_target.left_pad_xfer.
7824 (usr_store_inferior_registers): Use collect_ptrace_register callback
7825 instead of checking for the_low_target.left_pad_xfer.
7826
7827 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7828 (s390_supply_ptrace_register): Likewise.
7829 (s390_fill_gregset): Call s390_collect_ptrace_register.
7830 (the_low_target): Update.
7831
7832 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7833 (ppc_supply_ptrace_register): Likewise.
7834 (the_low_target): Update.
7835
7836 * linux-i386-low.c (the_low_target): Update.
7837 * linux-x86-64-low.c (the_low_target): Update.
7838
d61ddec4
UW
78392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7840
7841 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7842 reg-s390.o and reg-s390x.o.
7843
7844 * linux-low.c (new_inferior): New global variable.
7845 (linux_create_inferior, linux_attach): Set it.
7846 (linux_wait_for_process): Call the_low_target.arch_setup after the
7847 target has stopped for the first time.
7848 (initialize_low): Do not call the_low_target.arch_setup.
7849
7850 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7851 (s390_set_pc): Likewise.
7852 (s390_arch_setup): New function.
7853 (the_low_target): Use s390_arch_setup as arch_setup routine.
7854
7855 * regcache.c (realloc_register_cache): New function.
7856 (set_register_cache): Call it for each existing regcache.
7857
d05b4ac3
UW
78582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7859
7860 * server.h (init_registers): Remove prototype.
7861
7862 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7863 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7864 instead of init_registers ().
7865 * linux-arm-low.c (init_registers_arm): Add prototype.
7866 (init_registers_arm_with_iwmmxt): Likewise.
7867 (the_low_target): Add initializer for arch_setup field.
7868 * linux-cris-low.c (init_registers_cris): Add prototype.
7869 (the_low_target): Add initializer for arch_setup field.
7870 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7871 (the_low_target): Add initializer for arch_setup field.
7872 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7873 (the_low_target): Add initializer for arch_setup field.
7874 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7875 (the_low_target): Add initializer for arch_setup field.
7876 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7877 (the_low_target): Add initializer for arch_setup field.
7878 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7879 (the_low_target): Add initializer for arch_setup field.
7880 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7881 (init_registers_mips64_linux): Likewise.
7882 (the_low_target): Add initializer for arch_setup field.
7883 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7884 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7885 (the_low_target): Add initializer for arch_setup field.
7886 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7887 (init_registers_powerpc_64): Likewise.
7888 (the_low_target): Add initializer for arch_setup field.
7889 * linux-s390-low.c (init_registers_s390): Add prototype.
7890 (init_registers_s390x): Likewise.
7891 (the_low_target): Add initializer for arch_setup field.
7892 * linux-sh-low.c (init_registers_sh): Add prototype.
7893 (the_low_target): Add initializer for arch_setup field.
7894 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7895 (the_low_target): Add initializer for arch_setup field.
7896 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7897 (the_low_target): Add initializer for arch_setup field.
7898
7899 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7900 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7901 instead of init_registers ().
7902 * win32-arm-low.c (init_registers_arm): Add prototype.
7903 (the_low_target): Add initializer for arch_setup field.
7904 * win32-i386-low.c (init_registers_i386): Add prototype.
7905 (the_low_target): Add initializer for arch_setup field.
7906
7907 * spu-low.c (init_registers_spu): Add prototype.
7908 (initialize_low): Call initialie_registers_spu () instead of
7909 initialize_registers ().
7910
fd96d250
PA
79112008-02-19 Pedro Alves <pedro@codesourcery.com>
7912
7913 * server.c (handle_v_requests): When handling the vRun and vAttach
7914 packets, if already debugging a process, don't kill it. Return an
7915 error instead.
7916
d41b6bb4
DJ
79172008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7918
7919 * server.c (handle_query): Correct length check.
7920
5ac588cf
PA
79212008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7922
7923 * win32-low.c (do_initial_child_stuff): Add process handle
7924 parameter. Set current_process_handle and current_process_id from the
7925 parameters. Clear globals.
7926 (win32_create_inferior): Don't set current_process_handle and
7927 current_process_id here. Instead pass them on the call to
7928 do_initial_child_stuff.
7929 (win32_attach): Likewise.
7930 (win32_clear_inferiors): New.
7931 (win32_kill): Don't close the current process handle or the
7932 current thread handle here. Instead call win32_clear_inferiors.
7933 (win32_detach): Don't open a new handle to the process. Call
7934 win32_clear_inferiors.
7935 (win32_join): Don't rely on current_process_handle; open a new
7936 handle using the process id.
7937 (win32_wait): Call win32_clear_inferiors when the inferior process
7938 has exited.
7939
ecd7ecbc
DJ
79402008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7941
7942 * server.c (monitor_show_help): Add "exit".
7943
1525d545
MG
79442008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7945
ecd7ecbc 7946 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
7947 (clean): Add reg-xtensa.c.
7948 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
7949 * configure.srv (xtensa*-*-linux*) New target.
7950 * linux-xtensa-low.c: New.
7951 * xtensa-xtregs.c: New.
1525d545 7952
59a016f0
PA
79532008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7954
7955 * hostio.c: Don't include errno.h.
7956 (errno_to_fileio_errno): Move to hostio-errno.
7957 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7958 error number outputting to the target->hostio_last_error callback.
7959 (hostio_packet_error): Use FILEIO_EINVAL directly.
7960 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7961 calls to hostio_error.
7962 * hostio-errno.c: New.
7963 * server.h (hostio_last_error_from_errno): Declare.
7964 * target.h (target_ops): Add hostio_last_error member.
7965 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7966 as hostio_last_error handler.
889bf7c5 7967 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
7968 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7969 (wince_hostio_last_error): New functions.
7970 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7971 as hostio_last_error handler.
7972 (win32_target_ops) [!_WIN32_WCE]: Register
7973 hostio_last_error_from_errno as hostio_last_error handler.
7974 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7975 (hostio-errno.o): New rule.
7976 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7977 * configure.srv (srv_hostio_err_objs): New variable. Default to
7978 hostio-errno.o.
7979 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7980 * configure: Regenerate.
7981
2d717e4f
DJ
79822008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7983
7984 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7985 (linux_kill, linux_detach): Clean up the process list.
7986 * remote-utils.c (remote_open): Improve port number parsing.
7987 (putpkt_binary, input_interrupt): Only send interrupts if the target
7988 is running.
7989 * server.c (extended_protocol): Make static.
7990 (attached): Define earlier.
7991 (exit_requested, response_needed, program_argv): New variables.
7992 (target_running): New.
7993 (start_inferior): Clear attached here.
7994 (attach_inferior): Set attached here.
7995 (require_running): Define.
7996 (handle_query): Use require_running and target_running. Implement
7997 "monitor exit".
7998 (handle_v_attach, handle_v_run): New.
7999 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8000 (gdbserver_usage): Update.
8001 (main): Redo argument parsing. Handle --debug and --multi. Handle
8002 --attach along with other options or after the port. Save
8003 program_argv. Support no initial program. Resynchronize
8004 communication with GDB after an error. Handle "monitor exit".
8005 Use require_running and target_running. Always allow the extended
8006 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8007 restart in extended mode.
8008 * README: Refer to the GDB manual. Update --attach usage.
8009
7407e2de
AS
80102007-12-20 Andreas Schwab <schwab@suse.de>
8011
8012 * linux-low.c (STACK_SIZE): Define.
8013 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8014 (linux_test_for_tracefork): Likewise.
8015
b65d95c5
DJ
80162007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8017
8018 * linux-low.c (linux_wait_for_event): Update messages. Do not
8019 reinsert auto-delete breakpoints.
8020 * mem-break.c (struct breakpoint): Change return type of handler to
8021 int.
8022 (set_breakpoint_at): Update handler type.
8023 (reinsert_breakpoint_handler): Return 1 instead of calling
8024 delete_breakpoint.
8025 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8026 setting a new one.
8027 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8028 * mem-break.h (set_breakpoint_at): Update handler type.
8029 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8030 * win32-low.c (auto_delete_breakpoint): New.
8031 (get_child_debug_event): Use it.
8032
4e799345
DJ
80332007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8034
8035 * configure.ac: Check for pread and pwrite.
8036 * hostio.c (handle_pread): Fall back to lseek and read.
8037 (handle_pwrite): Fall back to lseek and write.
8038 * config.in, configure: Regenerated.
8039
27524b67
DJ
80402007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8041
8042 * server.c (myresume): Add own_buf argument.
8043 (main): Update calls.
8044
a20d5e98
DJ
80452007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8046
8047 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8048 * remote-utils.c (remote_open): Do not call disable_async_io.
8049 (block_async_io): Delete.
8050 (unblock_async_io): Make static.
8051 (initialize_async_io): New.
8052 * server.c (handle_v_cont): Handle async I/O here.
8053 (myresume): Likewise. Move other common resume tasks here...
8054 (main): ... from here. Call initialize_async_io. Disable async
8055 I/O before the main loop.
8056 * server.h (initialize_async_io): Declare.
8057 (block_async_io, unblock_async_io): Delete prototypes.
8058 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8059
b79d787e
DJ
80602007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8061
8062 * remote-utils.c (readchar): Allow binary data in received messages.
8063
d97903b2
PA
80642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8065
8066 * win32-low.c (attaching): New global.
8067 (win32_create_inferior): Clear the `attaching' global.
8068 (win32_attach): Set the `attaching' global.
8069 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8070 attaching. Only set a breakpoint at the entry point if not
8071 attaching.
8072
311de423
PA
80732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8074
8075 * server.c (main): Don't report dll events on the initial
8076 connection on attaches.
8077
6c2d16d2
PA
80782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8079
8080 * server.c (main): Relax numerical bases supported for the pid of
8081 the --attach command line argument.
8082
5ca906e6
PA
80832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8084
8085 * win32-low.c (win32_attach): Call OpenProcess before
8086 DebugActiveProcess, not after. Add last error output to error
8087 call.
8088
9c6c8194
PA
80892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8090
8091 * win32-low.c (win32_get_thread_context)
8092 (win32_set_thread_context): New functions.
8093 (thread_rec): Use win32_get_thread_context.
8094 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8095 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8096 field.
8097
4d5d1aaa
PA
80982007-12-03 Leo Zayas
8099 Pedro Alves <pedro_alves@portugalmail.pt>
8100
8101 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8102 global variables.
8103 (child_add_thread): Minor cleanup.
8104 (child_continue): Resume artificially suspended threads before
8105 calling ContinueDebugEvent.
8106 (suspend_one_thread): New.
8107 (fake_breakpoint_event): New.
8108 (get_child_debug_event): Change return type to int. Check here if
8109 gdb sent an interrupt request. If a soft interrupt was requested,
8110 fake a breakpoint event. Return 0 if there is no event to handle,
8111 and 1 otherwise.
8112 (win32_wait): Don't check here if gdb sent an interrupt request.
8113 Ensure there is a valid event to handle.
8114 (win32_request_interrupt): Add soft interruption method as last
8115 resort.
8116
c436e841
PA
81172007-12-03 Leo Zayas
8118 Pedro Alves <pedro_alves@portugalmail.pt>
8119
8120 * win32-low.h (win32_thread_info): Add descriptions to the
8121 structure members. Replace `suspend_count' counter by a
8122 `suspended' flag.
8123 * win32-low.c (thread_rec): Update condition of when to get the
8124 context from the inferior. Rely on ContextFlags being set if it
8125 has already been retrieved. Only suspend the inferior thread if
8126 we haven't already. Warn if that fails.
8127 (continue_one_thread): s/suspend_count/suspended/. Only call
8128 ResumeThread once. Warn if that fails.
8129
e7b5fa67
PA
81302007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8131
8132 * win32-low.c (win32_wait): Don't read from the inferior when it
8133 has already exited.
8134
a385171d
PA
81352007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8136
8137 * Makefile.in (win32_low_h): New variable.
8138 (win32-low.o): Add dependency on $(win32_low_h).
8139 (win32-arm-low.o, win32-i386-low.o): New rules.
8140
f80c84b3
DJ
81412007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8142
8143 * hostio.c: Correct copyright year.
8144
a6b151f1
DJ
81452007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8146
8147 * Makefile.in (OBS): Add hostio.o.
8148 (hostio.o): New rule.
8149 * server.h (handle_vFile): Declare.
8150 * hostio.c: New file.
8151 * server.c (handle_v_requests): Take packet_len and new_packet_len
8152 for binary packets. Call handle_vFile.
8153 (main): Update call to handle_v_requests.
8154
f9387fc3
DJ
81552007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8156
8157 * linux-low.c: Include <sched.h>.
8158
51c2684e
DJ
81592007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8160
8161 * linux-low.c (linux_tracefork_grandchild): New.
8162 (linux_tracefork_child): Use clone.
8163 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8164
75f83163
JB
81652007-10-31 Joel Brobecker <brobecker@adacore.com>
8166
8167 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8168
da5898ce
DJ
81692007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8170
8171 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8172
24a09b5f
DJ
81732007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8174
8175 * inferiors.c (change_inferior_id): Delete.
8176 (add_pid_to_list, pull_pid_from_list): New.
8177 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8178 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8179 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8180 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8181 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8182 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8183 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8184 (using_threads): Always set to 1.
8185 (handle_extended_wait): New.
8186 (add_process): Do not set TID.
8187 (linux_create_inferior): Set must_set_ptrace_flags.
8188 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8189 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8190 (linux_thread_alive): Rename TID argument to LWPID.
8191 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8192 (linux_wait_for_event): Do not use TID or check using_threads. Update
8193 call to dead_thread_notify. Call handle_extended_wait.
8194 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8195 (send_sigstop): Delete sigstop_sent.
8196 (wait_for_sigstop): Avoid TID.
8197 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8198 (linux_test_for_tracefork): New.
8199 (linux_lookup_signals): Use thread_db_active and
8200 linux_supports_tracefork_flag.
8201 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8202 * linux-low.h (get_process_thread): Avoid TID.
8203 (struct process_ifo): Move thread_known and tid to the end. Remove
8204 sigstop_sent.
8205 (linux_attach_lwp, thread_db_init): Update prototypes.
8206 * server.h (change_inferior_id): Delete prototype.
8207 (add_pid_to_list, pull_pid_from_list): New prototypes.
8208 * thread-db.c (thread_db_use_events): New.
8209 (find_first_thread): Rename to...
8210 (find_one_thread): ...this. Update callers and messages. Do not
8211 call fatal. Check thread_db_use_events. Do not call
8212 change_inferior_id or new_thread_notify.
8213 (maybe_attach_thread): Update. Do not call new_thread_notify.
8214 (thread_db_init): Set thread_db_use_events. Check use_events.
8215 * utils.c (fatal, warning): Correct message prefix.
8216
30ed0a8f
DJ
82172007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8218
8219 * Makefile.in (clean): Remove new files.
8220 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8221 (powerpc-64.o, powerpc-64.c): New rules.
8222 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8223 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8224 with SPE.
8225 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8226 SPE targets.
8227 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8228 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8229 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8230 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8231 (target_regsets): Add AltiVec and SPE register sets.
8232 * configure.ac: Check for AltiVec and SPE.
8233 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8234 (ppc_fill_vrregset, ppc_store_vrregset): New.
8235 (target_regsets): Add AltiVec register set.
8236 * configure: Regenerated.
8237
fd462a61
DJ
82382007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8239
8240 * linux-low.c (O_LARGEFILE): Define.
8241 (linux_read_memory): Use /proc/PID/mem.
8242 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8243 * configure, config.in: Regenerated.
8244
69f223ed
DJ
82452007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8246
8247 * linux-low.c (linux_wait_for_event): Do not pass signals while
8248 single-stepping.
8249
aec18585
PA
82502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8251
8252 * win32-low.c (create_process): New.
8253 (win32_create_inferior): Use create_process instead of
8254 CreateProcess. If create_process failed retry appending an ".exe"
8255 suffix. Store the GetLastError result immediatelly after
8256 create_process calls and use it on the call to error.
8257
34d86ddd
PA
82582007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8259
8260 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8261
5a0e3bd0
JB
82622007-08-23 Joel Brobecker <brobecker@adacore.com>
8263
8264 * configure.ac: Switch license to GPLv3.
8265
f88c79e6
MS
82662007-08-01 Michael Snyder <msnyder@access-company.com>
8267
8268 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8269
6b3d9b83
PA
82702007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8271
8272 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8273 typedef.
8274 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8275 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8276 CloseToolhelp32Snapshot.
8277 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8278 CloseToolhelp32Snapshot.
8279
c588c53c
MS
82802007-07-27 Michael Snyder <michael.snyder@access-company.com>
8281
8282 * server.c (main): Check for inferior exit before main loop.
8283
aa0403d9
PA
82842007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8285
8286 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8287 instead of on tmp_desc.
8288
255e7678
DJ
82892007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8290 Daniel Jacobowitz <dan@codesourcery.com>
8291
8292 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8293 (add_thread): Minor cleanups.
8294 (clear_inferiors): Move lower in the file. Clear the DLL
8295 list.
8296 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8297 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8298 (xml_escape_text): New.
8299 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8300 for qSupported.
8301 (handle_v_cont): Report errors.
8302 (gdbserver_version): Update.
8303 (main): Correct size of own_buf. Do not report initial DLL events.
8304 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8305 (unloaded_dll, xml_escape_text): New.
8306 * win32-low.c (enum target_waitkind): Update comments.
8307 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8308 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8309 (win32_EnumProcessModules, win32_GetModuleInformation)
8310 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8311 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8312 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8313 (win32_Module32First, win32_Module32Next, load_toolhelp)
8314 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8315 (get_child_debug_event): Handle DLL events.
8316 (win32_wait): Likewise.
8317
0d37add9
DJ
83182007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8319
8320 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8321 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8322
45e2715e
PA
83232007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8324
8325 * win32-low.c (handle_output_debug_string): Ignore event if not
8326 waiting.
8327
c5674cf1
PA
83282007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8329
8330 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8331
2bbe3cc1
DJ
83322007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8333
8334 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8335
ae13219e
DJ
83362007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8337
8338 * inferiors.c (change_inferior_id): Add comment.
8339 * linux-low.c (check_removed_breakpoint): Add an early
8340 prototype. Improve debug output.
8341 (linux_attach): Doc update.
8342 (linux_detach_one_process, linux_detach): Clean up before releasing
8343 each process.
8344 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8345 * linux-low.h (struct process_info): Doc improvement.
8346 * mem-break.c (delete_all_breakpoints): New.
8347 * mem-break.h (delete_all_breakpoints): New prototype.
8348 * thread-db.c (find_first_thread): New.
8349 (thread_db_create_event): Call it instead of
8350 thread_db_find_new_threads. Clean up unused variables.
8351 (maybe_attach_thread): Remove first thread handling.
8352 (thread_db_find_new_threads): Use find_first_thread.
8353 (thread_db_get_tls_address): Likewise.
8354
4105de34
DJ
83552007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8356
8357 * thread-db.c (thread_db_find_new_threads): Add prototype.
8358 (thread_db_create_event): Check for the main thread before adding
8359 a new thread.
8360 (maybe_attach_thread): Only enable event reporting if TID == 0.
8361 (thread_db_get_tls_address): Check for new threads.
8362
2b876972
DJ
83632007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8364
8365 * linux-low.c (linux_create_inferior): Try execv before execvp.
8366 * spu-low.c (spu_create_inferior): Likewise.
8367
7a245884
DJ
83682007-06-13 Mike Frysinger <vapier@gentoo.org>
8369
8370 * linux-low.c (linux_create_inferior): Change execv to execvp.
8371 * spu-low.c (spu_create_inferior): Likewies.
8372
117ce543
DJ
83732007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8374
8375 * Makefile.in (clean): Clean new files instead of deleted ones.
8376 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8377 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8378 rules.
8379 * configure.srv: Specify XML files and new regformats for MIPS and
8380 MIPS64 GNU/Linux.
8381 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8382 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8383 an entry for the restart register.
8384 (mips_cannot_fetch_register, mips_cannot_store_register)
8385 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8386 register names to match the XML descriptions.
8387 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8388 restart register instead of $0.
8389
0e7f50da
UW
83902007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8391 Markus Deuling <deuling@de.ibm.com>
8392
8393 * remote-utils.c (decode_xfer_write): New function.
8394 * server.h (decode_xfer_write): Add prototype.
8395 * server.c (handle_query): Add PACKET_LEN argument. Support
8396 qXfer:spu:read and qXfer:spu:write packets.
8397 (main): Pass packet_len to handle_query.
8398 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8399 * target.h (target_ops): Add qxfer_spu.
8400
374c1d38
UW
84012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8402
8403 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8404 accessing non-seekable spufs files.
8405
bb63802a
UW
84062007-05-16 Markus Deuling <deuling@de.ibm.com>
8407
889bf7c5 8408 * server.c (handle_query): Add reply for qC packet.
bb63802a 8409
7390519e
PA
84102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8411 Leo Zayas <lerele@champenstudios@com>
8412
8413 * server.h (check_remote_input_interrupt_request): New function.
8414 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8415 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8416 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8417 (check_remote_input_interrupt_request): New function.
8418 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 8419 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
8420 winapi_GenerateConsoleCtrlEvent): New typedefs.
8421 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8422 to 250 ms.
8423 (win32_wait): Check for remote interrupt request
8424 with check_remote_input_interrupt_request.
8425 (win32_request_interrupt): New function.
8426 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8427
34b34921
PA
84282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8429
8430 * win32-low.c (debug_registers_changed,
8431 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8432 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8433 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8434 (thread_rec): Get context using the low target.
8435 (child_add_thread): Call thread_added on the low target,
8436 which does the same thing.
8437 (regptr): Delete.
8438 (do_initial_child_stuff): Remove debug registers references.
8439 Set context using the low target. Resume threads after
8440 setting the contexts.
8441 (child_continue): Remove dead variable. Remove debug
8442 registers references.
8443 (child_fetch_inferior_registers): Go through the low target.
8444 (do_child_store_inferior_registers): Remove.
8445 (child_store_inferior_registers): Go through the low target.
8446 (win32_resume): Remove debug registers references.
8447 Set context using the low target.
8448 (handle_exception): Change return type to void. Don't record
8449 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8450 first chance exception.
889bf7c5 8451 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
8452 goto loop. Always return after waiting for debug event.
8453 (win32_wait): Convert to switch statement. Handle spurious
8454 events.
8455
8456 * win32-i386-low.c (debug_registers_changed,
8457 debug_registers_used): New.
8458 (initial_stuff): Rename to ...
8459 (i386_initial_stuff): ... this. Clear debug registers
8460 state variables.
8461 (store_debug_registers): Delete.
8462 (i386_get_thread_context): New.
8463 (load_debug_registers): Delete.
8464 (i386_set_thread_context): New.
8465 (i386_thread_added): New.
8466 (single_step): Rename to ...
8467 (i386_single_step): ... this.
8468 (do_fetch_inferior_registers): Rename to ...
8469 (i386_fetch_inferior_register): ... this.
8470 (i386_store_inferior_register): New.
8471 (the_low_target): Adapt to new interface.
8472
8473 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8474 (arm_get_thread_context): New.
8475 (arm_set_thread_context): New.
8476 (regptr): New.
8477 (do_fetch_inferior_registers): Rename to ...
8478 (arm_fetch_inferior_register): ... this.
8479 (arm_store_inferior_register): New.
8480 (arm_wince_breakpoint): Reimplement as unsigned long.
8481 (arm_wince_breakpoint_len): Define.
8482 (the_low_target): Adapt to new interface.
8483
8484 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8485 load_debug_registers. Add get_thread_context, set_thread_context,
8486 thread_added and store_inferior_register. Rename
8487 fetch_inferior_registers to fetch_inferior_register.
8488 (regptr): Remove declaration.
8489
dd6953e1
PA
84902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8491
8492 * linux-low.c (linux_detach): Change return type to int. Return 0.
8493 * spu-low.c (spu_detach): Likewise.
8494
444d6139
PA
84952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8496
8497 * target.h (target_ops): Change return type of detach to int.
8498 Add join.
8499 (join_inferior): New.
8500 * server.c (main): Don't skip detach support on mingw32.
8501 If the inferior doesn't support detaching return error.
8502 Call join_inferior instead of using waitpid.
8503 * linux-low.c (linux_join): New.
8504 (linux_target_op): Add linux_join.
8505 * spu-low.c (spu_join): New.
8506 (spu_target_ops): Add spu_join.
8507 * win32-low.c (win32_detach): Adapt to new interface.
8508 Reopen current_process_handle before detaching. Issue a child
8509 resume before detaching.
8510 (win32_join): New.
8511 (win32_target_op): Add win32_join.
8512
1d5315fe
PA
85132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8514
8515 * win32-low.c (win32-attach): Fix return value.
8516 * target.h (target_ops): Describe ATTACH return values.
8517
bf914831
PA
85182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8519
8520 * win32-low.c (GETPROCADDRESS): Define.
8521 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8522 (winapi_DebugSetProcessKillOnExit): Likewise.
8523 (win32_create_inferior): Force usage of ansi CreateProcessA.
8524 (win32_attach): Use GETPROCADDRESS.
8525 (win32_detach): Likewise.
8526
f72f3e60
PA
85272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8528
8529 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8530
ed50f18f
PA
85312007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8532
8533 * win32-low.c: Commit leftover changes from 2007-03-29.
8534
0c2ead7e
DJ
85352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8536
8537 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8538 fields short instead of int. Add explicit padding.
8539 (i387_cache_to_fsave): Remove unnecessary casts.
8540 (i387_fsave_to_cache): Doc fix.
8541 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8542
73725ff3
DJ
85432007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8544
8545 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8546 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8547
d99f33d8
PA
85482007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8549
8550 * configure.srv (arm*-*-mingw32ce*): Move near the other
8551 arm targets.
8552
68070c10
PA
85532007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8554
2482afc6 8555 * configure.ac: Add errno checking.
68070c10
PA
8556 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8557 sys/file.h and malloc.h.
8558 (AC_CHECK_DECLS): Add perror.
8559 (srv_mingwce): Handle.
2482afc6 8560 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
8561 win32-i386-low.o to srv_tgtobj.
8562 (i[34567]86-*-mingw*): Likewise.
8563 (arm*-*-mingw32ce*): Add case.
8564 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8565 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8566 [__MINGW32CE__] (strerror): New function.
8567 [__MINGW32CE__] (errno): Define to GetLastError.
8568 [__MINGW32CE__] (COUNTOF): New macro.
8569 (remote_open): Remove extra close call.
8570 * mem-break.c (delete_breakpoint_at): New function.
8571 * mem-break.h (delete_breakpoint_at): Declare.
8572 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8573 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8574 [USE_WIN32API] (read, write): Add char* casts.
8575 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8576 * server.h: Include wincecompat.h on Windows CE.
8577 [HAVE_ERRNO_H]: Check.
8578 (perror): Declare if not declared.
8579 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8580 (perror_with_name): Remove errno declaration.
8581 * wincecompat.h: New.
8582 * wincecompat.c: New.
8583 * win32-low.h: New.
8584 * win32-arm-low.c: New.
8585 * win32-i386-low.c: New.
8586 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8587 (OUTMSG2): Make it safe.
8588 (_T): New macro.
8589 (COUNTOF): New macro.
8590 (NUM_REGS): Get it from the low target.
8591 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8592 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8593 (thread_rec): Let low target handle debug registers.
8594 (child_add_thread): Likewise.
8595 (child_init_thread_list): Likewise.
8596 (continue_one_thread): Likewise.
8597 (regptr): New.
8598 (do_child_fetch_inferior_registers): Move to ...
8599 * win32-i386-low.c: ... here, and rename to ...
8600 (do_fetch_inferior_registers): ... this.
889bf7c5 8601 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
8602 Go through the low target.
8603 (do_child_store_inferior_registers): Use regptr.
8604 (strwinerror): New function.
8605 (win32_create_inferior): Handle Windows CE.
8606 Use strwinerror instead of strerror on Windows error
8607 codes. Add program to the error output.
8608 Don't close the main thread handle on Windows CE.
8609 (win32_attach): Use coredll.dll on Windows CE.
8610 (win32_kill): Close current process and current
8611 thread handles.
8612 (win32_detach): Use coredll.dll on Windows CE.
8613 (win32_resume): Let low target handle debug registers, and
8614 step request.
8615 (handle_exception): Add/Remove initial breakpoint. Avoid
8616 non-existant WSTOPSIG on Windows CE.
8617 (win32_read_inferior_memory): Cast to remove warning.
8618 (win32_arch_string): Go through the low target.
8619 (initialize_low): Call set_breakpoint_data with the low
8620 target's breakpoint.
8621 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8622 FOP_REGNUM, mappings): Move to ...
8623 * win32-i386-low.c: ... here.
8624 * win32-low.c (win32_thread_info): Move to ...
8625 * win32-low.h: ... here.
8626 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8627 win32-arm-low.c and wincecompat.c.
8628 (all:): Add $EXEEXT.
8629 (install-only:): Likewise.
8630 (gdbserver:): Likewise.
8631 (gdbreplay:): Likewise.
8632 * config.in: Regenerate.
8633 * configure: Regenerate.
8634
41093d81
PA
86352007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8636
8637 * win32-low.c: Rename typedef thread_info to
8638 win32_thread_info throughout.
8639
544afa54
PA
86402007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8641
8642 * win32-i386-low.c: Rename to ...
8643 * win32-low.c: ... this.
8644 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8645 * Makefile.in: Likewise.
8646
bce7165d
PA
86472007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8648
8649 * remote-utils.c (monitor_output): Constify msg parameter.
8650 * server.h (monitor_output): Likewise.
8651 * win32-i386-low.c (handle_output_debug_string): New.
8652 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8653 handle_output_debug_string.
8654 (get_child_debug_event): Likewise.
8655
506c7aa0
DJ
86562007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8657
8658 * server.c (main): Correct strtoul check.
8659
42c81e2a
DJ
86602007-03-27 Jon Ringle <jon@ringle.org>
8661
8662 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8663
9453113a
DJ
86642007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8665
8666 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8667
64a69107
DJ
86682007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8669
8670 * terminal.h: Check HAVE_SGTTY_H.
8671
86722007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
8673
8674 * remote-utils.c (remote_open): Print out the assigned port number.
8675
c74d0ad8
DJ
86762007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8677
8678 * remote-utils.c (monitor_output): New function.
8679 * server.c (debug_threads): Define here.
8680 (monitor_show_help): New function.
8681 (handle_query): Handle qRcmd.
8682 (main): Do not handle 'd' packet.
8683 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8684 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8685 of debug_threads.
8686
de7c3b4a
PA
86872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8688
8689 * Makefile.in (EXEEXT): New.
8690 (clean): Use $(EXEEXT).
8691
ef57601b
PA
86922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8693
8694 * target.h (target_ops): Rename send_signal to request_interrupt,
8695 and remove enum target_signal parameter.
8696 * linux-low.c (linux_request_interrupt): Rename from
8697 linux_send_signal, and always send SIGINT.
8698 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8699 and always send SIGINT.
8700 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8701 of send_signal.
8702 (input_interrupt): Likewise.
8703
820f2bda
PA
87042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8705
8706 * server.c (get_features_xml): Check if target implemented
8707 arch_string.
8708 * win32-i386-low.c (win32_arch_string): New.
8709 (win32_target_ops): Add win32_arch_string as arch_string member.
8710
ab39bf24
UW
87112007-02-22 Markus Deuling <deuling@de.ibm.com>
8712
8713 * spu-low.c (spu_arch_string): New.
8714 (spu_target_ops): Add spu_arch_string.
8715
61ff6e04
DJ
87162007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8717
8718 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8719 * configure.ac: Do not check for terminal.h.
8720 * configure, config.in: Regenerated.
8721
fb1e4ffc
DJ
87222007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8723
8724 * Makefile.in (OBS): Add $(XML_BUILTIN).
8725 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8726 (clean): Update.
8727 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8728 (arm-with-iwmmxt.c): New.
8729 * config.in, configure: Regenerate.
8730 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8731 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8732 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8733 (arm*-*-linux*): Add iWMMXt and regset support.
8734 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8735 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8736 (arm_store_wmmxregset, target_regsets): New.
8737 * server.c (get_features_xml): Take annex argument. Check builtin
8738 XML documents.
8739 (handle_query): Handle multiple annexes.
8740
0f48aa01
DJ
87412007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8742
8743 * remote-utils.c [USE_WIN32API] (read, write): Define.
8744 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8745 write.
8746
23181151
DJ
87472007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8748
8749 * linux-i386-low.c (the_low_target): Set arch_string.
8750 * linux-x86-64-low.c (the_low_target): Likewise.
8751 * linux-low.c (linux_arch_string): New.
8752 (linux_target_ops): Add it.
8753 * linux-low.h (struct linux_target_ops): Add arch_string.
8754 * server.c (write_qxfer_response): Use const void * for DATA.
8755 (get_features_xml): New.
8756 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8757 * target.h (struct target_ops): Add arch_string method.
8758
9d606399
DJ
87592007-01-03 Denis Pilat <denis.pilat@st.com>
8760 Daniel Jacobowitz <dan@codesourcery.com>
8761
8762 * linux-low.c (linux_kill): Handle being called with no threads.
8763 * win32-i386-low.c (win32_kill): Likewise.
8764 (get_child_debug_event): Clear current_process_handle.
8765
87662006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
8767 Daniel Jacobowitz <dan@codesourcery.com>
8768
8769 * remote-utils.c (remote_open): Check the type of specified
8770 serial port devices before opening them.
8771 * server.c (main): Kill the inferior if an error occurs during
8772 the first remote_open.
8773
a5e13d24
DJ
87742006-12-05 Markus Deuling <deuling@de.ibm.com>
8775
8776 * README: Update supported targets.
8777
186947f7
DJ
87782006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8779
8780 * Makefile.in (clean): Remove reg-mips64.c.
8781 (reg-mips64.c, reg-mips64.o): New rules.
8782 * configure.srv: Handle mips64. Include regset support for mips.
8783 * linux-mips-low.c (union mips_register): New.
8784 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8785 (mips_breakpoint, mips_breakpoint_at): Use int.
8786 (mips_collect_register, mips_supply_register)
8787 (mips_collect_register_32bit, mips_supply_register_32bit)
8788 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8789 (mips_store_fpregset, target_regsets): New.
8790 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8791
a13e2c95
UW
87922006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8793
8794 * configure.srv: Add target "spu*-*-*".
8795 * Makefile.in (clean): Remove reg-spu.c.
8796 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8797 * spu-low.c: New file.
8798
cb7283db
DJ
87992006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8800
8801 * configure.ac: Correct td_thr_tls_get_addr test.
8802 * configure: Regenerated.
8803
89be2091
DJ
88042006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8805
8806 * linux-low.c (linux_wait_for_event): Reformat. Use the
8807 pass_signals array.
8808 * remote-utils.c (decode_address_to_semicolon): New.
8809 * server.c (pass_signals, handle_general_set): New.
8810 (handle_query): Mention QPassSignals for qSupported.
8811 (main): Call handle_general_set.
8812 * server.h (pass_signals, decode_address_to_semicolon): New.
8813
000ef4f0
DJ
88142006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8815
8816 * server.c (handle_query): Correct error handling for read_auxv.
8817
b7149293
UW
88182005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8819
8820 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8821 and srv_linux_thread_db to yes.
8822 * linux-s390-low.c (s390_fill_gregset): New function.
8823 (target_regsets): Define data structure.
8824
dae5f5cf
DJ
88252006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8826
8827 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8828 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8829 * config.in, configure: Regenerated.
8830 * inferiors.c (gdb_id_to_thread): New function.
8831 (gdb_id_to_thread_id): Use it.
8832 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8833 * linux-low.h (struct process_info): Add th member.
8834 (thread_db_get_tls_address): New prototype.
8835 * remote-utils.c (decode_address): Make non-static.
8836 * server.c (handle_query): Handle qGetTLSAddr.
8837 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8838 * target.h (struct target_ops): Add get_tls_address.
8839 * thread-db.c (maybe_attach_thread): Save the thread handle.
8840 (thread_db_get_tls_address): New.
8841
32ca6d61
DJ
88422006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8843
8844 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8845 (linux_resume_one_process): Take a siginfo_t *. Update all
8846 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8847 (struct pending_signals): Add a siginfo_t.
8848 (linux_wait_for_process): Always set last_status.
8849 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8850 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8851 * linux-low.h (struct process_info): Add last_status.
8852
5ffff7c1
DJ
88532006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8854
8855 * remote-utils.c (try_rle): New function.
8856 (putpkt_binary): Use it.
8857
8695c747
DJ
88582006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8859
8860 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8861 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8862 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8863 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8864 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8865 point registers.
8866
290fadea
RS
88672006-08-08 Richard Sandiford <richard@codesourcery.com>
8868
8869 * server.c (terminal_fd): New variable.
8870 (old_foreground_pgrp): Likewise.
8871 (restore_old_foreground_pgrp): New function.
8872 (start_inferior): Record the terminal file descriptor in terminal_fd
8873 and its original foreground group in old_foreground_pgrp. Register
8874 restore_old_foreground_pgrp with atexit().
8875
9f2e1e63
DJ
88762006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8877
8878 * server.c (handle_query): Correct qPart to qXfer.
8879
b80864fb
DJ
88802006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8881
8882 * configure.ac: Check for more headers which are missing on
8883 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8884 * configure.srv: Add Cygwin and mingw32.
8885 * remote-utils.c: Don't include headers unconditionally which
8886 are missing on mingw32. Include <winsock.h> for mingw32.
8887 (remote_open): Adjust for mingw32 support. Flush
8888 standard error after writing to it.
8889 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8890 (unblock_async_io, enable_async_io, disable_async_io)
8891 (readchar, getpkt): Update for Winsock support.
8892 (prepare_resume_reply): Expect a protocol signal number.
8893 * server.c: Disable <sys/wait.h> on mingw32.
8894 (start_inferior): Adjust for mingw32 support. Flush
8895 standard error after writing to it.
8896 (attach_inferior): Likewise. Use protocol signal
8897 numbers.
8898 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8899 and names.
8900 * win32-i386-low.c: New file.
8901 * Makefile.in (XM_CLIBS): Set.
8902 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8903 (win32-i386-low.o): New dependency rule.
8904 * linux-low.c (linux_wait): Use target signal numbers.
8905 * target.h (struct target_ops): Doc fix.
8906 * server.h (target_signal_to_name): New prototype.
8907 * gdbreplay.c: Don't include headers unconditionally which
8908 are missing on mingw32. Include <winsock.h> for mingw32.
8909 (remote_close, remote_open): Adjust for Winsock support.
8910 * configure, config.in: Regenerated.
8911
0876f84a
DJ
89122006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8913
8914 * server.c (decode_xfer_read, write_qxfer_response): New.
8915 (handle_query): Take a packet length argument. Handle
8916 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8917 the qSupported response.
8918 (main): Update call to handle_query.
8919
01f9e8fa
DJ
89202006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8921
8922 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8923 (putpkt_binary): Renamed from putpkt and adjusted for binary
8924 data.
8925 (putpkt): New wrapper for putpkt_binary.
8926 (readchar): Don't mask off the high bit.
8927 (decode_X_packet): New function.
8928 * server.c (main): Call putpkt_binary if a handler sets the packet
8929 length. Save the length of the incoming packet. Handle 'X'.
8930 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8931
be2a5f71
DJ
89322006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8933
8934 * server.c (handle_query): Handle qSupported.
8935
ea025f5f
DJ
89362006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8937
8938 * remote-utils.c (all_symbols_looked_up): New variable.
8939 (look_up_one_symbol): Check it.
8940 * server.h (look_up_one_symbol): New declaration.
8941 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8942
9308fc88
DJ
89432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8944
8945 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 8946 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
8947 (PTRACE_GET_THREAD_AREA): Define.
8948 (ps_get_thread_area): New function.
8949
52fb6437
NS
89502006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8951
8952 * configure.srv (m68k*-*-uclinux*): New target.
8953 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8954 (linux_resume_one_process): Remove extraneous cast.
8955 (linux_read_offsets): New.
8956 (linux_target_op): Add linux_read_offsets on mmuless systems.
8957 * server.c (handle_query): Add qOffsets logic.
8958 * target.h (struct target_ops): Add read_offsets.
8959
21b0f40c
DJ
89602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8961
8962 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8963 (PTRACE_GET_THREAD_AREA): Define.
8964 (ps_get_thread_area): New function.
8965 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8966 (linux-x86-64-low.o): Update.
8967
0050a760
DJ
89682006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8969
8970 * configure.ac: Remove checks for prfpregset_t.
8971 * gdb_proc_service.h: New file.
8972 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8973 new "gdb_proc_service.h".
8974 * proc-service.c: Likewise.
8975 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8976 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8977 * Makefile.in (gdb_proc_service_h): Updated.
8978 * configure, config.in: Regenerated.
8979
b92a518e
DJ
89802006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8981
8982 * remote-utils.c (prepare_resume_reply): Move declaration
8983 of gdb_id_from_wait to the top of the block.
8984
545587ee
DJ
89852006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8986
8987 * linux-low.c (regsets_store_inferior_registers): Read the regset
8988 from the target before filling it.
8989
9db87ebd
DJ
89902006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8991
8992 * server.c (attach_inferior): Return SIGTRAP for a successful
8993 attach.
8994
dd24457d
DJ
89952006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8996
8997 * Makefile.in (OBS): Add version.o.
8998 (STAGESTUFF): Delete.
8999 (version.o): Add dependencies.
9000 (version.c): Replace rule.
9001 (clean): Remove version.c.
9002 * server.c (gdbserver_version): New.
9003 (gdbserver_usage): Use printf.
9004 (main): Handle --version and --help.
9005 * server.h (version, host_name): Add declarations.
9006
6f0f660e
EZ
90072005-12-23 Eli Zaretskii <eliz@gnu.org>
9008
889bf7c5
PA
9009 * linux-arm-low.c:
9010 * linux-arm-low.c:
9011 * inferiors.c:
9012 * i387-fp.h:
9013 * i387-fp.c:
9014 * gdbreplay.c:
9015 * regcache.c:
9016 * proc-service.c:
9017 * mem-break.h:
9018 * mem-break.c:
9019 * linux-x86-64-low.c:
9020 * linux-sh-low.c:
9021 * linux-s390-low.c:
9022 * linux-ppc64-low.c:
9023 * linux-ppc-low.c:
9024 * linux-mips-low.c:
9025 * linux-m68k-low.c:
9026 * linux-m32r-low.c:
9027 * linux-low.h:
9028 * linux-low.c:
9029 * linux-ia64-low.c:
9030 * linux-i386-low.c:
9031 * linux-crisv32-low.c:
9032 * thread-db.c:
9033 * terminal.h:
9034 * target.h:
9035 * target.c:
9036 * server.h:
9037 * server.c:
9038 * remote-utils.c:
9039 * regcache.h:
9040 * utils.c:
9041 * Makefile.in:
9042 * configure.ac:
6f0f660e
EZ
9043 * gdbserver.1: Add (C) after Copyright. Update the FSF
9044 address.
9045
9d1fb177
DJ
90462005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9047
9048 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9049 (arm_breakpoint_at): Recognize both breakpoints.
9050 (the_low_target): Use the correct breakpoint instruction.
9051
011a70c2
DJ
90522005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9053
9054 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9055 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9056 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9057 (the_low_target): Update.
9058
7fb85e41
AS
90592005-10-25 Andreas Schwab <schwab@suse.de>
9060
9061 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9062
9063 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9064 (ia64_num_regs): Reduce to 462.
9065
3db0444b
DJ
90662005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9067
9068 * acinclude.m4: Correct quoting.
9069 * aclocal.m4: Regenerated.
9070
9071 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9072 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9073 (thread_db_init): Call thread_db_err_str.
9074 * configure.ac: Check for TD_VERSION.
9075 * config.in, configure: Regenerated.
9076
bee0189a
DJ
90772005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9078
9079 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9080
e9d25b98
DJ
90812005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9082
9083 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9084 is not available. Define HAVE_PTRACE_GETREGS if it is.
9085 * config.in, configure: Regenerated.
9086 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9087 * linux-i386-low.c, linux-m68k-low.c: Update to use
9088 HAVE_PTRACE_GETREGS.
9089 * linux-low.c (regsets_fetch_inferior_registers)
9090 (regsets_store_inferior_registers): Only return 0 if we processed
9091 GENERAL_REGS.
9092 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9093 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9094
a06660f7
DJ
90952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9096
9097 * inferiors.c (struct thread_info): Add gdb_id.
9098 (add_thread): Add gdb_id argument.
9099 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9100 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9101 calls to add_thread.
9102 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9103 * server.c (handle_query): Use thread_to_gdb_id.
9104 (handle_v_cont, main): Use gdb_id_to_thread_id.
9105 * server.h (add_thread): Update prototype.
9106 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9107 prototypes.
9108
5a1f5858
DJ
91092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9110
9111 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9112 left-padded registers.
9113 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9114 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9115
e122f1f5
SE
91162005-07-01 Steve Ellcey <sje@cup.hp.com>
9117
9118 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9119 * configure: Regenerate.
9120 * config.in: Regenerate.
9121 * server.h (NEED_DECLARATION_STRERROR):
9122 Replace with !HAVE_DECL_STRERROR.
9123
d592fa2f
DJ
91242005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9125
9126 * linux-low.c (linux_wait, linux_send_signal): Don't test
9127 an unsigned long variable for > 0 if it could be MAX_ULONG.
9128 * server.c (myresume): Likewise.
9129 * target.c (set_desired_inferior): Likewise.
9130
ccbd4912
MK
91312005-06-13 Mark Kettenis <kettenis@gnu.org>
9132
9133 * configure.ac: Simplify and improve check for socklen_t.
9134 * configure, config.in: Regenerate.
9135
f450004a
DJ
91362005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9137
9138 * acconfig.h: Remove.
9139 * configure.ac: Add a test for socklen_t. Use three-argument
9140 AC_DEFINE throughout.
9141 * config.in: Regenerated using autoheader 2.59.
9142 * configure: Regenerated.
9143
9144 * gdbreplay.c (socklen_t): Provide a default.
9145 (remote_open): Use socklen_t.
9146 * remote-utils.c (socklen_t): Provide a default.
9147 (remote_open): Use socklen_t.
9148 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9149 unsigned char.
9150
9151 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9152 char for buffers.
9153 * linux-low.c (linux_read_memory, linux_write_memory)
9154 (linux_read_auxv): Likewise.
9155 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9156 (check_mem_write): Likewise.
9157 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9158 Likewise.
9159 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9160 (registers_from_string, register_data): Likewise.
9161 * server.c (handle_query, main): Likewise.
9162 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9163 (decode_M_packet): Likewise.
9164 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9165 * target.h (struct target_ops): Update read_memory, write_memory,
9166 and read_auxv.
9167 (read_inferior_memory, write_inferior_memory): Update.
9168 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9169 to unsigned char *.
9170 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9171 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9172 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9173 linux-s390-low.c, linux-sh-low.c: Update for changes in
9174 read_inferior_memory and the_low_target->breakpoint.
9175
eee84df1
DJ
91762005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9177
9178 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9179 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9180 * configure.srv: Add powerpc64-*-linux*.
9181 * linux-ppc64-low.c: New file.
9182
45b134e5
OF
91832005-05-23 Orjan Friberg <orjanf@axis.com>
9184
9185 * linux-cris-low.c: New file with support for CRIS.
9186 * linux-crisv32-low.c: Ditto for CRISv32.
9187 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9188 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9189 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9190 reg-crisv32.o, and reg-crisv32.c to make rules.
9191 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9192 recognized targets.
9193
48d93c75
UW
91942005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9195
9196 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9197 of sizeof (PTRACE_XFER_TYPE).
9198 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9199
e013ee27
OF
92002005-05-12 Orjan Friberg <orjanf@axis.com>
9201
889bf7c5 9202 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9203 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9204 pointers for hardware watchpoint support.
9205 * linux-low.h (struct linux_target_ops): Ditto.
9206 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9207 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9208 to linux_target_ops.
9209 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9210 reply packet.
9211 * server.c (main): Recognize 'Z' and 'z' packets.
9212
b0ded00b
UW
92132005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9214
9215 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9216 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9217 (the_low_target): Add new members.
9218
8643e2ad
DJ
92192005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9220
9221 * proc-service.c (ps_lgetregs): Search all_processes instead of
9222 all_threads.
9223
fc620387
DJ
92242005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9225
9226 * server.c (start_inferior): Change return type to int.
9227 (attach_inferior): Change sigptr to int *.
9228 (handle_v_cont, handle_v_requests): Change signal to int *.
9229 (main): Change signal to int.
9230
92312005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9232
9233 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9234 * configure.srv: Add m32r*-*-linux*.
9235 * linux-m32r-low.c: New file.
9236
e0e76420
DJ
92372005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9238
9239 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9240
a1928bad
DJ
92412005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9242
9243 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9244 Take unsigned long arguments for PIDs.
9245 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9246 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9247 (wait_for_sigstop, linux_resume_one_process)
9248 (regsets_fetch_inferior_registers, linux_send_signal)
9249 (linux_read_auxv): Likewise. Update the types of variables holding
9250 PIDs. Update format string specifiers.
9251 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9252 * remote-utils.c (prepare_resume_reply): Likewise.
9253 * server.c (cont_thread, general_thread, step_thread)
9254 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9255 unsigned long.
9256 (handle_query): Update format specifiers.
9257 (handle_v_cont, main): Use strtoul for thread IDs.
9258 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9259 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9260 (general_thread, step_thread, thread_from_wait)
9261 (old_thread_from_wait): Update.
9262 * target.h (struct thread_resume): Use unsigned long for THREAD.
9263 (struct target_ops): Use unsigned long for arguments to attach and
9264 thread_alive.
9265
dcdb98d2
DJ
92662005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9267
9268 * acinclude.m4: Include bfd/bfd.m4 directly.
9269 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9270 <agriffis@toolchain.org>.
9271 * aclocal.m4, configure: Regenerated.
9272
bec39cab
AC
92732005-01-07 Andrew Cagney <cagney@gnu.org>
9274
9275 * configure.ac: Rename configure.in, require autoconf 2.59.
9276 * configure: Re-generate.
9277
434c4c77
DJ
92782004-12-08 Daniel Jacobowitz <dan@debian.org>
9279
9280 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9281 LIBS when finished.
9282 * aclocal.m4: Regenerated.
9283 * configure: Regenerated.
9284
db1d3e1b
AS
92852004-11-21 Andreas Schwab <schwab@suse.de>
9286
9287 * linux-m68k-low.c (m68k_num_gregs): Define.
9288 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9289 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9290 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9291 (m68k_breakpoint_at): New. Add to the_low_target.
9292
9293 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9294 srv_linux_thread_db to yes.
9295
43360365
JB
92962004-10-20 Joel Brobecker <brobecker@gnat.com>
9297
9298 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9299 (ARCH_SET_FS): Likewise.
9300 (ARCH_GET_FS): Likewise.
9301 (ARCH_GET_GS): Likewise.
9302
fd500816
DJ
93032004-10-16 Daniel Jacobowitz <dan@debian.org>
9304
9305 * linux-i386-low.c (ps_get_thread_area): New.
9306 * linux-x86-64-low.c (ps_get_thread_area): New.
9307 * linux-low.c: Include <sys/syscall.h>.
9308 (linux_kill_one_process): Don't kill the first thread here.
9309 (linux_kill): Kill the first thread here.
9310 (kill_lwp): New function.
9311 (send_sigstop, linux_send_signal): Use it.
9312 * proc-service.c: Clean up #ifdefs.
9313 (fpregset_info): Delete.
9314 (ps_lgetregs): Update and enable implementation.
9315 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9316 implementations.
9317 * remote-utils.c (struct sym_cache, symbol_cache): New.
9318 (input_interrupt): Print a clearer message.
9319 (async_io_enabled): New variable.
9320 (enable_async_io, disable_async_io): Use it. Update comments.
9321 (look_up_one_symbol): Use the symbol cache.
9322 * thread-db.c (thread_db_look_up_symbols): New function.
9323 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9324
f6de3c42
DJ
93252004-10-16 Daniel Jacobowitz <dan@debian.org>
9326
9327 * configure.in: Test for -rdynamic.
9328 * configure: Regenerated.
9329 * Makefile (INTERNAL_LDFLAGS): New.
9330 (gdbserver, gdbreplay): Use it.
9331
2c0fc042
AC
93322004-09-02 Andrew Cagney <cagney@gnu.org>
9333
9334 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9335
075b3282
DJ
93362004-03-23 Daniel Jacobowitz <drow@mvista.com>
9337
9338 * linux-low.c (linux_wait): Clear all_processes list also.
9339
fa6a77dc
DJ
93402004-03-12 Daniel Jacobowitz <drow@mvista.com>
9341
9342 * linux-low.c: Include <errno.h>. Remove extern declaration of
9343 errno.
9344
6d782a97
DJ
93452004-03-12 Daniel Jacobowitz <drow@mvista.com>
9346
9347 * gdbreplay.c, server.h, utils.c: Update copyright years.
9348
3a7fb99b
DJ
93492004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9350
9351 * server.c (main): Print child status or termination signal from
9352 variable 'signal', not 'sig'.
9353
c3e735a6
DJ
93542004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9355
9356 * linux-low.c (linux_read_memory): Change return type to
9357 int. Check for and return error from ptrace().
9358 * target.c (read_inferior_memory): Change return type to int. Pass
9359 back return status from the_target->read_memory().
9360 * target.h (struct target_ops): Adapt *read_memory() prototype.
9361 Update comment.
9362 (read_inferior_memory): Adapt prototype.
9363 * server.c (main): Return an error packet if
9364 read_inferior_memory() returns an error.
9365
a59d1c82
DJ
93662004-03-04 Daniel Jacobowitz <drow@mvista.com>
9367
9368 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9369 Unify with other clean targets.
9370
dc3f8883
DJ
93712004-02-29 Daniel Jacobowitz <drow@mvista.com>
9372
9373 * server.c (handle_v_cont): Call set_desired_inferior.
9374
89a208da
DJ
93752004-02-29 Daniel Jacobowitz <drow@mvista.com>
9376
9377 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9378
62ea82f5
DJ
93792004-02-29 Daniel Jacobowitz <drow@mvista.com>
9380
9381 * linux-low.c (linux_wait): Unblock async I/O.
9382 (linux_resume): Block and enable async I/O.
9383 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9384 * server.h (block_async_io, unblock_async_io): Add prototypes.
9385
6910d122
DJ
93862004-02-29 Daniel Jacobowitz <drow@mvista.com>
9387
9388 * remote-utils.c (remote_open): Print a status notice after
9389 opening a TCP port.
9390 * server.c (attach_inferior): Print a status notice after
9391 attaching.
9392
93932004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
9394
9395 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9396
c89dc5d4
DJ
93972004-02-26 Daniel Jacobowitz <drow@mvista.com>
9398
9399 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9400 error packet.
9401 * server.c, target.h: Update copyright years.
9402
4b8dad4a
RM
94032004-02-25 Roland McGrath <roland@redhat.com>
9404
9405 * target.h (struct target_ops): New member `read_auxv'.
9406 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9407 * linux-low.c (linux_read_auxv): New function.
9408 (linux_target_ops): Initialize `read_auxv' member to that.
9409
d7446758
JB
94102004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9411
9412 Committed by Jim Blandy <jimb@redhat.com>.
9413
9414 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 9415 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
9416 instead of GPR_SIZE to distiguish s390 and s390x targets.
9417
5544ad89
DJ
94182004-01-31 Daniel Jacobowitz <drow@mvista.com>
9419
9420 * linux-low.c: Update copyright year.
9421 (check_removed_breakpoint): Clear pending_is_breakpoint.
9422 (linux_set_resume_request, linux_queue_one_thread)
9423 (resume_status_pending_p): New functions.
9424 (linux_continue_one_thread): Use process->resume.
9425 (linux_resume): Only resume threads if there are no pending events.
9426 * linux-low.h (struct process_info): Add resume request
9427 pointer.
9428
2a68b70e
DJ
94292004-01-30 Daniel Jacobowitz <drow@mvista.com>
9430
9431 * regcache.c (new_register_cache): Clear the allocated register
9432 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9433
64386c31
DJ
94342003-10-13 Daniel Jacobowitz <drow@mvista.com>
9435
9436 * linux-low.c (linux_resume): Take a struct thread_resume *
9437 argument.
9438 (linux_wait): Update call.
9439 (resume_ptr): New static variable.
9440 (linux_continue_one_thread): Renamed from
9441 linux_continue_one_process. Use resume_ptr.
9442 (linux_resume): Use linux_continue_one_thread.
9443 * server.c (handle_v_cont, handle_v_requests): New functions.
9444 (myresume): New function.
9445 (main): Handle 'v' case.
9446 * target.h (struct thread_resume): New type.
9447 (struct target_ops): Change argument of "resume" to struct
9448 thread_resume *.
9449 (myresume): Delete macro.
9450
c938e9b0
L
94512003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9452
9453 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9454 (uninstall): Support DESTDIR.
9455
7f313d07
BC
9456Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9457
9458 * configure.srv: Add xscale*linux copy of arm*linux entry.
9459
3b2fc2ea
DJ
94602003-07-24 Daniel Jacobowitz <drow@mvista.com>
9461
9462 * linux-arm-low.c (arm_reinsert_addr): New function.
9463 (the_low_target): Add arm_reinsert_addr.
9464
1c0a559e
MK
94652003-07-08 Mark Kettenis <kettenis@gnu.org>
9466
9467 * mem-break.c: Remove whitespace at end of file.
9468
43d5792c
DJ
94692003-06-28 Daniel Jacobowitz <drow@mvista.com>
9470
9471 * configure.in: Check whether we need to prototype strerror.
9472 * server.h: Optionally prototype strerror.
9473 * gdbreplay.c (perror_with_name): Use strerror.
9474 * linux-low.c (linux_attach_lwp): Use strerror.
9475 * utils.c (perror_with_name): Use strerror.
9476 * config.in, configure: Regenerated.
9477
c8a86edf
DJ
94782003-06-28 Daniel Jacobowitz <drow@mvista.com>
9479
9480 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9481 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9482
73d37363
DJ
94832003-06-20 Daniel Jacobowitz <drow@mvista.com>
9484
9485 * Makefile.in (SFILES): Update.
9486 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9487 low-sun3.c: Remove files.
9488
6ad8ae5c
DJ
94892003-06-17 Daniel Jacobowitz <drow@mvista.com>
9490
9491 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9492 (linux_detach_one_process, linux_detach): New functions.
9493 (linux_target_ops): Add linux_detach.
9494 * server.c (main): Handle 'D' packet.
9495 * target.h (struct target_ops): Add "detach" member.
9496 (detach_inferior): Define.
9497
1581182a
MK
94982003-06-13 Mark Kettenis <kettenis@gnu.org>
9499
9500 From Kelley Cook <kelleycook@wideopenwest.com>:
9501 * configure.srv: Accept i[34567]86 variants.
9502
e5379b03
DJ
95032003-06-05 Daniel Jacobowitz <drow@mvista.com>
9504
9505 * linux-low.c (linux_wait_for_event): Correct comment typos.
9506 (linux_resume_one_process): Call check_removed_breakpoint.
9507 (linux_send_signal): New function.
9508 (linux_target_ops): Add linux_send_signal.
9509 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9510 of kill.
9511 * target.h (struct target_ops): Add send_signal.
9512
2ff29de4
JB
95132003-05-29 Jim Blandy <jimb@redhat.com>
9514
9515 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9516 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9517 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9518 away part of the register's value.
9519
254787d4
DJ
95202003-03-26 Daniel Jacobowitz <drow@mvista.com>
9521
9522 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9523 (linux_wait_for_event, linux_init_signals): Likewise.
9524
94e10508
DJ
95252003-03-17 Daniel Jacobowitz <drow@mvista.com>
9526
9527 * configure.in: Check for stdlib.h.
9528 * configure: Regenerated.
9529 * config.in: Regenerated.
9530
4c0711e0
DJ
95312003-01-04 Andreas Schwab <schwab@suse.de>
9532
9533 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9534
ef66e766
AC
95352003-01-02 Andrew Cagney <ac131313@redhat.com>
9536
9537 * Makefile.in: Remove obsolete code.
9538
a1358604
DJ
95392002-11-20 Daniel Jacobowitz <drow@mvista.com>
9540
9541 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9542 defined(PT_FPR0_HI).
9543
23ce3b1c
DJ
95442002-11-17 Stuart Hughes <seh@zee2.com>
9545
9546 * linux-arm-low.c (arm_num_regs): Increase.
9547 (arm_regmap): Include status register.
9548
95492002-11-17 Daniel Jacobowitz <drow@mvista.com>
9550
9551 * linux-low.c (register_addr): Remove incorrect -1 check.
9552
a9fa9f7d
DJ
95532002-08-29 Daniel Jacobowitz <drow@mvista.com>
9554
9555 * linux-low.c (linux_create_inferior): Call setpgid. Return
9556 the new PID.
9557 (unstopped_p, linux_signal_pid): Remove.
9558 (linux_target_ops): Remove linux_signal_pid.
9559 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9560 global instead of target method.
9561 * target.h (struct target_ops): Remove signal_pid. Update comment
9562 for create_inferior.
9563 * server.c (signal_pid): New variable.
9564 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 9565 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
9566 (attach_inferior): Set signal_pid.
9567
17574093
DJ
95682002-08-23 Daniel Jacobowitz <drow@mvista.com>
9569
9570 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9571
95722002-08-20 Jim Blandy <jimb@redhat.com>
9573
9574 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9575 default for this.
9576
95772002-08-01 Andrew Cagney <cagney@redhat.com>
9578
9579 * Makefile.in: Make chill references obsolete.
9580
95812002-07-24 Kevin Buettner <kevinb@redhat.com>
9582
9583 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9584 * configure: Regenerate.
9585 * config.in: Regenerate.
9586
95872002-07-09 David O'Brien <obrien@FreeBSD.org>
9588
9589 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9590 (perror_with_name, remote_close, remote_open, expect, play): Static.
9591
95922002-07-04 Michal Ludvig <mludvig@suse.cz>
9593
4b8dad4a 9594 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
9595 byte offsets instead of an array of indexes.
9596 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9597
95982002-06-13 Daniel Jacobowitz <drow@mvista.com>
9599
9600 * regcache.c: Add comment.
9601
96022002-06-11 Daniel Jacobowitz <drow@mvista.com>
9603
9604 * thread-db.c: New file.
9605 * proc-service.c: New file.
9606 * acinclude.m4: New file.
9607 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9608 proc-service.o, and thread-db.o.
9609 (linux-low.o): Add USE_THREAD_DB.
9610 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9611 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9612 * aclocal.m4: Regenerated.
9613 * config.in: Regenerated.
9614 * configure: Regenerated.
9615 * configure.in: Check for proc_service.h, sys/procfs.h,
9616 thread_db.h, and linux/elf.h headrs.
9617 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9618 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9619 Check for -lthread_db and thread support.
9620 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9621 PowerPC, and SuperH.
9622 * i387-fp.c: Constify arguments.
9623 * i387-fp.h: Likewise.
9624 * inferiors.c: (struct thread_info): Renamed from
9625 `struct inferior_info'. Remove PID member. Use generic inferior
9626 list header. All uses updated.
9627 (inferiors, signal_pid): Removed.
9628 (all_threads): New variable.
9629 (get_thread): Define.
9630 (add_inferior_to_list): New function.
9631 (for_each_inferior): New function.
9632 (change_inferior_id): New function.
9633 (add_inferior): Removed.
9634 (remove_inferior): New function.
9635 (add_thread): New function.
9636 (free_one_thread): New function.
9637 (remove_thread): New function.
9638 (clear_inferiors): Use for_each_inferior and free_one_thread.
9639 (find_inferior): New function.
9640 (find_inferior_id): New function.
9641 (inferior_target_data): Update argument type.
9642 (set_inferior_target_data): Likewise.
9643 (inferior_regcache_data): Likewise.
9644 (set_inferior_regcache_data): Likewise.
9645 * linux-low.c (linux_bp_reinsert): Remove.
9646 (all_processes, stopping_threads, using_thrads)
9647 (struct pending_signals, debug_threads, pid_of): New.
9648 (inferior_pid): Replace with macro.
9649 (struct inferior_linux_data): Remove.
9650 (get_stop_pc, add_process): New functions.
9651 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9652 Use add_process and add_thread.
9653 (linux_attach_lwp): New function, based on old linux_attach. Use
9654 add_process and add_thread. Set stop_expected for new threads.
9655 (linux_attach): New function.
9656 (linux_kill_one_process): New function.
9657 (linux_kill): Kill all LWPs.
9658 (linux_thread_alive): Use find_inferior_id.
9659 (check_removed_breakpoints, status_pending_p): New functions.
9660 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9661 Update. Use WNOHANG. Wait for cloned processes also. Update process
9662 struct for the found process.
9663 (linux_wait_for_event): New function.
9664 (linux_wait): Use it. Support LWPs.
9665 (send_sigstop, wait_for_sigstop, stop_all_processes)
9666 (linux_resume_one_process, linux_continue_one_process): New functions.
9667 (linux_resume): Support LWPs.
9668 (REGISTER_RAW_SIZE): Remove.
9669 (fetch_register): Use register_size instead. Call supply_register.
9670 (usr_store_inferior_registers): Likewise. Call collect_register.
9671 Fix recursive case.
9672 (regsets_fetch_inferior_registers): Improve error message.
9673 (regsets_store_inferior_registers): Add debugging.
9674 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9675 (unstopped_p, linux_signal_pid): New functions.
9676 (linux_target_ops): Add linux_signal_pid.
9677 (linux_init_signals): New function.
9678 (initialize_low): Call it. Initialize using_threads.
9679 * regcache.c (inferior_regcache_data): Add valid
9680 flag.
9681 (get_regcache): Fetch registers lazily. Add fetch argument
9682 and update all callers.
9683 (regcache_invalidate_one, regcache_invalidate): New
9684 functions.
9685 (new_register_cache): Renamed from create_register_cache.
9686 Return the new regcache.
9687 (free_register_cache): Change argument to a void *.
9688 (registers_to_string, registers_from_string): Call get_regcache
9689 with fetch flag set.
9690 (register_data): Make static. Pass fetch flag to get_regcache.
9691 (supply_register): Call get_regcache with fetch flag clear.
9692 (collect_register): Call get_regcache with fetch flag set.
9693 (collect_register_as_string): New function.
9694 * regcache.h: Update.
9695 * remote-utils.c (putpkt): Flush after debug output and use
9696 stderr.
9697 Handle input interrupts while waiting for an ACK.
9698 (input_interrupt): Use signal_pid method.
9699 (getpkt): Flush after debug output and use stderr.
9700 (outreg): Use collect_register_as_string.
9701 (new_thread_notify, dead_thread_notify): New functions.
9702 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9703 and general_thread.
9704 (look_up_one_symbol): Flush after debug output.
9705 * server.c (step_thread, server_waiting): New variables.
9706 (start_inferior): Don't use signal_pid. Update call to mywait.
9707 (attach_inferior): Update call to mywait.
9708 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9709 (main): Don't fetch/store registers explicitly. Use
9710 set_desired_inferior. Support proposed ``Hs'' packet. Update
9711 calls to mywait.
9712 * server.h: Update.
9713 (struct inferior_list, struct_inferior_list_entry): New.
9714 * target.c (set_desired_inferior): New.
9715 (write_inferior_memory): Constify.
9716 (mywait): New function.
9717 * target.h: Update.
9718 (struct target_ops): New signal_pid method.
9719 (mywait): Removed macro, added prototype.
9720
9721 * linux-low.h (regset_func): Removed.
9722 (regset_fill_func, regset_store_func): New.
9723 (enum regset_type): New.
9724 (struct regset_info): Add type field. Use new operation types.
9725 (struct linux_target_ops): stop_pc renamed to get_pc.
9726 Add decr_pc_after_break and breakpoint_at.
9727 (get_process, get_thread_proess, get_process_thread)
9728 (strut process_info, all_processes, linux_attach_lwp)
9729 (thread_db_init): New.
9730
9731 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9732 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9733 (the_low_target): Add new members.
9734 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9735 (i386_store_fpxregset): Constify.
9736 (target_regsets): Add new kind identifier.
9737 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9738 (i386_set_pc): Add debugging.
9739 (i386_breakpoint_at): New function.
9740 (the_low_target): Add new members.
9741 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9742 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9743 (mips_breakpoint_at): New.
9744 (the_low_target): Add new members.
9745 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9746 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9747 (the_low_target): Add new members.
9748 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9749 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9750 (the_low_target): Add new members.
9751 * linux-x86-64-low.c (target_regsets): Add new kind
9752 identifier.
9753
97542002-05-15 Daniel Jacobowitz <drow@mvista.com>
9755
9756 From Martin Pool <mbp@samba.org>:
9757 * server.c (gdbserver_usage): New function.
9758 (main): Call it.
9759
97602002-05-14 Daniel Jacobowitz <drow@mvista.com>
9761
9762 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9763 stop_at -> stop_pc.
9764
97652002-05-04 Andrew Cagney <ac131313@redhat.com>
9766
9767 * Makefile.in: Remove obsolete code.
9768
97692002-04-24 Michal Ludvig <mludvig@suse.cz>
9770
9771 * linux-low.c (regsets_fetch_inferior_registers),
9772 (regsets_store_inferior_registers): Removed cast to int from
9773 ptrace() calls.
9774 * regcache.h: Added declaration of struct inferior_info.
9775
97762002-04-20 Daniel Jacobowitz <drow@mvista.com>
9777
9778 * inferiors.c (struct inferior_info): Add regcache_data.
9779 (add_inferior): Call create_register_cache.
9780 (clear_inferiors): Call free_register_cache.
9781 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9782 * regcache.c (struct inferior_regcache_data): New.
9783 (registers): Remove.
9784 (get_regcache): New function.
9785 (create_register_cache, free_register_cache): New functions.
9786 (set_register_cache): Don't initialize the register cache here.
9787 (registers_to_string, registers_from_string, register_data): Call
9788 get_regcache.
9789 * regcache.h: Add prototypes.
9790 * server.h: Likewise.
9791
97922002-04-20 Daniel Jacobowitz <drow@mvista.com>
9793
9794 * mem-break.c: New file.
9795 * mem-break.h: New file.
9796 * Makefile.in: Add mem-break.o rule; update server.h
9797 dependencies.
9798 * inferiors.c (struct inferior_info): Add target_data
9799 member.
9800 (clear_inferiors): Free target_data member if set.
9801 (inferior_target_data, set_inferior_target_data): New functions.
9802 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9803 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9804 * linux-low.c (linux_bp_reinsert): New variable.
9805 (struct inferior_linux_data): New.
9806 (linux_create_inferior): Use set_inferior_target_data.
9807 (linux_attach): Likewise. Call add_inferior.
9808 (linux_wait_for_one_inferior): New function.
9809 (linux_wait): Call it.
9810 (linux_write_memory): Add const.
9811 (initialize_low): Call set_breakpoint_data.
9812 * linux-low.h (struct linux_target_ops): Add breakpoint
9813 handling members.
9814 * server.c (attach_inferior): Remove extra add_inferior
9815 call.
9816 * server.h: Include mem-break.h. Update inferior.c
9817 prototypes.
9818 * target.c (read_inferior_memory)
9819 (write_inferior_memory): New functions.
9820 * target.h (read_inferior_memory)
9821 (write_inferior_memory): Change macros to prototypes.
9822 (struct target_ops): Update comments. Add const to write_memory
9823 definition.
9824
98252002-04-11 Daniel Jacobowitz <drow@mvista.com>
9826
9827 * linux-low.c (usr_store_inferior_registers): Support
9828 registers which are allowed to fail to store.
9829 * linux-low.h (linux_target_ops): Likewise.
9830 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9831 (ppc_cannot_store_register): FPSCR may not be storable.
9832
98332002-04-09 Daniel Jacobowitz <drow@mvista.com>
9834
9835 * server.h: Include <string.h> if HAVE_STRING_H.
9836 * ChangeLog: Correct paths in last ChangeLog entry.
9837
98382002-04-09 Daniel Jacobowitz <drow@mvista.com>
9839
9840 * linux-low.h: Remove obsolete prototypes.
9841 (struct linux_target_ops): New.
9842 (extern the_low_target): New.
9843 * linux-low.c (num_regs, regmap): Remove declarations.
9844 (register_addr): Use the_low_target explicitly.
9845 (fetch_register): Likewise.
9846 (usr_fetch_inferior_registers): Likewise.
9847 (usr_store_inferior_registers): Likewise.
9848 * linux-arm-low.c (num_regs): Remove.
9849 (arm_num_regs): Define.
9850 (arm_regmap): Renamed from regmap, made static.
9851 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9852 made static.
9853 (arm_cannot_store_register): Renamed from cannot_store_register,
9854 made static.
9855 (the_low_target): New.
9856 * linux-i386-low.c (num_regs): Remove.
9857 (i386_num_regs): Define.
9858 (i386_regmap): Renamed from regmap, made static.
9859 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9860 made static.
9861 (i386_cannot_store_register): Renamed from cannot_store_register,
9862 made static.
9863 (the_low_target): New.
9864 * linux-ia64-low.c (num_regs): Remove.
9865 (ia64_num_regs): Define.
9866 (ia64_regmap): Renamed from regmap, made static.
9867 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9868 made static.
9869 (ia64_cannot_store_register): Renamed from cannot_store_register,
9870 made static.
9871 (the_low_target): New.
9872 * linux-m68k-low.c (num_regs): Remove.
9873 (m68k_num_regs): Define.
9874 (m68k_regmap): Renamed from regmap, made static.
9875 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9876 made static.
9877 (m68k_cannot_store_register): Renamed from cannot_store_register,
9878 made static.
9879 (the_low_target): New.
9880 * linux-mips-low.c (num_regs): Remove.
9881 (mips_num_regs): Define.
9882 (mips_regmap): Renamed from regmap, made static.
9883 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9884 made static.
9885 (mips_cannot_store_register): Renamed from cannot_store_register,
9886 made static.
9887 (the_low_target): New.
9888 * linux-ppc-low.c (num_regs): Remove.
9889 (ppc_num_regs): Define.
9890 (ppc_regmap): Renamed from regmap, made static.
9891 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9892 made static.
9893 (ppc_cannot_store_register): Renamed from cannot_store_register,
9894 made static.
9895 (the_low_target): New.
9896 * linux-s390-low.c (num_regs): Remove.
9897 (s390_num_regs): Define.
9898 (s390_regmap): Renamed from regmap, made static.
9899 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9900 made static.
9901 (s390_cannot_store_register): Renamed from cannot_store_register,
9902 made static.
9903 (the_low_target): New.
9904 * linux-sh-low.c (num_regs): Remove.
9905 (sh_num_regs): Define.
9906 (sh_regmap): Renamed from regmap, made static.
9907 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9908 made static.
9909 (sh_cannot_store_register): Renamed from cannot_store_register,
9910 made static.
9911 (the_low_target): New.
9912 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9913 (the_low_target): New.
9914
99152002-04-09 Daniel Jacobowitz <drow@mvista.com>
9916
9917 * Makefile.in: Add stamp-h target.
9918 * configure.in: Create stamp-h.
9919 * configure: Regenerated.
9920
99212002-04-09 Daniel Jacobowitz <drow@mvista.com>
9922
9923 * inferiors.c: New file.
9924 * target.c: New file.
9925 * target.h: New file.
9926 * Makefile.in: Add target.o and inferiors.o. Update
9927 dependencies.
9928 * linux-low.c (inferior_pid): New static variable,
9929 moved from server.c.
9930 (linux_create_inferior): Renamed from create_inferior.
9931 Call add_inferior. Return 0 on success instead of a PID.
9932 (linux_attach): Renamed from myattach.
9933 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9934 (linux_thread_alive): Renamed from mythread_alive.
9935 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9936 child dies.
9937 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9938 (regsets_store_inferior_registers): Correct error message.
9939 Add missing ``return 0''.
9940 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9941 (linux_store_registers): Renamed from store_inferior_registers.
9942 (linux_read_memory): Renamed from read_inferior_memory.
9943 (linux_write_memory): Renamed from write_inferior_memory.
9944 (linux_target_ops): New structure.
9945 (initialize_low): Call set_target_ops ().
9946 * remote-utils.c (unhexify): New function.
9947 (hexify): New function.
9948 (input_interrupt): Send signals to ``signal_pid''.
9949 * server.c (inferior_pid): Remove.
9950 (start_inferior): Update create_inferior call.
9951 (attach_inferior): Call add_inferior.
9952 (handle_query): New function.
9953 (main): Call handle_query for `q' packets.
9954 * server.h: Include "target.h". Remove obsolete prototypes.
9955 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9956
99572002-04-09 Daniel Jacobowitz <drow@mvista.com>
9958
9959 * Makefile.in: Add WARN_CFLAGS. Update configury
9960 dependencies.
9961 * configure.in: Check for <string.h>
9962 * configure: Regenerate.
9963 * config.in: Regenerate.
9964 * gdbreplay.c: Include needed system headers.
9965 (remote_open): Remove strchr prototype.
9966 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9967 * regcache.c (supply_register): Change buf argument to const void *.
9968 (supply_register_by_name): Likewise.
9969 (collect_register): Change buf argument to void *.
9970 (collect_register_by_name): Likewise.
9971 * regcache.h: Add missing prototypes.
9972 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9973 * server.c (handle_query): New function.
9974 (attached): New static variable, moved out of main.
9975 (main): Quiet longjmp clobber warnings.
9976 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9977 * utils.c (error): Remove NORETURN.
9978 (fatal): Likewise.
This page took 1.331153 seconds and 4 git commands to generate.