1 2014-08-07 Gary Benson <gbenson@redhat.com>
3 * server.h: Do not include stdlib.h.
4 * inferiors.c: Likewise.
5 * linux-low.c: Likewise.
6 * regcache.c: Likewise.
8 * tracepoint.c: Likewise.
11 2014-08-07 Gary Benson <gbenson@redhat.com>
13 * server.h: Do not include stdio.h.
14 * linux-low.c: Likewise.
15 * remote-utils.c: Likewise.
16 * spu-low.c: Likewise.
18 * wincecompat.c: Likewise.
20 2014-08-06 Gary Benson <gbenson@redhat.com>
22 * regcache.c (init_register_cache): Move conditionals inside if.
24 2014-08-06 Gary Benson <gbenson@redhat.com>
26 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
28 2014-07-31 Gary Benson <gbenson@redhat.com>
30 * ax.h: Do not include server.h.
31 * gdbthread.h: Likewise.
32 * lynx-low.h: Likewise.
35 2014-07-30 Gary Benson <gbenson@redhat.com>
37 * server.h: Include common-defs.h.
38 Do not include config.h or build-gnulib-gdbserver/config.h.
40 2014-07-30 Gary Benson <gbenson@redhat.com>
42 * hostio-errno.c: Move server.h to top of includes list.
43 * inferiors.c: Likewise.
44 * linux-x86-low.c: Likewise.
45 * notif.c: Include server.h.
47 2014-07-24 Tom Tromey <tromey@redhat.com>
48 Gary Benson <gbenson@redhat.com>
50 * server.h (CORE_ADDR): Now unsigned.
52 2014-07-16 Pedro Alves <palves@redhat.com>
54 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
56 2014-07-15 Pedro Alves <palves@redhat.com>
58 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
61 2014-07-11 Pedro Alves <palves@redhat.com>
63 * linux-low.c (kill_wait_lwp): New function, based on
64 kill_one_lwp_callback, but use my_waitpid directly.
65 (kill_one_lwp_callback, linux_kill): Use it.
67 2014-06-23 Pedro Alves <palves@redhat.com>
69 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
70 before setting DR0..DR3.
72 2014-06-20 Gary Benson <gbenson@redhat.com>
74 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
75 * configure: Regenerated.
76 * config.in: Likewise.
78 2014-06-20 Gary Benson <gbenson@redhat.com>
80 * Makefile.in (SFILES): Update locations for files moved
82 (object file files): Reordered.
84 2014-06-20 Gary Benson <gbenson@redhat.com>
86 * i386-low.h (i386_dr_low_can_set_addr): Removed.
87 (i386_dr_low_set_addr): Likewise.
88 (i386_dr_low_get_addr): Likewise.
89 (i386_dr_low_can_set_control): Likewise.
90 (i386_dr_low_set_control): Likewise.
91 (i386_dr_low_get_control): Likewise.
92 (i386_dr_low_get_status): Likewise.
93 (i386_get_debug_register_length): Likewise.
94 * linux-x86-low.c (i386_dr_low_set_addr):
95 Changed signature. Made static.
96 (i386_dr_low_get_addr): Likewise.
97 (i386_dr_low_set_control): Likewise.
98 (i386_dr_low_get_control): Likewise.
99 (i386_dr_low_get_status): Likewise.
100 (i386_dr_low): New global variable.
101 * win32-i386-low.c (i386_dr_low_set_addr):
102 Changed signature. Made static.
103 (i386_dr_low_get_addr): Likewise.
104 (i386_dr_low_set_control): Likewise.
105 (i386_dr_low_get_control): Likewise.
106 (i386_dr_low_get_status): Likewise.
107 (i386_dr_low): New global variable.
109 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
111 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
112 * Makefile.in (AR, AR_FLAGS): Define.
113 * configure: Regenerate.
115 2014-06-19 Gary Benson <gbenson@redhat.com>
117 * Makefile.in (i386-dregs.o): New rule.
118 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
119 * i386-low.c (target.h): Remove include.
120 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
121 (DR_CONTROL_SHIFT): Likewise.
122 (DR_CONTROL_SIZE): Likewise.
123 (DR_RW_EXECUTE): Likewise.
124 (DR_RW_WRITE): Likewise.
125 (DR_RW_READ): Likewise.
126 (DR_RW_IORW): Likewise.
127 (DR_LEN_1): Likewise.
128 (DR_LEN_2): Likewise.
129 (DR_LEN_4): Likewise.
130 (DR_LEN_8): Likewise.
131 (DR_LOCAL_ENABLE_SHIFT): Likewise.
132 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
133 (DR_ENABLE_SIZE): Likewise.
134 (DR_LOCAL_SLOWDOWN): Likewise.
135 (DR_GLOBAL_SLOWDOWN): Likewise.
136 (DR_CONTROL_RESERVED): Likewise.
137 (I386_DR_CONTROL_MASK): Likewise.
138 (I386_DR_VACANT): Likewise.
139 (I386_DR_LOCAL_ENABLE): Likewise.
140 (I386_DR_GLOBAL_ENABLE): Likewise.
141 (I386_DR_DISABLE): Likewise.
142 (I386_DR_SET_RW_LEN): Likewise.
143 (I386_DR_GET_RW_LEN): Likewise.
144 (I386_DR_WATCH_HIT): Likewise.
145 (i386_wp_op_t): Likewise.
146 (i386_show_dr): Likewise.
147 (i386_length_and_rw_bits): Likewise.
148 (i386_insert_aligned_watchpoint): Likewise.
149 (i386_remove_aligned_watchpoint): Likewise.
150 (i386_handle_nonaligned_watchpoint): Likewise.
151 i386_update_inferior_debug_regs(): Likewise.
152 (i386_dr_insert_watchpoint): Likewise.
153 (i386_dr_remove_watchpoint): Likewise.
154 (i386_dr_region_ok_for_watchpoint): Likewise.
155 (i386_dr_stopped_data_address): Likewise.
156 (i386_dr_stopped_by_watchpoint): Likewise.
158 2014-06-19 Gary Benson <gbenson@redhat.com>
160 * i386-low.c (i386_dr_show): Renamed to
161 i386_show_dr and made static. All uses updated.
162 (i386_dr_length_and_rw_bits): Renamed to
163 i386_length_and_rw_bits and made static.
165 (i386_dr_insert_aligned_watchpoint): Renamed to
166 i386_insert_aligned_watchpoint and made static.
168 (i386_dr_remove_aligned_watchpoint): Renamed to
169 i386_remove_aligned_watchpoint and made static.
171 (i386_dr_update_inferior_debug_regs): Renamed to
172 i386_update_inferior_debug_regs and made static.
175 2014-06-18 Gary Benson <gbenson@redhat.com>
177 * i386-low.h (i386_dr_low_can_set_addr): New macro.
178 (i386_dr_low_can_set_control): Likewise.
179 (i386_get_debug_register_length): Likewise.
180 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
181 (i386_dr_low_can_set_control): Likewise.
182 (i386_get_debug_register_length): Likewise.
184 2014-06-17 Gary Benson <gbenson@redhat.com>
186 * i386-low.h (i386-dregs.h): New include.
187 (DR_FIRSTADDR): Now in i386-dregs.h.
188 (DR_LASTADDR): Likewise.
189 (DR_NADDR): Likewise.
190 (DR_STATUS): Likewise.
191 (DR_CONTROL): Likewise.
192 (i386_debug_reg_state): Likewise.
193 (i386_dr_insert_watchpoint): Likewise.
194 (i386_dr_remove_watchpoint): Likewise.
195 (i386_dr_region_ok_for_watchpoint): Likewise.
196 (i386_dr_stopped_data_address): Likewise.
197 (i386_dr_stopped_by_watchpoint): Likewise.
198 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
200 2014-06-18 Gary Benson <gbenson@redhat.com>
202 * i386-low.h (i386_low_insert_watchpoint): Renamed to
203 i386_dr_insert_watchpoint.
204 (i386_low_remove_watchpoint): Renamed to
205 i386_dr_remove_watchpoint.
206 (i386_low_region_ok_for_watchpoint): Renamed to
207 i386_dr_region_ok_for_watchpoint.
208 (i386_low_stopped_data_address): Renamed to
209 i386_dr_stopped_data_address.
210 (i386_low_stopped_by_watchpoint): Renamed to
211 i386_dr_stopped_by_watchpoint.
212 * i386-low.c (i386_show_dr): Renamed to
213 i386_dr_show and made nonstatic. All uses updated.
214 (i386_length_and_rw_bits): Renamed to
215 i386_dr_length_and_rw_bits and made nonstatic.
217 (i386_insert_aligned_watchpoint): Renamed to
218 i386_dr_insert_aligned_watchpoint and made nonstatic.
220 (i386_remove_aligned_watchpoint): Renamed to
221 i386_dr_remove_aligned_watchpoint and made nonstatic.
223 (i386_update_inferior_debug_regs): Renamed to
224 i386_dr_update_inferior_debug_regs and made nonstatic.
226 (i386_low_insert_watchpoint): Renamed to
227 i386_dr_insert_watchpoint. All uses updated.
228 (i386_low_remove_watchpoint): Renamed to
229 i386_dr_remove_watchpoint. All uses updated.
230 (i386_low_region_ok_for_watchpoint): Renamed to
231 i386_dr_region_ok_for_watchpoint. All uses updated.
232 (i386_low_stopped_data_address): Renamed to
233 i386_dr_stopped_data_address. All uses updated.
234 (i386_low_stopped_by_watchpoint): Renamed to
235 i386_dr_stopped_by_watchpoint. All uses updated.
237 2014-06-18 Gary Benson <gbenson@redhat.com>
239 * i386-low.c (i386_dr_low_can_set_addr): New macro.
240 (i386_dr_low_can_set_control): Likewise.
241 (i386_insert_aligned_watchpoint): New check.
243 2014-06-18 Gary Benson <gbenson@redhat.com>
245 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
248 2014-06-18 Gary Benson <gbenson@redhat.com>
250 * i386-low.c (i386_length_and_rw_bits): Use internal_error
251 instead of fatal and error.
252 (i386_handle_nonaligned_watchpoint): Likewise.
254 2014-06-18 Gary Benson <gbenson@redhat.com>
256 * i386-low.c (i386_get_debug_register_length): New macro.
257 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
258 (i386_show_dr): Use debug_printf instead of fprintf. Use
259 phex to format values.
261 2014-06-18 Gary Benson <gbenson@redhat.com>
263 * i386-low.h: Comment changes.
264 * i386-low.c: Likewise.
266 2014-06-18 Gary Benson <gbenson@redhat.com>
268 * i386-low.c: Whitespace changes.
270 2014-06-12 Tom Tromey <tromey@redhat.com>
272 * utils.c (freeargv): Remove.
274 2014-06-12 Tom Tromey <tromey@redhat.com>
276 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
277 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
278 (parse_debug_format_options): Likewise.
279 (gdbserver_usage): Likewise.
280 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
281 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
282 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
284 ($(LIBGNU)): Depend on libiberty.
285 (all-lib): Recurse into all subdirs.
286 (install-only): Invoke "install" target in subdirs.
287 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
289 * configure: Rebuild.
290 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
291 for vasprintf, vsnprintf, or gettimeofday.
292 * configure.srv: Don't add safe-ctype.o or lbasename.o to
295 2014-06-05 Joel Brobecker <brobecker@adacore.com>
297 * development.sh: Delete.
298 * Makefile.in (config.status): Adjust dependency on development.sh.
299 * configure.ac: Adjust development.sh source call.
300 * configure: Regenerate.
302 2014-06-02 Pedro Alves <palves@redhat.com>
304 * ax.c (gdb_free_agent_expr): New function.
305 * ax.h (gdb_free_agent_expr): New declaration.
306 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
308 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
310 (clear_breakpoint_conditions_and_commands): New function.
311 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
312 (clear_breakpoint_conditions_and_commands): New declaration.
314 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
316 * linux-aarch64-low.c (asm/ptrace.h): Include.
318 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
320 Fix TLS access for -static -pthread.
321 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
322 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
323 (thread_db_load_search, try_thread_db_load_1): Initialize it.
325 2014-05-20 Pedro Alves <palves@redhat.com>
327 * linux-aarch64-low.c (aarch64_insert_point)
328 (aarch64_remove_point): No longer check whether the type is
329 supported here. Adjust to new interface.
330 (the_low_target): Install aarch64_supports_z_point_type as
331 supports_z_point_type method.
332 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
333 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
334 instead of a Z packet char. Adjust.
335 (arm_supports_z_point_type): New function.
336 (arm_insert_point, arm_remove_point): Adjust to new interface.
337 (the_low_target): Install arm_supports_z_point_type.
338 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
339 (cris_insert_point, cris_remove_point): Adjust to new interface.
340 Don't check whether the type is supported here.
341 (the_low_target): Install cris_supports_z_point_type.
342 * linux-low.c (linux_supports_z_point_type): New function.
343 (linux_insert_point, linux_remove_point): Adjust to new interface.
344 * linux-low.h (struct linux_target_ops) <insert_point,
345 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
346 raw_breakpoint pointer parameter.
347 <supports_z_point_type>: New method.
348 * linux-mips-low.c (mips_supports_z_point_type): New function.
349 (mips_insert_point, mips_remove_point): Adjust to new interface.
350 Use mips_supports_z_point_type.
351 (the_low_target): Install mips_supports_z_point_type.
352 * linux-ppc-low.c (the_low_target): Install NULL as
353 supports_z_point_type method.
354 * linux-s390-low.c (the_low_target): Install NULL as
355 supports_z_point_type method.
356 * linux-sparc-low.c (the_low_target): Install NULL as
357 supports_z_point_type method.
358 * linux-x86-low.c (x86_supports_z_point_type): New function.
359 (x86_insert_point): Adjust to new insert_point interface. Use
360 insert_memory_breakpoint. Adjust to new
361 i386_low_insert_watchpoint interface.
362 (x86_remove_point): Adjust to remove_point interface. Use
363 remove_memory_breakpoint. Adjust to new
364 i386_low_remove_watchpoint interface.
365 (the_low_target): Install x86_supports_z_point_type.
366 * lynx-low.c (lynx_target_ops): Install NULL as
367 supports_z_point_type callback.
368 * nto-low.c (nto_supports_z_point_type): New.
369 (nto_insert_point, nto_remove_point): Adjust to new interface.
370 (nto_target_ops): Install nto_supports_z_point_type.
371 * mem-break.c: Adjust intro comment.
372 (struct raw_breakpoint) <raw_type, size>: New fields.
373 <inserted>: Update comment.
374 <shlib_disabled>: Delete field.
375 (enum bkpt_type) <gdb_breakpoint>: Delete value.
376 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
377 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
378 (raw_bkpt_type_to_target_hw_bp_type): New function.
379 (find_enabled_raw_code_breakpoint_at): New function.
380 (find_raw_breakpoint_at): New type and size parameters. Use them.
381 (insert_memory_breakpoint): New function, based off
382 set_raw_breakpoint_at.
383 (remove_memory_breakpoint): New function.
384 (set_raw_breakpoint_at): Reimplement.
385 (set_breakpoint): New, based on set_breakpoint_at.
386 (set_breakpoint_at): Reimplement.
387 (delete_raw_breakpoint): Go through the_target->remove_point
388 instead of assuming memory breakpoints.
389 (find_gdb_breakpoint_at): Delete.
390 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
391 (find_gdb_breakpoint): New function.
392 (set_gdb_breakpoint_at): Delete.
393 (z_type_supported): New function.
394 (set_gdb_breakpoint_1): New function, loosely based off
395 set_gdb_breakpoint_at.
396 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
397 (delete_gdb_breakpoint_at): Delete.
398 (delete_gdb_breakpoint_1): New function, loosely based off
399 delete_gdb_breakpoint_at.
400 (delete_gdb_breakpoint): New function.
401 (clear_gdb_breakpoint_conditions): Rename to ...
402 (clear_breakpoint_conditions): ... this. Don't handle a NULL
404 (add_condition_to_breakpoint): Make static.
405 (add_breakpoint_condition): Take a struct breakpoint pointer
406 instead of an address. Adjust.
407 (gdb_condition_true_at_breakpoint): Rename to ...
408 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
410 (gdb_condition_true_at_breakpoint): Reimplement.
411 (add_breakpoint_commands): Take a struct breakpoint pointer
412 instead of an address. Adjust.
413 (gdb_no_commands_at_breakpoint): Rename to ...
414 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
415 parameter. Return true if no breakpoint was found. Change debug
417 (gdb_no_commands_at_breakpoint): Reimplement.
418 (run_breakpoint_commands): Rename to ...
419 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
420 and change return type to boolean.
421 (run_breakpoint_commands): New function.
422 (gdb_breakpoint_here): Also check for Z1 breakpoints.
423 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
424 breakpoint. Go through the_target->remove_point instead of
425 assuming memory breakpoint.
426 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
427 software and hardware breakpoints.
428 (reinsert_raw_breakpoint): Go through the_target->insert_point
429 instead of assuming memory breakpoint.
430 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
431 software and hardware breakpoints.
432 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
433 Check both software and hardware breakpoints.
434 (validate_inserted_breakpoint): Assert the breakpoint is a
435 software breakpoint. Set the inserted flag to -1 instead of
436 setting shlib_disabled.
437 (delete_disabled_breakpoints): Adjust.
438 (validate_breakpoints): Only validate software breakpoints.
439 Adjust to inserted flag change.
440 (check_mem_read, check_mem_write): Skip breakpoint types other
441 than software breakpoints. Adjust to inserted flag change.
442 * mem-break.h (enum raw_bkpt_type): New enum.
443 (raw_breakpoint, struct process_info): Forward declare.
444 (Z_packet_to_target_hw_bp_type): Delete declaration.
445 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
446 (set_gdb_breakpoint, delete_gdb_breakpoint)
447 (clear_breakpoint_conditions): New declarations.
448 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
449 (breakpoint_inserted_here): Update comment.
450 (add_breakpoint_condition, add_breakpoint_commands): Replace
451 address parameter with a breakpoint pointer parameter.
452 (gdb_breakpoint_here): Update comment.
453 (delete_gdb_breakpoint_at): Delete.
454 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
455 * server.c (process_point_options): Take a struct breakpoint
456 pointer instead of an address. Adjust.
457 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
458 delete_gdb_breakpoint.
459 * spu-low.c (spu_target_ops): Install NULL as
460 supports_z_point_type method.
461 * target.h: Include mem-break.h.
462 (struct target_ops) <prepare_to_access_memory>: Update comment.
463 <supports_z_point_type>: New field.
464 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
465 instead of a char. Also take a raw breakpoint pointer.
466 * win32-arm-low.c (the_low_target): Install NULL as
467 supports_z_point_type.
468 * win32-i386-low.c (i386_supports_z_point_type): New function.
469 (i386_insert_point, i386_remove_point): Adjust to new interface.
470 (the_low_target): Install i386_supports_z_point_type.
471 * win32-low.c (win32_supports_z_point_type): New function.
472 (win32_insert_point, win32_remove_point): Adjust to new interface.
473 (win32_target_ops): Install win32_supports_z_point_type.
474 * win32-low.h (struct win32_target_ops):
475 <supports_z_point_type>: New method.
476 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
477 instead of a char. Also take a raw breakpoint pointer.
479 2014-05-20 Pedro Alves <palves@redhat.com>
481 * mem-break.h: Include break-common.h.
482 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
483 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
484 (Z_packet_to_target_hw_bp_type): New declaration.
485 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
486 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
487 (Z_PACKET_ACCESS_WP): Delete macros.
488 (Z_packet_to_hw_type): Delete function.
489 * i386-low.h: Don't include break-common.h here.
490 (Z_packet_to_hw_type): Delete declaration.
491 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
492 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
493 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
494 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
495 * linux-aarch64-low.c: Don't include break-common.h here.
496 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
497 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
498 (Z_packet_to_target_hw_bp_type): Delete function.
499 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
501 (mips_insert_point, mips_remove_point): Use
502 Z_packet_to_target_hw_bp_type.
504 2014-05-20 Pedro Alves <palves@redhat.com>
506 * linux-aarch64-low.c: Include break-common.h.
507 (enum target_point_type): Delete.
508 (Z_packet_to_point_type): Rename to ...
509 (Z_packet_to_target_hw_bp_type): ... this, and return a
510 target_hw_bp_type instead.
511 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
512 instead of an enum target_point_type.
513 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
515 (aarch64_dr_state_insert_one_point)
516 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
517 (aarch64_handle_aligned_watchpoint)
518 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
519 Take an enum target_hw_bp_type instead of an enum
521 (aarch64_supports_z_point_type): New function.
522 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
523 use Z_packet_to_target_hw_bp_type.
525 2014-05-20 Joel Brobecker <brobecker@adacore.com>
527 * configure.ac: Only use -Werror by default when DEVELOPMENT
529 * configure: Regenerate.
531 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
533 Fix gdbserver qGetTLSAddr for x86_64 -m32.
534 * linux-x86-low.c (X86_64_USER_REGS): New.
535 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
537 2014-04-28 Yao Qi <yao@codesourcery.com>
539 * Makefile.in (i386-avx512.c): Fix the typo of generated file
542 2014-04-25 Pedro Alves <palves@redhat.com>
545 * linux-low.c (linux_attach_fail_reason_string): New function.
546 (linux_attach_lwp): Delete.
547 (linux_attach_lwp_1): Rename to ...
548 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
549 argument. Remove "initial" parameter. Return int instead of
550 void. Don't error or warn here.
551 (linux_attach): Adjust to call linux_attach_lwp. Call error on
552 failure to attach to the tgid. Call warning when failing to
554 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
555 argument. Remove "initial" parameter. Return int instead of
556 void. Don't error or warn here.
557 (linux_attach_fail_reason_string): New declaration.
558 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
559 interface change. Use linux_attach_fail_reason_string.
561 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
562 Walfred Tedeschi <walfred.tedeschi@intel.com>
564 * Makefile.in: Added rules to handle new files
565 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
566 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
567 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
568 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
569 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
570 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
572 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
573 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
574 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
576 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
577 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
578 i386/x32-avx512-linux.xml.
579 * i387-fp.c (num_avx512_k_registers): New constant for number
581 (num_avx512_zmmh_low_registers): New constant for number of
582 lower ZMM registers (0-15).
583 (num_avx512_zmmh_high_registers): New constant for number of
584 higher ZMM registers (16-31).
585 (num_avx512_ymmh_registers): New contant for number of higher
586 YMM registers (ymm16-31 added by avx521 on x86_64).
587 (num_avx512_xmm_registers): New constant for number of higher
588 XMM registers (xmm16-31 added by AVX512 on x86_64).
589 (struct i387_xsave): Add space for AVX512 registers.
590 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
591 Add code to handle AVX512 registers.
592 (i387_xsave_to_cache): Add code to handle AVX512 registers.
593 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
594 prototypei from generated file.
595 (tdesc_amd64_avx512_linux): Likewise.
596 (init_registers_x32_avx512_linux): Likewise.
597 (tdesc_x32_avx512_linux): Likewise.
598 (init_registers_i386_avx512_linux): Likewise.
599 (tdesc_i386_avx512_linux): Likewise.
600 (x86_64_regmap): Add AVX512 registers.
601 (x86_linux_read_description): Add code to handle AVX512 XSTATE
603 (initialize_low_arch): Add code to initialize AVX512 registers.
605 2014-04-23 Pedro Alves <palves@redhat.com>
607 * mem-break.c (find_gdb_breakpoint_at): Make static.
608 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
610 2014-04-23 Pedro Alves <palves@redhat.com>
612 * i386-low.c: Don't include break-common.h here.
613 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
614 prototype to take target_hw_bp_type as argument instead of a Z
616 * i386-low.h: Include break-common.h here.
617 (Z_packet_to_hw_type): Declare.
618 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
620 * linux-x86-low.c (x86_insert_point): Convert the packet number to
621 a target_hw_bp_type before calling i386_low_insert_watchpoint.
622 (x86_remove_point): Convert the packet number to a
623 target_hw_bp_type before calling i386_low_remove_watchpoint.
624 * win32-i386-low.c (i386_insert_point): Convert the packet number
625 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
626 (i386_remove_point): Convert the packet number to a
627 target_hw_bp_type before calling i386_low_remove_watchpoint.
629 2014-04-23 Pedro Alves <palves@redhat.com>
631 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
633 2014-04-10 Pedro Alves <palves@redhat.com>
635 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
636 Check if the condition or command is NULL before checking if the
637 breakpoint is known. On success, return true.
638 * mem-break.h (add_breakpoint_condition): Document return.
639 (add_breakpoint_commands): Add describing comment.
640 * server.c (skip_to_semicolon): New function.
641 (process_point_options): Use it.
643 2014-04-09 Pedro Alves <palves@redhat.com>
645 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
648 2014-02-27 Pedro Alves <palves@redhat.com>
651 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
653 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
655 (last_thread_of_process_p): Take a PID argument instead of a
657 (linux_wait_for_lwp): Delete.
658 (num_lwps, check_zombie_leaders, not_stopped_callback): New
660 (linux_low_filter_event): New function, party factored out from
661 linux_wait_for_event.
662 (linux_wait_for_event): Rename to ...
663 (linux_wait_for_event_filtered): ... this. Add new filter ptid
664 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
665 sigsuspend. Check for zombie leaders.
666 (linux_wait_for_event): Reimplement as wrapper around
667 linux_wait_for_event_filtered.
668 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
669 a normal or signal exit is seen, it's the whole process exiting.
670 (wait_for_sigstop): No longer a for_each_inferior callback.
671 Rewrite on top of linux_wait_for_event_filtered.
672 (stop_all_lwps): Call wait_for_sigstop directly.
673 * server.c (resume, handle_target_event): Handle
674 TARGET_WAITKIND_NO_RESUMED.
676 2014-02-26 Joel Brobecker <brobecker@adacore.com>
678 * win32-low.c (psapi_get_dll_name,
679 * win32_CreateToolhelp32Snapshot): Delete.
680 (win32_CreateToolhelp32Snapshot, win32_Module32First)
681 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
683 (handle_load_dll): Add function description.
684 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
686 2014-02-26 Joel Brobecker <brobecker@adacore.com>
688 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
690 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
691 base address when calling win32_add_one_solib.
692 (handle_load_dll): Delete local variable load_addr.
693 Remove 0x1000 offset applied to DLL base address when calling
695 (handle_unload_dll): Add comment.
697 2014-02-26 Joel Brobecker <brobecker@adacore.com>
699 * win32-low.c (win32_add_all_dlls): Renames
700 win32_ensure_ntdll_loaded. Rewrite function documentation.
701 Adjust implementation to always load all DLLs.
702 Add 0x1000 offset to DLL base address when calling
704 (child_initialization_done): New static global.
705 (do_initial_child_stuff): Set child_initialization_done to
706 zero during child initialization, and 1 after. Replace call
707 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
709 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
710 (handle_unload_dll): Add function documentation.
711 (get_child_debug_event): Ignore load and unload DLL events
712 during child initialization.
714 2014-02-20 Doug Evans <dje@google.com>
716 Remove global all_lwps.
717 * inferiors.h (ptid_of): Move here from linux-low.h.
718 (pid_of, lwpid_of): Ditto.
719 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
720 parameter is a struct thread_info * now.
721 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
722 directly. Pass &all_threads to find_inferior instead of &all_lwps.
723 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
725 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
726 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
727 * linux-arm-low.c (update_registers_callback): Update, "entry"
728 parameter is a struct thread_info * now.
729 Fetch lwpid from current_inferior directly.
730 (arm_insert_point): Pass &all_threads to find_inferior instead of
732 (arm_remove_point): Ditto.
733 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
734 (arm_prepare_to_resume): Fetch pid from thread.
735 (arm_read_description): Fetch lwpid from current_inferior directly.
736 * linux-low.c (all_lwps): Delete.
737 (delete_lwp): Delete call to remove_inferior.
738 (handle_extended_wait): Fetch lwpid from thread.
739 (add_lwp): Don't set lwp->entry.id. Remove call to
740 add_inferior_to_list.
741 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
742 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
743 (kill_one_lwp_callback): Ditto.
744 (linux_kill): Don't dereference NULL pointer.
745 Fetch ptid,lwpid from thread.
746 (get_detach_signal): Fetch ptid from thread.
747 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
748 Simplify call to regcache_invalidate_thread.
749 (delete_lwp_callback): Update, "entry" parameter is a
750 struct thread_info * now. Fetch pid from thread.
751 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
752 (status_pending_p_callback): Update, "entry" parameter is a
753 struct thread_info * now. Fetch ptid from thread.
754 (find_lwp_pid): Update, "entry" parameter is a
755 struct thread_info * now.
756 (linux_wait_for_lwp): Fetch pid from thread.
757 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
758 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
759 (enqueue_one_deferred_signal): Fetch lwpid from thread.
760 (dequeue_one_deferred_signal): Ditto.
761 (cancel_breakpoint): Fetch ptid from current_inferior.
762 (linux_wait_for_event): Pass &all_threads to find_inferior,
763 not &all_lwps. Fetch ptid, lwpid from thread.
764 (count_events_callback): Update, "entry" parameter is a
765 struct thread_info * now.
766 (select_singlestep_lwp_callback): Ditto.
767 (select_event_lwp_callback): Ditto.
768 (cancel_breakpoints_callback): Ditto.
769 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
771 (select_event_lwp): Ditto. Fetch ptid from event_thread.
772 (unsuspend_one_lwp): Update, "entry" parameter is a
773 struct thread_info * now.
774 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
776 (linux_stabilize_threads): Ditto. And for for_each_inferior.
777 Fetch lwpid from thread, not lwp.
778 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
779 Pass &all_threads to find_inferior, not &all_lwps.
780 (send_sigstop): Fetch lwpid from thread, not lwp.
781 (send_sigstop_callback): Update, "entry" parameter is a
782 struct thread_info * now.
783 (suspend_and_send_sigstop_callback): Ditto.
784 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
785 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
786 struct thread_info * now.
787 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
789 (lwp_running): Update, "entry" parameter is a
790 struct thread_info * now.
791 (stop_all_lwps): Fetch ptid from thread.
792 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
793 (linux_resume_one_lwp): Fetch lwpid from thread.
794 (linux_set_resume_request): Update, "entry" parameter is a
795 struct thread_info * now. Fetch pid, lwpid from thread.
796 (resume_status_pending_p): Update, "entry" parameter is a
797 struct thread_info * now.
798 (need_step_over_p): Ditto. Fetch lwpid from thread.
799 (start_step_over): Fetch lwpid from thread.
800 (linux_resume_one_thread): Update, "entry" parameter is a
801 struct thread_info * now. Fetch lwpid from thread.
802 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
803 (proceed_one_lwp): Update, "entry" parameter is a
804 struct thread_info * now. Fetch lwpid from thread.
805 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
806 struct thread_info * now.
807 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
808 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
809 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
811 (regsets_store_inferior_registers): Ditto.
812 (fetch_register, store_register): Ditto.
813 (linux_read_memory, linux_write_memory): Ditto.
814 (linux_request_interrupt): Ditto.
815 (linux_read_auxv): Ditto.
816 (linux_xfer_siginfo): Ditto.
817 (linux_qxfer_spu): Ditto.
818 (linux_qxfer_libraries_svr4): Ditto.
819 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
820 moved to inferiors.h.
822 (get_thread_lwp): Update.
823 (struct lwp_info): Delete member "entry". Simplify comment for
826 * linux-mips-low.c (mips_read_description): Fetch lwpid from
827 current_inferior directly.
828 (update_watch_registers_callback): Update, "entry" parameter is a
829 struct thread_info * now. Fetch pid from thread.
830 (mips_linux_prepare_to_resume): Fetch ptid from thread.
831 (mips_insert_point): Fetch lwpid from current_inferior.
832 Pass &all_threads to find_inferior, not &all_lwps.
833 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
834 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
836 (mips_stopped_data_address): Ditto.
837 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
839 * linux-tile-low.c (tile_arch_setup): Ditto.
840 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
841 (update_debug_registers_callback): Update, "entry" parameter is a
842 struct thread_info * now. Fetch pid from thread.
843 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
844 Pass &all_threads to find_inferior, not &all_lwps.
845 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
846 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
847 Pass &all_threads to find_inferior, not &all_lwps.
848 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
849 (i386_dr_low_get_status): Ditto.
850 (x86_linux_prepare_to_resume): Fetch ptid from thread.
851 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
852 (x86_linux_read_description): Ditto.
853 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
855 2014-02-20 Doug Evans <dje@google.com>
857 * inferiors.c (get_first_inferior): Fix buglet.
859 2014-02-19 Doug Evans <dje@google.com>
861 * gdbthread.h (add_thread): Change result type to struct thread_info *.
862 * inferiors.c (add_thread): Change result type to struct thread_info *.
864 (add_lwp): Call add_thread here instead of in callers.
866 * linux-low.h (get_lwp_thread): Rewrite.
867 (struct lwp_info): New member "thread".
869 2014-02-19 Doug Evans <dje@google.com>
871 * linux-low.c (add_lwp): Change result to struct lwp_info *.
874 2014-02-19 Doug Evans <dje@google.com>
876 * inferiors.c (add_thread): Fix whitespace.
878 2014-02-19 Doug Evans <dje@google.com>
880 * dll.c (clear_dlls): Replace accessing list implemention details
882 * gdbthread.h (get_first_thread): Declare.
883 * inferiors.c (for_each_inferior_with_data): New function.
884 (get_first_thread): New function.
885 (find_thread_ptid): Simplify.
886 (get_first_inferior): New function.
887 (clear_list): Delete.
888 (one_inferior_p): New function.
889 (clear_inferior_list): New function.
890 (clear_inferiors): Update.
891 * inferiors.h (for_each_inferior_with_data): Declare.
892 (clear_inferior_list): Declare.
893 (one_inferior_p): Declare.
894 (get_first_inferior): Declare.
895 * linux-low.c (linux_wait_for_event): Replace accessing list
896 implemention details with API function.
897 * server.c (target_running): Ditto.
898 (accumulate_file_name_length): New function.
899 (emit_dll_description): New function.
900 (handle_qxfer_libraries): Replace accessing list implemention
901 details with API function.
902 (handle_qxfer_threads_worker): New function.
903 (handle_qxfer_threads_proper): Replace accessing list implemention
904 details with API function.
905 (handle_query): Ditto.
906 (visit_actioned_threads_callback_ftype): New typedef.
907 (visit_actioned_threads_data): New struct.
908 (visit_actioned_threads): Rewrite to be find_inferior callback.
909 (resume): Call find_inferior.
910 (handle_status): Replace accessing list implemention
911 details with API function.
912 (process_serial_event): Replace accessing list implemention details
914 * target.c (set_desired_inferior): Replace accessing list implemention
915 details with API function.
916 * tracepoint.c (same_process_p): New function.
917 (gdb_agent_about_to_close): Replace accessing list implemention
918 details with API function.
919 * win32-low.c (child_delete_thread): Replace accessing list
920 implemention details with API function.
921 (match_dll_by_basename): New function.
922 (dll_is_loaded_by_basename): New function.
923 (win32_ensure_ntdll_loaded): Replace accessing list implemention
924 details call to dll_is_loaded_by_basename.
926 2014-02-19 Doug Evans <dje@google.com>
928 * dll.h (struct dll_info): Add comment.
929 * gdbthread.h (struct thread_info): Add comment.
930 (current_ptid): Simplify.
931 * inferiors.c (add_process): Update.
932 (remove_process): Update.
933 * inferiors.h (struct process_info): Rename member "head" to "entry".
934 * linux-low.c (delete_lwp): Update.
936 (last_thread_of_process_p): Update.
937 (kill_one_lwp_callback, linux_kill): Update.
938 (status_pending_p_callback): Update.
939 (wait_for_sigstop): Update. Simplify read of ptid.
940 (start_step_over): Update.
941 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
942 (get_lwp_thread): Update.
943 (struct lwp_info): Rename member "head" to "entry".
944 * regcache.h (inferior_list_entry): Delete.
945 * server.c (kill_inferior_callback): Update.
946 (detach_or_kill_inferior_callback): Update.
947 (print_started_pid): Update.
948 (print_attached_pid): Update.
949 (process_serial_event): Simplify read of ptid.
950 * thread-db.c (thread_db_create_event): Update.
951 (thread_db_get_tls_address): Update.
952 * win32-low.c (current_inferior_ptid): Simplify.
954 2014-02-19 Tom Tromey <tromey@redhat.com>
956 * target.h (struct target_ops) <supports_btrace>: Add target_ops
958 (target_supports_btrace): Update.
960 2014-02-14 Yao Qi <yao@codesourcery.com>
962 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
963 (rsp-low-ipa.o): New target.
965 2014-02-12 Tom Tromey <tromey@redhat.com>
967 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
968 convert_ascii_to_int.
969 * regcache.c (registers_to_string): Likewise.
970 * remote-utils.c (decode_M_packet): Likewise.
971 * server.c (process_serial_event): Likewise.
973 2014-02-12 Tom Tromey <tromey@redhat.com>
975 * server.c (handle_query, handle_v_run): Use hex2bin, not
977 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
979 2014-02-12 Tom Tromey <tromey@redhat.com>
981 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
982 convert_int_to_ascii.
983 * regcache.c (registers_to_string, collect_register_as_string):
985 * remote-utils.c (look_up_one_symbol, relocate_instruction):
987 * server.c (process_serial_event): Likewise.
988 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
989 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
991 2014-02-12 Tom Tromey <tromey@redhat.com>
993 * remote-utils.c (look_up_one_symbol, monitor_output): Use
995 * tracepoint.c (cmd_qtstatus): Likewise.
997 2014-02-12 Tom Tromey <tromey@redhat.com>
999 * remote-utils.c (monitor_output): Pass explicit length to
1002 2014-02-12 Tom Tromey <tromey@redhat.com>
1004 * tracepoint.c: Include rsp-low.h.
1005 * server.c: Include rsp-low.h.
1006 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1007 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1009 * remote-utils.c: Include rsp-low.h.
1010 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1011 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1012 (convert_int_to_ascii, convert_ascii_to_int): Move to
1014 * regcache.c: Include rsp-low.h.
1015 * ax.c: Include rsp-low.h.
1016 * Makefile.in (SFILES): Add common/rsp-low.c.
1017 (OBS): Add rsp-low.o.
1018 (rsp-low.o): New target.
1020 2014-02-12 Tom Tromey <tromey@redhat.com>
1022 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1023 Include print-utils.h.
1024 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1025 (plongest, thirty_two, phex_nz): Remove.
1026 * Makefile.in (SFILES): Add common/print-utils.c.
1027 (OBS): Add print-utils.o.
1028 (print-utils-ipa.o): New target.
1029 (print-utils.o): New target.
1030 (IPA_OBJS): Add print-utils-ipa.o.
1032 2014-02-06 Tom Tromey <tromey@redhat.com>
1034 * Makefile.in (SFILES): Fix indentation.
1036 2014-02-05 Doug Evans <dje@google.com>
1038 * linux-low.c (linux_wait_for_event): Improve comment.
1039 (linux_wait_1): Keep current_inferior in sync with event_child.
1041 2014-01-22 Doug Evans <dje@google.com>
1043 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1045 2014-01-22 Doug Evans <dje@google.com>
1047 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1048 * configure: Regenerate.
1049 * config.in: Regenerate.
1050 * Makefile.in (SFILES): Add debug.c.
1052 * debug.c: New file.
1053 * debug.h: New file.
1054 * linux-aarch64-low.c (*): Update all debugging printfs to use
1055 debug_printf instead of fprintf.
1056 * linux-arm-low.c (*): Ditto.
1057 * linux-cris-low.c (*): Ditto.
1058 * linux-crisv32-low.c (*): Ditto.
1059 * linux-m32r-low.c (*): Ditto.
1060 * linux-sparc-low.c (*): Ditto.
1061 * linux-x86.c (*): Ditto.
1062 * linux-low.c (*): Ditto.
1063 (linux_wait_1): Add calls to debug_enter, debug_exit.
1064 (linux_wait): Remove redundant debugging printf.
1065 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1066 (linux_resume, unstop_all_lwps): Ditto.
1067 * mem-break.c (*): Update all debugging printfs to use
1068 debug_printf instead of fprintf.
1069 * remote-utils.c (*): Ditto.
1070 * thread-db.c (*): Ditto.
1071 * server.c #include <ctype.h>, "gdb_vecs.h".
1072 (debug_threads): Moved to debug.c.
1073 (*): Update all debugging printfs to use debug_printf instead of
1075 (start_inferior): Replace call to fflush with call to debug_flush.
1076 (monitor_show_help): Mention set debug-format.
1077 (parse_debug_format_options): New function.
1078 (handle_monitor_command): Handle "monitor set debug-format".
1079 (gdbserver_usage): Mention --debug-format.
1080 (main): Parse --debug-format.
1081 * server.h (debug_threads): Declaration moved to debug.h.
1083 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1084 trace_debug_1 that uses debug_printf.
1085 (tracepoint_look_up_symbols): Update all debugging printfs to use
1086 debug_printf instead of fprintf.
1088 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1090 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1093 2014-01-17 Pedro Alves <palves@redhat.com>
1096 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1097 defined after including gdb_proc_service.h.
1099 2014-01-16 Doug Evans <dje@google.com>
1101 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1102 (match_dll): Use it.
1104 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1106 * target.h (target_ops) <read_btrace>: Change parameters and
1107 return type to allow error reporting.
1108 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1109 trace reading errors on.
1110 * linux-low.c (linux_low_read_btrace): Pass trace reading
1112 (linux_low_disable_btrace): New.
1114 2014-01-15 Doug Evans <dje@google.com>
1116 * inferiors.c (thread_id_to_gdb_id): Delete.
1117 * inferiors.h (thread_id_to_gdb_id): Delete.
1119 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1121 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1122 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1125 2014-01-08 Pedro Alves <palves@redhat.com>
1127 * server.c (handle_status): Don't discard previous queued stop
1128 replies or thread's pending status here.
1129 (main) <disconnection>: Do it here instead.
1131 2014-01-08 Pedro Alves <palves@redhat.com>
1133 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1134 * server.c (visit_actioned_threads, handle_pending_status): New
1136 (handle_v_cont): Factor out parts to ...
1137 (resume): ... this new function. If in all-stop, and a thread
1138 being resumed has a pending status, report it without actually
1140 (myresume): Adjust to use the new 'resume' function.
1141 (clear_pending_status_callback, set_pending_status_callback)
1142 (find_status_pending_thread_callback): New functions.
1143 (handle_status): Handle the case of multiple threads having
1144 interesting statuses to report. Report threads' real last signal
1145 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1146 with an interesting thread to report the status for, instead of
1147 always reporting the status of the first thread.
1149 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1151 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1152 * gdbreplay.c (gdbreplay_version): Likewise.
1154 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1156 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1157 iov.iov_len with the real length in use.
1159 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1161 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1162 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1163 for all targets that use win32-low.c.
1164 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1165 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1167 2013-12-13 Pedro Alves <palves@redhat.com>
1169 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1170 if equal to TARGET_WAITKIND_LOADED.
1171 * win32-low.c (cached_status): New static global.
1172 (win32_wait): Add declaration.
1173 (do_initial_child_stuff): Flush all initial pending debug events
1174 up to the initial breakpoint.
1175 (win32_wait): If CACHED_STATUS was set, return that instead
1176 of doing a real wait. Remove the code resuming the execution
1177 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1178 during the initial phase. Also remove the code changing
1179 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1180 TARGET_WAITKIND_STOPPED.
1182 2013-12-11 Yao Qi <yao@codesourcery.com>
1184 * notif.c (handle_notif_ack): Return 0 if no notification
1187 2013-11-20 Doug Evans <dje@google.com>
1189 * linux-low.c (linux_set_resume_request): Fix comment.
1191 2013-11-20 Doug Evans <dje@google.com>
1193 * linux-low.c (resume_status_pending_p): Tweak comment.
1195 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1197 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1198 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1199 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1200 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1201 (srv_amd64_regobj): Add amd64-mpx.o.
1202 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1203 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1204 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1205 * i387-fp.c (num_pl_bnd_register) Added constant.
1206 (num_pl_bnd_cfg_registers) Added constant.
1207 (struct i387_xsave) Added reserved area and MPX fields.
1208 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1209 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1211 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1212 (init_registers_amd64_mpx_linux): Declare new function.
1213 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1214 (x86_64_regmap): Add MPX registers.
1215 (x86_linux_read_description): Add MPX case.
1216 (initialize_low_arch): Initialize MPX targets.
1218 2013-11-18 Tom Tromey <tromey@redhat.com>
1220 * configure: Rebuild.
1221 * configure.ac: Don't check for stdlib.h.
1222 * gdbreplay.c: Unconditionally include stdlib.h.
1224 2013-11-18 Tom Tromey <tromey@redhat.com>
1226 * config.in: Rebuild.
1227 * configure: Rebuild.
1228 * configure.ac: Don't use AC_HEADER_DIRENT.
1230 2013-11-18 Tom Tromey <tromey@redhat.com>
1232 * server.h: Don't check HAVE_STRING_H.
1233 * gdbreplay.c: Don't check HAVE_STRING_H.
1234 * configure: Rebuild.
1236 2013-11-18 Tom Tromey <tromey@redhat.com>
1238 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1241 2013-11-08 Tom Tromey <tromey@redhat.com>
1243 * configure, config.in: Rebuild.
1244 * configure.ac: Remove unused configury.
1246 2013-11-08 Tom Tromey <tromey@redhat.com>
1248 * acinclude.m4: Include common.m4, codeset.m4.
1249 * configure, config.in: Rebuild.
1250 * configure.ac: Use GDB_AC_COMMON.
1252 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1254 * linux-s390-low.c (HWCAP_S390_TE): New define.
1255 (s390_arch_setup): Consider the TE field in the HWCAP for
1256 determining 'have_regset_tdb'.
1258 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1261 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1264 2013-10-02 Pedro Alves <palves@redhat.com>
1266 * server.c (process_serial_event): Don't output "GDBserver
1267 exiting" if GDB is connected through stdio.
1268 * target.c (mywait): Likewise, be silent if GDB is connected
1271 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1273 * lynx-low.c (lynx_add_threads_after_attach): New function.
1274 (lynx_attach): Remove call to add_thread. Add call to
1275 lynx_add_threads_after_attach instead.
1277 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1279 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1280 * config.in, configure: Regenerated.
1282 2013-09-18 Yao Qi <yao@codesourcery.com>
1285 * server.c (start_inferior): Clear 'resume_info'.
1287 2013-09-16 Jiong Wang <jiwang@tilera.com>
1289 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1292 2013-09-16 Jiong Wang <jiwang@tilera.com>
1294 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1295 linux-tile-low.o to srv_tgtobj.
1297 2013-09-16 Will Newton <will.newton@linaro.org>
1299 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1302 2013-09-06 Pedro Alves <palves@redhat.com>
1304 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1305 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1306 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1307 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1308 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1309 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1311 2013-09-06 Pedro Alves <palves@redhat.com>
1313 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1314 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1316 2013-09-06 Pedro Alves <palves@redhat.com>
1318 * linux-amd64-ipa.c: Include tracepoint.h.
1319 * linux-i386-ipa.c: Include tracepoint.h.
1321 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1323 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1324 (ps_get_thread_area): New function.
1326 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1328 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1329 (initialize_low_arch): Call init_registers_crisv32 rather than
1330 init_register_crisv32.
1332 2013-09-05 Pedro Alves <palves@redhat.com>
1334 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1336 * hostio.h: ... this new file.
1337 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1338 win32-low.c: Include hostio.h.
1340 2013-09-05 Pedro Alves <palves@redhat.com>
1342 * server.h (gdb_client_data, handler_func, callback_handler_func)
1343 (delete_file_handler, add_file_handler, append_callback_event)
1344 (delete_callback_event, start_event_loop, initialize_event_loop):
1345 Move to event-loop.h and include it.
1346 * event-loop.h: New file.
1348 2013-09-05 Pedro Alves <palves@redhat.com>
1350 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1351 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1352 (loaded_dll, unloaded_dll): Move to ...
1353 * dll.h: ... this new file.
1354 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1356 2013-09-05 Pedro Alves <palves@redhat.com>
1358 * server.h (current_process, get_thread_process, all_processes)
1359 (add_inferior_to_list, for_each_inferior, current_inferior)
1360 (remove_inferior, add_process, remove_process, find_process_pid)
1361 (have_started_inferiors_p, have_attached_inferiors_p)
1362 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1363 (clear_inferiors, find_inferior, find_inferior_id)
1364 (inferior_target_data, set_inferior_target_data)
1365 (inferior_regcache_data, set_inferior_regcache_data): Move to
1366 inferiors.h, and include it.
1367 * inferiors.h: New file.
1369 2013-09-05 Pedro Alves <palves@redhat.com>
1371 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1375 2013-09-05 Pedro Alves <palves@redhat.com>
1377 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1379 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1380 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1381 (handle_tracepoint_general_set, handle_tracepoint_query)
1382 (tracepoint_finished_step, tracepoint_was_hit)
1383 (release_while_stepping_state_list, current_traceframe)
1384 (in_readonly_region, traceframe_read_mem)
1385 (fetch_traceframe_registers, traceframe_read_sdata)
1386 (traceframe_read_info, struct fast_tpoint_collect_status)
1387 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1388 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1389 (supply_fast_tracepoint_registers)
1390 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1391 (ipa_tdesc, claim_trampoline_space)
1392 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1393 (agent_mem_read, agent_get_trace_state_variable_value)
1394 (agent_set_trace_state_variable_value, agent_tsv_read)
1395 (agent_mem_read_string, get_raw_reg_func_addr)
1396 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1397 * tracepoint.h: ... this new file.
1399 2013-09-05 Pedro Alves <palves@redhat.com>
1401 * server.h (perror_with_name, error, fatal, warning, paddress)
1402 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1404 * utils.h: New file.
1406 2013-09-05 Pedro Alves <palves@redhat.com>
1408 * server.h (remote_debug, noack_mode, transport_is_reliable)
1409 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1410 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1411 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1412 (write_enn, initialize_async_io, enable_async_io)
1413 (disable_async_io, check_remote_input_interrupt_request)
1414 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1415 (dead_thread_notify, prepare_resume_reply)
1416 (decode_address_to_semicolon, decode_address, decode_m_packet)
1417 (decode_M_packet, decode_X_packet, decode_xfer_write)
1418 (decode_search_memory_packet, unhexify, hexify)
1419 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1420 (look_up_one_symbol, relocate_instruction)
1421 (monitor_output): Move to remote-utils.h, and include it.
1422 * remote-utils.h: New file.
1424 2013-09-05 Pedro Alves <palves@redhat.com>
1426 * server.h (_): Delete.
1428 2013-09-02 Pedro Alves <palves@redhat.com>
1430 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1431 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1433 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1435 2013-09-02 Pierre Muller <muller@sourceware.org>
1437 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1438 or WriteProcessMemory complete successfully and handle
1439 ERROR_PARTIAL_COPY error.
1441 2013-09-02 Pedro Alves <palves@redhat.com>
1443 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1444 error instead of EIO.
1446 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1449 * linux-low.c: Include filestuff.h.
1450 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1451 * lynx-low.c: Include filestuff.h.
1452 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1453 * server.c: Include filestuff.h.
1454 (main): Call notice_open_fds.
1455 * spu-low.c: Include filestuff.h.
1456 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1458 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1460 * Makefile.in: Explain why ../target and ../nat are not
1461 listed as include file search paths.
1462 (linux-waitpid.o): New object file rule.
1463 * configure.srv (srv_native_linux_obj): New variable.
1464 Replace all occurrences of linux native object files with
1465 $srv_native_linux_obj.
1466 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1467 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1468 (linux_enable_event_reporting): Remove declaration.
1469 (my_waitpid): Moved to common/linux-waitpid.c.
1470 (linux_wait_for_event): Pass ptid when calling
1471 linux_enable_event_reporting.
1472 (linux_supports_tracefork_flag): Remove.
1473 (linux_enable_event_reporting): Likewise.
1474 (linux_tracefork_grandchild): Remove.
1475 (STACK_SIZE): Moved to common/linux-ptrace.c.
1476 (linux_tracefork_child): Remove.
1477 (linux_test_for_tracefork): Remove.
1478 (linux_look_up_symbols): Call linux_supports_traceclone.
1479 (initialize_low): Remove call to linux_test_for_tracefork.
1480 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1481 common/linux-ptrace.h.
1482 (PTRACE_TYPE_ARG4): Likewise.
1483 Include linux-ptrace.h.
1485 2013-08-21 Pedro Alves <palves@redhat.com>
1487 * config.in: Renegerate.
1489 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1491 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1492 (SFILES): Remove $(srcdir)/common/target-common.c and
1493 add $(srcdir)/target/waitstatus.c.
1494 (OBS): Remove target-common.o and add waitstatus.o.
1495 (server_h): Remove $(srcdir)/../common/target-common.h and
1496 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1497 and $(srcdir)/../target/waitstatus.h.
1498 (target-common.o): Remove.
1499 (waitstatus.o): New target object file.
1500 * target.h: Do not include target-common.h and
1501 include target/resume.h, target/wait.h and
1502 target/waitstatus.h.
1504 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1506 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1507 to PTRACE_TYPE_ARG3.
1508 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1509 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1511 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1512 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1514 2013-07-27 Jie Zhang <jie@codesourcery.com>
1515 Daniel Jacobowitz <dan@codesourcery.com>
1516 Yao Qi <yao@codesourcery.com>
1518 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1519 (mips-linux-watch.o): New rule.
1520 (mips_linux_watch_h): New variable.
1521 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1523 * linux-mips-low.c: Include mips-linux-watch.h.
1524 (struct arch_process_info, struct arch_lwp_info): New.
1525 (update_watch_registers_callback): New function.
1526 (mips_linux_new_process, mips_linux_new_thread) New functions.
1527 (mips_linux_prepare_to_resume, mips_insert_point): New
1529 (mips_remove_point, mips_stopped_by_watchpoint): New
1531 (rsp_bp_type_to_target_hw_bp_type): New function.
1532 (mips_stopped_data_address): New function.
1533 (the_low_target): Add watchpoint support functions.
1535 2013-07-27 Yao Qi <yao@codesourcery.com>
1537 * i386-low.c: Include break-common.h.
1538 (enum target_hw_bp_type): Remove.
1540 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1542 * Makefile.in (SFILES): /common/target-common.c.
1543 (OBS): Add target-common.o.
1544 (server_h): Add $(srcdir)/../common/target-common.h.
1545 (target-common.o): New target.
1546 * server.c (queue_stop_reply_callback): Free
1547 status string after use.
1548 * target.c (target_waitstatus_to_string): Remove.
1549 * target.h: Include target-common.h.
1550 (resume_kind): Likewise.
1551 (target_waitkind): Likewise.
1552 (target_waitstatus): Likewise.
1553 (TARGET_WNOHANG): Likewise.
1555 2013-07-04 Yao Qi <yao@codesourcery.com>
1557 * Makefile.in (host_alias): Use @host_noncanonical@.
1558 (target_alias): Use @target_noncanonical@.
1559 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1560 ACX_NONCANONICAL_HOST.
1561 * configure: Regenerated.
1564 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1566 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1567 * configure: Rebuild.
1568 * Makefile.in (version_host, version_target): Get from configure.
1569 (version.c): Use $(version_host) and $(version_target).
1571 2013-07-03 Pedro Alves <palves@redhat.com>
1573 * Makefile.in (config.status): Depend on development.sh.
1574 * acinclude.m4: Include libmcheck.m4.
1575 * configure: Regenerate.
1577 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1579 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1580 attribute inside the parentheses.
1581 (winapi_DebugSetProcessKillOnExit): Ditto.
1582 (winapi_DebugBreakProcess): Ditto.
1583 (winapi_GenerateConsoleCtrlEvent): Ditto.
1585 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1587 * notif.h (notif_event): Add a dummy member to avoid compiler
1590 2013-07-01 Pedro Alves <palves@redhat.com>
1592 * hostio.c (HOSTIO_PATH_MAX): Define.
1593 (require_filename, handle_open, handle_unlink, handle_readlink):
1596 2013-07-01 Pedro Alves <palves@redhat.com>
1598 * server.h: Include "pathmax.h".
1599 * linux-low.c: Don't include sys/param.h.
1600 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1602 * win32-low.c: Don't include sys/param.h.
1603 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1605 2013-07-01 Pedro Alves <palves@redhat.com>
1607 * event-loop.c: Don't check HAVE_UNISTD_H before including
1609 * gdbreplay.c: Likewise.
1610 * remote-utils.c: Likewise.
1611 * server.c: Likewise.
1612 * configure.ac: Don't check for unistd.h.
1613 * configure: Regenerate.
1615 2013-06-28 Tom Tromey <tromey@redhat.com>
1617 * Makefile.in (version.c): Use version.in, not
1620 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1622 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1623 * configure: Rebuild.
1624 * Makefile.in (version_host, version_target): Get from configure.
1625 (version.c): Use $(version_host) and $(version_target).
1627 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1629 Fix trace-status to output user name without trailing colon.
1630 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1632 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1634 Fix trace-status to output proper start-time and stop-time.
1635 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1636 output start time and stop time in hex as gdb expects.
1638 2013-06-26 Pedro Alves <pedro@codesourcery.com>
1640 * tracepoint.c (build_traceframe_info_xml): Output trace state
1641 variables present in the trace buffer.
1643 2013-06-24 Tom Tromey <tromey@redhat.com>
1645 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1647 (version.o): Remove.
1648 * gdbreplay.c: Include version.h.
1649 (version, host_name): Don't declare.
1650 * server.h: Include version.h.
1651 (version, host_name): Don't declare.
1653 2013-06-12 Pedro Alves <palves@redhat.com>
1655 * linux-x86-low.c (linux_is_elf64): Delete global.
1656 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1657 with local linux_pid_exe_is_elf_64_file use.
1659 2013-06-11 Pedro Alves <palves@redhat.com>
1661 * linux-low.c (regset_disabled, disable_regset): New functions.
1662 (regsets_fetch_inferior_registers)
1663 (regsets_store_inferior_registers): Use them.
1664 (initialize_regsets_info); Don't allocate the disabled_regsets
1666 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1669 2013-06-11 Pedro Alves <palves@redhat.com>
1671 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1674 2013-06-11 Pedro Alves <palves@redhat.com>
1676 * linux-x86-low.c (initialize_low_arch): Call
1677 init_registers_x32_avx_linux.
1679 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1681 Fix compatibility with Android Bionic.
1682 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1685 2013-06-07 Pedro Alves <palves@redhat.com>
1688 * Makefile.in (OBS): Add tdesc.o.
1689 (IPA_OBJS): Add tdesc-ipa.o.
1690 (tdesc-ipa.o): New rule.
1691 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1693 * linux-low.c (new_inferior): Delete.
1694 (disabled_regsets, num_regsets): Delete.
1695 (linux_add_process): Adjust to set the new per-process
1697 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1698 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1699 was a stop. When calling arch_setup, switch the current inferior
1700 to the thread that got an event.
1701 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1702 (regsets_fetch_inferior_registers)
1703 (regsets_store_inferior_registers): New regsets_info parameter.
1705 (linux_register_in_regsets): New regs_info parameter. Adjust to
1707 (register_addr, fetch_register, store_register): New usrregs_info
1708 parameter. Adjust to use it.
1709 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1710 parameter regs_info. Adjust to use it.
1711 (linux_fetch_registers): Get the current inferior's regs_info, and
1713 (linux_store_registers): Ditto.
1714 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1715 (initialize_low): Don't initialize the target_regsets here. Call
1716 initialize_low_arch.
1717 * linux-low.h (target_regsets): Delete declaration.
1718 (struct regsets_info): New.
1719 (struct usrregs_info): New.
1720 (struct regs_info): New.
1721 (struct process_info_private) <new_inferior>: New field.
1722 (struct linux_target_ops): Delete the num_regs, regmap, and
1723 regset_bitmap fields. New field regs_info.
1724 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1725 * i387-fp.c (num_xmm_registers): Delete.
1726 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1727 calls to new interface.
1728 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1729 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1730 Infer the number of xmm registers from the regcache's target
1732 * i387-fp.h (num_xmm_registers): Delete.
1733 * inferiors.c (add_thread): Don't install the thread's regcache
1735 * proc-service.c (gregset_info): Fetch the current inferior's
1736 regs_info. Adjust to use it.
1737 * regcache.c: Include tdesc.h.
1738 (register_bytes, reg_defs, num_registers)
1739 (gdbserver_expedite_regs): Delete.
1740 (get_thread_regcache): If the thread doesn't have a regcache yet,
1741 create one, instead of aborting gdbserver.
1742 (regcache_invalidate_one): Rename to ...
1743 (regcache_invalidate_thread): ... this.
1744 (regcache_invalidate_one): New.
1745 (regcache_invalidate): Only invalidate registers of the current
1747 (init_register_cache): Add target_desc parameter, and use it.
1748 (new_register_cache): Ditto. Assert the target description has a
1749 non zero registers_size.
1750 (regcache_cpy): Add assertions. Adjust.
1751 (realloc_register_cache, set_register_cache): Delete.
1752 (registers_to_string, registers_from_string): Adjust.
1753 (find_register_by_name, find_regno, find_register_by_number)
1754 (register_cache_size): Add target_desc parameter, and use it.
1755 (free_register_cache_thread, free_register_cache_thread_one)
1756 (regcache_release, register_cache_size): New.
1757 (register_size): Add target_desc parameter, and use it.
1758 (register_data, supply_register, supply_register_zeroed)
1759 (supply_regblock, supply_register_by_name, collect_register)
1760 (collect_register_as_string, collect_register_by_name): Adjust.
1761 * regcache.h (struct target_desc): Forward declare.
1762 (struct regcache) <tdesc>: New field.
1763 (init_register_cache, new_register_cache): Add target_desc
1765 (regcache_invalidate_thread): Declare.
1766 (regcache_invalidate_one): Delete declaration.
1767 (regcache_release): Declare.
1768 (find_register_by_number, register_cache_size, register_size)
1769 (find_regno): Add target_desc parameter.
1770 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1772 * remote-utils.c: Include tdesc.h.
1773 (outreg, prepare_resume_reply): Adjust.
1774 * server.c: Include tdesc.h.
1775 (gdbserver_xmltarget): Delete declaration.
1776 (get_features_xml, process_serial_event): Adjust.
1777 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1779 (struct process_info) <tdesc>: New field.
1780 (ipa_tdesc): Declare.
1781 * tdesc.c: New file.
1782 * tdesc.h: New file.
1783 * tracepoint.c: Include tdesc.h.
1784 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1785 (get_context_regcache): Adjust to pass ipa_tdesc down.
1786 (do_action_at_tracepoint): Adjust to get the register cache size
1787 from the context regcache's description.
1788 (traceframe_walk_blocks): Adjust to get the register cache size
1789 from the current trace frame's description.
1790 (traceframe_get_pc): Adjust to get current trace frame's
1791 description and pass it down.
1792 (gdb_collect): Adjust to get the register cache size from the
1794 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1795 (gdbserver_xmltarget): Delete.
1796 (initialize_low_tracepoint): Set the ipa's target description.
1797 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1798 (initialize_low_tracepoint): Set the ipa's target description.
1799 * linux-x86-low.c: Include tdesc.h.
1800 [__x86_64__] (is_64bit_tdesc): New.
1801 (ps_get_thread_area, x86_get_thread_area): Use it.
1802 (i386_cannot_store_register): Rename to ...
1803 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1804 (i386_cannot_fetch_register): Rename to ...
1805 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1806 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1808 (target_regsets): Rename to ...
1809 (x86_regsets): ... this.
1810 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1812 (x86_siginfo_fixup): Use is_64bit_tdesc.
1813 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1814 (tdesc_x32_avx_linux, tdesc_x32_linux)
1815 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1817 (x86_linux_update_xmltarget): Delete.
1818 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1819 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1820 (AMD64_LINUX_USER64_CS): New.
1821 (x86_linux_read_description): New, based on
1822 x86_linux_update_xmltarget.
1823 (same_process_callback): New.
1824 (x86_arch_setup_process_callback): New.
1825 (x86_linux_update_xmltarget): New.
1826 (x86_regsets_info): New.
1827 (amd64_linux_regs_info): New.
1828 (i386_linux_usrregs_info): New.
1829 (i386_linux_regs_info): New.
1830 (x86_linux_regs_info): New.
1831 (x86_arch_setup): Reimplement.
1832 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1833 (x86_emit_ops): Ditto.
1834 (the_low_target): Adjust. Install x86_linux_regs_info,
1835 x86_cannot_fetch_register, and x86_cannot_store_register.
1836 (initialize_low_arch): New.
1837 * linux-ia64-low.c (tdesc_ia64): Declare.
1838 (ia64_fetch_register): Adjust.
1839 (ia64_usrregs_info, regs_info): New globals.
1840 (ia64_regs_info): New function.
1841 (the_low_target): Adjust.
1842 (initialize_low_arch): New function.
1843 * linux-sparc-low.c (tdesc_sparc64): Declare.
1844 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1846 (sparc_arch_setup): New function.
1847 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1848 (the_low_target): Adjust.
1849 (initialize_low_arch): New function.
1850 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1851 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1852 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1853 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1854 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1855 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1856 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1857 (tdesc_powerpc_isa205_vsx64l): Declare.
1858 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1859 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1860 (ppc_set_pc, ppc_get_hwcap): Adjust.
1861 (ppc_usrregs_info): Forward declare.
1862 (!__powerpc64__) ppc_regmap_adjusted: New global.
1863 (ppc_arch_setup): Adjust to the current process'es target
1865 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1866 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1867 (ppc_store_evrregset): Adjust.
1868 (target_regsets): Rename to ...
1869 (ppc_regsets): ... this, and make static.
1870 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1871 (ppc_regs_info): New function.
1872 (the_low_target): Adjust.
1873 (initialize_low_arch): New function.
1874 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1875 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1876 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1877 (tdesc_s390x_linux64v2): Declare.
1878 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1879 (s390_fill_gregset, s390_store_last_break): Adjust.
1880 (target_regsets): Rename to ...
1881 (s390_regsets): ... this, and make static.
1882 (s390_get_pc, s390_set_pc): Adjust.
1883 (s390_get_hwcap): New target_desc parameter, and use it.
1884 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1885 (s390_arch_setup): Adjust to set the current process'es target
1886 description. Don't adjust the regmap.
1887 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1888 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1889 (regs_info_3264): New globals.
1890 (s390_regs_info): New function.
1891 (the_low_target): Adjust.
1892 (initialize_low_arch): New function.
1893 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1894 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1895 [__mips64] (init_registers_mips_linux)
1896 (init_registers_mips_dsp_linux): Delete defines.
1897 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1898 (have_dsp): New global.
1899 (mips_read_description): New, based on mips_arch_setup.
1900 (mips_arch_setup): Reimplement.
1901 (get_usrregs_info): New function.
1902 (mips_cannot_fetch_register, mips_cannot_store_register)
1903 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1904 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1905 (target_regsets): Rename to ...
1906 (mips_regsets): ... this, and make static.
1907 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1908 (dsp_regs_info, regs_info): New globals.
1909 (mips_regs_info): New function.
1910 (the_low_target): Adjust.
1911 (initialize_low_arch): New function.
1912 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1913 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1915 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1916 (arm_read_description): New, with bits factored from
1918 (arm_arch_setup): Reimplement.
1919 (target_regsets): Rename to ...
1920 (arm_regsets): ... this, and make static.
1921 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1922 (arm_regs_info): New function.
1923 (the_low_target): Adjust.
1924 (initialize_low_arch): New function.
1925 * linux-m68k-low.c (tdesc_m68k): Declare.
1926 (target_regsets): Rename to ...
1927 (m68k_regsets): ... this, and make static.
1928 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1929 (m68k_regs_info): New function.
1930 (m68k_arch_setup): New function.
1931 (the_low_target): Adjust.
1932 (initialize_low_arch): New function.
1933 * linux-sh-low.c (tdesc_sharch): Declare.
1934 (target_regsets): Rename to ...
1935 (sh_regsets): ... this, and make static.
1936 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1937 (sh_regs_info, sh_arch_setup): New functions.
1938 (the_low_target): Adjust.
1939 (initialize_low_arch): New function.
1940 * linux-bfin-low.c (tdesc_bfin): Declare.
1941 (bfin_arch_setup): New function.
1942 (bfin_usrregs_info, regs_info): New globals.
1943 (bfin_regs_info): New function.
1944 (the_low_target): Adjust.
1945 (initialize_low_arch): New function.
1946 * linux-cris-low.c (tdesc_cris): Declare.
1947 (cris_arch_setup): New function.
1948 (cris_usrregs_info, regs_info): New globals.
1949 (cris_regs_info): New function.
1950 (the_low_target): Adjust.
1951 (initialize_low_arch): New function.
1952 * linux-cris-low.c (tdesc_crisv32): Declare.
1953 (cris_arch_setup): New function.
1954 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1955 (cris_regs_info): New function.
1956 (the_low_target): Adjust.
1957 (initialize_low_arch): New function.
1958 * linux-m32r-low.c (tdesc_m32r): Declare.
1959 (m32r_arch_setup): New function.
1960 (m32r_usrregs_info, regs_info): New globals.
1961 (m32r_regs_info): Adjust.
1962 (initialize_low_arch): New function.
1963 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1964 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1965 (tic6x_usrregs_info): Forward declare.
1966 (tic6x_read_description): New function, based on ...
1967 (tic6x_arch_setup): ... this. Reimplement.
1968 (target_regsets): Rename to ...
1969 (tic6x_regsets): ... this, and make static.
1970 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1971 (tic6x_regs_info): New function.
1972 (the_low_target): Adjust.
1973 (initialize_low_arch): New function.
1974 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1975 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1976 (target_regsets): Rename to ...
1977 (xtensa_regsets): ... this, and make static.
1978 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1980 (xtensa_arch_setup, xtensa_regs_info): New functions.
1981 (the_low_target): Adjust.
1982 (initialize_low_arch): New function.
1983 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1984 (nios2_arch_setup): Set the current process'es tdesc.
1985 (target_regsets): Rename to ...
1986 (nios2_regsets): ... this.
1987 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1988 (nios2_regs_info): New function.
1989 (the_low_target): Adjust.
1990 (initialize_low_arch): New function.
1991 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1992 (aarch64_arch_setup): Set the current process'es tdesc.
1993 (target_regsets): Rename to ...
1994 (aarch64_regsets): ... this.
1995 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1996 (aarch64_regs_info): New function.
1997 (the_low_target): Adjust.
1998 (initialize_low_arch): New function.
1999 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2001 (target_regsets): Rename to ...
2002 (tile_regsets): ... this.
2003 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2004 (tile_regs_info): New function.
2005 (tile_arch_setup): Set the current process'es tdesc.
2006 (the_low_target): Adjust.
2007 (initialize_low_arch): New function.
2008 * spu-low.c (tdesc_spu): Declare.
2009 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2010 * win32-arm-low.c (tdesc_arm): Declare.
2011 (arm_arch_setup): New function.
2012 (the_low_target): Install arm_arch_setup instead of
2014 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2015 (init_windows_x86): Rename to ...
2016 (i386_arch_setup): ... this. Set `win32_tdesc'.
2017 (the_low_target): Adjust.
2018 * win32-low.c (win32_tdesc): New global.
2019 (child_add_thread): Don't create the thread cache here.
2020 (do_initial_child_stuff): Set the new process'es tdesc.
2021 * win32-low.h (struct target_desc): Forward declare.
2022 (win32_tdesc): Declare.
2023 * lynx-i386-low.c (tdesc_i386): Declare global.
2024 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2025 * lynx-low.c (lynx_tdesc): New global.
2026 (lynx_add_process): Set the new process'es tdesc.
2027 * lynx-low.h (struct target_desc): Forward declare.
2028 (lynx_tdesc): Declare global.
2029 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2030 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2031 * nto-low.c (nto_tdesc): New global.
2032 (do_attach): Set the new process'es tdesc.
2033 * nto-low.h (struct target_desc): Forward declare.
2034 (nto_tdesc): Declare.
2035 * nto-x86-low.c (tdesc_i386): Declare.
2036 (nto_x86_arch_setup): Set `nto_tdesc'.
2038 2013-06-04 Gary Benson <gbenson@redhat.com>
2040 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2041 to qSupported response when appropriate.
2042 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2043 with nonzero-length annex.
2044 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2045 arguments supplied in annex.
2047 2013-05-31 Doug Evans <dje@google.com>
2050 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2051 64 bits in 64-cross-32 environment.
2053 2013-05-28 Pedro Alves <palves@redhat.com>
2055 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2056 (aarch64-without-fpu.c): Delete rule.
2057 * configure.srv (aarch64*-*-linux*): Remove references to
2058 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2059 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2062 2013-05-24 Pedro Alves <palves@redhat.com>
2064 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2065 instead of strchr/decode_address. Error if the range isn't split
2066 with a ','. Don't assume there's be a ':' in the action.
2068 2013-05-23 Yao Qi <yao@codesourcery.com>
2069 Pedro Alves <palves@redhat.com>
2071 * linux-low.c (lwp_in_step_range): New function.
2072 (linux_wait_1): If the thread was range stepping and stopped
2073 outside the stepping range, report the stop to GDB. Otherwise,
2074 continue stepping. Add range stepping debug output.
2075 (linux_set_resume_request): Copy the step range from the resume
2077 (linux_supports_range_stepping): New.
2078 (linux_target_ops) <supports_range_stepping>: Set to
2079 linux_supports_range_stepping.
2080 * linux-low.h (struct linux_target_ops)
2081 <supports_range_stepping>: New field.
2082 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2083 * linux-x86-low.c (x86_supports_range_stepping): New.
2084 (the_low_target) <supports_range_stepping>: Set to
2085 x86_supports_range_stepping.
2086 * server.c (handle_v_cont): Handle 'r' action.
2087 (handle_v_requests): Append ";r" if the target supports range
2089 * target.h (struct thread_resume) <step_range_start,
2090 step_range_end>: New fields.
2091 (struct target_ops) <supports_range_stepping>:
2093 (target_supports_range_stepping): New macro.
2095 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2097 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2098 confusion in comment.
2100 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2102 * lynx-low.c (struct process_info_private): New type.
2103 (lynx_add_process): New function.
2104 (lynx_create_inferior, lynx_attach): Replace calls to
2105 add_process by calls to lynx_add_process.
2106 (lynx_resume): If PTID is null, then try using
2107 current_process()->private->last_wait_event_ptid.
2109 (lynx_clear_inferiors): Delete. The contents of that function
2110 has been inlined in lynx_mourn;
2111 (lynx_wait_1): Save the ptid in the process's private data.
2112 (lynx_mourn): Free the process' private data. Replace call
2113 to lynx_clear_inferiors by call to clear_inferiors.
2115 2013-05-17 Yao Qi <yao@codesourcery.com>
2117 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2120 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2122 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2123 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2124 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2125 PT_TEXT_END_ADDR guards. Update comments.
2126 (linux_target_op) <read_offsets>: Conditionally define to
2127 linux_read_offsets if the target is UCLIBC and if it defines
2128 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2130 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2131 Andrew Jenner <andrew@codesourcery.com>
2133 * Makefile.in (SFILES): Add linux-nios2-low.c.
2134 (clean): Add action to delete nios2-linux.c.
2135 (nios2-linux.c): New rule.
2136 * configure.srv: Add nios2*-*-linux*.
2137 * linux-nios2-low.c: New.
2139 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2141 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2143 2013-04-25 Hui Zhu <hui@codesourcery.com>
2146 * ax.c (ax_printf): Add fflush.
2148 2013-04-22 Tom Tromey <tromey@redhat.com>
2150 * Makefile.in (SFILES): Add filestuff.c.
2151 (OBS): Add filestuff.o.
2152 (filestuff.o): New target.
2153 * config.in, configure: Rebuild.
2154 * configure.ac: Check for fdwalk, pipe2.
2156 2013-04-17 Pedro Alves <palves@redhat.com>
2158 * configure.ac (USE_THREAD_DB): Delete variable.
2159 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2160 Don't AC_SUBST USE_THREAD_DB.
2161 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2162 * config.in, configure: Regenerate.
2164 2013-04-16 Pedro Alves <palves@redhat.com>
2166 * linux-low.h (struct lwp_info) <thread_known>: Move under
2167 the USE_THREAD_DB #ifdef.
2169 2013-04-16 Pedro Alves <palves@redhat.com>
2171 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2172 (linux-low.o): Delete rule.
2173 * linux-low.h: Always include "gdb_thread_db.h" instead of
2174 conditionally including thread_db.h.
2175 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2178 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2180 * Makefile.in (install-only): Fix make install regression.
2182 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2184 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2185 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2187 * gdbserver.1: Remove.
2189 2013-03-22 Pedro Alves <palves@redhat.com>
2191 * linux-low.c (handle_extended_wait): Don't call
2192 linux_enable_event_reporting.
2194 2013-03-15 Tony Theodore <tonyt@logyst.com>
2197 * Makefile.in (SHELL): Use @SHELL@.
2199 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2201 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2204 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2206 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2207 Remove extraneous NULL element.
2209 2013-03-13 Yao Qi <yao@codesourcery.com>
2211 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2212 'V' block in trace frame.
2214 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2216 * target.h (struct target_ops): Add btrace ops.
2217 (target_supports_btrace): New macro.
2218 (target_enable_btrace): New macro.
2219 (target_disable_btrace): New macro.
2220 (target_read_btrace): New macro.
2221 * gdbthread.h (struct thread_info): Add btrace field.
2222 * server.c: Include btrace-common.h.
2223 (handle_btrace_general_set): New function.
2224 (handle_btrace_enable): New function.
2225 (handle_btrace_disable): New function.
2226 (handle_general_set): Call handle_btrace_general_set.
2227 (handle_qxfer_btrace): New function.
2228 (struct qxfer qxfer_packets[]): Add btrace entry.
2229 * inferiors.c (remove_thread): Disable btrace.
2230 * linux-low: Include linux-btrace.h.
2231 (linux_low_enable_btrace): New function.
2232 (linux_low_read_btrace): New function.
2233 (linux_target_ops): Add btrace ops.
2234 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2235 Add srv_linux_btrace=yes.
2236 (x86_64-*-linux*): Add linux-btrace.o.
2237 Add srv_linux_btrace=yes.
2238 * configure.ac: Define HAVE_LINUX_BTRACE.
2239 * config.in: Regenerated.
2240 * configure: Regenerated.
2242 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2244 * server.c (handle_qxfer): Preserve error message if -3 is
2246 (qxfer): Document the -3 return value.
2248 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2250 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2251 (linux_btrace_h): New variable.
2252 (linux-btrace.o): New rule.
2254 2013-03-08 Stan Shebs <stan@codesourcery.com>
2255 Hafiz Abid Qadeer <abidh@codesourcery.com>
2257 * tracepoint.c (trace_buffer_size): New global.
2258 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2259 (init_trace_buffer): Change to one-argument function. Allocate
2260 trace buffer memory.
2261 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2262 handle QTBuffer:size packet.
2263 (cmd_bigqtbuffer_size): New function.
2264 (initialize_tracepoint): Call init_trace_buffer with
2265 DEFAULT_TRACE_BUFFER_SIZE.
2266 * server.c (handle_query): Add QTBuffer:size in the
2269 2013-03-07 Yao Qi <yao@codesourcery.com>
2271 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2272 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2274 (cmd_qtsp): Adjust condition. Do post increment.
2275 Set cur_action and cur_step_action back to 0.
2277 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2280 * linux-low.c (linux_write_memory): Return early success if LEN is
2283 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2285 * configure.srv: Add x86_64-*-cygwin* as target.
2287 2013-02-28 Tom Tromey <tromey@redhat.com>
2289 * configure.ac: Invoke AC_SYS_LARGEFILE.
2290 * configure, config.in: Rebuild.
2292 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2294 * win32-low.c: Throughout, fix format strings and casts of
2295 printf-like functions to avoid type related warnings on all
2297 (get_child_debug_event): Print dwDebugEventCode as hex since
2298 that's how it's usually documented.
2300 2013-02-28 Yao Qi <yao@codesourcery.com>
2302 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2305 2013-02-27 Jiong Wang <jiwang@tilera.com>
2307 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2308 (reg-tilegx32.c): New rule.
2309 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2310 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2311 different register info initializer according to elf class.
2312 (init_registers_tilgx32): New function. The tilegx32 register info
2314 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2315 (tile_store_gregset): Likewise.
2317 2013-02-27 Yao Qi <yao@codesourcery.com>
2319 * server.c (process_point_options): Print debug message when
2320 debug_threads is true.
2322 2013-02-26 Yao Qi <yao@codesourcery.com>
2324 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2326 2013-02-19 Pedro Alves <palves@redhat.com>
2327 Kai Tietz <ktietz@redhat.com>
2331 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2332 instead of strtoul to extract address from packet.
2333 (process_serial_event) <'z'>: Likewise.
2335 2013-02-18 Yao Qi <yao@codesourcery.com>
2337 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2339 2013-02-14 Pedro Alves <palves@redhat.com>
2343 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2344 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2346 2013-02-14 Pedro Alves <palves@redhat.com>
2348 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2350 2013-02-14 Pedro Alves <palves@redhat.com>
2352 * tracepoint.c (save_string): Delete.
2353 (add_tracepoint_action): Use savestring instead of save_string.
2355 2013-02-12 Pedro Alves <palves@redhat.com>
2357 * linux-xtensa-low.c: Ditto.
2358 * xtensa-xtregs.c: Ditto.
2360 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2362 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2365 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2367 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2368 aarch64_num_wp_regs and aarch64_num_bp_regs to
2369 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2371 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2373 * linux-aarch64-low.c (ps_get_thread_area): Replace
2374 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2376 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2377 Marcus Shawcroft <marcus.shawcroft@arm.com>
2378 Nigel Stephens <nigel.stephens@arm.com>
2379 Yufeng Zhang <yufeng.zhang@arm.com>
2381 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2382 (aarch64.c, aarch64-without-fpu.c): New targets.
2383 * configure.srv (aarch64*-*-linux*): New.
2384 * linux-aarch64-low.c: New file.
2386 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2388 * linux-low.c (handle_extended_wait, linux_create_inferior)
2389 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2390 (dequeue_one_deferred_signal, linux_resume_one_thread)
2391 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2392 (linux_tracefork_grandchild, linux_test_for_tracefork)
2393 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2394 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2395 where the argument is 0.
2397 2013-01-25 Yao Qi <yao@codesourcery.com>
2399 * event-loop.c: Include "queue.h".
2400 (gdb_event_p): New typedef.
2401 (struct gdb_event) <next_event>: Remove.
2402 (event_queue): Change to QUEUE(gdb_event_p).
2403 (async_queue_event): Remove.
2404 (gdb_event_xfree): New.
2405 (initialize_event_loop): New.
2406 (process_event): Use API from QUEUE.
2407 (wait_for_event): Likewise.
2408 * server.c (main): Call initialize_event_loop.
2409 * server.h (initialize_event_loop): Declare.
2411 2013-01-18 Yao Qi <yao@codesourcery.com>
2413 * ax.h (struct eval_agent_expr_context): New.
2414 (gdb_eval_agent_expr): Update declaration.
2415 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2416 TFRAME. Add new argument CTX.
2417 * server.h (struct eval_agent_expr_context): Declare.
2418 (agent_mem_read, agent_tsv_read): Update declaration.
2419 (agent_mem_read_string): Likewise.
2420 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2421 (add_traceframe_block): Add new argument TPOINT.
2422 Increase TPOINT->traceframe_usage.
2423 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2424 eval_tracepoint_agent_expr.
2425 (condition_true_at_tracepoint): Likewise.
2426 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2427 (agent_mem_read_string, agent_tsv_read): Likewise.
2429 2013-01-16 Yao Qi <yao@codesourcery.com>
2431 * linux-low.c (linux_resume_one_lwp): Don't check
2432 'lwp->bp_reinsert != 0'.
2434 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2435 Pedro Alves <palves@redhat.com>
2437 * lynx-low.c (ptrace_request_to_str): Define a temporary
2438 macro and use it to simplify this function's implementation.
2440 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2442 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2445 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2447 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2449 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2451 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2453 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2455 * lynx-low.c (lynx_resume): Use the resume_info parameter
2456 to determine the ptid for the lynx_ptrace call, unless
2457 it is equal to minus_one_ptid, in which case we use the
2458 ptid of the current_inferior.
2459 (lynx_wait_1): After having received a thread create/exit
2460 event, resume the inferior's execution using the signaling
2461 thread's ptid, rather than the old ptid.
2463 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2465 * lynx-low.c (lynx_resume): Delete variable ret.
2467 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2469 * gdbreplay.c (gdbreplay_version): Update copyright year.
2470 * server.c (gdbserver_version): Likewise.
2472 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2474 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2477 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2479 * lynx-low.c (ptrace_request_to_str): Add handling for
2482 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2484 * lynx-low.c (lynx_attach): Delete variable new_process.
2486 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2488 * lynx-low.c (lynx_create_inferior): Delete variable
2491 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2493 * lynx-low.c (ptrace_request_to_str): Do not handle
2494 PTRACE_GETTHREADLIST if this macro does not exist.
2496 2012-12-15 Yao Qi <yao@codesourcery.com>
2498 * Makefile.in (OBS): Add notif.o.
2499 * notif.c, notif.h: New.
2500 * server.c: Include "notif.h".
2501 (struct vstop_notif) <next>: Remove.
2503 (queue_stop_reply): Update.
2504 (push_event, send_next_stop_reply): Remove.
2505 (discard_queued_stop_replies): Update.
2506 (notif_stop): New variable.
2507 (handle_v_stopped): Remove.
2508 (handle_v_requests): Don't call handle_v_stopped. Call
2509 handle_ack_notif instead.
2510 (queue_stop_reply_callback): Call notif_event_enque instead
2511 of queue_stop_reply.
2512 (handle_status): Don't call send_next_stop_reply, call
2513 notif_write_event instead.
2514 (kill_inferior_callback): Likewise.
2515 (detach_or_kill_inferior_callback): Likewise.
2516 (main): Call initialize_notif.
2517 (process_serial_event): Call QUEUE_is_empty.
2518 (handle_target_event): Call notif_push instead of push event.
2519 * server.h (push_event): Remove declaration.
2521 2012-12-10 Tom Tromey <tromey@redhat.com>
2523 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2524 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2527 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2528 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2529 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2530 (amd64-linux-ipa.o, ax.o): Rewrite.
2531 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2532 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2533 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2534 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2535 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2536 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2537 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2538 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2539 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2540 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2541 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2542 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2543 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2544 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2545 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2546 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2547 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2548 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2549 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2550 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2551 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2552 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2553 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2554 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2555 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2556 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2557 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2558 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2559 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2560 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2561 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2562 (reg-tilegx.o): Remove.
2563 (all_object_files): New macro.
2564 Include .deps files.
2565 * aclocal.m4, configure: Rebuild.
2566 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2567 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2568 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2570 2012-12-05 Tom Tromey <tromey@redhat.com>
2573 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2575 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2577 * configure.ac: Check for linux/perf_event.h.
2578 * config.in: Regenerated.
2579 * configure: Regenerated.
2581 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2583 * hostio.c (handle_readlink): Decrease buffer size
2584 parameter passed to readlink by one byte.
2586 2012-11-26 Yao Qi <yao@codesourcery.com>
2588 * configure.ac (build_warnings): Append '-Wempty-body'.
2589 * configure: Regenerated.
2590 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2593 2012-11-15 Pierre Muller <muller@sourceware.org>
2595 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2596 * config.in: Regenerate.
2597 * configure: Regenerate.
2598 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2599 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2600 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2601 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2603 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2604 instead of <sys/wait.h> header.
2605 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2607 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
2609 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2610 (various make rules): Remove -DGDBSERVER
2612 2012-11-09 Yao Qi <yao@codesourcery.com>
2614 * spu-low.c (current_ptid): Move it to ..
2615 * gdbthread.h: ... here. New.
2616 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2617 * server.c (myresume, process_serial_event): Likewise.
2618 * thread-db.c (thread_db_find_new_threads): Likewise.
2619 * tracepoint.c (run_inferior_command): Likewise.
2621 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
2623 * server.c (handle_search_memory_1): Include access length in
2626 2012-09-05 Michael Brandt <michael.brandt@axis.com>
2628 * linux-crisv32-low.c: Fix compile errors.
2630 2012-09-04 Yao Qi <yao@codesourcery.com>
2632 * tracepoint.c (cmd_qtsv): Adjust debug message.
2633 Don't check CUR_TPOINT.
2635 2012-08-28 Yao Qi <yao@codesourcery.com>
2637 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2638 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2639 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2640 Remove declarations of xmalloc, xreallloc, xstrdup and
2642 * Makefile.in (libiberty_h): New.
2643 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2644 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2646 2012-08-23 Yao Qi <yao@codesourcery.com>
2648 * server.h: Remove declaration of 'xsnprintf'.
2650 2012-08-22 Keith Seitz <keiths@redhat.com>
2652 * server.h: Include build-gnulib-gbserver/config.h.
2653 * gdbreplay.c: Likewise.
2655 2012-08-08 Doug Evans <dje@google.com>
2657 * Makefile.in (SFILES): Add gdb_vecs.c.
2658 (OBS): Add gdb_vecs.o.
2659 (gdb_vecs_h, host_defs_h): New variables.
2660 (thread-db.o): Add $(gdb_vecs_h) dependency.
2661 (gdb_vecs.o): New rule.
2662 * thread-db.c: #include "gdb_vecs.h".
2663 (thread_db_load_search): Use a vector to iterate over path elements.
2664 Handle text appearing after "$pdir".
2666 * configure.ac: Add check for strstr.
2667 * config.in: Regenerate.
2668 * configure: Regenerate.
2670 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2672 * hostio.c (handle_pread): If pread fails, fall back to attempting
2674 (handle_pwrite): Likewise for pwrite.
2676 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2678 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2679 between unsupported TYPE and unimplementable ADDR/LEN combination.
2680 (arm_insert_point): Act on new return value.
2682 2012-07-31 Pedro Alves <palves@redhat.com>
2684 * server.c (process_point_options): Only skip tokens if we find
2685 one that is unrecognized. Don't treat 'X' specially while
2686 skipping unrecognized tokens.
2688 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2690 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2691 to 4-byte-align HW breakpoint addresses for Thumb.
2693 2012-07-27 Yao Qi <yao@codesourcery.com>
2697 * server.h: Declare gdb_agent_about_to_close.
2698 * target.c (kill_inferior): Include "agent.h".
2699 New. Send command 'kill'.
2700 * target.h (kill_inferior): Removed macro.
2701 * tracepoint.c (gdb_agent_about_to_close): New.
2702 (gdb_agent_helper_thread): Handle command 'close'.
2703 Wait endlessly until the inferior stops.
2704 Install gdb_agent_remove_socket to atexit hook.
2705 (agent_socket_name): New static variable.
2706 (gdb_agent_socket_init): Replace local variable 'name' with
2707 'agent_socket_name'.
2708 (gdb_agent_remove_socket): New.
2710 2012-07-27 Yao Qi <yao@codesourcery.com>
2712 * server.c (process_point_options): Stop at 'X' when parsing.
2714 2012-07-19 Michael Eager <eager@eagercon.com>
2716 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2718 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2719 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2720 hardware breakpoint.
2722 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2724 * gdbserver/linux-low.c (initialize_low): Call
2725 linux_ptrace_init_warnings.
2727 2012-07-02 Doug Evans <dje@google.com>
2729 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2732 2012-07-02 Stan Shebs <stan@codesourcery.com>
2734 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2735 (ax.o): Add it to build rule.
2737 (OBS): Add format.o.
2738 (IPA_OBS): Add format.o.
2739 * server.c (handle_query): Claim support for breakpoint commands.
2740 (process_point_options): Add command case.
2741 (process_serial_event): Leave running if there are printfs in
2743 * mem-break.h (any_persistent_commands): Declare.
2744 (add_breakpoint_commands): Declare.
2745 (gdb_no_commands_at_breakpoint): Declare.
2746 (run_breakpoint_commands): Declare.
2747 * mem-break.c (struct point_command_list): New struct.
2748 (struct breakpoint): New field command_list.
2749 (any_persistent_commands): New function.
2750 (add_commands_to_breakpoint): New function.
2751 (add_breakpoint_commands): New function.
2752 (gdb_no_commands_at_breakpoint): New function.
2753 (run_breakpoint_commands): New function.
2754 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2756 * ax.c: Include format.h.
2757 (ax_printf): New function.
2758 (gdb_eval_agent_expr): Add printf opcode.
2760 2012-06-13 Yao Qi <yao@codesourcery.com>
2762 * server.c (start_inferior): Remove duplicated writes to fields
2763 'last_resume_kind' and 'last_status' of 'current_inferior'.
2765 2012-06-12 Yao Qi <yao@codesourcery.com>
2766 Pedro Alves <palves@redhat.com>
2768 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2770 * server.c (handle_v_cont): Extend comment.
2772 2012-06-11 Yao Qi <yao@codesourcery.com>
2774 * linux-low.c (linux_attach): Add 'static'.
2776 2012-06-06 Yao Qi <yao@codesourcery.com>
2778 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2780 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2782 Fix gcc -flto compilation warning.
2783 * server.c (main): Make variable multi_mode and attach volatile.
2785 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2787 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2788 if the platform doesn't know about it.
2790 2012-05-30 Jeff Kenton <jkenton@tilera.com>
2792 * Makefile.in (SFILES): Add linux-tile-low.c.
2793 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2794 * configure.srv: Handle tilegx-*-linux*.
2795 * linux-tile-low.c: New file.
2797 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2799 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2801 2012-05-24 Pedro Alves <palves@redhat.com>
2805 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2807 2012-05-24 Pedro Alves <palves@redhat.com>
2811 Replace target_signal with gdb_signal throughout.
2813 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2815 * linux-low.c (linux_store_registers): Avoid the copying sequence
2816 when no data has been retrieved by ptrace.
2818 2012-05-22 Will Deacon <will.deacon@arm.com>
2820 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2821 Include asm/ptrace.h.
2822 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2825 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2827 * linux-low.c (linux_store_registers): Don't re-retrieve data
2828 with ptrace that has already been obtained from /proc. Always
2829 copy any data retrieved with ptrace to the buffer supplied.
2831 2012-05-11 Yao Qi <yao@codesourcery.com>
2832 Pedro Alves <palves@redhat.com>
2834 * linux-low.c (enum stopping_threads_kind): New.
2835 (stopping_threads): Change type to `enum stopping_threads_kind'.
2836 (handle_extended_wait): If stopping and suspending threads, leave
2837 the new_lwp suspended too.
2838 (linux_wait_for_event): Adjust.
2839 (stop_all_lwps): Set `stopping_threads' to
2840 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2841 whether we're suspending threads or just stopping them. Assert no
2844 2012-04-29 Yao Qi <yao@codesourcery.com>
2846 * server.h: Move some code to ...
2847 * gdbthread.h: ... here. New.
2848 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2849 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2850 (nto-low.o, win32-low.o): Likewise.
2851 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2852 * regcache.c, remote-utils.c, server.c: Likewise.
2853 * target.c, tracepoint.c, win32-low.c: Likewise.
2855 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2857 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2858 (PTRACE_ARG4_TYPE): Likewise.
2859 (PTRACE_XFER_TYPE): Likewise.
2860 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2861 ptrace to PTRACE_ARG3_TYPE.
2862 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2863 (PTRACE_ARG4_TYPE): Likewise.
2864 (PTRACE_XFER_TYPE): Likewise.
2865 (linux_detach_one_lwp): Cast fourth argument of
2866 ptrace to long then PTRACE_ARG4_TYPE.
2867 (regsets_fetch_inferior_registers): Cast third argument of
2868 ptrace to long then PTRACE_ARG3_TYPE.
2869 (regsets_store_inferior_registers): Likewise.
2871 2012-04-20 Pedro Alves <palves@redhat.com>
2873 * configure: Regenerate.
2875 2012-04-19 Pedro Alves <palves@redhat.com>
2877 * Makefile.in (GNULIB_BUILDDIR): New.
2878 (LIBGNU, INCGNU, GNULIB_H): Adjust.
2879 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2880 (all, install-only, uninstall, clean-info, all-lib, clean): No
2881 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2882 (maintainer-clean realclean distclean): Use subdir_do.
2884 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
2885 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
2886 * acinclude.m4: Include acx_configure_dir.m4.
2887 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2888 calls. Call AC_PROG_RANLIB. Configure gnulib using
2891 (GNULIB_STDINT_H): Adjust.
2892 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2893 * gdbreplay.c: Include build-gnulib/config.h.
2894 * server.h: Likewise.
2895 * aclocal.m4: Regenerate.
2896 * config.in: Regenerate.
2897 * configure: Regenerate.
2899 2012-04-19 Pedro Alves <palves@redhat.com>
2901 * Makefile.in (LIBGNU, INCGNU): Adjust.
2902 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2903 (all, install-only, uninstall, clean-info, all-lib, clean)
2904 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2905 * configure.ac: Adjust AC_OUTPUT output.
2906 * aclocal.m4: Regenerate.
2907 * configure: Regenerate.
2909 2012-04-19 Pedro Alves <palves@redhat.com>
2911 * Makefile.in (generated_files): New.
2912 (server_h): Remove the explicit dependency on config.h, and depend
2913 on $generated_files.
2915 2012-04-19 Pedro Alves <palves@redhat.com>
2917 * Makefile.in (INCGNU): Add -Ignulib.
2919 2012-04-19 Pedro Alves <palves@redhat.com>
2921 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2922 (INCGNU): ... this, and spell out -I here.
2923 (GNULIB_LIB): Rename to ...
2925 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2927 2012-04-19 Pedro Alves <palves@redhat.com>
2929 * config.in: Regenerate.
2931 2012-04-19 Pedro Alves <palves@redhat.com>
2933 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2934 * server.h (memmem): Remove declaration.
2935 * config.in: Regenerate.
2936 * configure: Regenerate.
2938 2012-04-19 Yao Qi <yao@codesourcery.com>
2940 * Makefile.in (SFILES): Add common/vec.c.
2944 2012-04-19 Yao Qi <yao@codesourcery.com>
2946 * remote-utils.c (prepare_resume_reply): Replace with macro
2947 target_core_of_thread.
2948 * server.c (handle_qxfer_threads_proper): Likewise.
2949 * target.h (traget_core_of_thread): New macro.
2951 2012-04-18 Pedro Alves <palves@redhat.com>
2953 * aclocal.m4: Regenerate.
2954 * configure: Regenerate.
2956 2012-04-16 Yao Qi <yao@codesourcery.com>
2958 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2959 duplicated on address.
2961 2012-04-16 Yao Qi <yao@codesourcery.com>
2963 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2964 (struct tracepoint_action_ops) <send>: New field.
2965 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2966 (agent_expr_send, x_tracepoint_action_send): New.
2967 (l_tracepoint_action_send): New.
2968 (cmd_qtdp): Download and install tracepoint
2969 according to `use_agent'.
2970 (run_inferior_command): Add one more parameter `len'.
2972 (tracepoint_send_agent): New.
2973 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2975 2012-04-16 Yao Qi <yao@codesourcery.com>
2977 * tracepoint.c (download_tracepoints): Moved to ...
2978 (cmd_qtstart): ... here.
2980 2012-04-14 Yao Qi <yao@codesourcery.com>
2982 * tracepoint.c: Include inttypes.h.
2983 (struct collect_memory_action): Use sized types.
2984 (struct tracepoint): Likewise.
2985 (cmd_qtdp, stop_tracing): Update print specifiers.
2986 (cmd_qtp, response_tracepoint): Likewise.
2987 (collect_data_at_tracepoint): Likewise.
2988 (collect_data_at_step): Likewise.
2990 2012-04-14 Yao Qi <yao@codesourcery.com>
2992 Import gnulib module inttypes.
2993 * aclocal.m4, config.in, configure: Regenerated.
2995 2012-04-14 Yao Qi <yao@codesourcery.com>
2997 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2998 Makefile and config.status at last.
3000 2012-04-13 Yao Qi <yao@codesourcery.com>
3002 * tracepoint.c: Include stdint.h unconditionally.
3004 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3006 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3007 on BFD_HAVE_SYS_PROCFS_TYPE.
3008 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3009 * configure: Regenerate.
3010 * config.in: Likewise.
3012 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3014 * Makefile.in (clean): Also remove x32.c x32-linux.c
3015 x32-avx.c x32-avx-linux.c.
3016 (x32.o): New target.
3018 (x32-linux.o): Likewise.
3019 (x32-linux.c): Likewise.
3020 (x32-avx.o): Likewise.
3021 (x32-avx.c): Likewise.
3022 (x32-avx-linux.o): Likewise.
3023 (x32-avx-linux.c): Likewise.
3025 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3026 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3027 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3028 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3029 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3030 i386/x32-avx-linux.xml.
3032 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3033 (init_registers_x32_avx_linux): Likwise.
3034 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3035 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3037 2012-04-13 Pedro Alves <palves@redhat.com>
3039 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3040 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3041 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3042 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3045 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3047 * linux-x86-low.c (compat_x32_clock_t): New.
3048 (compat_x32_siginfo_t): Likewise.
3049 (compat_x32_siginfo_from_siginfo): Likewise.
3050 (siginfo_from_compat_x32_siginfo): Likewise.
3051 (linux_is_elf64): Likewise.
3052 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3053 and siginfo_from_compat_x32_siginfo for x32.
3054 (x86_arch_setup): Set linux_is_elf64.
3056 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3059 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3061 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3062 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3063 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3064 compatible with process.
3066 2012-04-12 Yao Qi <yao@codesourcery.com>
3068 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3069 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3070 (install-only, install-info, clean): Handle sub dir gnulib.
3071 (all-lib, am--refresh): New targets.
3072 (memmem.o): Remove target.
3073 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3074 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3075 (AC_REPLACE_FUNCS): Remove memmem.
3076 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3077 (AC_OUTPUT): Generate Makefile in gnulib/.
3078 * aclocal.m4, config.in, configure: Regenerated.
3080 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3082 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3084 2012-04-05 Pedro Alves <palves@redhat.com>
3086 -Werror=strict-aliasing
3088 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3091 2012-04-04 Pedro Alves <palves@redhat.com>
3093 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3094 (sparc_store_gregset_from_stack, sparc_store_gregset)
3095 (sparc_breakpoint_at): Fix formatting.
3097 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3099 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3101 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3102 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3103 * config.in: Regenerate.
3104 * configure: Likewise.
3106 2012-03-29 Pedro Alves <palves@redhat.com>
3108 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3109 Correct ptrace arguments.
3111 2012-03-28 Pedro Alves <palves@redhat.com>
3113 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3114 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3115 (IA64_FR1_REGNUM): New defines.
3116 (ia64_fetch_register): New.
3117 (the_low_target): Install it.
3118 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3120 * linux-low.c (linux_fetch_registers): Try the
3121 the_low_target.fetch_register hook first.
3123 * linux-arm-low.c (the_low_target): Adjust.
3124 * linux-bfin-low.c (the_low_target): Adjust.
3125 * linux-cris-low.c (the_low_target): Adjust.
3126 * linux-crisv32-low.c (the_low_target): Adjust.
3127 * linux-m32r-low.c (the_low_target): Adjust.
3128 * linux-m68k-low.c (the_low_target): Adjust.
3129 * linux-mips-low.c (the_low_target): Adjust.
3130 * linux-ppc-low.c (the_low_target): Adjust.
3131 * linux-s390-low.c (the_low_target): Adjust.
3132 * linux-sh-low.c (the_low_target): Adjust.
3133 * linux-sparc-low.c (the_low_target): Adjust.
3134 * linux-tic6x-low.c (the_low_target): Adjust.
3135 * linux-x86-low.c (the_low_target): Adjust.
3136 * linux-xtensa-low.c (the_low_target): Adjust.
3138 2012-03-26 Pedro Alves <palves@redhat.com>
3140 * server.c (handle_qxfer_libraries): Don't bail early if
3141 the_target->qxfer_libraries_svr4 is not NULL.
3143 2012-03-26 Pedro Alves <palves@redhat.com>
3145 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3147 2012-03-23 Pedro Alves <palves@redhat.com>
3149 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3150 "library-list-svr4" element's start tag when the the DSO list is
3153 2012-03-23 Pedro Alves <palves@redhat.com>
3155 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3156 a variable whose type size is the same as the inferior's pointer
3159 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3161 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3163 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3164 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3165 * linux-low.h: Include <signal.h>.
3166 (struct siginfo): Remove forward declaration.
3167 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3170 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3172 * .gitignore: Ignore more files.
3174 2012-03-19 Pedro Alves <palves@redhat.com>
3175 Jan Kratochvil <jan.kratochvil@redhat.com>
3177 * server.c (cont_thread, general_thread): Add describing comments.
3178 (start_inferior): Clear `cont_thread'.
3179 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3182 2012-03-15 Yao Qi <yao@codesourcery.com>
3184 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3186 (cmd_qtdp): ... here.
3188 2012-03-15 Yao Qi <yao@codesourcery.com>
3190 * tracepoint.c (struct tracepoint_action_ops): New.
3191 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3192 (m_tracepoint_action_download): New.
3193 (r_tracepoint_action_download): New.
3194 (x_tracepoint_action_download): New.
3195 (l_tracepoint_action_download): New.
3196 (add_tracepoint_action): Install `action->ops' according type.
3197 (download_tracepoint_1): Move code `download' function pointer
3198 of various tracepoint_action_ops.
3200 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3202 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3203 linux_ptrace_attach_warnings.
3205 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3207 * Makefile.in (linux-ptrace.o): New.
3208 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3209 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3210 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3211 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3212 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3214 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3216 2012-03-08 Yao Qi <yao@codesourcery.com>
3217 Pedro Alves <palves@redhat.com>
3219 Fix PR server/13392.
3220 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3222 * tracepoint.c (remove_tracepoint): New.
3223 (cmd_qtdp): Call remove_tracepoint when failed to install.
3225 2012-03-07 Pedro Alves <palves@redhat.com>
3227 * linux-low.c (get_detach_signal): New.
3228 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3229 Pass on pending signals to PTRACE_DETACH. Check the result of the
3231 * server.c (program_signals, program_signals_p): New.
3232 (handle_general_set): Handle QProgramSignals.
3233 * server.h (program_signals, program_signals_p): Declare.
3235 2012-03-05 Pedro Alves <palves@redhat.com>
3236 Jan Kratochvil <jan.kratochvil@redhat.com>
3238 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3241 2012-03-03 Yao Qi <yao@codesourcery.com>
3243 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3244 agent_look_up_symbols.
3246 2012-03-03 Yao Qi <yao@codesourcery.com>
3248 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3249 (linux-x86-low.o): Likewise.
3250 * server.h: Remove in_process_agent_loaded.
3251 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3255 2012-03-03 Yao Qi <yao@codesourcery.com>
3257 * tracepoint.c (gdb_agent_capability): New global.
3258 (in_process_agent_loaded_ust): Renamed to
3259 `in_process_agent_supports_ust'.
3261 (in_process_agent_supports_ust): Call agent_capability_check.
3262 (clear_installed_tracepoints): Assert that agent supports
3265 2012-03-03 Yao Qi <yao@codesourcery.com>
3267 * linux-low.c (linux_supports_agent): New.
3268 (linux_target_ops): Initialize field `supports_agent' with
3269 linux_supports_agent.
3270 * target.h (struct target_ops) <supports_agent>: New.
3271 (target_supports_agent): New macro.
3272 * server.c (handle_general_set): Handle packet 'QAgent'.
3273 (handle_query): Send `QAgent+'.
3274 * Makefile.in (server.o): Depends on agent.h.
3276 2012-03-03 Yao Qi <yao@codesourcery.com>
3278 * Makefile.in (OBS): Add agent.o.
3279 Add new rule for agent.o.
3280 Track dependence of tracepoint.c on agent.h.
3281 * tracepoint.c (run_inferior_command_1):
3282 (run_inferior_command): Call agent_run_command.
3283 (gdb_ust_connect_sync_socket): Deleted. Move it to
3285 (resume_thread, stop_thread): Likewise.
3286 (gdb_ust_socket_init): Renamed to ...
3287 (gdb_agent_socket_init): ... New.
3288 (gdb_ust_thread): Renamed to ...
3289 (gdb_agent_helper_thread): ... New.
3290 (gdb_ust_init): Move some code to ...
3291 (gdb_agent_init): ... here. New.
3292 [HAVE_UST]: Call gdb_ust_init.
3293 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3294 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3295 * config.in, configure: Regenerated.
3297 2012-03-02 Pedro Alves <palves@redhat.com>
3299 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3300 * linux-low.c (struct simple_pid_list): New.
3301 (stopped_pids): New a struct simple_pid_list pointer.
3302 (add_to_pid_list, pull_pid_from_list): New.
3303 (handle_extended_wait): Don't assume the first signal new children
3304 report is SIGSTOP. Adjust call to pull_pid_from_list.
3305 (linux_wait_for_lwp): Adjust.
3307 2012-03-02 Yao Qi <yao@codesourcery.com>
3309 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3312 2012-03-02 Yao Qi <yao@codesourcery.com>
3314 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3315 `stop_pc' and `tpoint'. Update caller.
3317 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3319 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3320 * linux-low.c (use_linux_regsets): New macro.
3321 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3322 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3323 (linux_register_in_regsets): New function.
3324 (usr_fetch_inferior_registers): Skip registers covered by
3326 (usr_store_inferior_registers): Likewise.
3327 (usr_fetch_inferior_registers): New macro.
3328 (usr_store_inferior_registers): Likewise.
3329 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3330 (linux_store_registers): Likewise.
3331 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3333 (init_registers_mips64_dsp_linux): Likewise.
3334 (init_registers_mips_linux): New macro.
3335 (init_registers_mips_dsp_linux): Likewise.
3336 (mips_dsp_num_regs): Likewise.
3337 (DSP_BASE, DSP_CONTROL): New fallback macros.
3338 (mips_base_regs): New macro.
3339 (mips_regmap): Use it. Fix the size.
3340 (mips_dsp_regmap): New variable.
3341 (mips_dsp_regset_bitmap): Likewise.
3342 (mips_arch_setup): New function.
3343 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3345 (mips_cannot_store_register): Likewise.
3346 (the_low_target): Update .arch_setup, .num_regs and .regmap
3347 initializers. Add .regset_bitmap initializer.
3348 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3350 * linux-bfin-low.c (the_low_target): Likewise.
3351 * linux-cris-low.c (the_low_target): Likewise.
3352 * linux-crisv32-low.c (the_low_target): Likewise.
3353 * linux-ia64-low.c (the_low_target): Likewise.
3354 * linux-m32r-low.c (the_low_target): Likewise.
3355 * linux-m68k-low.c (the_low_target): Likewise.
3356 * linux-ppc-low.c (the_low_target): Likewise.
3357 * linux-s390-low.c (the_low_target): Likewise.
3358 * linux-sh-low.c (the_low_target): Likewise.
3359 * linux-sparc-low.c (the_low_target): Likewise.
3360 * linux-tic6x-low.c (the_low_target): Likewise.
3361 * linux-x86-low.c (the_low_target): Likewise.
3362 * linux-xtensa-low.c (the_low_target): Likewise.
3363 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3364 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3365 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3367 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3368 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3370 2012-02-29 Yao Qi <yao@codesourcery.com>
3371 Pedro Alves <palves@redhat.com>
3373 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3374 `step_over_finished' is true.
3376 2012-02-27 Pedro Alves <palves@redhat.com>
3378 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3379 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3381 2012-02-27 Pedro Alves <palves@redhat.com>
3384 * linux-low.c (pid_is_stopped): New.
3385 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3387 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3389 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3392 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3394 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3396 2012-02-24 Luis Machado <lgustavo@codesourcery>
3398 * server.c (handle_query): Advertise support for target-side
3399 breakpoint condition evaluation.
3400 (process_point_options): New function.
3401 (process_serial_event): When inserting a breakpoint, check for
3402 a target-side condition that should be evaluated.
3404 * mem-break.c: Include regcache.h and ax.h.
3405 (point_cond_list_t): New data structure.
3406 (breakpoint) <cond_list>: New field.
3407 (find_gdb_breakpoint_at): Make non-static.
3408 (delete_gdb_breakpoint_at): Clear any target-side
3410 (clear_gdb_breakpoint_conditions): New function.
3411 (add_condition_to_breakpoint): Likewise.
3412 (add_breakpoint_condition): Likewise.
3413 (gdb_condition_true_at_breakpoint): Likewise.
3414 (gdb_breakpoint_here): Return result directly instead
3415 of going through a local variable.
3417 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3418 (clear_gdb_breakpoint_conditions): Likewise.
3419 (add_breakpoint_condition): Likewise.
3420 (gdb_condition_true_at_breakpoint): Likewise.
3422 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3423 (need_step_over_p): Take target-side breakpoint condition into
3426 2012-02-24 Luis Machado <lgustavo@codesourcery>
3428 * server.h: Include tracepoint.h.
3429 (agent_mem_read, agent_get_trace_state_variable_value,
3430 agent_set_trace_state_variable_value,
3431 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3432 get_set_tsv_func_addr): New prototypes.
3434 * ax.h: New include file.
3435 * ax.c: New source file.
3437 * tracepoint.c: Include ax.h.
3438 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3439 agent_expr, eval_result_type): Move to ax.h.
3440 (parse_agent_expr): Rename to ...
3441 (gdb_parse_agent_expr): ... this, make it non-static and move
3443 (unparse_agent_expr) Rename to ...
3444 (gdb_unparse_agent_expr): ... this, make it non-static and move
3446 (eval_agent_expr): Rename to ...
3447 (eval_tracepoint_agent_expr): ... this.
3448 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3449 forward declarations.
3450 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3451 (agent_get_trace_state_variable_value): New function.
3452 (agent_set_trace_state_variable_value): New function.
3453 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3454 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3455 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3456 (condition_true_at_tracepoint): Likewise.
3457 (parse_agent_expr): Rename to ...
3458 (gdb_parse_agent_expr): ... this and move to ax.c.
3459 (unparse_agent_expr): Rename to ...
3460 (gdb_unparse_agent_expr): ... this and move to ax.c.
3461 (gdb_agent_op_name): Move to ax.c.
3462 (eval_agent_expr): Rename to ...
3463 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3465 (eval_tracepoint_agent_expr): New function.
3466 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3468 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3470 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3471 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3472 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3473 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3474 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3475 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3476 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3477 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3478 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3479 (compile_bytecodes): Remove forward declaration.
3480 (is_goto_target): Move to ax.c.
3481 (compile_bytecodes): Move to ax.c and call
3482 agent_get_trace_state_variable_value (...) and
3483 agent_set_trace_state_variable_value (...).
3485 * Makefile.in: Update ax.c and IPA dependencies.
3487 2012-02-24 Pedro Alves <palves@redhat.com>
3489 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3490 (cmd_bigqtbuffer_circular): ... this. Only handle
3491 'QTBuffer:circular:'.
3492 (handle_tracepoint_general_set): Adjust.
3494 2012-02-16 Yao Qi <yao@codesourcery.com>
3496 * inferiors.c: Move code to ...
3497 * dll.c: .... here. New.
3498 * server.h: Declare clear_dlls.
3499 * Makefile.in (SFILES): Add dll.c.
3503 2012-02-11 Yao Qi <yao@codesourcery.com>
3505 * server.c: (handle_monitor_command): Add a new parameter
3507 (handle_query): Update caller.
3509 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3511 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3512 * configure, config.in: Regenerate.
3513 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3516 2012-02-02 Pedro Alves <palves@redhat.com>
3518 Try SIGKILL first, then PTRACE_KILL.
3519 * linux-low.c (linux_kill_one_lwp): New.
3520 (linux_kill_one_lwp): Rename to ...
3521 (kill_one_lwp_callback): ... this. Use the new
3524 2012-02-02 Pedro Alves <palves@redhat.com>
3526 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3529 2012-01-27 Pedro Alves <palves@redhat.com>
3531 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3532 (elf_64_file_p): Make static.
3533 (linux_pid_exe_is_elf_64_file): New.
3534 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3535 Delete declarations.
3536 (linux_pid_exe_is_elf_64_file): Declare.
3537 * linux-x86-low.c (x86_arch_setup): Use
3538 linux_pid_exe_is_elf_64_file.
3540 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3542 * linux-low.c (linux_wait_for_event_1): Rename to ...
3543 (linux_wait_for_event): ... here and merge it with former
3544 linux_wait_for_event - new variable wait_ptid, use it.
3545 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3547 2012-01-23 Pedro Alves <palves@redhat.com>
3549 * server.c (main): Avoid yet another case of infinite loop while
3550 detaching/killing after a longjmp.
3552 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3555 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3557 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3559 * hostio.c (handle_readlink): New function.
3560 (handle_vFile): Call it to handle "vFile:readlink" packets.
3562 2012-01-20 Pedro Alves <palves@redhat.com>
3563 Ulrich Weigand <ulrich.weigand@linaro.org>
3565 * server.c (handle_v_requests): Only support vAttach and vRun to
3566 start multiple processes when in extended protocol mode.
3568 2012-01-17 Pedro Alves <palves@redhat.com>
3570 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3571 memalign plus mprotect to allocate the scratch buffer.
3573 2012-01-13 Pedro Alves <palves@redhat.com>
3575 * server.c (attach_inferior): Clear `cont_thread'.
3577 2012-01-13 Pedro Alves <palves@redhat.com>
3579 * server.c (main): Avoid infinite loop while detaching/killing
3582 2012-01-09 Doug Evans <dje@google.com>
3584 * server.c (start_inferior): Set last_ptid in --wrapper case.
3586 2012-01-06 Yao Qi <yao@codesourcery.com>
3588 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3590 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3592 2012-01-04 Yao Qi <yao@codesourcery.com>
3594 * tracepoint.c (cmd_qtdp): Print debug message
3595 for static tracepoint.
3597 2012-01-04 Yao Qi <yao@codesourcery.com>
3599 * tracepoint.c (trace_vdebug): Differentiate debug message
3600 between gdbserver and IPA.
3602 2012-01-03 Yao Qi <yao@codesourcery.com>
3604 * tracepoint.c (tracepoint_was_hit): Don't collect for
3607 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3609 * terminal.h: Reformat copyright header.
3611 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3613 * server.c (gdbserver_version): Update copyright year.
3614 * gdbreplay.c (gdbreplay_version): Likewise.
3616 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3618 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3621 2011-12-18 Hui Zhu <teawater@gmail.com>
3622 * linux-low.c (linux_create_inferior): Save return value to ret.
3624 2011-12-18 Hui Zhu <teawater@gmail.com>
3626 * linux-low.c (linux_create_inferior): Save return value to ret.
3628 2011-12-16 Doug Evans <dje@google.com>
3630 * linux-low.c (linux_create_inferior): If stdio connection,
3631 redirect stdin from /dev/null, stdout to stderr.
3632 * remote-utils.c (remote_is_stdio): New static global.
3633 (remote_connection_is_stdio): New function.
3634 (remote_prepare): Handle stdio connection.
3635 (remote_open): Ditto.
3636 (remote_close): Don't close stdin for stdio connections.
3637 (read_prim,write_prim): New functions. Replace all calls to
3638 read/write to these.
3639 * server.c (main): Watch for "-" argument. Move call to
3640 remote_prepare before start_inferior.
3641 * server.h (STDIO_CONNECTION_NAME): New macro.
3642 (remote_connection_is_stdio): Declare.
3644 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3645 in debugging output.
3647 2011-12-15 Yao Qi <yao@codesourcery.com>
3649 * tracepoint.c: Include sys/syscall.h.
3650 (gdb_ust_thread): Remove preprocessor conditional.
3652 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3654 * linux-low.c (linux_detach_one_lwp): Call
3655 the_low_target.prepare_to_resume before detaching.
3657 2011-12-14 Yao Qi <yao@codesourcery.com>
3659 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3662 2011-12-14 Yao Qi <yao@codesourcery.com>
3664 * i386-low.c (i386_low_stopped_data_address): Initialize local
3667 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3671 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3672 DR_CONTROL unless necessary. Extend comments.
3673 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3674 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3676 2011-12-13 Yao Qi <yao@codesourcery.com>
3678 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3680 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3682 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3684 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3685 Print new debug message for such case.
3687 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3689 Fix overlapping memcpy.
3690 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3691 the read_inferior_memory transfer.
3692 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3693 write_inferior_memory transfer.
3694 (set_fast_tracepoint_jump): New variable buf. Use it for the
3695 read_inferior_memory and write_inferior_memory transfers.
3696 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3697 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3698 Use it for the write_inferior_memory transfer.
3699 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3702 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3704 * linux-low.c (fetch_register, store_register): Make code
3705 consistent, fix formatting.
3707 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3709 * linux-low.c (usr_store_inferior_registers): Factor out code
3710 to handle individual registers into...
3711 (store_register): ... this new function.
3713 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3715 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3716 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3717 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3718 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3719 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3720 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3721 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3722 (srv_xmlfiles): Add new XML files.
3724 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3726 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3727 (init_registers_s390_linux32v1): Add prototype.
3728 (init_registers_s390_linux32v2): Likewise.
3729 (init_registers_s390_linux64v1): Likewise.
3730 (init_registers_s390_linux64v2): Likewise.
3731 (init_registers_s390x_linux64v1): Likewise.
3732 (init_registers_s390x_linux64v2): Likewise.
3733 (s390_num_regs): Increment to 52.
3734 (s390_regmap): Add orig_r2 register.
3735 (s390_num_regs_3264): Increment to 68.
3736 (s390_regmap_3264): Add orig_r2 register.
3737 (s390_collect_ptrace_register): Handle orig_r2 register.
3738 (s390_supply_ptrace_register): Likewise.
3739 (s390_fill_last_break): New function.
3740 (s390_store_last_break): Likewise.
3741 (s390_fill_system_call): New function.
3742 (s390_store_system_call): Likewise.
3743 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3745 (s390_check_regset): New function.
3746 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3747 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3748 Update target_regsets for available register sets.
3750 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3751 Jan Kratochvil <jan.kratochvil@redhat.com>
3753 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3754 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3756 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3757 * linux-low.h (struct process_info_private): New member r_debug.
3758 * server.c (handle_qxfer_libraries): Call
3759 the_target->qxfer_libraries_svr4.
3760 (handle_qxfer_libraries_svr4): New function.
3761 (qxfer_packets): New entry "libraries-svr4".
3762 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3763 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3764 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3765 PACKET_qXfer_libraries_svr4.
3767 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3769 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3770 PSW address/mask between 8-byte and 16-byte formats.
3771 (s390_supply_ptrace_register): Likewise.
3772 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3773 basic addressing mode bit.
3775 2011-11-24 Stan Shebs <stan@codesourcery.com>
3777 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3779 2011-11-17 Stan Shebs <stan@codesourcery.com>
3781 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3782 (tracing_start_time): New global.
3783 (tracing_stop_time): New global.
3784 (tracing_user_name): New global.
3785 (tracing_notes): New global.
3786 (tracing_stop_note): New global.
3787 (cmd_qtstart): Set traceframe_usage, start_time.
3788 (stop_tracing): Set stop_time.
3789 (cmd_qtstatus): Report additional status.
3790 (cmd_qtp): New function.
3791 (handle_tracepoint_query): Call it.
3792 (cmd_qtnotes): New function.
3793 (handle_tracepoint_general_set): Call it.
3794 (get_timestamp): Rename from tsv_get_timestamp.
3796 2011-11-14 Stan Shebs <stan@codesourcery.com>
3797 Kwok Cheung Yeung <kcy@codesourcery.com>
3799 * linux-x86-low.c (small_jump_insn): New.
3800 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3801 trampoline and error message, build a trampoline and issue a small
3802 jump instruction to it.
3803 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3804 trampoline and error message.
3805 (x86_get_min_fast_tracepoint_insn_len): New.
3806 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3807 * linux-low.h (struct linux_target_ops): Add arguments to
3808 install_fast_tracepoint_jump_pad operation, add new operation.
3809 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3811 (linux_get_min_fast_tracepoint_insn_len): New function.
3812 (linux_target_op): Add new operation.
3813 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3814 (gdb_trampoline_buffer_end): Ditto.
3815 (gdb_trampoline_buffer_error): Ditto.
3816 (struct ipa_sym_addresses): Add fields for new IPA variables.
3817 (symbol_list): Add entries for new IPA variables.
3818 (struct tracepoint): Add fields to hold the address range of the
3819 trampoline used by the tracepoint.
3820 (trampoline_buffer_head): New static variable.
3821 (trampoline_buffer_tail): Ditto.
3822 (claim_trampoline_space): New function.
3823 (have_fast_tracepoint_trampoline_buffer): New function.
3824 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3826 (install_fast_tracepoint): Ditto, also add error buffer argument.
3827 (cmd_qtminftpilen): New function.
3828 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3829 (fast_tracepoint_from_trampoline_address): New function.
3830 (fast_tracepoint_collecting): Handle trampoline as part of jump
3832 (set_trampoline_buffer_space): New function.
3833 (initialize_tracepoint): Initialize new IPA variables.
3834 * target.h (struct target_ops): Add arguments to
3835 install_fast_tracepoint_jump_pad operation, add new
3836 get_min_fast_tracepoint_insn_len operation.
3837 (target_get_min_fast_tracepoint_insn_len): New.
3838 (install_fast_tracepoint_jump_pad): Add arguments.
3839 * server.h (IPA_BUFSIZ): Define.
3840 * linux-i386-ipa.c: Include extra header files.
3841 (initialize_fast_tracepoint_trampoline_buffer): New function.
3842 (initialize_low_tracepoint): Call it.
3843 * server.h (set_trampoline_buffer_space): Declare.
3844 (claim_trampoline_space): Ditto.
3845 (have_fast_tracepoint_trampoline_buffer): Ditto.
3847 2011-11-14 Yao Qi <yao@codesourcery.com>
3849 * server.c (handle_query): Handle InstallInTrace for qSupported.
3850 * tracepoint.c (add_tracepoint): Sort list.
3851 (install_tracepoint, download_tracepoint): New.
3852 (cmd_qtdp): Call them to install and download tracepoints.
3853 (sort_tracepoints): Removed.
3854 (cmd_qtstart): Update.
3856 2011-11-14 Yao Qi <yao@codesourcery.com>
3858 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3859 * mem-break.h: Declare.
3860 * tracepoint.c (cmd_qtstart): Move some code to ...
3861 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3863 (download_tracepoints): Move some code to ...
3864 (download_tracepoint_1): ... here. New.
3866 2011-11-08 Yao Qi <yao@codesourcery.com>
3868 * remote-utils.c (relocate_instruction): A comment fix.
3870 2011-11-07 Joel Brobecker <brobecker@adacore.com>
3872 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3873 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3874 dr_status_mirror and dr_control_mirror from debug_reg_state.
3875 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3876 (i386_initial_stuff): Remove use of deleted globals.
3877 (i386_get_thread_context, i386_set_thread_context,
3878 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3879 from debug_reg_state.
3881 2011-11-05 Yao Qi <yao@codesourcery.com>
3883 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3884 address as TPOINT's.
3886 2011-11-02 Stan Shebs <stan@codesourcery.com>
3888 * tracepoint.c (agent_mem_read_string): New function.
3889 (eval_agent_expr): Call it for tracenz.
3890 * server.c (handle_query): Report support for tracenz.
3892 2011-11-02 Yao Qi <yao@codesourcery.com>
3894 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3896 2011-11-02 Yao Qi <yao@codesourcery.com>
3898 * target.h: Fix a typo in comment.
3900 2011-10-31 Pedro Alves <pedro@codesourcery.com>
3902 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3903 clobber the breakpoints' shadows with fast tracepoint jumps.
3904 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3905 * target.c (write_inferior_memory): Also pass MYADDR down to
3908 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3910 * configure.ac: Check support for personality routine.
3911 * configure: Regenerate.
3912 * config.in: Likewise.
3913 * linux-low.c: Include <sys/personality.h>.
3914 Define ADDR_NO_RANDOMIZE if necessary.
3915 (linux_create_inferior): Disable address space randomization when
3916 forking inferior, if requested.
3917 (linux_supports_disable_randomization): New function.
3918 (linux_target_ops): Install it.
3919 * server.h (disable_randomization): Declare.
3920 * server.c (disable_randomization): New global variable.
3921 (handle_general_set): Handle QDisableRandomization.
3922 (handle_query): Likewise for qSupported.
3923 (main): Support --disable-randomization and --no-disable-randomization
3924 command line arguments.
3925 * target.h (struct target_ops): Add supports_disable_randomization.
3926 (target_supports_disable_randomization): New macro.
3928 2011-09-29 Mike Frysinger <vapier@gentoo.org>
3930 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3932 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3933 [!PT_GETDSBT] (target_loadmap): New definition.
3934 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3935 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3936 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3937 and PT_GETDSBT to LINUX_LOADMAP.
3938 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3939 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3941 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3943 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3944 (arm_linux_hwbp_cap): New static variable.
3945 (arm_linux_get_hwbp_cap): Replace by ...
3946 (arm_linux_init_hwbp_cap): ... this new function.
3947 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3948 (arm_linux_get_hw_watchpoint_count): Likewise.
3949 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3950 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3951 (arm_prepare_to_resume): Use perror_with_name instead of error.
3953 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3955 * linux-arm-low.c: Include <signal.h>.
3956 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3957 (struct arm_linux_hwbp_cap): New data type.
3958 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3959 (struct arm_linux_hw_breakpoint): New data type.
3960 (MAX_BPTS, MAX_WPTS): Define.
3961 (struct arch_process_info, struct arch_lwp_info): New data types.
3962 (arm_linux_get_hwbp_cap): New function.
3963 (arm_linux_get_hw_breakpoint_count): Likewise.
3964 (arm_linux_get_hw_watchpoint_count): Likewise.
3965 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3966 (arm_hwbp_control_initialize): Likewise.
3967 (arm_hwbp_control_is_enabled): Likewise.
3968 (arm_hwbp_control_is_initialized): Likewise.
3969 (arm_hwbp_control_disable): Likewise.
3970 (arm_linux_hw_breakpoint_equal): Likewise.
3971 (arm_linux_hw_point_initialize): Likewise.
3972 (struct update_registers_data): New data structure.
3973 (update_registers_callback: New function.
3974 (arm_insert_point): Likewise.
3975 (arm_remove_point): Likewise.
3976 (arm_stopped_by_watchpoint): Likewise.
3977 (arm_stopped_data_address): Likewise.
3978 (arm_new_process): Likewise.
3979 (arm_new_thread): Likewise.
3980 (arm_prepare_to_resume): Likewise.
3981 (the_low_target): Register arm_insert_point, arm_remove_point,
3982 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3983 arm_new_thread, and arm_prepare_to_resume.
3985 2011-09-15 Stan Shebs <stan@codesourcery.com>
3987 * server.h (struct emit_ops): Add compare-goto fields.
3988 * tracepoint.c (gdb_agent_op_sizes): New table.
3989 (emit_eq_goto): New function.
3990 (emit_ne_goto): New function.
3991 (emit_lt_goto): New function.
3992 (emit_le_goto): New function.
3993 (emit_gt_goto): New function.
3994 (emit_ge_goto): New function.
3995 (is_goto_target): New function.
3996 (compile_bytecodes): Recognize special cases of compare-goto
3997 combinations and call specialized emitters for them.
3998 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3999 (amd64_emit_ne_goto): New function.
4000 (amd64_emit_lt_goto): New function.
4001 (amd64_emit_le_goto): New function.
4002 (amd64_emit_gt_goto): New function.
4003 (amd64_emit_ge_goto): New function.
4004 (amd64_emit_ops): Add the new functions.
4005 (i386_emit_eq_goto): New function.
4006 (i386_emit_ne_goto): New function.
4007 (i386_emit_lt_goto): New function.
4008 (i386_emit_le_goto): New function.
4009 (i386_emit_gt_goto): New function.
4010 (i386_emit_ge_goto): New function.
4011 (i386_emit_ops): Add the new functions.
4013 2011-09-08 Stan Shebs <stan@codesourcery.com>
4015 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4016 (i386_emit_epilogue): Restore %ebx.
4018 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4020 * server.c (step_thread): Remove definition.
4021 (process_serial_event): Don't handle Hs.
4022 * server.h (step_thread): Remove declaration.
4023 * target.c (set_desired_inferior): Remove use of step_thread.
4025 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4027 * linux-low.c: Include linux-procfs.h.
4028 (linux_attach_lwp_1): Update comments.
4029 (linux_attach): Scan for existing threads when attaching to a
4030 process that is the tgid.
4031 * Makefile.in: Update dependencies.
4033 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4035 * configure.srv: Add linux-procfs.o dependencies.
4037 2011-08-14 Yao Qi <yao@codesourcery.com>
4039 * target.h (struct target_ops): Fix indent.
4040 * win32-low.c (win32_target_ops): Fix comment.
4042 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4043 Yao Qi <yao@codesourcery.com>
4045 * Makefile.in (clean): Remove tic6x-*.c files.
4046 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4047 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4048 (tic6x-c64xp-linux.c): Likewise.
4049 * configure.srv: Add support for tic6x-*-uclinux.
4050 * linux-tic6x-low.c: New.
4051 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4053 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4054 Yao Qi <yao@codesourcery.com>
4056 * target.h (struct target_ops): Add read_loadmap.
4057 * linux-low.c (struct target_loadseg): New type.
4058 (struct target_loadmap): New type.
4059 (linux_read_loadmap): New function.
4060 (linux_target_ops): Add linux_read_loadmap.
4061 * server.c (handle_query): Support qXfer:fdpic:read packet.
4062 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4065 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4067 * win32-low.c: Include <stdint.h>.
4069 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4071 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4072 to the inferior here.
4073 (i386_remove_aligned_watchpoint): Ditto.
4074 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4075 fit part of the watchpoint in the debug registers.
4076 (i386_update_inferior_debug_regs): New.
4077 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4078 registers, and only update the inferior on success.
4079 (i386_low_remove_watchpoint): Ditto.
4081 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4083 * linux-low.c (compare_ints, unique, list_threads, show_process,
4084 linux_core_of_thread): Delete.
4085 (linux_target_ops): Change linux_core_of_thread to
4086 linux_common_core_of_thread.
4087 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4088 * utils.c (malloc_failure): Change type of argument.
4089 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4090 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4091 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4092 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4093 (IPA_OBJS): Add common-utils-ipa.o.
4094 (ptid_h, linux_osdata_h): New macros.
4095 (server_h): Add common/common-utils.h, common/xml-utils.h,
4096 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4098 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4099 ptid.o, buffer.o): New rules.
4100 (linux-low.o): Add common/linux-osdata.h as a dependency.
4101 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4102 * configure.ac: Add AC_HEADER_DIRENT check.
4103 * config.in: Regenerate.
4104 * configure: Regenerate.
4105 * remote-utils.c (xml_escape_text): Delete.
4106 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4107 buffer_xml_printf): Move to common/buffer.c.
4108 * server.c (main): Remove call to initialize_inferiors.
4109 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4110 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4111 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4112 internal_error, gdb_assert, gdb_assert_fail): Delete.
4113 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4114 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4116 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4117 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4118 initialize_inferiors): Delete.
4120 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4122 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4125 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4127 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4129 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4131 2011-05-26 Yao Qi <yao@codesourcery.com>
4133 * Makefile.in (thread-db.o): Track dependence to
4134 common/gdb_thread_db.h.
4135 * thread-db.c: include gdb_thread_db.h from right place.
4137 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4139 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4140 __FILE__ and __LINE__ to internal_error.
4142 2011-05-13 Doug Evans <dje@google.com>
4144 * thread-db.c (try_thread_db_load_from_sdir): New function.
4145 (try_thread_db_load_from_dir): New function.
4146 (thread_db_load_search): Handle $sdir, ignore $pdir.
4147 Remove trying of system directories if search of
4148 libthread-db-search-path fails, that is now done via $sdir.
4150 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4152 * server.c (handle_query): Add EnableDisableTracepoints to the list
4153 of supported features.
4154 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4156 (cmd_qtenable_disable): New.
4157 (cmd_qtstart): Install tracepoints even if disabled.
4158 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4159 receiving a QTEnable or QTDisable packet.
4160 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4161 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4163 (gdb_probe): Skip data collection if static tracepoint is disabled.
4165 2011-05-10 Doug Evans <dje@google.com>
4167 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4169 2011-05-04 Doug Evans <dje@google.com>
4171 * linux-low.c (linux_join): Skip process lookup.
4172 * spu-low.c (spu_join): Ditto.
4173 * server.c (join_inferiors_callback): Delete.
4174 (process_serial_event): For 'D' packet (detach) call join_inferior
4177 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4179 * README: Don't mention xscale*-*-linux*.
4180 * configure.srv (xscale*-*-linux*): Don't handle target.
4182 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4184 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4186 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4187 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4188 (i386_emit_void_call_2): Likewise.
4190 2011-04-26 Yao Qi <yao@codesourcery.com>
4192 * linux-low.c: Move common macros to linux-ptrace.h.
4193 Include linux-ptrace.h.
4194 * Makefile.in (linux_ptrace_h): New.
4195 (linux-low.o): Depends on linux-ptrace.h.
4197 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4199 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4200 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4201 (remote_prepare): New function with most of the TCP code from ...
4202 (remote_open): ... here. Detect PORT here unconditionally. Move also
4203 setting transport_is_reliable.
4204 * server.c (run_once): New variable.
4205 (gdbserver_usage): Document it.
4206 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4207 the first run if RUN_ONCE.
4208 * server.h (run_once, remote_prepare): New declarations.
4210 2011-04-19 Tom Tromey <tromey@redhat.com>
4212 * win32-low.c (handle_load_dll): Remove duplicate "the".
4214 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4216 Remove support for old Cygwin 1.5 versions.
4217 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4218 function to avoid warning.
4219 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4222 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4224 * gdbserver/server.h (Macro _): Define it if not available.
4226 2011-03-14 Michael Snyder <msnyder@vmware.com>
4228 * hostio.c (handle_close): Remove unnecessary null test.
4230 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4232 * Makefile.in (maintainer-clean realclean distclean): Remove
4233 "make ... subdir_do" command.
4235 2011-03-10 Michael Snyder <msnyder@vmware.com>
4237 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4239 * server.c (handle_v_run): Free alloced buffer on early return.
4241 2011-03-09 Yao Qi <yao@codesourcery.com>
4244 2011-03-04 Yao Qi <yao@codesourcery.com>
4246 * Makefile.in: Remove GNU make feature --directory.
4248 2011-03-05 Yao Qi <yao@codesourcery.com>
4250 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4251 (subdir_do): New make target. Copied from gdb/Makefile.
4252 (maintainer-clean, realclean, distclean, clean): Call corresponding
4253 make targets in common/Makefile.
4255 2011-02-11 Yao Qi <yao@codesourcery.com>
4257 * configure.ac: Call AC_PROG_RANLIB.
4258 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4259 * configure: Regenerate.
4261 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4263 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4265 2011-03-06 Yao Qi <yao@codesourcery.com>
4267 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4269 2011-03-05 Yao Qi <yao@codesourcery.com>
4271 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4272 (subdir_do): New make target. Copied from gdb/Makefile.
4273 (maintainer-clean, realclean, distclean, clean): Call corresponding
4274 make targets in common/Makefile.
4276 2011-03-04 Yao Qi <yao@codesourcery.com>
4278 * Makefile.in: Remove GNU make feature --directory.
4280 2011-03-04 Michael Snyder <msnyder@vmware.com>
4282 * server.c (queue_stop_reply): Call xmalloc not malloc.
4284 2011-03-02 Michael Snyder <msnyder@vmware.com>
4286 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4288 2011-02-28 Michael Snyder <msnyder@vmware.com>
4290 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4291 (cmd_qtframe): Ditto.
4292 (cmd_qtbuffer): Ditto.
4293 (cmd_bigqtbuffer): Ditto.
4295 * utils.c (decimal2str): Initialize 'width' to nine, then
4298 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4300 * hostio.c (require_data): Free *data, not data.
4302 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4304 * hostio.c (require_data): Use free, not xfree.
4306 2011-02-27 Michael Snyder <msnyder@vmware.com>
4308 * server.c (handle_query): Discard unused value.
4310 * hostio.c (require_data): Free malloc memory before returning
4313 2011-02-26 Michael Snyder <msnyder@vmware.com>
4315 * linux-low.c (list_threads): Call closedir for dirent.
4317 2011-02-27 Michael Snyder <msnyder@vmware.com>
4319 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4320 a case statement falls through.
4322 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4324 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4327 2011-02-26 Michael Snyder <msnyder@vmware.com>
4329 * utils.c (decimal2str): Eliminate dead code and dead param.
4330 (pulongest): Drop dead param from call to decimal2str.
4333 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4335 Revert the following patch (not approved yet):
4336 2011-02-21 Hui Zhu <teawater@gmail.com>
4337 * tracepoint.c (tp_printf): New function.
4338 (eval_agent_expr): Handle gdb_agent_op_printf.
4340 2011-02-21 Hui Zhu <teawater@gmail.com>
4342 * tracepoint.c (tp_printf): New function.
4343 (eval_agent_expr): Handle gdb_agent_op_printf.
4345 2011-02-18 Tom Tromey <tromey@redhat.com>
4347 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4348 (tracepoint.o): Likewise.
4349 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4350 (gdb_agent_op_names): Likewise.
4352 2011-02-18 Tom Tromey <tromey@redhat.com>
4354 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4355 gdb_agent_op_rot>: New constants.
4356 (gdb_agent_op_names): Add pick and roll.
4357 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4360 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4362 * aclocal.m4: Regenerated with aclocal-1.11.1.
4364 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4366 * server.c (handle_qxfer_traceframe_info): New.
4367 (qxfer_packets): Register "traceframe-info".
4368 (handle_query): Report support for qXfer:traceframe-info:read+.
4369 * tracepoint.c (match_blocktype): New.
4370 (traceframe_find_block_type): Rename to ...
4371 (traceframe_walk_blocks): ... this. Add callback filter argument,
4373 (traceframe_find_block_type): New, reimplemented on top of
4374 traceframe_walk_blocks.
4375 (build_traceframe_info_xml): New.
4376 (traceframe_read_info): New.
4377 * server.h (traceframe_read_info): Declare.
4379 2011-02-11 Yao Qi <yao@codesourcery.com>
4381 * configure.ac: Call AC_PROG_RANLIB.
4382 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4383 * configure: Regenerate.
4385 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4387 * server.c (gdb_read_memory): Change return semantics to allow
4389 (handle_search_memory_1): Adjust.
4390 (process_serial_event) <'m' packet>: Handle partial transfers.
4391 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4393 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4395 * regcache.c (init_register_cache): Initialize
4396 regcache->register_status.
4397 (free_register_cache): Release regcache->register_status.
4398 (regcache_cpy): Copy register_status.
4399 (registers_to_string): Print 'x's for unavailable registers.
4400 (supply_register): Mark the register's status valid or
4401 unavailable, depending on whether a buffer was passed in or not.
4402 (supply_register_zeroed): New.
4403 (supply_regblock): Mark the registers' status valid or
4404 unavailable, depending on whether a buffer was passed in or not.
4405 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4406 (struct regcache): New `register_status' field.
4407 (supply_register_zeroed): Declare.
4408 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4409 supply_register_zeroed, rather than passing a NULL buffer to
4411 * tracepoint.c (fetch_traceframe_registers): Update comment.
4413 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4415 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4418 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4420 * server.h (decode_xfer_write): Change prototype.
4421 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4422 and don't extract the annex here.
4423 * server.c (decode_xfer_read): Remove `annex' parameter,
4424 and don't extract the annex here.
4426 (struct qxfer): New.
4427 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4428 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4429 (handle_qxfer_statictrace): New functions, abstracted out from
4430 handle_query, and made to use the struct qxfer interface.
4431 (handle_threads_qxfer_proper): Rename to ...
4432 (handle_qxfer_threads_proper): ... this.
4433 (handle_threads_qxfer): Rename to ...
4434 (handle_qxfer_threads): ... this. Adjust.
4435 (qxfer_packets): New array.
4436 (handle_qxfer): New function.
4437 (handle_query): Use handle_qxfer.
4439 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4441 * gdbreplay.c: Shorten lines of >= 80 columns.
4442 * linux-low.c: Ditto.
4443 * linux-ppc-low.c: Ditto.
4444 * linux-s390-low.c: Ditto.
4445 * linux-sparc-low.c: Ditto.
4446 * linux-x86-low.c: Ditto.
4447 * linux-xtensa-low.c: Ditto.
4448 * mem-break.c: Ditto.
4450 * regcache.h: Ditto.
4451 * remote-utils.c: Ditto.
4454 * thread-db.c: Ditto.
4455 * tracepoint.c: Ditto.
4457 * win32-low.h: Ditto.
4459 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4461 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4464 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4466 * server.c (gdbserver_version): Update copyright year in version
4468 * gdbreplay.c (gdbreplay_version): Ditto.
4470 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4472 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4473 * linux-bfin-low.c: New file.
4474 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4475 PT_DATA_ADDR for BFIN targets.
4476 * Makefile.in (SFILES): Add linux-bfin-low.c.
4477 (clean): Remove reg-bfin.c.
4478 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4479 * README: Mention supported Blackfin targets.
4481 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4483 * .gitignore: New file.
4485 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4487 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4489 2010-10-22 Jie Zhang <jie@codesourcery.com>
4491 * Makefile.in: Add FLAGS_TO_PASS variable.
4492 (install): Remove dependency of install-only and recursively
4493 invoke make for install-only.
4495 2010-10-04 Doug Evans <dje@google.com>
4497 * Makefile.in (uninstall): Use $(DESTDIR).
4499 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4503 * linux-x86-low.c (compat_siginfo_from_siginfo)
4504 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4505 si_code is < 0. Check for si_code == SI_TIMER before checking for
4508 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4510 * lynx-i386-low.c: New file.
4511 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4513 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4515 * lynx-low.c (ptrace_request_to_str): Remove handling for
4516 request values that have been removed in LynxOS 5.x.
4518 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4520 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4523 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4525 * configure.ac: Add --enable-inprocess-agent option.
4526 * configure: Rebuilt.
4528 2010-09-06 Yao Qi <yao@codesourcery.com>
4530 * linux-low.c (linux_kill): Remove unused variable.
4531 (linux_stabilize_threads): Likewise.
4532 * server.c (start_inferior): Likewise.
4533 (queue_stop_reply_callback): Likewise.
4534 * tracepoint.c (do_action_at_tracepoint): Likewise.
4536 2010-09-06 Yao Qi <yao@codesourcery.com>
4538 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4541 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4543 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4545 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4547 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4550 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4552 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4553 gdbserver/lynx-ppc-low.c: New files.
4554 * Makefile.in (lynx_low_h): New variable.
4555 (lynx-low.o, lynx-ppc-low.o): New rules.
4556 * configure.ac: On LynxOS, link with -lnetinet.
4557 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4558 * configure: regenerate.
4560 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4562 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4563 * configure.ac: Add check for vasprintf and vsnprintf.
4564 * configure, config.in: Regenerate.
4565 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4567 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4569 * gdbreplay.c: Move include of alloca.h up, next to include of
4571 * server.h: Add include of malloc.h.
4572 * mem-break.c: Remove include of malloc.h.
4573 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4575 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4577 * Makefile.in (memmem.o): Build with -Wno-error.
4579 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4581 * utils.c (xsnprintf): Make non-static.
4582 * server.h: Add xsnprintf declaration.
4583 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4584 replace calls to snprintf by calls to xsnprintf throughout.
4586 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4588 * configure.ac: Add configure check for alloca.
4589 * configure, config.in: Regenerate.
4590 * server.h: Include alloca.h if it exists.
4591 * gdbreplay.c: Include alloca.h if it exists.
4593 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4595 * linux-low.c (__SIGRTMIN): Define if not already defined.
4596 (linux_create_inferior): Check for __ANDROID__ rather than
4598 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4599 are already deferred.
4600 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4601 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4602 stopped and already has a pending signal to report.
4603 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4604 a pending signal to report or is moving out of a jump pad.
4605 (linux_init_signals): Check for __ANDROID__ rather than
4608 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4610 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4611 debug_threads check. Avoid a linear search when not doing debug
4614 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4616 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4617 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4618 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4619 (process_event): Change local fd's type to gdb_fildes_t.
4620 (create_file_handler): Adjust prototype.
4621 (delete_file_handler): Adjust prototype.
4622 (handle_file_event): Adjust prototype. Use pfildes.
4623 (create_file_event): Adjsut prototype.
4624 * remote-utils.c (remote_desc, listen_desc): Change type to
4626 * server.h: New gdb_fildes_t typedef.
4627 [USE_WIN32API]: Include winsock2.h.
4628 (delete_file_handler, add_file_handler): Adjust prototypes.
4630 * utils.c (pfildes): New.
4632 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4634 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4635 * configure: Regenerate.
4637 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4639 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4640 (linux_done_accessing_memory): ... this.
4641 (linux_target_ops): Adjust.
4642 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4643 * nto-low.c (nto_target_ops): Adjust comment.
4644 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4645 * spu-low.c (spu_target_ops): Adjust comment.
4646 * target.h (target_ops): Rename unprepare_to_access_memory field
4647 to done_accessing_memory.
4648 (unprepare_to_access_memory): Rename to ...
4649 (done_accessing_memory): ... this.
4651 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4653 * linux-low.c (linux_prepare_to_access_memory): New.
4654 (linux_unprepare_to_access_memory): New.
4655 (linux_target_ops): Install them.
4656 * server.c (read_memory): Rename to ...
4657 (gdb_read_memory): ... this. Use
4658 prepare_to_access_memory/prepare_to_access_memory.
4659 (write_memory): Rename to ...
4660 (gdb_write_memory): ... this. Use
4661 prepare_to_access_memory/prepare_to_access_memory.
4662 (handle_search_memory_1): Adjust.
4663 (process_serial_event): Adjust.
4664 * target.h (struct target_ops): New fields
4665 prepare_to_access_memory and unprepare_to_access_memory.
4666 (prepare_to_access_memory, unprepare_to_access_memory): New.
4667 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4668 prepare_to_access_memory/prepare_to_access_memory.
4669 * nto-low.c (nto_target_ops): Adjust.
4670 * spu-low.c (spu_target_ops): Adjust.
4671 * win32-low.c (win32_target_ops): Adjust.
4673 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4675 * Makefile.in (WARN_CFLAGS): Get it from configure.
4676 (WERROR_CFLAGS): New.
4677 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4678 * configure.ac: Introduce --enable-werror, which adds -Werror to
4679 the compiler command line. Enabled by default. Disable with
4680 --disable-werror. Add -Wdeclaration-after-statement
4681 Wpointer-arith and -Wformat-nonliteral to warning flags.
4682 * configure: Regenerate.
4684 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4686 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4688 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4690 * gdbreplay.c (remote_error): New.
4692 (expect): Use gdbchar. Check for error reading from GDB.
4693 Clarify sync error output.
4694 (play): Check for errors writing to GDB.
4695 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4696 * remote-utils.c (getpkt): Check for errors writing to the remote
4699 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4701 * linux-low.c (linux_wait_1): Move non-debugging code out of
4702 `debug_threads' control.
4704 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4706 * linux-low.c (linux_wait_1): Don't set last_status here.
4707 * server.c (push_event, queue_stop_reply_callback): Assert we're
4708 not pushing a TARGET_WAITKIND_IGNORE event.
4709 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4710 (myresume, handle_target_event): Set the thread's last_resume_kind
4711 and last_status from the target returned status.
4713 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4717 * linux-x86-low.c (update_debug_registers_callback): New.
4718 (i386_dr_low_set_addr): Use it.
4719 (i386_dr_low_get_addr): New.
4720 (i386_dr_low_set_control): Use update_debug_registers_callback.
4721 (i386_dr_low_get_control): New.
4722 (i386_dr_low_get_status): Adjust.
4723 * linux-low.c (linux_stop_lwp): New.
4724 * linux-low.h (linux_stop_lwp): Declare.
4726 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4727 argument instead of a i386_debug_reg_state.
4728 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4729 a i386_debug_reg_state.
4730 (i386_insert_aligned_watchpoint): Adjust.
4731 (i386_remove_aligned_watchpoint): Adjust.
4732 (i386_low_stopped_data_address): Read the debug registers from the
4733 inferior instead of from the mirrors.
4734 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4735 (i386_dr_low_get_addr): Declare.
4736 (i386_dr_low_get_control): Declare.
4737 (i386_dr_low_get_status): Change prototype.
4739 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4740 (i386_dr_low_get_addr): New.
4741 (i386_dr_low_get_control): New.
4742 (i386_dr_low_get_status): Adjust prototype. Return
4744 (i386_initial_stuff): Clear dr_status_mirror and
4746 (i386_get_thread_context): Adjust.
4747 (i386_set_thread_context): Adjust.
4748 (i386_thread_added): Adjust.
4750 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4752 * linux-low.h (linux_thread_area): Delete declaration.
4754 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4756 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4757 after its termination.
4759 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4761 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4762 (gdb_wants_all_stopped): Delete.
4763 (linux_wait_1): Don't call them.
4764 * server.c (handle_v_cont): Tag all threads as want-stopped.
4765 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4766 stopped as "client-wants-stopped".
4768 2010-07-31 Pedro Alves <pedro@codesourcery.com>
4770 * Makefile.in (signals_h): New.
4771 (server_h): Depend on it.
4772 (server.o): Don't depend on $(signals_def).
4773 (signals.o): Depend on $(signals_def).
4775 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4777 * Makefile.in (signals_def): New.
4778 (server_h): Append include/gdb/signals.h and signals_def.
4779 (server.o): Append signals_def.
4781 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4783 * server.c (handle_target_event): Use target_signal_to_host for
4784 resume_info.sig initialization.
4785 * target.h (struct thread_resume) <sig>: New comment.
4787 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4789 * server.c (handle_query): strcpy() the returned string from paddress()
4790 instead of sprintf().
4791 * utils.c (paddress): Return phex_nz().
4793 2010-07-07 Joel Brobecker <brobecker@adacore.com>
4795 * server.c (handle_v_cont): Call mourn_inferior if process
4797 (myresume): Likewise.
4799 2010-07-01 Pedro Alves <pedro@codesourcery.com>
4801 Static tracepoints, and integration with UST.
4803 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4804 * mem-break.c (uninsert_all_breakpoints)
4805 (reinsert_all_breakpoints): New.
4806 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4807 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4808 (gdb_agent_ust_loaded, helper_thread_id)
4809 (gdb_agent_helper_thread_id): New macros.
4810 (struct ipa_sym_addresses): Add addr_ust_loaded,
4811 addr_helper_thread_id, addr_cmd_buf.
4812 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4813 (in_process_agent_loaded_ust): New.
4814 (write_e_ust_not_loaded): New.
4815 (maybe_write_ipa_ust_not_loaded): New.
4816 (struct collect_static_trace_data_action): New.
4817 (enum tracepoint_type) <static_tracepoint>: New.
4818 (struct tracepoint) <handle>: Mention static tracepoints.
4819 (struct static_tracepoint_ctx): New.
4820 (CMD_BUF_SIZE): New.
4821 (add_tracepoint_action): Handle static tracepoint actions.
4822 (unprobe_marker_at): New.
4823 (clear_installed_tracepoints): Handle static tracepoints.
4824 (cmd_qtdp): Handle static tracepoints.
4825 (probe_marker_at): New.
4826 (cmd_qtstart): Handle static tracepoints.
4827 (response_tracepoint): Handle static tracepoints.
4828 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4829 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4830 (get_context_regcache): Handle static tracepoints.
4831 (do_action_at_tracepoint): Handle static tracepoint actions.
4832 (traceframe_find_block_type): Handle static trace data blocks.
4833 (traceframe_read_sdata): New.
4834 (download_tracepoints): Download static tracepoint actions.
4835 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4836 (GDB_PROBE_NAME): New.
4841 (ust_marker_to_static_tracepoint): New.
4843 (collect_ust_data_at_tracepoint): New.
4844 (gdb_ust_probe): New.
4845 (UNIX_PATH_MAX, SOCK_DIR): New.
4846 (gdb_ust_connect_sync_socket): New.
4847 (resume_thread, stop_thread): New.
4848 (run_inferior_command): New.
4849 (init_named_socket): New.
4850 (gdb_ust_socket_init): New.
4851 (cstr_to_hexstr): New.
4853 (first_marker, next_marker): New.
4854 (response_ust_marker): New.
4855 (cmd_qtfstm, cmd_qtsstm): New.
4856 (unprobe_marker_at, probe_marker_at): New.
4857 (cmd_qtstmat, gdb_ust_thread): New.
4858 (gdb_ust_init): New.
4859 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4860 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4862 (x86_64_st_collect_regmap): New.
4863 (X86_64_NUM_ST_COLLECT_GREGS): New.
4864 (AMD64_RIP_REGNUM): New.
4865 (supply_static_tracepoint_registers): New.
4866 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4868 (i386_st_collect_regmap): New.
4869 (i386_NUM_ST_COLLECT_GREGS): New.
4870 (supply_static_tracepoint_registers): New.
4871 * server.c (handle_query): Handle qXfer:statictrace:read.
4872 <qSupported>: Report support for StaticTracepoints, and
4873 qXfer:statictrace:read features.
4874 * server.h (traceframe_read_sdata)
4875 (supply_static_tracepoint_registers): Declare.
4876 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4877 (unpack_varlen_hex): Include in IPA build.
4878 * Makefile.in (ustlibs, ustinc): New.
4879 (IPA_OBJS): Add remote-utils-ipa.o.
4880 ($(IPA_LIB)): Link -ldl and -lpthread.
4882 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4883 * config.in, configure: Regenerate.
4885 2010-06-20 Ian Lance Taylor <iant@google.com>
4886 Pedro Alves <pedro@codesourcery.com>
4888 * linux-x86-low.c (always_true): Delete.
4889 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4890 trying to fool the compiler with always_true.
4892 2010-06-20 Pedro Alves <pedro@codesourcery.com>
4894 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4895 conditions in gdbserver.
4897 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4899 * spu-low.c (spu_read_memory): Wrap around local store limit.
4900 (spu_write_memory): Likewise.
4902 2010-06-15 Pedro Alves <pedro@codesourcery.com>
4904 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4905 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4907 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4909 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4910 uses with LONGEST uses.
4912 2010-06-14 Stan Shebs <stan@codesourcery.com>
4913 Pedro Alves <pedro@codesourcery.com>
4917 * linux-x86-low.c: Include limits.h.
4922 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4923 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4924 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4925 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4926 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4927 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4928 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4929 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4930 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4931 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4932 (amd64_emit_void_call_2): New.
4933 (amd64_emit_ops): New.
4934 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4935 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4936 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4937 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4938 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4939 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4940 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4941 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4942 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4943 (i386_emit_stack_adjust, i386_emit_int_call_1)
4944 (i386_emit_void_call_2): New.
4945 (i386_emit_ops): New.
4946 (x86_emit_ops): New.
4947 (the_low_target): Install x86_emit_ops.
4948 * server.h (struct emit_ops): New.
4949 (get_raw_reg_func_addr): Declare.
4950 (current_insn_ptr, emit_error): Declare.
4951 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4952 (set_trace_state_variable_value): New defines.
4953 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4954 addr_get_trace_state_variable_value and
4955 addr_set_trace_state_variable_value.
4956 (symbol_list): New fields for get_raw_reg,
4957 get_trace_state_variable_value and set_trace_state_variable_value.
4958 (condfn): New typedef.
4959 (struct tracepoint): New field `compiled_cond'.
4960 (do_action_at_tracepoint): Clear compiled_cond.
4961 (get_trace_state_variable_value, set_trace_state_variable_value):
4963 (condition_true_at_tracepoint): If there's a compiled condition,
4965 (current_insn_ptr, emit_error): New globals.
4966 (struct bytecode_address): New.
4967 (get_raw_reg_func_addr): New.
4968 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4969 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4970 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4971 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4972 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4973 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4974 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4975 (compile_tracepoint_condition, compile_bytecodes): New.
4976 * target.h (emit_ops): Forward declare.
4977 (struct target_ops): New field emit_ops.
4978 (target_emit_ops): New.
4979 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4980 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4981 * linux-low.c (linux_emit_ops): New.
4982 (linux_target_ops): Install it.
4983 * linux-low.h (struct linux_target_ops): New field emit_ops.
4985 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4987 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4988 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4990 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4991 Stan Shebs <stan@codesourcery.com>
4993 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4994 (all): Depend on $(extra_libraries).
4995 (install-only): Install the IPA.
4996 (IPA_OBJS, IPA_LIB): New.
4997 (clean): Remove the IPA lib.
4998 (IPAGENT_CFLAGS): New.
4999 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5000 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5001 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5002 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5003 * configure.ac: Check for atomic builtins support in the compiler.
5004 (IPA_DEPFILES, extra_libraries): Define.
5005 * configure.srv (ipa_obj): Add description.
5006 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5007 (i[34567]86-*-linux*): Set ipa_obj.
5008 (x86_64-*-linux*): Set ipa_obj.
5009 * linux-low.c (stabilizing_threads): New.
5010 (supports_fast_tracepoints): New.
5011 (linux_detach): Stabilize threads before detaching.
5012 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5013 the lwp is either not stabilizing, or is moving out of a jump pad.
5014 (linux_fast_tracepoint_collecting): New.
5015 (maybe_move_out_of_jump_pad): New.
5016 (enqueue_one_deferred_signal): New.
5017 (dequeue_one_deferred_signal): New.
5018 (linux_wait_for_event_1): If moving out of a jump pad, defer
5019 pending signals to later.
5020 (linux_stabilize_threads): New.
5021 (linux_wait_1): Check if threads need moving out of jump pads, and
5023 (stuck_in_jump_pad_callback): New.
5024 (move_out_of_jump_pad_callback): New.
5026 (linux_resume_one_lwp): Handle moving out of jump pads.
5027 (linux_set_resume_request): Dequeue deferred signals.
5028 (need_step_over_p): Also step over fast tracepoint jumps.
5029 (start_step_over): Also uninsert fast tracepoint jumps.
5030 (finish_step_over): Also reinsert fast tracepoint jumps.
5031 (linux_install_fast_tracepoint_jump): New.
5032 (linux_target_ops): Install linux_stabilize_threads and
5033 linux_install_fast_tracepoint_jump_pad.
5034 * linux-low.h (linux_target_ops) <get_thread_area,
5035 install_fast_tracepoint_jump_pad>: New fields.
5036 (struct lwp_info) <collecting_fast_tracepoint,
5037 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5038 (linux_get_thread_area): Declare.
5039 * linux-x86-low.c (jump_insn): New.
5040 (x86_get_thread_area): New.
5041 (append_insns): New.
5043 (amd64_install_fast_tracepoint_jump_pad): New.
5044 (i386_install_fast_tracepoint_jump_pad): New.
5045 (x86_install_fast_tracepoint_jump_pad): New.
5046 (the_low_target): Install x86_get_thread_area and
5047 x86_install_fast_tracepoint_jump_pad.
5048 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5049 (struct fast_tracepoint_jump): New.
5050 (fast_tracepoint_jump_insn): New.
5051 (fast_tracepoint_jump_shadow): New.
5052 (find_fast_tracepoint_jump_at): New.
5053 (fast_tracepoint_jump_here): New.
5054 (delete_fast_tracepoint_jump): New.
5055 (set_fast_tracepoint_jump): New.
5056 (uninsert_fast_tracepoint_jumps_at): New.
5057 (reinsert_fast_tracepoint_jumps_at): New.
5058 (set_breakpoint_at): Use write_inferior_memory.
5059 (uninsert_raw_breakpoint): Use write_inferior_memory.
5060 (check_mem_read): Mask out fast tracepoint jumps.
5061 (check_mem_write): Mask out fast tracepoint jumps.
5062 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5063 (set_fast_tracepoint_jump): Declare.
5064 (delete_fast_tracepoint_jump)
5065 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5066 (reinsert_fast_tracepoint_jumps_at): Declare.
5067 * regcache.c: Don't compile many functions when building the
5068 in-process agent library.
5069 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5070 the register buffer in the heap.
5071 (free_register_cache): If the register buffer isn't owned by the
5072 regcache, don't free it.
5073 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5074 pre-existing register caches.
5075 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5077 (convert_ascii_to_int): : Constify `from' parameter type.
5078 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5079 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5080 the needed buffer in-place.
5081 (relocate_instruction): New.
5082 * server.c (handle_query) <qSymbols>: If the target supports
5083 tracepoints, give it a chance of looking up symbols. Report
5084 support for fast tracepoints.
5085 (handle_status): Stabilize threads.
5086 (process_serial_event): Adjust.
5087 * server.h (struct fast_tracepoint_jump): Forward declare.
5088 (struct process_info) <fast_tracepoint_jumps>: New field.
5089 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5090 (decode_X_packet, decode_M_packet): Adjust.
5091 (relocate_instruction): Declare.
5092 (in_process_agent_loaded): Declare.
5093 (tracepoint_look_up_symbols): Declare.
5094 (struct fast_tpoint_collect_status): Declare.
5095 (fast_tracepoint_collecting): Declare.
5096 (force_unlock_trace_buffer): Declare.
5097 (handle_tracepoint_bkpts): Declare.
5098 (initialize_low_tracepoint)
5099 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5100 * target.h (struct target_ops) <stabilize_threads,
5101 install_fast_tracepoint_jump_pad>: New fields.
5102 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5103 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5104 [HAVE_STDINT_H]: Include stdint.h.
5105 (trace_debug_1): Rename to ...
5106 (trace_vdebug): ... this.
5107 (trace_debug): Rename to ...
5108 (trace_debug_1): ... this. Add `level' parameter.
5110 (ATTR_USED, ATTR_NOINLINE): New.
5111 (IP_AGENT_EXPORT): New.
5112 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5113 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5114 (about_to_request_buffer_space, trace_buffer_is_full)
5115 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5116 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5117 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5118 (traceframe_write_count, traceframes_created)
5119 (trace_state_variables)
5120 New renaming defines.
5121 (struct ipa_sym_addresses): New.
5122 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5124 (ipa_sym_addrs): New.
5125 (all_tracepoint_symbols_looked_up): New.
5126 (in_process_agent_loaded): New.
5127 (write_e_ipa_not_loaded): New.
5128 (maybe_write_ipa_not_loaded): New.
5129 (tracepoint_look_up_symbols): New.
5130 (debug_threads) [IN_PROCESS_AGENT]: New.
5131 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5132 (UNKNOWN_SIDE_EFFECTS): New.
5133 (stop_tracing): New.
5134 (flush_trace_buffer): New.
5135 (stop_tracing_bkpt): New.
5136 (flush_trace_buffer_bkpt): New.
5137 (read_inferior_integer): New.
5138 (read_inferior_uinteger): New.
5139 (read_inferior_data_pointer): New.
5140 (write_inferior_data_pointer): New.
5141 (write_inferior_integer): New.
5142 (write_inferior_uinteger): New.
5143 (struct collect_static_trace_data_action): Delete.
5144 (enum tracepoint_type): New.
5145 (struct tracepoint) <type>: New field `type'.
5146 <actions_str, step_actions, step_actions_str>: Only include in
5148 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5149 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5150 (tracepoints): Use IP_AGENT_EXPORT.
5151 (last_tracepoint): Don't include in the IPA.
5152 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5153 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5154 (alloced_trace_state_variables): New.
5155 (trace_state_variables): Use IP_AGENT_EXPORT.
5156 (traceframe_t): Delete unused variable.
5157 (circular_trace_buffer): Don't include in the IPA.
5158 (trace_buffer_start): Delete.
5159 (struct trace_buffer_control): New.
5160 (trace_buffer_free): Delete.
5161 (struct ipa_trace_buffer_control): New.
5162 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5163 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5165 (trace_buffer_ctrl): New.
5166 (TRACE_BUFFER_CTRL_CURR): New.
5167 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5168 Reimplement as macros.
5169 (trace_buffer_wrap): Delete.
5170 (traceframe_write_count, traceframe_read_count)
5171 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5172 (struct tracepoint_hit_ctx) <type>: New field.
5173 (struct fast_tracepoint_ctx): New.
5174 (memory_barrier): New.
5176 (record_tracepoint_error): Update atomically in the IPA.
5177 (clear_inferior_trace_buffer): New.
5178 (about_to_request_buffer_space): New.
5179 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5180 updating the same buffer.
5181 (add_tracepoint): Default the tracepoint's type to trap
5182 tracepoint, and orig_size to -1.
5183 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5185 (create_trace_state_variable): New parameter `gdb'. Handle it.
5186 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5187 (cmd_qtdp): Handle fast tracepoints.
5189 (max_jump_pad_size): New.
5190 (gdb_jump_pad_head): New.
5191 (get_jump_space_head): New.
5192 (claim_jump_space): New.
5193 (sort_tracepoints): New.
5194 (MAX_JUMP_SIZE): New.
5195 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5197 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5198 support. Upload fast traceframes, and delete internal IPA
5200 (stop_tracing_handler): New.
5201 (flush_trace_buffer_handler): New.
5202 (cmd_qtstop): Upload fast tracepoints.
5203 (response_tracepoint): Handle fast tracepoints.
5204 (tracepoint_finished_step): Upload fast traceframes. Set the
5205 tracepoint hit context's tracepoint type.
5206 (handle_tracepoint_bkpts): New.
5207 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5208 type. Add comment about fast tracepoints.
5209 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5210 non-existing action_str field.
5211 (get_context_regcache): Handle fast tracepoints.
5212 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5214 (fast_tracepoint_from_jump_pad_address): New.
5215 (fast_tracepoint_from_ipa_tpoint_address): New.
5216 (collecting_t): New.
5217 (force_unlock_trace_buffer): New.
5218 (fast_tracepoint_collecting): New.
5221 (write_inferior_data_ptr): New.
5222 (target_tp_heap): New.
5223 (target_malloc): New.
5224 (download_agent_expr): New.
5226 (download_tracepoints): New.
5227 (download_trace_state_variables): New.
5228 (upload_fast_traceframes): New.
5229 (IPA_FIRST_TRACEFRAME): New.
5230 (IPA_NEXT_TRACEFRAME_1): New.
5231 (IPA_NEXT_TRACEFRAME): New.
5232 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5233 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5234 (gdb_jump_pad_buffer_end): New.
5235 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5236 (initialize_tracepoint): Adjust.
5237 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5238 buffer. Initialize the low module.
5239 * utils.c (PREFIX, TOOLNAME): New.
5240 (malloc_failure): Use PREFIX.
5241 (error): In the IPA, an error causes an exit.
5242 (fatal, warning): Use PREFIX.
5243 (internal_error): Use TOOLNAME.
5244 (NUMCELLS): Increase to 10.
5245 * configure, config.in: Regenerate.
5247 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5249 * server.c (handle_query) <qSupported>: Do two passes over the
5250 qSupported string to avoid nesting strtok.
5252 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5254 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5256 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5258 * configure: Regenerate.
5259 * proc-service.list: New.
5261 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5263 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5266 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5268 * gdbreplay.c (remote_open): Check error return from socket() call by
5269 its equality to -1 not by it being negative.
5270 * remote-utils.c (remote_open): Likewise.
5272 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5274 * config.h: Regenerate.
5276 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5278 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5279 doesn't provide PTRACE_GET_THREAD_AREA.
5281 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5283 * linux-m68k-low.c: Include <asm/ptrace.h>
5284 (ps_get_thread_area): Implement.
5286 2010-05-03 Doug Evans <dje@google.com>
5288 * event-loop.c (struct callback_event): New struct.
5289 (callback_list): New global.
5290 (append_callback_event, delete_callback_event): New functions.
5291 (process_callback): New function.
5292 (start_event_loop): Call it.
5293 * remote-utils.c (NOT_SCHEDULED): Define.
5294 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5295 moved out of readchar.
5296 (readchar): Rewrite. Call reschedule before returning.
5297 (reset_readchar): New function.
5298 (remote_close): Call it.
5299 (process_remaining, reschedule): New functions.
5300 * server.h (callback_handler_func): New typedef.
5301 (append_callback_event, delete_callback_event): Declare.
5303 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5305 * proc-service.c (ps_pglobal_lookup): Use
5306 thread_db_look_up_one_symbol.
5307 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5308 parameter. Use it instead of all_symbols_looked_up.
5309 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5311 (all_symbols_looked_up): Don't declare.
5312 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5313 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5315 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5316 Set all_symbols_looked_up here.
5317 (thread_db_look_up_one_symbol): New.
5318 (thread_db_get_tls_address): Adjust.
5319 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5320 thread_db object on the heap, and tentatively set it in the
5322 (thread_db_init): Don't set all_symbols_looked_up here.
5323 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5325 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5327 * linux-low.c (linux_kill, linux_detach): Adjust.
5328 (status_pending_p_callback): Remove redundant statement. Check
5329 for !TARGET_WAITIKIND_IGNORE, instead of
5330 TARGET_WAITKIND_STOPPED.
5331 (handle_tracepoints): Make sure LWP is locked. Adjust.
5332 (linux_wait_for_event_1): Adjust.
5333 (linux_cancel_breakpoints): New.
5334 (unsuspend_one_lwp): New.
5335 (unsuspend_all_lwps): New.
5336 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5337 (send_sigstop_callback): Change return type to int, add new
5338 `except' parameter and handle it.
5339 (suspend_and_send_sigstop_callback): New.
5340 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5341 pass them down. If SUSPEND, also increment the lwp's suspend
5343 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5344 (need_step_over_p): Don't consider suspended LWPs.
5345 (start_step_over): Adjust.
5346 (proceed_one_lwp): Change return type to int, add new `except'
5347 parameter and handle it.
5348 (unsuspend_and_proceed_one_lwp): New.
5349 (proceed_all_lwps): Use find_inferior instead of
5351 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5352 also decrement the suspend count of LWPs. Pass `except' down,
5353 instead of hacking its suspend count.
5354 (linux_pause_all): Add `freeze' parameter. Adjust.
5355 (linux_unpause_all): New.
5356 (linux_target_ops): Install linux_unpause_all.
5357 * server.c (handle_status): Adjust.
5358 * target.h (struct target_ops): New fields `unpause_all' and
5359 `cancel_breakpoints'. Add new parameter to `pause_all'.
5360 (pause_all): Add new `freeze' parameter.
5362 (cancel_breakpoints): New.
5363 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5365 (cmd_qtstart): Pause threads.
5366 (stop_tracing): Pause threads, and cancel breakpoints.
5367 * win32-low.c (win32_target_ops): Adjust.
5369 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5371 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5372 the inferior right away from here...
5373 (linux_wait_1): ... to here, and adjust to check the thread's
5374 last_resume_kind instead of the lwp's step or stop_expected flags.
5376 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5378 * README: Use consistent `GDB' and `GDBserver' spellings.
5380 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5382 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5383 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5384 (linux_detach_one_lwp): Assume the lwp is stopped.
5385 (any_thread_of): Delete.
5386 (linux_detach): Stop all lwps here. Don't blindly delete all
5388 (delete_lwp_callback): New.
5389 (linux_mourn): Delete all lwps of the process that is gone.
5390 (linux_wait_1): Don't delete the last lwp of the process here.
5391 * mem-break.h (mark_breakpoints_out): Declare.
5392 * mem-break.c (mark_breakpoints_out): New.
5393 (free_all_breakpoints): Use it.
5394 * server.c (handle_target_event): If the process is gone, mark
5396 * thread-db.c (struct thread_db) <create_bp>: New field.
5397 (thread_db_enable_reporting): Fix prototype. Store a thread event
5398 breakpoint reference in the thread_db struct.
5399 (thread_db_load_search): Clear the thread_db object.
5400 (try_thread_db_load_1): Ditto.
5401 (switch_to_process): New.
5402 (disable_thread_event_reporting): Use it.
5403 (remove_thread_event_breakpoints): New.
5404 (thread_db_detach, thread_db_mourn): Use it.
5406 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5408 * linux-low.c (linux_enable_event_reporting): New.
5409 (linux_wait_for_event_1, handle_extended_wait): Use it.
5411 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5413 * linux-low.c (linux_kill_one_lwp, linux_kill)
5414 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5415 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5416 SIGSTOP even if the LWP is stopped.
5417 (send_sigstop_callback): New.
5418 (stop_all_lwps): Use send_sigstop_callback instead.
5419 (linux_resume_one_thread): Adjust.
5420 (proceed_one_lwp): Still proceed an LWP that the client has
5421 requested to stop, if we haven't reported it as stopped yet. Make
5422 sure that LWPs the client want stopped, have a pending SIGSTOP.
5424 2010-04-26 Doug Evans <dje@google.com>
5426 * server.c (handle_general_set): Make static.
5428 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5429 Print received char after testing for error/eof instead of before.
5430 (input_interrupt): Tweak comment.
5432 2010-04-23 Doug Evans <dje@google.com>
5434 * server.c (start_inferior): Print inferior argv if --debug.
5436 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5438 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5439 * nto-x86-low.c: Include server.h
5441 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5443 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5444 be consistent with other sources of this directory.
5445 (init_registers_amd64): Correct name of source file of this function
5448 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5450 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5453 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5455 * win32-i386-low.c: Add 64-bit support.
5456 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5457 (init_registers_amd64): Declare.
5458 (mappings): Add 64-bit version of array.
5459 (init_windows_x86): New function.
5460 (the_low_target): Change init_arch field to init_windows_x86.
5462 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5464 * win32-low.c: Adapt to support also 64-bit architecture.
5465 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5466 (get_image_name): Use SIZE_T type for local variable `done'.
5467 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5468 (toolhelp_get_dll_name): Idem.
5469 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5470 Use uintptr_t typecast to avoid warning.
5471 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5472 (handle_exception): Use phex_nz to avoid warning.
5473 (win32_wait): Remove unused local variable `process'.
5475 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5477 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5480 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5482 * configure.ac: Use `ws2_32' library for srv_mingw.
5483 * configure: Regenerate.
5484 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5485 * remote-utils.c: Likewise.
5487 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5489 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5490 if __x86_64__ is defined.
5492 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5494 * configure: Regenerate.
5496 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5498 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5499 * target.h (target_ops): New get_tib_address field.
5500 * win32-low.h (win32_thread_info): Add thread_local_base field.
5501 * win32-low.c (child_add_thread): Add tlb argument.
5502 Set thread_local_base field to TLB.
5503 (get_child_debug_event): Adapt to child_add_thread change.
5504 (win32_get_tib_address): New function.
5505 (win32_target_ops): Set get_tib_address field to
5506 win32_get_tib_address.
5507 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5509 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5511 * linux-low.c (linux_mourn): Also remove the process.
5512 * server.c (handle_target_event): Don't remove the process here.
5513 * nto-low.c (nto_mourn): New.
5514 (nto_target_ops): Install it.
5515 * spu-low.c (spu_mourn): New.
5516 (spu_target_ops): Install it.
5517 * win32-low.c (win32_mourn): New.
5518 (win32_target_ops): Install it.
5520 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5522 * server.h (buffer_xml_printf): Remove redundant `;'.
5524 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5526 * regcache.c (set_register_cache): Invalidate regcaches before
5527 changing the register cache layout.
5528 (regcache_invalidate_one): Allow a NULL regcache.
5529 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5530 regcaches before changing the register cache layout or the target
5533 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5535 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5536 variable warning on Linux/x86-64.
5538 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5540 GDBserver disconnected tracing support.
5542 * linux-low.c (linux_remove_process): Delete.
5543 (add_lwp): Don't set last_resume_kind here.
5544 (linux_kill): Use `mourn'.
5545 (linux_detach): Use `thread_db_detach', and `mourn'.
5547 (linux_attach_lwp_1): Adjust comment.
5548 (linux_attach): last_resume_kind moved the thread_info; adjust.
5549 (status_pending_p_callback): Adjust.
5550 (linux_wait_for_event_1): Adjust.
5551 (count_events_callback, select_singlestep_lwp_callback)
5552 (select_event_lwp_callback, cancel_breakpoints_callback)
5553 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5554 (proceed_one_lwp): Adjust.
5555 (linux_async): Add debug output.
5556 (linux_thread_stopped): New.
5557 (linux_pause_all): New.
5558 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5560 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5561 (thread_db_free): Delete declaration.
5562 (thread_db_detach, thread_db_mourn): Declare.
5563 * thread-db.c (thread_db_init): Use thread_db_mourn.
5564 (thread_db_free): Delete, split in two.
5565 (disable_thread_event_reporting): New.
5566 (thread_db_detach): New.
5567 (thread_db_mourn): New.
5569 * server.h (struct thread_info) <last_resume_kind>: New field.
5570 <attached>: Add comment.
5571 <gdb_detached>: New field.
5572 (handler_func): Change return type to int.
5573 (handle_serial_event, handle_target_event): Ditto.
5574 (gdb_connected): Declare.
5576 (disconnected_tracing): Declare.
5577 (stop_tracing): Declare.
5579 * server.c (handle_query) <qSupported>: Report support for
5580 disconnected tracing.
5581 (queue_stop_reply_callback): Account for running threads.
5582 (gdb_wants_thread_stopped): New.
5583 (gdb_wants_all_threads_stopped): New.
5584 (gdb_reattached_process): New.
5585 (handle_status): Clear the `gdb_detached' flag of all processes.
5586 In all-stop, stop all threads.
5587 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5588 (process_serial_event): If the remote connection breaks, or if an
5589 exit was forced with "monitor exit", force an event loop exit.
5590 Handle disconnected tracing on detach.
5591 (handle_serial_event): Adjust.
5592 (handle_target_event): If GDB isn't connected, forward events back
5593 to the inferior, unless the last process exited, in which case,
5594 exit gdbserver. Adjust interface.
5596 * remote-utils.c (remote_open): Don't block in accept. Instead
5597 register an event loop source on the listen socket file
5598 descriptor. Refactor bits into ...
5599 (listen_desc): ... this new global.
5600 (gdb_connected): ... this new function.
5601 (enable_async_notification): ... this new function.
5602 (handle_accept_event): ... this new function.
5603 (remote_close): Clear remote_desc.
5605 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5607 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5609 (mourn_inferior): Define.
5610 (target_process_qsupported): Avoid the dangling else problem.
5611 (thread_stopped): Define.
5612 (pause_all): Define.
5613 (target_waitstatus_to_string): Declare.
5614 * target.c (target_waitstatus_to_string): New.
5616 * tracepoint.c (tracing): Make extern.
5617 (disconnected_tracing): New.
5618 (stop_tracing): Make extern. Handle tracing stops due to GDB
5620 (cmd_qtdisconnected): New.
5621 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5622 (handle_tracepoint_general_set): Handle QTDisconnected.
5624 * event-loop.c (event_handler_func): Change return type to int.
5625 (process_event): Bail out if the event handler wants the event
5627 (handle_file_event): Ditto.
5628 (start_event_loop): Bail out if the event handler wants the event
5631 * nto-low.c (nto_target_ops): Adjust.
5632 * spu-low.c (spu_wait): Don't remove the process here.
5633 (spu_target_ops): Adjust.
5634 * win32-low.c (win32_wait): Don't remove the process here.
5635 (win32_target_ops): Adjust.
5637 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5639 * regcache.c (realloc_register_cache): Invalidate inferior's
5640 regcache before recreating it.
5642 2010-04-09 Pedro Alves <pedro@codesourcery.com>
5644 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5646 2010-04-09 Stan Shebs <stan@codesourcery.com>
5647 Pedro Alves <pedro@codesourcery.com>
5649 * server.h (LONGEST): New.
5650 (struct thread_info) <while_stepping>: New field.
5651 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5653 (initialize_tracepoint, handle_tracepoint_general_set)
5654 (handle_tracepoint_query, tracepoint_finished_step)
5655 (tracepoint_was_hit, release_while_stepping_state_list):
5656 (current_traceframe): Declare.
5657 * server.c (handle_general_set): Handle tracepoint packets.
5659 (write_memory): New.
5660 (handle_search_memory_1): Use read_memory.
5661 (handle_query): Report support for conditional tracepoints, trace
5662 state variables, and tracepoint sources. Handle tracepoint
5664 (main): Initialize the tracepoints module.
5665 (process_serial_event): Handle traceframe reads/writes.
5667 * linux-low.c (handle_tracepoints): New.
5668 (linux_wait_1): Call it.
5669 (linux_resume_one_lwp): Handle while-stepping.
5670 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5671 (linux_target_ops): Install them.
5672 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5674 * linux-x86-low.c (x86_supports_tracepoints): New.
5675 (the_low_target). Install it.
5677 * mem-break.h (delete_breakpoint): Declare.
5678 * mem-break.c (delete_breakpoint): Make external.
5680 * target.h (struct target_ops): Add `supports_tracepoints',
5681 `read_pc', and `write_pc' fields.
5682 (target_supports_tracepoints): Define.
5683 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5686 * regcache.h (struct regcache) <registers_owned>: New field.
5687 (init_register_cache, regcache_cpy): Declare.
5688 (regcache_read_pc, regcache_write_pc): Declare.
5689 (register_cache_size): Declare.
5690 (supply_regblock): Declare.
5691 * regcache.c (init_register_cache): New.
5692 (new_register_cache): Use it.
5693 (regcache_cpy): New.
5694 (register_cache_size): New.
5695 (supply_regblock): New.
5696 (regcache_read_pc, regcache_write_pc): New.
5698 * tracepoint.c: New.
5700 * Makefile.in (OBS): Add tracepoint.o.
5701 (tracepoint.o): New rule.
5703 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5705 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5707 (i386-mmx.c): Likewise.
5708 (i386-mmx-linux.o): Likewise.
5709 (i386-mmx-linux.c): Likewise.
5711 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5712 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5713 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5714 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5716 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5717 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5718 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5720 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5722 * Makefile.in (clean): Updated.
5724 (i386-avx.c): Likewise.
5725 (i386-avx-linux.o): Likewise.
5726 (i386-avx-linux.c): Likewise.
5727 (amd64-avx.o): Likewise.
5728 (amd64-avx.c): Likewise.
5729 (amd64-avx-linux.o): Likewise.
5730 (amd64-avx-linux.c): Likewise.
5732 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5733 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5734 (srv_amd64_regobj): Add amd64-avx.o.
5735 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5736 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5737 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5738 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5739 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5740 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5741 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5743 * i387-fp.c: Include "i386-xstate.h".
5745 (i387_cache_to_xsave): Likewise.
5746 (i387_xsave_to_cache): Likewise.
5747 (x86_xcr0): Likewise.
5749 * i387-fp.h (i387_cache_to_xsave): Likewise.
5750 (i387_xsave_to_cache): Likewise.
5751 (x86_xcr0): Likewise.
5753 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5754 * linux-crisv32-low.c (target_regsets): Likewise.
5755 * linux-m68k-low.c (target_regsets): Likewise.
5756 * linux-mips-low.c (target_regsets): Likewise.
5757 * linux-ppc-low.c (target_regsets): Likewise.
5758 * linux-s390-low.c (target_regsets): Likewise.
5759 * linux-sh-low.c (target_regsets): Likewise.
5760 * linux-sparc-low.c (target_regsets): Likewise.
5761 * linux-xtensa-low.c (target_regsets): Likewise.
5763 * linux-low.c: Include <sys/uio.h>.
5764 (regsets_fetch_inferior_registers): Support nt_type.
5765 (regsets_store_inferior_registers): Likewise.
5766 (linux_process_qsupported): New.
5767 (linux_target_ops): Add linux_process_qsupported.
5769 * linux-low.h (regset_info): Add nt_type.
5770 (linux_target_ops): Add process_qsupported.
5772 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5774 (init_registers_i386_avx_linux): New.
5775 (init_registers_amd64_avx_linux): Likewise.
5776 (xmltarget_i386_linux_no_xml): Likewise.
5777 (xmltarget_amd64_linux_no_xml): Likewise.
5778 (PTRACE_GETREGSET): Likewise.
5779 (PTRACE_SETREGSET): Likewise.
5780 (x86_fill_xstateregset): Likewise.
5781 (x86_store_xstateregset): Likewise.
5782 (use_xml): Likewise.
5783 (x86_linux_update_xmltarget): Likewise.
5784 (x86_linux_process_qsupported): Likewise.
5785 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5786 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5787 init_registers_i386_linux here. Call
5788 x86_linux_update_xmltarget.
5789 (the_low_target): Add x86_linux_process_qsupported.
5791 * server.c (handle_query): Call target_process_qsupported.
5793 * target.h (target_ops): Add process_qsupported.
5794 (target_process_qsupported): New.
5796 2010-04-03 Pedro Alves <pedro@codesourcery.com>
5798 * inferiors.c (add_thread): Set last_status kind to
5799 TARGET_WAITKIND_IGNORE.
5800 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5801 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5802 (linux_wait_1): Move `thread' local definition to block that uses
5803 it. Don't NULL initialize `event_child'.
5804 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5805 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5806 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5808 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5810 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5811 an extended waitstatus, or by a watchpoint.
5812 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5813 thread was stepping or has been stopped by a watchpoint.
5815 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5817 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5818 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5819 of another, then delete the previous, and validate all
5821 (validate_inserted_breakpoint): New.
5822 (delete_disabled_breakpoints): New.
5823 (validate_breakpoints): New.
5824 (check_mem_read): Validate breakpoints before trusting their
5825 shadow. Delete disabled breakpoints.
5826 (check_mem_write): Validate breakpoints before trusting they
5827 should be inserted. Delete disabled breakpoints.
5828 * mem-break.h (validate_breakpoints):
5829 * server.c (handle_query): Validate breakpoints when we see a
5832 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5834 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5835 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5836 if we could tell there's a GDB breakpoint at stop_pc.
5837 (need_step_over_p): Don't do a step over if we find a GDB
5838 breakpoint at the resume PC.
5840 * mem-break.c (struct raw_breakpoint): New.
5841 (enum bkpt_type): New type `gdb_breakpoint'.
5842 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5843 fields. New field `raw'.
5844 (find_raw_breakpoint_at): New.
5845 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5847 (set_breakpoint_at): Adjust.
5848 (delete_raw_breakpoint): New.
5849 (release_breakpoint): New.
5850 (delete_breakpoint): Rename to...
5851 (delete_breakpoint_1): ... this. Add proc parameter. Use
5852 release_breakpoint. Return ENOENT.
5853 (delete_breakpoint): Reimplement.
5854 (find_breakpoint_at): Delete.
5855 (find_gdb_breakpoint_at): New.
5856 (delete_breakpoint_at): Delete.
5857 (set_gdb_breakpoint_at): New.
5858 (delete_gdb_breakpoint_at): New.
5859 (gdb_breakpoint_here): New.
5860 (set_reinsert_breakpoint): Use release_breakpoint.
5861 (uninsert_breakpoint): Rename to ...
5862 (uninsert_raw_breakpoint): ... this.
5863 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5864 (reinsert_raw_breakpoint): Change parameter type to
5866 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5868 (check_breakpoints): Adjust. Use release_breakpoint.
5869 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5870 (breakpoint_inserted_here): Ditto.
5871 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5872 Don't trust the breakpoint's shadow if it is not inserted.
5873 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5874 (delete_all_breakpoints): Adjust.
5875 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5876 use delete_breakpoint_1.
5878 * mem-break.h (breakpoints_supported): Delete declaration.
5879 (set_gdb_breakpoint_at): Declare.
5880 (gdb_breakpoint_here): Declare.
5881 (delete_breakpoint_at): Delete.
5882 (delete_gdb_breakpoint_at): Declare.
5884 * server.h (struct raw_breakpoint): Forward declare.
5885 (struct process_info): New field `raw_breakpoints'.
5887 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5890 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5892 * linux-low.c (status_pending_p_callback): Fix comment.
5893 (linux_wait_for_event_1): Move most of the internal breakpoint
5894 handling from here...
5895 (linux_wait_1): ... to here.
5896 (count_events_callback): New.
5897 (select_singlestep_lwp_callback): New.
5898 (select_event_lwp_callback): New.
5899 (cancel_breakpoints_callback): New.
5900 (select_event_lwp): New.
5901 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5902 priority to all LWPs that have had events that should be reported
5903 to the client. Cancel breakpoints when about to reporting the
5904 event to the client, not while stopping lwps. No longer cancel
5905 finished single-steps here.
5906 (cancel_finished_single_step): Delete.
5907 (cancel_finished_single_steps): Delete.
5909 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5911 * mem-break.c (enum bkpt_type): New.
5912 (struct breakpoint): New field `type'.
5913 (set_breakpoint_at): Change return type to struct breakpoint
5914 pointer. Set type to `other_breakpoint' by default.
5915 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5916 in the breakpoint list.
5917 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5918 (reinsert_breakpoint): Rename to ...
5919 (reinsert_raw_breakpoint): ... this.
5920 (reinsert_breakpoints_at): Adjust.
5921 * mem-break.h (struct breakpoint): Declare.
5922 (set_breakpoint_at): Change return type to struct breakpoint
5925 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5927 * server.c (handle_query): Assign, not compare.
5929 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5931 Teach linux gdbserver to step-over-breakpoints.
5933 * linux-low.c (can_hardware_single_step): New.
5934 (supports_breakpoints): New.
5935 (handle_extended_wait): If stopping threads, read the stop pc of
5938 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5939 low target doesn't support retrieving the PC.
5940 (add_lwp): Set last_resume_kind to resume_continue.
5941 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5942 (linux_attach): Don't clear stop_expected. Set the lwp's
5943 last_resume_kind to resume_stop.
5944 (linux_detach_one_lwp): Don't check for removed breakpoints.
5945 (check_removed_breakpoint): Delete.
5946 (status_pending_p): Rename to ...
5947 (status_pending_p_callback): ... this. Don't check for removed
5948 breakpoints. Don't consider threads that are stopped from GDB's
5950 (linux_wait_for_lwp): Always read the stop_pc here.
5951 (cancel_breakpoint): New.
5952 (step_over_bkpt): New global.
5953 (linux_wait_for_event_1): Implement stepping over breakpoints.
5954 (gdb_wants_lwp_stopped): New.
5955 (gdb_wants_all_stopped): New.
5956 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5957 single-step traps here. Store the thread's last reported target
5959 (send_sigstop): Don't clear stop_expected. Always set it,
5961 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5962 (cancel_finished_single_step): New.
5963 (cancel_finished_single_steps): New.
5964 (wait_for_sigstop): Don't cancel finished single-step traps here.
5965 (linux_resume_one_lwp): Don't check for removed breakpoints.
5966 Don't set `step' on non-hardware step archs.
5967 (linux_set_resume_request): Ignore resume_stop requests if already
5968 stopping or stopped. Set the lwp's last_resume_kind.
5969 (resume_status_pending_p): Don't check for removed breakpoints.
5970 (need_step_over_p): New.
5971 (start_step_over): New.
5972 (finish_step_over): New.
5973 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5974 requests. Clear the thread's last reported target waitstatus.
5975 Don't use the `suspended' flag. Don't consider pending breakpoints.
5976 (linux_resume): Start a step-over if necessary.
5977 (proceed_one_lwp): New.
5978 (proceed_all_lwps): New.
5979 (unstop_all_lwps): New.
5980 * linux-low.h (struct lwp_info): Rewrite comment for the
5981 `suspended' flag. Add the `stop_pc' field. Delete the
5982 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5983 Add `'last_resume_kind' and `need_step_over' fields.
5984 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5985 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5986 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5987 (set_raw_breakpoint_at): New.
5988 (set_breakpoint_at): Rewrite to use it.
5989 (reinsert_breakpoint_handler): Delete.
5990 (set_reinsert_breakpoint): New.
5991 (reinsert_breakpoint_by_bp): Delete.
5992 (delete_reinsert_breakpoints): New.
5993 (uninsert_breakpoint): Rewrite.
5994 (uninsert_breakpoints_at): New.
5995 (reinsert_breakpoint): Rewrite.
5996 (reinsert_breakpoints_at): New.
5997 (check_breakpoints): Rewrite.
5998 (breakpoint_here): New.
5999 (breakpoint_inserted_here): New.
6000 (check_mem_read): Adjust.
6001 * mem-break.h (breakpoints_supported, breakpoint_here)
6002 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6003 (reinsert_breakpoint_by_bp): Delete declaration.
6004 (delete_reinsert_breakpoints): Declare.
6005 (reinsert_breakpoint): Delete declaration.
6006 (reinsert_breakpoints_at): Declare.
6007 (uninsert_breakpoint): Delete declaration.
6008 (uninsert_breakpoints_at): Declare.
6009 (check_breakpoints): Adjust prototype.
6010 * server.h: Adjust include order.
6011 (struct thread_info): Declare here. Add a `last_status' field.
6013 2010-03-23 Michael Snyder <msnyder@vmware.com>
6015 * server.c (crc32): New function.
6016 (handle_query): Add handling for 'qCRC:' request.
6018 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6020 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6021 lwp had been stopped by a watchpoint.
6023 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6025 * server.h (internal_error): Declare.
6026 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6027 * utils.c (internal_error): New function.
6029 2010-03-15 Andreas Schwab <schwab@redhat.com>
6031 * configure.srv: Fix typo setting srv_regobj.
6033 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6035 * linux-low.c (fetch_register): Avoid passing a non string literal
6037 (usr_store_inferior_registers): Ditto.
6039 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6041 * linux-low.c (linux_write_memory): Bail out early if peeking
6044 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6046 * linux-low.h (struct lwp_info): New fields
6047 `stopped_by_watchpoint' and `stopped_data_address'.
6048 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6049 here, and cache them in the lwp object.
6050 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6052 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6054 (linux_stopped_by_watchpoint): Rewrite.
6055 (linux_stopped_data_address): Rewrite.
6057 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6059 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6060 switching the current inferior, not before.
6062 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6064 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6065 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6066 i386-linux.c and amd64-linux.c.
6067 (reg-i386.o): Removed.
6068 (reg-i386.c): Likewise.
6069 (reg-i386-linux.o): Likewise.
6070 (reg-i386-linux.c): Likewise.
6071 (reg-x86-64.o): Likewise.
6072 (reg-x86-64.c): Likewise.
6073 (reg-x86-64-linux.o): Likewise.
6074 (reg-x86-64-linux.c): Likewise.
6077 (i386-linux.o): Likewise.
6078 (i386-linux.c): Likewise.
6079 (amd64.o): Likewise.
6080 (amd64.c): Likewise.
6081 (amd64-linux.o): Likewise.
6082 (amd64-linux.c): Likewise.
6084 * configure.srv (srv_i386_regobj): New.
6085 (srv_i386_linux_regobj): Likewise.
6086 (srv_amd64_regobj): Likewise.
6087 (srv_amd64_linux_regobj): Likewise.
6088 (srv_i386_32bit_xmlfiles): Likewise.
6089 (srv_i386_64bit_xmlfiles): Likewise.
6090 (srv_i386_xmlfiles): Likewise.
6091 (srv_amd64_xmlfiles): Likewise.
6092 (srv_i386_linux_xmlfiles): Likewise.
6093 (srv_amd64_linux_xmlfiles): Likewise.
6094 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6095 srv_xmlfiles to $srv_i386_xmlfiles.
6096 (i[34567]86-*-mingw32ce*): Likewise.
6097 (i[34567]86-*-mingw*): Likewise.
6098 (i[34567]86-*-nto*): Likewise.
6099 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6100 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6101 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6102 (x86_64-*-linux*): Likewise.
6104 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6105 (init_registers_amd64_linux): New.
6106 (x86_arch_setup): Replace init_registers_x86_64_linux with
6107 init_registers_amd64_linux.
6109 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6111 * configure.ac: Check for libdl. If it is not available link against
6112 static libthread_db.
6113 * configure: Regenerate.
6115 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6119 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6120 handing a read watchpoint.
6121 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6123 2010-02-12 Doug Evans <dje@google.com>
6125 * linux-low.c (linux_supports_tracefork_flag): Document.
6126 (linux_look_up_symbols): Add comment.
6128 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6130 * regcache.c (supply_register): Clear regcache if buf is NULL.
6132 2010-02-02 Nicolas Roche <roche@sourceware.org>
6133 Joel Brobecker <brobecker@adacore.com>
6135 * inferiors.c (find_inferior): Add function documentation.
6136 (unloaded_dll): Handle the case where the unloaded dll has not
6137 been previously registered in the dll list.
6139 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6141 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6142 (thumb2_breakpoint): New.
6143 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6145 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6147 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6148 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6151 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6153 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6155 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6157 * linux-s390-low.c (s390_collect_ptrace_register)
6158 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6160 2010-01-21 Doug Evans <dje@google.com>
6162 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6163 (PTRACE_ARG4_TYPE): New macro.
6164 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6165 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6166 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6167 (usr_store_inferior_registers): Ditto.
6168 (linux_read_memory, linux_write_memory): Ditto.
6169 (linux_test_for_tracefork): Ditto.
6171 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6172 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6174 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6176 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6179 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6181 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6182 prototype to take a regcache. Adjust.
6184 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6186 * regcache.h (struct thread_info): Forward declare.
6187 (struct regcache): New.
6188 (new_register_cache): Adjust prototype.
6189 (get_thread_regcache): Declare.
6190 (free_register_cache): Adjust prototype.
6191 (registers_to_string, registers_from_string): Ditto.
6192 (supply_register, supply_register_by_name, collect_register)
6193 (collect_register_as_string, collect_register_by_name): Ditto.
6194 * regcache.c (struct inferior_regcache_data): Delete.
6195 (get_regcache): Rename to ...
6196 (get_thread_regcache): ... this. Adjust. Switch inferior before
6198 (regcache_invalidate_one): Adjust.
6199 (regcache_invalidate): Fix prototype.
6200 (new_register_cache): Return the new register cache.
6201 (free_register_cache): Change prototype.
6202 (realloc_register_cache): Adjust.
6203 (registers_to_string): Change prototype to take a regcache. Adjust.
6204 (registers_from_string): Ditto.
6205 (register_data): Ditto.
6206 (supply_register): Ditto.
6207 (supply_register_by_name): Ditto.
6208 (collect_register): Ditto.
6209 (collect_register_as_string): Ditto.
6210 (collect_register_by_name): Ditto.
6211 * server.c (process_serial_event): Adjust.
6212 * linux-low.h (regset_fill_func, regset_store_func): Change
6214 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6216 * linux-low.c (get_stop_pc): Adjust.
6217 (check_removed_breakpoint): Adjust.
6218 (linux_wait_for_event): Adjust.
6219 (linux_resume_one_lwp): Adjust.
6220 (fetch_register): Add regcache parameter. Adjust.
6221 (usr_store_inferior_registers): Ditto.
6222 (regsets_fetch_inferior_registers): Ditto.
6223 (regsets_store_inferior_registers): Ditto.
6224 (linux_fetch_registers, linux_store_registers): Ditto.
6225 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6227 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6229 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6230 prototype to take a regcache.
6231 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6232 * remote-utils.c (convert_ascii_to_int, outreg)
6233 (prepare_resume_reply): Change prototype to take a regcache.
6235 * target.h (struct target_ops) <fetch_registers, store_registers>:
6236 Change prototype to take a regcache.
6237 (fetch_inferior_registers, store_inferior_registers): Change
6238 prototype to take a regcache. Adjust.
6239 * proc-service.c (ps_lgetregs): Adjust.
6240 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6241 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6242 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6243 take a regcache. Adjust.
6244 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6245 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6246 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6247 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6248 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6249 (cris_cannot_fetch_register):
6250 (cris_breakpoint_at): Change prototype to take a regcache.
6252 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6253 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6254 to take a regcache. Adjust.
6255 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6257 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6258 take a regcache. Adjust.
6259 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6260 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6261 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6262 * linux-mips-low.c (mips_get_pc):
6263 (mips_set_pc): Change prototype to take a regcache. Adjust.
6264 (mips_reinsert_addr): Adjust.
6265 (mips_collect_register): Change prototype to take a regcache.
6267 (mips_supply_register):
6268 (mips_collect_register_32bit, mips_supply_register_32bit)
6269 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6270 (mips_store_fpregset): Ditto.
6271 * linux-ppc-low.c (ppc_supply_ptrace_register)
6272 (ppc_supply_ptrace_register): Ditto.
6273 (parse_spufs_run): Adjust.
6274 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6275 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6276 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6277 take a regcache. Adjust.
6278 * linux-s390-low.c (s390_collect_ptrace_register)
6279 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6280 (s390_set_pc): Change prototype to take a regcache. Adjust.
6281 (s390_arch_setup): Adjust.
6282 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6283 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6284 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6285 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6286 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6288 (sparc_breakpoint_at): Adjust.
6289 * linux-xtensa-low.c (xtensa_fill_gregset):
6290 (xtensa_store_gregset):
6291 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6292 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6293 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6294 prototype to take a regcache. Adjust.
6295 * win32-arm-low.c (arm_fetch_inferior_register)
6296 (arm_store_inferior_register): Change prototype to take a
6298 * win32-i386-low.c (i386_fetch_inferior_register)
6299 (i386_store_inferior_register): Change prototype to take a
6301 * win32-low.c (child_fetch_inferior_registers)
6302 (child_store_inferior_registers): Change prototype to take a
6304 (win32_wait): Adjust.
6305 (win32_fetch_inferior_registers): Change prototype to take a
6307 (win32_store_inferior_registers): Adjust.
6308 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6309 store_inferior_register>: Change prototype to take a regcache.
6311 2010-01-20 Doug Evans <dje@google.com>
6313 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6315 (linux_wait_for_event1, linux_init_signals): Ditto.
6316 (W_STOPCODE): Provide definition if missing.
6318 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6320 * linux-low.c (linux_core_of_thread): New.
6321 (compare_ints, show_process, list_threads): New.
6322 (linux_qxfer_osdata): Report threads and cores.
6323 (linux_target_op): Register linux_core_of_thread.
6324 * remote-utils.c (prepare_resume_reply): Report the core.
6325 (buffer_xml_printf): Support %d specifier.
6326 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6328 (handle_query): Handle qXfer:threads. Announce availability
6330 * target.h (struct target_ops): New field core_of_thread.
6332 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6334 * Makefile.in (clean): Remove new generated files.
6335 (reg-s390.o, reg-s390.c): Remove rules.
6336 (reg-s390x.o, reg-s390x.c): Likewise.
6337 (s390-linux32.o, s390-linux32.c): Add rules.
6338 (s390-linux64.o, s390-linux64.c): Likewise.
6339 (s390x-linux64.o, s390x-linux64.c): Likewise.
6340 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6341 * linux-s390-low.c: Include <elf.h>.
6342 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6343 (init_registers_s390): Remove prototype.
6344 (init_registers_s390x): Likewise.
6345 (init_registers_s390_linux32): Add prototype.
6346 (init_registers_s390_linux64): Likewise.
6347 (init_registers_s390x_linux64): Likewise.
6348 (s390_num_regs_3264): New define.
6349 (s390_regmap_3264): New global variable.
6350 (s390_cannot_fetch_register): Remove obsolete check.
6351 (s390_cannot_store_register): Likewise.
6352 (s390_collect_ptrace_register): Handle upper/lower register halves.
6353 (s390_supply_ptrace_register): Likewise.
6354 (s390_fill_gregset): Update to register number changes.
6355 (s390_get_hwcap): New routine.
6356 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6357 Install appropriate regmap and register set.
6359 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6361 * server.c (gdbserver_version): Update copyright year to 2010.
6362 * gdbreplay.c (gdbreplay_version): Likewise.
6364 2009-12-28 Doug Evans <dje@google.com>
6366 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6367 elf/external.h. Include <elf.h> instead but only if necessary.
6369 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6371 * linux-low.c (linux_remove_process): Remove `detaching'
6372 parameter. Don't release/detach from thread_db here.
6373 (linux_kill): Release/detach from thread_db here, ...
6374 (linux_detach): ... and here, before actually detaching.
6375 (linux_wait_1): ... and here, when a process exits.
6376 * thread-db.c (any_thread_of): New.
6377 (thread_db_free): Switch the current inferior to a thread of the
6380 2009-12-21 Doug Evans <dje@google.com>
6382 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6384 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6385 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6386 warning ifndef __NR_tkill. Move setting of errno there too.
6387 Delete unnecessary resetting of errno after syscall.
6388 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6390 * configure.ac: Check for dladdr.
6391 * config.in: Regenerate.
6392 * configure: Regenerate.
6393 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6394 (try_thread_db_load): Update.
6396 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6398 2009-12-18 Doug Evans <dje@google.com>
6400 * event-loop.c: Include unistd.h if it exists.
6402 * linux-low.c (my_waitpid): Move definition away from being in
6403 between linux_tracefork_child/linux_test_for_tracefork.
6405 * gdb_proc_service.h (psaddr_t): Fix type.
6406 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6407 signature to match glibc.
6409 2009-12-16 Doug Evans <dje@google.com>
6411 * linux-low.c (linux_read_memory): Fix argument to read.
6413 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6415 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6416 events, don't leave current_inferior pointing at null.
6418 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6420 * win32-low.c (LOG): Delete.
6421 (OUTMSG): Output to stderr.
6422 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6423 on compile time LOG macro.
6424 (win32_wait): Fix debug output.
6426 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6428 * win32-low.c (win32_add_one_solib): If the dll name is
6429 "ntdll.dll", prepend the system directory to the dll path.
6431 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6433 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6435 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6436 Vladimir Prus <vladimir@codesourcery.com>
6438 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6439 * configure.ac: Check for __mcoldfire__ and set
6440 gdb_cv_m68k_is_coldfire.
6441 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6442 reg-cf.o and reg-m68k.o.
6443 * configure: Regenerated.
6445 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6447 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6448 Pass it to thread_db_free.
6449 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6450 proper `detaching' argument to linux_remove_process.
6451 * linux-low.h (thread_db_free): Add `detaching' parameter.
6452 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6454 (thread_db_free): Add `detaching' parameter. Only
6455 call td_ta_clear_event if detaching from process.
6457 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6459 * thread-db.c (thread_db_free): Fix typo.
6461 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6464 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6466 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6468 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6469 with an i686 compiler.
6470 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6472 * configure: Rebuilt.
6474 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6478 * server.c (handle_search_memory_1): Correct read_addr initialization
6479 in loop for searching subsequent chunks.
6481 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6483 * configure.ac: New --with-libthread-db option.
6484 * thread-db.c: Allow direct dependence on libthread_db.
6485 (thread_db_free): Adjust.
6486 * config.in: Regenerate.
6487 * configure: Likewise.
6489 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6492 * thread-db.c (attach_thread): New function.
6493 (maybe_attach_thread): Return success/failure.
6494 (find_new_threads_callback): Adjust.
6495 (thread_db_find_new_threads): Loop until no new threads.
6497 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6499 * proc-service.c (ps_lgetregs): Formatting.
6501 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6503 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6504 * configure.ac: Adjust.
6505 * linux-low.h (struct process_info_private): Move members to struct
6507 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6508 * linux-low.c (linux_remove_process): Adjust.
6509 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6510 * server.c (handle_query): Move code ...
6511 (handle_monitor_command): ... here. New function.
6512 * target.h (struct target_ops): New member.
6513 * thread-db.c (struct thread_db): New.
6514 (libthread_db_search_path): New variable.
6515 (thread_db_create_event, thread_db_enable_reporting)
6516 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6517 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6518 (try_thread_db_load_1, dladdr_to_soname): New functions.
6519 (try_thread_db_load, thread_db_load_search): New functions.
6520 (thread_db_init): Search for libthread_db.
6521 (thread_db_free): New function.
6522 (thread_db_handle_monitor_command): Likewise.
6523 * config.in: Regenerate.
6524 * configure: Regenerate.
6526 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6528 * spu-low.c (spu_kill): Wait for inferior to terminate.
6529 Call clear_inferiors.
6530 (spu_detach): Call clear_inferiors.
6532 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6534 * aclocal.m4: Regenerate.
6535 * config.in: Likewise.
6536 * configure: Likewise.
6538 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6540 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6541 (parse_spufs_run): New function.
6542 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6543 (ppc_breakpoint_at): Handle SPU breakpoints.
6545 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6547 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6548 (SPUFS_MAGIC): Define.
6549 (spu_enumerate_spu_ids): New function.
6550 (linux_qxfer_spu): New function.
6551 (linux_target_ops): Install linux_qxfer_spu.
6553 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6555 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6556 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6557 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6558 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6559 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6560 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6561 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6562 (init_registers_powerpc_cell32l): Add prototype.
6563 (init_registers_powerpc_cell64l): Likewise.
6564 (ppc_arch_setup): Detect Cell/B.E. architecture.
6566 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6568 * Makefile.in (datarootdir): New variable.
6570 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6572 * linux-low.c (linux_write_memory): Update debugging output.
6573 * Makefile.in (clean): Add new descriptions.
6574 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6575 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6576 * configure.srv: Add new files for arm*-*-linux*.
6577 * linux-arm-low.c: Add new declarations.
6578 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6579 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6580 (HWCAP_VFPv3D16): New.
6581 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6582 instead of __IWMMXT__.
6583 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6584 (arm_arch_setup): New.
6585 (target_regsets): Remove #ifdef. Add VFP regset.
6586 (the_low_target): Use arm_arch_setup.
6588 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6590 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6591 the main thread again.
6593 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6595 Adding Neutrino gdbserver.
6596 * configure: Regenerated.
6597 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6598 * configure.srv (i[34567]86-*-nto*): New target.
6599 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6600 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6601 (nto_comctrl) [__QNX__]: New function.
6602 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6604 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
6606 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6609 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6610 Pedro Alves <pedro@codesourcery.com>
6612 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6613 don't support CONTEXT_EXTENDED_REGISTERS.
6614 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6615 (the_low_target): Install them.
6616 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6617 failing with ERROR_PIPE_NOT_CONNECTED.
6619 2009-06-30 Doug Evans <dje@google.com>
6620 Pierre Muller <muller@ics.u-strasbg.fr>
6622 Add h/w watchpoint support to x86-linux, win32-i386.
6623 * Makefile.in (SFILES): Add i386-low.c
6624 (i386_low_h): Define.
6625 (i386-low.o): Add dependencies.
6626 (linux-x86-low.o): Add i386-low.h dependency.
6627 (win32-i386-low.o): Ditto.
6628 * i386-low.c: New file.
6629 * i386-low.h: New file.
6630 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6631 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6632 * linux-low.c (linux_add_process): Initialize arch_private.
6633 (linux_remove_process): Free arch_private.
6634 (add_lwp): Initialize arch_private.
6635 (delete_lwp): Free arch_private.
6636 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6638 * linux-low.h (process_info_private): New member arch_private.
6639 (lwp_info): New member arch_private.
6640 (linux_target_ops): New members new_process, new_thread,
6642 (ptid_of): New macro.
6643 * linux-x86-low.c: Include stddef.h, i386-low.h.
6644 (arch_process_info): New struct.
6645 (arch_lwp_info): New struct.
6646 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6647 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6648 (i386_dr_low_get_status): New function.
6649 (x86_insert_point, x86_remove_point): New functions.
6650 (x86_stopped_by_watchpoint): New function.
6651 (x86_stopped_data_address): New function.
6652 (x86_linux_new_process, x86_linux_new_thread): New functions.
6653 (x86_linux_prepare_to_resume): New function.
6654 (the_low_target): Add entries for insert_point, remove_point,
6655 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6657 * server.c (debug_hw_points): New global.
6658 (monitor_show_help): Document set debug-hw-points.
6659 (handle_query): Process "set debug-hw-points".
6660 * server.h (debug_hw_points): Declare.
6661 (paddress): Declare.
6662 * utils.c (NUMCELLS, CELLSIZE): New macros.
6663 (get_sell, xsnprintf, paddress): New functions.
6664 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6665 remove_point, stopped_by_watchpoint, stopped_data_address.
6666 * win32-i386-low.c: Include i386-low.h.
6667 (debug_reg_state): Replaces dr.
6668 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6669 (i386_dr_low_get_status): New function.
6670 (i386_insert_point, i386_remove_point): New functions.
6671 (i386_stopped_by_watchpoint): New function.
6672 (i386_stopped_data_address): New function.
6673 (i386_initial_stuff): Update.
6674 (get_thread_context,set_thread_context,i386_thread_added): Update.
6675 (the_low_target): Add entries for insert_point,
6676 remove_point, stopped_by_watchpoint, stopped_data_address.
6677 * win32-low.c (win32_insert_watchpoint): New function.
6678 (win32_remove_watchpoint): New function.
6679 (win32_stopped_by_watchpoint): New function.
6680 (win32_stopped_data_address): New function.
6681 (win32_target_ops): Add entries for insert_watchpoint,
6682 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6683 * win32-low.h (win32_target_ops): New members insert_point,
6684 remove_point, stopped_by_watchpoint, stopped_data_address.
6686 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6688 * server.c (process_serial_event): Re-return unsupported, not
6689 error, if the type isn't recognized. Re-allow supporting only
6690 insert or remove packets. Also call require_running for
6691 breakpoints. Add missing break statement to default case. Tidy.
6692 * target.h (struct target_ops): Rename insert_watchpoint to
6693 insert_point, and remove_watchpoint to remove_point.
6695 * linux-low.h (struct linux_target_ops): Likewise.
6696 * linux-low.c (linux_insert_watchpoint): Rename to ...
6697 (linux_insert_point): ... this. Adjust.
6698 (linux_remove_watchpoint): Rename to ...
6699 (linux_remove_point): ... this. Adjust.
6700 (linux_target_ops): Adjust.
6701 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6702 (cris_insert_point): ... this.
6703 (cris_remove_watchpoint): Rename to ...
6704 (cris_remove_point): ... this.
6705 (the_low_target): Adjust.
6707 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6709 * server.c (handle_v_kill): Pass signal_pid to
6710 kill_inferior if multi_process is zero.
6712 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6714 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6715 * target.h (target_ops): Comment for *_watchpoint to make it clear
6716 the functions can get types '0' and '1'.
6718 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6720 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6721 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6722 * regcache.c (get_regcache): Likewise.
6723 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6724 * win32-low.c (child_fetch_inferior_registers): Remove check for
6727 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6728 Pedro Alves <pedro@codesourcery.com>
6730 * target.h (struct target_ops) <supports_multi_process>: New
6732 (target_supports_multi_process): New.
6733 * server.c (handle_query): Even if GDB reports support, only
6734 enable multi-process if the target also supports it. Report
6735 multi-process support only if the target backend supports it.
6736 * linux-low.c (linux_supports_multi_process): New function.
6737 (linux_target_ops): Install it as target_supports_multi_process
6740 2009-05-24 Doug Evans <dje@google.com>
6742 Global renaming of find_thread_pid to find_thread_ptid.
6743 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6744 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6745 All callers updated.
6747 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6748 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6751 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6752 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6753 (linux_resume_one_lwp): Ditto.
6755 2009-05-23 Doug Evans <dje@google.com>
6757 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6758 from struct inferior_list_entry * to struct lwp_info *.
6759 All callers updated.
6761 2009-05-13 Doug Evans <dje@google.com>
6763 * linux-x86-low.c: Don't include assert.h.
6764 (x86_siginfo_fixup): Use fatal, not assert.
6765 (x86_arch_setup): Fix comment.
6767 2009-05-12 Doug Evans <dje@google.com>
6769 Biarch support for i386/amd64 gdbserver.
6770 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6771 Add linux-x86-low.c.
6772 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6773 (linux-x86-low.o): Add.
6774 * linux-x86-64-low.c: Delete.
6775 * linux-i386-low.c: Delete.
6776 * linux-x86-low.c: New file.
6777 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6779 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6781 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6782 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6783 (linux_child_pid_to_exec_file): New function.
6784 (elf_64_header_p, elf_64_file_p): New functions.
6785 (siginfo_fixup): New function.
6786 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6787 give target a chance to convert layout.
6788 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6789 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6791 2009-05-07 Doug Evans <dje@google.com>
6793 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6794 (regsets_store_inferior_registers): Ditto.
6796 2009-05-06 Pedro Alves <pedro@codesourcery.com>
6800 * linux-low.c (must_set_ptrace_flags): Delete.
6801 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6803 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6804 `lwp->must_set_ptrace_flags' instead.
6805 (linux_wait_for_event_1): Set ptrace options here.
6806 (linux_wait_1): ... not here.
6808 2009-04-30 Doug Evans <dje@google.com>
6810 * inferiors.c (started_inferior_callback): New function.
6811 (attached_inferior_callback): New function.
6812 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6813 * server.c (print_started_pid, print_attached_pid): New functions.
6814 (detach_or_kill_for_exit): New function.
6815 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6816 * server.h (have_started_inferiors_p): Declare.
6817 (have_attached_inferiors_p): Declare.
6819 * inferiors.c (remove_process): Fix memory leak, free process.
6820 * linux-low.c (linux_remove_process): New function.
6821 (linux_kill): Call it instead of remove_process.
6822 (linux_detach, linux_wait_1): Ditto.
6824 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6826 * configure.srv: Add x86 Windows CE target.
6828 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6830 * inferiors.c (get_thread_process): Make global.
6831 * server.h (get_thread_process): Add prototype.
6832 * thread-db.c (find_one_thread): Use get_thread_process
6833 instead of current_process.
6834 (thread_db_get_tls_address): Do not crash if called when
6835 thread layer is not yet initialized.
6837 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6839 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6840 * spu-low.c (current_tid): Rename to ...
6841 (current_ptid): ... this.
6842 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6843 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6844 ptid_get_lwp (current_ptid) instead of current_tid.
6845 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6846 instead of current_tid. Use find_process_pid to verify pid
6847 argument is valid. Pass proper argument to remove_process.
6848 (spu_thread_alive): Compare current_ptid instead of current_tid.
6849 (spu_resume): Likewise.
6851 2009-04-02 Pedro Alves <pedro@codesourcery.com>
6853 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6856 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6858 Implement the multiprocess extensions, and add linux multiprocess
6861 * server.h (ULONGEST): Declare.
6862 (struct ptid, ptid_t): New.
6863 (minus_one_ptid, null_ptid): Declare.
6864 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6865 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6866 (struct inferior_list_entry): Change `id' type from unsigned from
6868 (struct sym_cache, struct breakpoint, struct
6869 process_info_private): Forward declare.
6870 (struct process_info): Declare.
6871 (current_process): Declare.
6872 (all_processes): Declare.
6873 (initialize_inferiors): Declare.
6874 (add_thread): Adjust to use ptid_t.
6875 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6876 (add_process, remove_process, find_thread_pid): Declare.
6877 (find_inferior_id): Adjust to use ptid_t.
6878 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6879 (multi_process): Declare.
6880 (push_event): Adjust to use ptid_t.
6881 (read_ptid, write_ptid): Declare.
6882 (prepare_resume_reply): Adjust to use ptid_t.
6883 (clear_symbol_cache): Declare.
6884 * inferiors.c (all_processes): New.
6885 (null_ptid, minus_one_ptid): New.
6886 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6887 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6888 (add_thread): Change unsigned long to ptid. Remove gdb_id
6890 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6891 (gdb_id_to_thread): Rename to ...
6892 (find_thread_pid): ... this. Change unsigned long to ptid.
6893 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6894 (loaded_dll, pull_pid_from_list): Adjust.
6895 (add_process, remove_process, find_process_pid)
6896 (get_thread_process, current_process, initialize_inferiors): New.
6897 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6898 (struct target_waitstatus) <related_pid>: Ditto.
6899 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6901 (struct target_ops) <join>: Add `pid' argument.
6902 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6903 (struct target_ops) <wait>: Add `ptid' field. Change return type
6905 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6906 (mywait): Add `ptid' argument. Change return type to ptid_t.
6907 (target_pid_to_str): Declare.
6908 * target.c (set_desired_inferior): Adjust to use ptids.
6909 (mywait): Add new `ptid' argument. Adjust.
6910 (target_pid_to_str): New.
6911 * mem-break.h (free_all_breakpoints): Declare.
6912 * mem-break.c (breakpoints): Delelete.
6913 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6914 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6915 to use per-process breakpoint list.
6916 (free_all_breakpoints): New.
6917 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6918 (symbol_cache, all_symbols_looked_up): Delete.
6920 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6922 (prepare_resume_reply): Change ptid argument's type from unsigned
6923 long to ptid_t. Adjust. Implement W;process and X;process.
6924 (free_sym_cache, clear_symbol_cache): New.
6925 (look_up_one_symbol): Adjust to per-process symbol cache. *
6926 * server.c (cont_thread, general_thread, step_thread): Change type
6929 (multi_process): New.
6930 (last_ptid): Change type to ptid_t.
6931 (struct vstop_notif) <ptid>: Change type to ptid_t.
6932 (queue_stop_reply, push_event): Change `ptid' argument's type to
6934 (discard_queued_stop_replies): Add `pid' argument.
6935 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6936 changes. Don't reference the `attached' global.
6937 (attach_inferior): Adjust to mywait interface changes.
6938 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6939 features. Handle and report "multiprocess+". Handle
6941 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6943 (handle_v_kill): New.
6944 (handle_v_stopped): Adjust to use target_pid_to_str.
6945 (handle_v_requests): Allow multiple attaches and runs when
6946 multiprocess extensions are in effect. Handle "vKill".
6947 (myresume): Adjust to use ptids.
6948 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6949 (handle_status): Adjust to discard_queued_stop_replies interface
6951 (first_thread_of, kill_inferior_callback)
6952 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6953 (main): Call initialize_inferiors. Adjust to use ptids, killing
6954 and detaching from all inferiors. Handle multiprocess packet
6956 * linux-low.h: Include gdb_proc_service.h.
6957 (struct process_info_private): New.
6958 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6959 <lwpid_of>: Use ptid_get_lwp.
6960 (get_lwp_thread): Adjust.
6961 (struct lwp_info): Add `dead' member.
6962 (find_lwp_pid): Declare.
6963 * linux-low.c (thread_db_active): Delete.
6964 (new_inferior): Adjust comment.
6965 (inferior_pid): Delete.
6966 (linux_add_process): New.
6967 (handle_extended_wait): Adjust.
6968 (add_lwp): Change unsigned long to ptid.
6969 (linux_create_inferior): Add process to processes table. Adjust
6970 to use ptids. Don't set new_inferior here.
6971 (linux_attach_lwp): Rename to ...
6972 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6973 it. Adjust to use ptids.
6974 (linux_attach_lwp): New.
6975 (linux_attach): Add process to processes table. Don't set
6977 (struct counter): New.
6978 (second_thread_of_pid_p, last_thread_of_process_p): New.
6979 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6981 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6982 processes. Remove process from process table.
6983 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6984 to multiple processes.
6985 (any_thread_of): New.
6986 (linux_detach): Add `pid' argument, and handle it. Remove process
6987 from processes table.
6988 (linux_join): Add `pid' argument. Handle it.
6989 (linux_thread_alive): Change unsighed long argument to ptid_t.
6990 Consider dead lwps as not being alive.
6991 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6992 threads we're not interested in.
6993 (same_lwp, find_lwp_pid): New.
6994 (linux_wait_for_lwp): Change `pid' argument's type from int to
6996 (linux_wait_for_event): Rename to ...
6997 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6998 from int to ptid_t. Adjust.
6999 (linux_wait_for_event): New.
7000 (linux_wait_1): Add `ptid' argument. Change return type to
7001 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7002 that exit from the process table.
7003 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7005 (mark_lwp_dead): New.
7006 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7007 stopping all threads, mark its main lwp as dead.
7008 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7010 (fetch_register, usr_store_inferior_registers)
7011 (regsets_fetch_inferior_registers)
7012 (regsets_store_inferior_registers, linux_read_memory)
7013 (linux_write_memory): Inline `inferior_pid'.
7014 (linux_look_up_symbols): Adjust to use per-process
7016 (linux_request_interrupt): Adjust to use ptids.
7017 (linux_read_auxv): Inline `inferior_pid'.
7018 (initialize_low): Don't reference thread_db_active.
7019 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7020 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7021 (ps_getpid): Return the pid of the current inferior.
7022 * thread-db.c (proc_handle, thread_agent): Delete.
7023 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7025 (find_one_thread): Change argument type to ptid_t. Adjust to
7027 (maybe_attach_thread): Adjust to per-process data and ptids.
7028 (thread_db_find_new_threads): Ditto.
7029 (thread_db_init): Ditto.
7030 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7031 processes table. Adjust to use ptids.
7032 (spu_kill, spu_detach): Adjust interface. Remove process from
7034 (spu_join, spu_thread_alive): Adjust interface.
7035 (spu_wait): Adjust interface. Remove process from processes
7036 table. Adjust to use ptids.
7037 * win32-low.c (current_inferior_tid): Delete.
7038 (current_inferior_ptid): New.
7039 (debug_event_ptid): New.
7040 (thread_rec): Take a ptid. Adjust.
7041 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7042 (child_delete_thread): Ditto.
7043 (do_initial_child_stuff): Add `attached' argument. Add process to
7045 (child_fetch_inferior_registers, child_store_inferior_registers):
7047 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7048 (win32_attach): Pass 1 to do_initial_child_stuff.
7049 (win32_kill): Adjust interface. Remove process from processes
7051 (win32_detach): Ditto.
7052 (win32_join): Adjust interface.
7053 (win32_thread_alive): Take a ptid.
7054 (win32_resume): Adjust to use ptids.
7055 (get_child_debug_event): Ditto.
7056 (win32_wait): Adjust interface. Remove exiting process from
7059 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7061 Non-stop mode support.
7063 * server.h (non_stop): Declare.
7064 (gdb_client_data, handler_func): Declare.
7065 (delete_file_handler, add_file_handler, start_event_loop):
7067 (handle_serial_event, handle_target_event, push_event)
7068 (putpkt_notif): Declare.
7069 * target.h (enum resume_kind): New.
7070 (struct thread_resume): Replace `step' field by `kind' field.
7071 (TARGET_WNOHANG): Define.
7072 (struct target_ops) <wait>: Add `options' argument.
7073 <supports_non_stop, async, start_non_stop>: New fields.
7074 (target_supports_non_stop, target_async): New.
7075 (start_non_stop): Declare.
7076 (mywait): Add `options' argument.
7077 * target.c (mywait): Add `options' argument. Print child exit
7079 (start_non_stop): New.
7080 * server.c (non_stop, own_buf, mem_buf): New globals.
7081 (struct vstop_notif): New.
7082 (notif_queue): New global.
7083 (queue_stop_reply, push_event, discard_queued_stop_replies)
7084 (send_next_stop_reply): New.
7085 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7087 (attach_inferior): In non-stop mode, don't wait for the target
7089 (handle_general_set): Handle QNonStop.
7090 (handle_query): When handling qC, return the current general
7091 thread, instead of the first thread of the list.
7092 (handle_query): If the backend supports non-stop mode, include
7093 QNonStop+ in the qSupported query response.
7094 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7096 (handle_v_attach, handle_v_run): Handle non-stop mode.
7097 (handle_v_stopped): New.
7098 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7099 (myresume): Adjust to use resume_kind. Handle non-stop.
7100 (queue_stop_reply_callback): New.
7101 (handle_status): Handle non-stop mode.
7102 (main): Clear non_stop flag on reconnection. Use the event-loop.
7103 Refactor serial protocol handling from here ...
7104 (process_serial_event): ... to this new function. When GDB
7105 selects any thread, select one here. In non-stop mode, wait until
7106 GDB acks all pending events before exiting.
7107 (handle_serial_event, handle_target_event): New.
7108 * remote-utils.c (remote_open): Install remote_desc in the event
7110 (remote_close): Remove remote_desc from the event loop.
7111 (putpkt_binary): Rename to...
7112 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7113 (putpkt_binary): New as wrapper around putpkt_binary_1.
7114 (putpkt_notif): New.
7115 (prepare_resume_reply): In non-stop mode, don't change the
7117 * event-loop.c: New.
7118 * Makefile.in (OBJ): Add event-loop.o.
7119 (event-loop.o): New rule.
7121 * linux-low.h (pid_of): Moved here.
7123 (get_lwp_thread): Use lwpid_of.
7124 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7125 * linux-low.c (pid_of): Delete.
7126 (inferior_pid): Use lwpid_of.
7127 (linux_event_pipe): New.
7128 (target_is_async_p): New.
7130 (handle_extended_wait): Use lwpid_of.
7131 (add_lwp): Don't set lwpid field.
7132 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7133 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7134 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7135 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7136 first. Adjust to linux_wait_for_event interface changes. Use
7138 (linux_detach): Don't delete the main lwp here.
7139 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7140 (status_pending_p): Don't consider explicitly suspended lwps.
7141 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7142 pointer. Add OPTIONS argument. Change return type to int. Use
7143 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7144 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7145 pointer. Add status pointer argument. Return a pid instead of a
7146 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7147 changes. In non-stop mode, don't switch to a random thread.
7148 (linux_wait): Rename to...
7149 (linux_wait_1): ... this. Add target_options argument, and handle
7150 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7151 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7152 clean exit and signal exit code. Don't stop all threads in
7153 non-stop mode. In all-stop mode, only stop all threads when
7154 reporting a stop to GDB. Handle explicit thread stop requests.
7155 (async_file_flush, async_file_mark): New.
7157 (send_sigstop): Use lwpid_of.
7158 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7159 interface changes. In non-stop mode, don't switch to a random
7161 (linux_resume_one_lwp): Use lwpid_of.
7162 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7163 (linux_resume_one_thread): ... this. Handle resume_stop. In
7164 non-stop mode, don't look for pending flag in all threads.
7165 (resume_status_pending_p): Don't consider explicitly suspended
7167 (my_waitpid): Reimplement. Emulate __WALL.
7168 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7170 (sigchld_handler, linux_supports_non_stop, linux_async)
7171 (linux_start_non_stop): New.
7172 (linux_target_ops): Register linux_supports_non_stop, linux_async
7173 and linux_start_non_stop.
7174 (initialize_low): Install SIGCHLD handler.
7175 * thread-db.c (thread_db_create_event, find_one_thread)
7176 (thread_db_get_tls_address): Use lwpid_of.
7177 * win32-low.c (win32_detach): Adjust to use resume_kind.
7178 (win32_wait): Add `options' argument.
7179 * spu-low.c (spu_resume): Adjust to use resume_kind.
7180 (spu_wait): Add `options' argument.
7182 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7184 Decouple target code from remote protocol.
7186 * target.h (enum target_waitkind): New.
7187 (struct target_waitstatus): New.
7188 (struct target_ops) <wait>: Return an unsigned long. Take a
7189 target_waitstatus pointer instead of a char pointer.
7191 * target.c (mywait): Change prototype to return an unsigned long.
7192 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7193 * server.h (thread_from_wait, old_thread_from_wait): Delete
7195 (prepare_resume_reply): Change prototype to take a
7197 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7198 (last_status, last_ptid): New.
7199 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7200 pid instead of a signal.
7201 (attach_inferior): Remove "status" and "signal" parameters.
7203 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7205 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7206 (handle_v_requests, myresume): Remove "status" and "signal"
7208 (handle_status): New.
7209 (main): Delete local `status'. Adjust.
7210 * remote-utils.c: Include target.h.
7211 (prepare_resume_reply): Change prototype to take a
7212 target_waitstatus. Adjust.
7214 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7216 * spu-low.c (spu_wait): Adjust.
7217 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7219 (win32_wait): Adjust.
7221 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7223 * target.h (struct thread_resume): Delete leave_stopped member.
7224 (struct target_ops): Add a `n' argument to the `resume' callback.
7225 * server.c (start_inferior): Adjust.
7226 (handle_v_cont, myresume): Adjust.
7227 * linux-low.c (check_removed_breakpoint): Adjust to resume
7228 interface change, and to removed leave_stopped field.
7229 (resume_ptr): Delete.
7230 (struct thread_resume_array): New.
7231 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7232 resume interface change.
7233 (linux_continue_one_thread, linux_queue_one_thread)
7234 (resume_status_pending_p): Check if the resume field is NULL
7235 instead of checking the leave_stopped member.
7236 (linux_resume): Adjust to the target resume interface change.
7237 * spu-low.c (spu_resume): Adjust to the target resume interface
7239 * win32-low.c (win32_detach, win32_resume): Ditto.
7241 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7243 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7245 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7247 (linux_continue_one_thread): Only preserve the stepping flag if
7248 there's a pending breakpoint.
7250 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7252 * server.c (main): After the inferior having exited, call
7253 remote_close before exiting gdbserver.
7255 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7257 Fix size of FPSCR in Power 7 processors.
7258 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7259 (PPC_FEATURE_HAS_DFP): New #define.
7260 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7263 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7265 * server.c (handle_query) Whitespace and formatting.
7267 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7269 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7270 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7271 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7272 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7273 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7274 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7275 Makefile.in, configure.ac: Fix whitespace throughout.
7276 * configure: Regenerate.
7278 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7280 * inferiors.c (find_inferior): Make it safe for the callback
7281 function to delete the currently iterated inferior.
7283 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7285 * Makefile.in (linuw_low_h): Move higher.
7286 (thread-db.o): Depend on $(linux_low_h).
7288 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7290 Rename "process" to "lwp" throughout.
7292 * linux-low.c (all_processes): Rename to...
7293 (all_lwps): ... this.
7294 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7295 (add_process): Rename to ...
7296 (add_lwp): ... this. Adjust.
7297 (linux_create_inferior): Adjust.
7298 (linux_attach_lwp): Adjust.
7299 (linux_attach): Adjust.
7300 (linux_kill_one_process): Rename to ...
7301 (linux_kill_one_lwp): ... this. Adjust.
7302 (linux_kill): Adjust.
7303 (linux_detach_one_process): Rename to ...
7304 (linux_detach_one_lwp): ... this. Adjust.
7305 (linux_detach): Adjust.
7306 (check_removed_breakpoint): Adjust.
7307 (status_pending_p): Adjust.
7308 (linux_wait_for_process): Rename to ...
7309 (linux_wait_for_lwp): ... this. Adjust.
7310 (linux_wait_for_event): Adjust.
7311 (send_sigstop): Adjust.
7312 (wait_for_sigstop): Adjust.
7313 (stop_all_processes): Rename to ...
7314 (stop_all_lwps): ... this.
7315 (linux_resume_one_process): Rename to ...
7316 (linux_resume_one_lwp): ... this. Adjust.
7317 (linux_set_resume_request, linux_continue_one_thread)
7318 (linux_queue_one_thread, resume_status_pending_p)
7319 (usr_store_inferior_registers, regsets_store_inferior_registers)
7320 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7322 * linux-low.h (get_process): Rename to ...
7323 (get_lwp): ... this. Adjust.
7324 (get_thread_process): Rename to ...
7325 (get_thread_lwp): ... this. Adjust.
7326 (get_process_thread): Rename to ...
7327 (get_lwp_thread): ... this. Adjust.
7328 (struct process_info): Rename to ...
7329 (struct lwp_info): ... this.
7330 (all_processes): Rename to ...
7331 (all_lwps): ... this.
7332 * proc-service.c (ps_lgetregs): Adjust.
7333 * thread-db.c (thread_db_create_event, find_one_thread)
7334 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7336 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7338 * server.c (handle_query): Handle "qAttached".
7340 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7342 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7343 GPLv3, update license URL.
7345 2009-03-01 Doug Evans <dje@google.com>
7347 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7348 (server_h): Add gdb_signals.h.
7349 (signals.o): Update.
7350 * server.h (target_signal_from_host,target_signal_to_host_p)
7351 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7353 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7355 * remote-utils.c (getpkt): Also generate remote-debug
7356 information if noack_mode is set.
7358 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7360 * server.c (handle_query): Report qXfer:siginfo:read and
7361 qXfer:siginfo:write as supported and handle them.
7362 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7363 * linux-low.c (linux_xfer_siginfo): New.
7364 (linux_target_ops): Set it.
7366 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7368 * server.c (gdbserver_usage): Mention --remote-debug.
7369 (main): Accept '--remote-debug' switch.
7371 2009-01-18 Doug Evans <dje@google.com>
7373 * regcache.c (new_register_cache): No need to check result of xcalloc.
7374 * server.c (handle_search_memory): Back out calls to xmalloc,
7375 result is checked and error is returned to user upon failure.
7376 (handle_query): Ditto. Add more checks for result of malloc.
7377 (handle_v_cont): Check result of malloc, report error back to
7379 (handle_v_run): Ditto. Call freeargv.
7380 * server.h (freeargv): Declare.
7381 * utils.c (freeargv): New fn.
7383 2009-01-15 Doug Evans <dje@google.com>
7385 * gdbreplay.c (perror_with_name): Make arg const char *.
7386 * server.h (target_signal_to_name): Make return type const char *.
7387 * thread-db.c (thread_db_err_str): Make return type const char *.
7388 * utils.c (perror_with_name): Make arg const char *.
7390 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7392 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7393 when handling a EXIT_PROCESS_DEBUG_EVENT.
7395 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7397 * gdbreplay.c (gdbreplay_version): Update copyright year.
7398 * server.c (gdbserver_version): Likewise.
7400 2009-01-05 Doug Evans <dje@google.com>
7402 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7403 (handle_extended_wait): Improve comment.
7405 2008-12-13 Doug Evans <dje@google.com>
7407 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7408 * server.h (ATTR_MALLOC): New macro.
7409 (xmalloc,xcalloc,xstrdup): Declare.
7410 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7411 * inferiors.c: Ditto.
7412 * linux-low.c: Ditto.
7413 * mem-break.c: Ditto.
7414 * regcache.c: Ditto.
7415 * remote-utils.c: Ditto.
7418 * win32-low.c: Ditto.
7420 2008-12-12 Doug Evans <dje@google.com>
7422 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7423 in debugging printf.
7425 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7427 2008-12-09 Doug Evans <dje@google.com>
7429 * linux-low.h (struct process_info): Delete member tid, unused.
7430 * thread-db.c (find_one_thread): Update.
7431 (maybe_attach_thread): Update.
7433 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7435 * target.h (struct target_ops): Add qxfer_osdata member.
7436 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7438 (linux_qxfer_osdata): New functions.
7439 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7441 * server.c (handle_query): Handle "qXfer:osdata:read:".
7442 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7443 (buffer_xml_printf): New functions.
7444 * server.h (struct buffer): New.
7445 (buffer_grow_str, buffer_grow_str0): New macros.
7446 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7447 (buffer_xml_printf): Declare.
7449 2008-11-24 Doug Evans <dje@google.com>
7451 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7453 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7455 * server.c (handle_v_run): Always use the supplied argument list.
7457 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7459 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7460 (xtensa_regmap_table): Add entry for scompare1.
7462 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7464 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7465 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7466 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7467 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7468 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7469 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7470 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7471 XML target descriptions.
7472 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7473 when inferior is running on an ISA 2.05 or later processor. Add
7474 special case to return offset for full 64-bit slot of FPSCR when
7477 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7479 * Makefile.in (SFILES, clean): Added sparc64 files.
7480 (reg-sparc64.o, reg-sparc64.c): New.
7481 * configure.srv (sparc*-*-linux*): New configuration.
7482 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7483 syscall arguments for SPARC.
7484 (regsets_store_inferior_registers): Likewise.
7485 * linux-sparc-low.c: New file.
7487 2008-10-21 Doug Evans <dje@google.com>
7489 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7490 (READLINE_DIR,READLINE_DEP): Delete.
7491 (INTERNAL_CFLAGS): Update.
7492 (LINTFLAGS): Update.
7494 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7496 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7497 whole argv from the last run, not just argv[0].
7499 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7501 * regcache.c (new_register_cache): Return NULL if the register
7502 cache size isn't known yet.
7503 (free_register_cache): Avoid dereferencing a NULL regcache.
7505 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7507 * configure.srv: Merge MIPS and MIPS64.
7509 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7511 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7513 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7515 * Makefile.in: Add required vsx dependencies.
7517 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7518 Declare init_registers_powerpc_vsx32l.
7519 Declare init_registers_powerpc_vsx64l.
7520 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7521 (ppc_arch_setup): Check for VSX in hwcap.
7522 (ppc_fill_vsxregset): New function.
7523 (ppc_store_vsxregset): New function.
7524 Add new VSX entry in regset_info target_regsets.
7526 * configure.srv: Add new VSX dependencies.
7528 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7530 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7531 (remote_open): Set or clear transport_is_reliable.
7532 (putpkt_binary): Don't expect acks in noack mode.
7533 (getpkt): Don't send ack/nac in noack mode.
7534 * server.c (handle_general_set): Handle QStartNoAckMode.
7535 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7537 (main): Reset noack_mode on every connection.
7538 * server.h (noack_mode): Declare.
7540 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7542 * Makefile.in (GDBREPLAY_OBS): New variable.
7543 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7545 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7546 Daniel Jacobowitz <dan@codesourcery.com>
7548 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7549 (usr_store_inferior_registers): Likewise.
7550 (regsets_store_inferior_registers): Likewise.
7552 2008-07-31 Rolf Jansen <rj@surtec.com>
7553 Pedro Alves <pedro@codesourcery.com>
7555 * configure.ac: Check for memmem declaration.
7556 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7557 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7558 (disable_packet_qfThreadInfo): Unconditionally compile.
7559 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7560 * configure, config.in: Regenerate.
7562 2008-07-28 Doug Kwan <dougkwan@google.com>
7564 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7565 (linux_write_memory): Remove declaration of errno.
7567 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7569 * linux-low.c (handle_extended_wait): Do not use "status"
7570 variable uninitialized.
7572 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7574 * server.c (handle_v_attach): Inhibit reporting dll changes.
7576 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7578 * remote-utils.c (prepare_resume_reply): If requested, don't
7579 output "thread:TID" in the T stop reply.
7581 * server.c (disable_packet_vCont, disable_packet_Tthread)
7582 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7583 (handle_query): If requested, disable support for qC, qfThreadInfo
7585 (handle_v_requests): If requested, disable support for vCont.
7586 (gdbserver_show_disableable): New.
7587 (main): Handle --disable-packet and --disable-packet=LIST.
7589 * server.h (disable_packet_vCont, disable_packet_Tthread)
7590 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7592 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7594 * server.c (gdbserver_usage): Mention --version.
7596 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7598 * Makefile.in (gdbreplay.o): New rule.
7600 2008-06-06 Joseph Myers <joseph@codesourcery.com>
7602 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7603 message, not gdbserver.
7605 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
7606 Nathan Sidwell <nathan@codesourcery.com>
7607 Joseph Myers <joseph@codesourcery.com>
7609 * acinclude.m4: Include ../../config/acx.m4.
7610 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7611 * configure, config.in: Regenerate.
7612 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7613 * server.c (gdbserver_version): Print PKGVERSION.
7614 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7615 (main): Adjust gdbserver_usage calls.
7616 * gdbreplay.c (version, host_name): Add declarations.
7617 (gdbreplay_version, gdbreplay_usage): New.
7618 (main): Accept --version and --help options.
7620 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7622 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7623 (arm_breakpoint_at): Handle Thumb.
7624 (the_low_target): Add comment.
7626 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7628 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7630 2008-05-09 Doug Evans <dje@google.com>
7632 * server.h (decode_search_memory_packet): Declare.
7633 * remote-utils.c (decode_search_memory_packet): New fn.
7634 * server.c (handle_search_memory_1): New fn.
7635 (handle_search_memory): New fn.
7636 (handle_query): Process qSearch:memory packets.
7638 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7640 * regcache.c (registers_length): Remove.
7641 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7642 full register packet.
7643 * regcache.h (registers_length): Remove prototype.
7644 * server.h (PBUFSIZ): Define to 16384.
7646 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7648 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7649 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7650 powerpc-64l.o, and powerpc-altivec64l.o.
7651 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7652 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7653 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7654 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7655 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7658 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7659 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7660 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7661 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7662 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7663 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7664 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7665 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7666 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7667 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7670 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7671 (init_registers_powerpc_32l): ... this new prototype.
7672 (init_registers_powerpc_32): Remove, replace by ...
7673 (init_registers_powerpc_altivec32l): ... this new prototype.
7674 (init_registers_powerpc_e500): Remove, replace by ...
7675 (init_registers_powerpc_e500l): ... this new prototype.
7676 (init_registers_ppc64): Remove, replace by ...
7677 (init_registers_powerpc_64l): ... this new prototype.
7678 (init_registers_powerpc_64): Remove, replace by ...
7679 (init_registers_powerpc_altivec64l): ... this new prototype.
7680 (ppc_num_regs): Set to 73.
7681 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7682 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7683 (ppc_cannot_store_register): Handle orig_r3 and trap.
7684 (ppc_arch_setup): Update init_registers_... calls.
7685 (ppc_fill_gregset): Handle orig_r3 and trap.
7687 * inferiors.c (clear_inferiors): Reset current_inferior.
7689 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7691 * acinclude.m4: Add override.m4.
7692 * configure: Regenerate.
7694 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7696 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7697 initial call to init_register_ppc64.
7699 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7701 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7702 single powerpc*-*-linux* case.
7703 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7705 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7707 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7708 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7710 * linux-ppc-low.c: Include <elf.h>.
7711 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7712 (ppc_hwcap): New global variable.
7713 (ppc_regmap): Remove __SPE__ #ifdef sections.
7714 (ppc_regmap_e500): New global variable.
7715 (ppc_cannot_store_register): Update __SPE__ special case.
7716 (ppc_get_hwcap): New function.
7717 (ppc_arch_setup): Use it to determine whether inferior supports
7718 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7719 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7720 Do not access registers if target does not support AltiVec.
7721 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7722 Do not access registers if target does not support SPE.
7723 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7725 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7727 * linux-low.c (disabled_regsets, num_regsets): New.
7728 (use_regsets_p): Delete.
7729 (linux_wait_for_process): Clear disabled_regsets.
7730 (regsets_fetch_inferior_registers): Check and set it.
7731 (regsets_store_inferior_registers): Likewise.
7732 (linux_fetch_registers, linux_store_registers): Do not use
7734 (initialize_low): Allocate disabled_regsets.
7736 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7738 * Makefile.in (LIBOBJS): New.
7740 (memmem.o): New rule.
7741 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7742 * configure: Regenerated.
7744 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7746 * server.c (handle_query): Never return "unsupported" for
7747 qXfer:features:read queries.
7749 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7751 * server.c (get_features_xml): Fix inverted condition.
7752 (handle_query): Always support qXfer:feature:read.
7754 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7756 * server.c (wrapper_argv): New.
7757 (start_inferior): Handle wrapper_argv. If set, expect an extra
7759 (gdbserver_usage): Document --wrapper.
7760 (main): Parse --wrapper.
7762 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7764 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7765 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7766 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7767 (ppc_set_pc): Likewise.
7768 (ppc_arch_setup): New function.
7769 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7770 of collect_register.
7771 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
7773 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7775 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7776 instead of linux-ppc64-low.o.
7777 * linux-ppc64-low.c: Remove file.
7778 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7779 (linux-ppc64-low.o): Remove rule.
7781 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7782 (init_registers_powerpc_64): Likewise.
7783 (ppc_regmap): Conditionally define depending on __powerpc64__.
7784 (ppc_cannot_store_register): Do not special-case "fpscr" when
7785 compiled on __powerpc64__.
7786 (ppc_collect_ptrace_register): New function.
7787 (ppc_supply_ptrace_register): New function.
7788 (ppc_breakpoint): Change type to "unsigned int".
7789 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7790 (the_low_target): Conditionally provide initializers for the
7791 arch_setup member depending on __powerpc64__. Install
7792 collect_ptrace_register and supply_ptrace_register members.
7794 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7796 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7797 * server.c (gdbserver_xmltarget): Define.
7798 (get_features_xml): Use it to replace "target.xml" and arch_string.
7800 * configure.srv: Remove srv_xmltarget. Add XML files that were
7801 mentioned there to srv_xmlfiles instead. Remove conditional tests
7802 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7803 srv_xmlfiles and srv_regobj to include all possible choices.
7804 * configure.ac (srv_xmltarget): Remove.
7805 (srv_xmlfiles): Do not add "target.xml".
7806 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7807 checks for supplementary target information.
7808 * configure: Regenerate.
7809 * Makefile.in (XML_TARGET): Remove.
7810 (target.xml): Remove rule.
7811 (clean): Do not clean up target.xml.
7812 (.PRECIOUS): Do not mention target.xml.
7814 * target.h (struct target_ops): Remove arch_string member.
7815 * linux-low.c (linux_arch_string): Remove.
7816 (linux_target_ops): Remove arch_string initializer.
7817 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7818 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7819 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7820 * spu-low.c (spu_arch_string): Remove.
7821 (spu_target_ops): Remove arch_string initializer.
7822 * win32-low.c (win32_arch_string): Remove.
7823 (win32_target_ops): Remove arch_string initializer.
7824 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7825 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7826 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7828 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7830 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7831 by collect_ptrace_register and supply_ptrace_register hooks.
7832 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7833 instead of checking for the_low_target.left_pad_xfer.
7834 (usr_store_inferior_registers): Use collect_ptrace_register callback
7835 instead of checking for the_low_target.left_pad_xfer.
7837 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7838 (s390_supply_ptrace_register): Likewise.
7839 (s390_fill_gregset): Call s390_collect_ptrace_register.
7840 (the_low_target): Update.
7842 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7843 (ppc_supply_ptrace_register): Likewise.
7844 (the_low_target): Update.
7846 * linux-i386-low.c (the_low_target): Update.
7847 * linux-x86-64-low.c (the_low_target): Update.
7849 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7851 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7852 reg-s390.o and reg-s390x.o.
7854 * linux-low.c (new_inferior): New global variable.
7855 (linux_create_inferior, linux_attach): Set it.
7856 (linux_wait_for_process): Call the_low_target.arch_setup after the
7857 target has stopped for the first time.
7858 (initialize_low): Do not call the_low_target.arch_setup.
7860 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7861 (s390_set_pc): Likewise.
7862 (s390_arch_setup): New function.
7863 (the_low_target): Use s390_arch_setup as arch_setup routine.
7865 * regcache.c (realloc_register_cache): New function.
7866 (set_register_cache): Call it for each existing regcache.
7868 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7870 * server.h (init_registers): Remove prototype.
7872 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7873 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7874 instead of init_registers ().
7875 * linux-arm-low.c (init_registers_arm): Add prototype.
7876 (init_registers_arm_with_iwmmxt): Likewise.
7877 (the_low_target): Add initializer for arch_setup field.
7878 * linux-cris-low.c (init_registers_cris): Add prototype.
7879 (the_low_target): Add initializer for arch_setup field.
7880 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7881 (the_low_target): Add initializer for arch_setup field.
7882 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7883 (the_low_target): Add initializer for arch_setup field.
7884 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7885 (the_low_target): Add initializer for arch_setup field.
7886 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7887 (the_low_target): Add initializer for arch_setup field.
7888 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7889 (the_low_target): Add initializer for arch_setup field.
7890 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7891 (init_registers_mips64_linux): Likewise.
7892 (the_low_target): Add initializer for arch_setup field.
7893 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7894 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7895 (the_low_target): Add initializer for arch_setup field.
7896 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7897 (init_registers_powerpc_64): Likewise.
7898 (the_low_target): Add initializer for arch_setup field.
7899 * linux-s390-low.c (init_registers_s390): Add prototype.
7900 (init_registers_s390x): Likewise.
7901 (the_low_target): Add initializer for arch_setup field.
7902 * linux-sh-low.c (init_registers_sh): Add prototype.
7903 (the_low_target): Add initializer for arch_setup field.
7904 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7905 (the_low_target): Add initializer for arch_setup field.
7906 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7907 (the_low_target): Add initializer for arch_setup field.
7909 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7910 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7911 instead of init_registers ().
7912 * win32-arm-low.c (init_registers_arm): Add prototype.
7913 (the_low_target): Add initializer for arch_setup field.
7914 * win32-i386-low.c (init_registers_i386): Add prototype.
7915 (the_low_target): Add initializer for arch_setup field.
7917 * spu-low.c (init_registers_spu): Add prototype.
7918 (initialize_low): Call initialie_registers_spu () instead of
7919 initialize_registers ().
7921 2008-02-19 Pedro Alves <pedro@codesourcery.com>
7923 * server.c (handle_v_requests): When handling the vRun and vAttach
7924 packets, if already debugging a process, don't kill it. Return an
7927 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7929 * server.c (handle_query): Correct length check.
7931 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7933 * win32-low.c (do_initial_child_stuff): Add process handle
7934 parameter. Set current_process_handle and current_process_id from the
7935 parameters. Clear globals.
7936 (win32_create_inferior): Don't set current_process_handle and
7937 current_process_id here. Instead pass them on the call to
7938 do_initial_child_stuff.
7939 (win32_attach): Likewise.
7940 (win32_clear_inferiors): New.
7941 (win32_kill): Don't close the current process handle or the
7942 current thread handle here. Instead call win32_clear_inferiors.
7943 (win32_detach): Don't open a new handle to the process. Call
7944 win32_clear_inferiors.
7945 (win32_join): Don't rely on current_process_handle; open a new
7946 handle using the process id.
7947 (win32_wait): Call win32_clear_inferiors when the inferior process
7950 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7952 * server.c (monitor_show_help): Add "exit".
7954 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7956 * Makefile.in (SFILES): Add linux-xtensa-low.c.
7957 (clean): Add reg-xtensa.c.
7958 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
7959 * configure.srv (xtensa*-*-linux*) New target.
7960 * linux-xtensa-low.c: New.
7961 * xtensa-xtregs.c: New.
7963 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7965 * hostio.c: Don't include errno.h.
7966 (errno_to_fileio_errno): Move to hostio-errno.
7967 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7968 error number outputting to the target->hostio_last_error callback.
7969 (hostio_packet_error): Use FILEIO_EINVAL directly.
7970 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7971 calls to hostio_error.
7972 * hostio-errno.c: New.
7973 * server.h (hostio_last_error_from_errno): Declare.
7974 * target.h (target_ops): Add hostio_last_error member.
7975 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7976 as hostio_last_error handler.
7977 * spu-low.c (spu_target_ops): Likewise.
7978 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7979 (wince_hostio_last_error): New functions.
7980 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7981 as hostio_last_error handler.
7982 (win32_target_ops) [!_WIN32_WCE]: Register
7983 hostio_last_error_from_errno as hostio_last_error handler.
7984 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7985 (hostio-errno.o): New rule.
7986 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7987 * configure.srv (srv_hostio_err_objs): New variable. Default to
7989 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7990 * configure: Regenerate.
7992 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7994 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7995 (linux_kill, linux_detach): Clean up the process list.
7996 * remote-utils.c (remote_open): Improve port number parsing.
7997 (putpkt_binary, input_interrupt): Only send interrupts if the target
7999 * server.c (extended_protocol): Make static.
8000 (attached): Define earlier.
8001 (exit_requested, response_needed, program_argv): New variables.
8002 (target_running): New.
8003 (start_inferior): Clear attached here.
8004 (attach_inferior): Set attached here.
8005 (require_running): Define.
8006 (handle_query): Use require_running and target_running. Implement
8008 (handle_v_attach, handle_v_run): New.
8009 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8010 (gdbserver_usage): Update.
8011 (main): Redo argument parsing. Handle --debug and --multi. Handle
8012 --attach along with other options or after the port. Save
8013 program_argv. Support no initial program. Resynchronize
8014 communication with GDB after an error. Handle "monitor exit".
8015 Use require_running and target_running. Always allow the extended
8016 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8017 restart in extended mode.
8018 * README: Refer to the GDB manual. Update --attach usage.
8020 2007-12-20 Andreas Schwab <schwab@suse.de>
8022 * linux-low.c (STACK_SIZE): Define.
8023 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8024 (linux_test_for_tracefork): Likewise.
8026 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8028 * linux-low.c (linux_wait_for_event): Update messages. Do not
8029 reinsert auto-delete breakpoints.
8030 * mem-break.c (struct breakpoint): Change return type of handler to
8032 (set_breakpoint_at): Update handler type.
8033 (reinsert_breakpoint_handler): Return 1 instead of calling
8035 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8037 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8038 * mem-break.h (set_breakpoint_at): Update handler type.
8039 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8040 * win32-low.c (auto_delete_breakpoint): New.
8041 (get_child_debug_event): Use it.
8043 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8045 * configure.ac: Check for pread and pwrite.
8046 * hostio.c (handle_pread): Fall back to lseek and read.
8047 (handle_pwrite): Fall back to lseek and write.
8048 * config.in, configure: Regenerated.
8050 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8052 * server.c (myresume): Add own_buf argument.
8053 (main): Update calls.
8055 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8057 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8058 * remote-utils.c (remote_open): Do not call disable_async_io.
8059 (block_async_io): Delete.
8060 (unblock_async_io): Make static.
8061 (initialize_async_io): New.
8062 * server.c (handle_v_cont): Handle async I/O here.
8063 (myresume): Likewise. Move other common resume tasks here...
8064 (main): ... from here. Call initialize_async_io. Disable async
8065 I/O before the main loop.
8066 * server.h (initialize_async_io): Declare.
8067 (block_async_io, unblock_async_io): Delete prototypes.
8068 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8070 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8072 * remote-utils.c (readchar): Allow binary data in received messages.
8074 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8076 * win32-low.c (attaching): New global.
8077 (win32_create_inferior): Clear the `attaching' global.
8078 (win32_attach): Set the `attaching' global.
8079 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8080 attaching. Only set a breakpoint at the entry point if not
8083 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8085 * server.c (main): Don't report dll events on the initial
8086 connection on attaches.
8088 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8090 * server.c (main): Relax numerical bases supported for the pid of
8091 the --attach command line argument.
8093 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8095 * win32-low.c (win32_attach): Call OpenProcess before
8096 DebugActiveProcess, not after. Add last error output to error
8099 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8101 * win32-low.c (win32_get_thread_context)
8102 (win32_set_thread_context): New functions.
8103 (thread_rec): Use win32_get_thread_context.
8104 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8105 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8108 2007-12-03 Leo Zayas
8109 Pedro Alves <pedro_alves@portugalmail.pt>
8111 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8113 (child_add_thread): Minor cleanup.
8114 (child_continue): Resume artificially suspended threads before
8115 calling ContinueDebugEvent.
8116 (suspend_one_thread): New.
8117 (fake_breakpoint_event): New.
8118 (get_child_debug_event): Change return type to int. Check here if
8119 gdb sent an interrupt request. If a soft interrupt was requested,
8120 fake a breakpoint event. Return 0 if there is no event to handle,
8122 (win32_wait): Don't check here if gdb sent an interrupt request.
8123 Ensure there is a valid event to handle.
8124 (win32_request_interrupt): Add soft interruption method as last
8127 2007-12-03 Leo Zayas
8128 Pedro Alves <pedro_alves@portugalmail.pt>
8130 * win32-low.h (win32_thread_info): Add descriptions to the
8131 structure members. Replace `suspend_count' counter by a
8133 * win32-low.c (thread_rec): Update condition of when to get the
8134 context from the inferior. Rely on ContextFlags being set if it
8135 has already been retrieved. Only suspend the inferior thread if
8136 we haven't already. Warn if that fails.
8137 (continue_one_thread): s/suspend_count/suspended/. Only call
8138 ResumeThread once. Warn if that fails.
8140 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8142 * win32-low.c (win32_wait): Don't read from the inferior when it
8145 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8147 * Makefile.in (win32_low_h): New variable.
8148 (win32-low.o): Add dependency on $(win32_low_h).
8149 (win32-arm-low.o, win32-i386-low.o): New rules.
8151 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8153 * hostio.c: Correct copyright year.
8155 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8157 * Makefile.in (OBS): Add hostio.o.
8158 (hostio.o): New rule.
8159 * server.h (handle_vFile): Declare.
8160 * hostio.c: New file.
8161 * server.c (handle_v_requests): Take packet_len and new_packet_len
8162 for binary packets. Call handle_vFile.
8163 (main): Update call to handle_v_requests.
8165 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8167 * linux-low.c: Include <sched.h>.
8169 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8171 * linux-low.c (linux_tracefork_grandchild): New.
8172 (linux_tracefork_child): Use clone.
8173 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8175 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8177 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8179 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8181 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8183 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8185 * inferiors.c (change_inferior_id): Delete.
8186 (add_pid_to_list, pull_pid_from_list): New.
8187 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8188 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8189 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8190 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8191 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8192 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8193 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8194 (using_threads): Always set to 1.
8195 (handle_extended_wait): New.
8196 (add_process): Do not set TID.
8197 (linux_create_inferior): Set must_set_ptrace_flags.
8198 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8199 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8200 (linux_thread_alive): Rename TID argument to LWPID.
8201 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8202 (linux_wait_for_event): Do not use TID or check using_threads. Update
8203 call to dead_thread_notify. Call handle_extended_wait.
8204 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8205 (send_sigstop): Delete sigstop_sent.
8206 (wait_for_sigstop): Avoid TID.
8207 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8208 (linux_test_for_tracefork): New.
8209 (linux_lookup_signals): Use thread_db_active and
8210 linux_supports_tracefork_flag.
8211 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8212 * linux-low.h (get_process_thread): Avoid TID.
8213 (struct process_ifo): Move thread_known and tid to the end. Remove
8215 (linux_attach_lwp, thread_db_init): Update prototypes.
8216 * server.h (change_inferior_id): Delete prototype.
8217 (add_pid_to_list, pull_pid_from_list): New prototypes.
8218 * thread-db.c (thread_db_use_events): New.
8219 (find_first_thread): Rename to...
8220 (find_one_thread): ...this. Update callers and messages. Do not
8221 call fatal. Check thread_db_use_events. Do not call
8222 change_inferior_id or new_thread_notify.
8223 (maybe_attach_thread): Update. Do not call new_thread_notify.
8224 (thread_db_init): Set thread_db_use_events. Check use_events.
8225 * utils.c (fatal, warning): Correct message prefix.
8227 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8229 * Makefile.in (clean): Remove new files.
8230 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8231 (powerpc-64.o, powerpc-64.c): New rules.
8232 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8233 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8235 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8237 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8238 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8239 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8240 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8241 (target_regsets): Add AltiVec and SPE register sets.
8242 * configure.ac: Check for AltiVec and SPE.
8243 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8244 (ppc_fill_vrregset, ppc_store_vrregset): New.
8245 (target_regsets): Add AltiVec register set.
8246 * configure: Regenerated.
8248 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8250 * linux-low.c (O_LARGEFILE): Define.
8251 (linux_read_memory): Use /proc/PID/mem.
8252 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8253 * configure, config.in: Regenerated.
8255 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8257 * linux-low.c (linux_wait_for_event): Do not pass signals while
8260 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8262 * win32-low.c (create_process): New.
8263 (win32_create_inferior): Use create_process instead of
8264 CreateProcess. If create_process failed retry appending an ".exe"
8265 suffix. Store the GetLastError result immediatelly after
8266 create_process calls and use it on the call to error.
8268 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8270 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8272 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8274 * configure.ac: Switch license to GPLv3.
8276 2007-08-01 Michael Snyder <msnyder@access-company.com>
8278 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8280 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8282 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8284 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8285 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8286 CloseToolhelp32Snapshot.
8287 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8288 CloseToolhelp32Snapshot.
8290 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8292 * server.c (main): Check for inferior exit before main loop.
8294 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8296 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8297 instead of on tmp_desc.
8299 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8300 Daniel Jacobowitz <dan@codesourcery.com>
8302 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8303 (add_thread): Minor cleanups.
8304 (clear_inferiors): Move lower in the file. Clear the DLL
8306 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8307 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8308 (xml_escape_text): New.
8309 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8311 (handle_v_cont): Report errors.
8312 (gdbserver_version): Update.
8313 (main): Correct size of own_buf. Do not report initial DLL events.
8314 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8315 (unloaded_dll, xml_escape_text): New.
8316 * win32-low.c (enum target_waitkind): Update comments.
8317 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8318 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8319 (win32_EnumProcessModules, win32_GetModuleInformation)
8320 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8321 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8322 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8323 (win32_Module32First, win32_Module32Next, load_toolhelp)
8324 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8325 (get_child_debug_event): Handle DLL events.
8326 (win32_wait): Likewise.
8328 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8330 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8331 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8333 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8335 * win32-low.c (handle_output_debug_string): Ignore event if not
8338 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8340 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8342 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8344 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8346 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8348 * inferiors.c (change_inferior_id): Add comment.
8349 * linux-low.c (check_removed_breakpoint): Add an early
8350 prototype. Improve debug output.
8351 (linux_attach): Doc update.
8352 (linux_detach_one_process, linux_detach): Clean up before releasing
8354 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8355 * linux-low.h (struct process_info): Doc improvement.
8356 * mem-break.c (delete_all_breakpoints): New.
8357 * mem-break.h (delete_all_breakpoints): New prototype.
8358 * thread-db.c (find_first_thread): New.
8359 (thread_db_create_event): Call it instead of
8360 thread_db_find_new_threads. Clean up unused variables.
8361 (maybe_attach_thread): Remove first thread handling.
8362 (thread_db_find_new_threads): Use find_first_thread.
8363 (thread_db_get_tls_address): Likewise.
8365 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8367 * thread-db.c (thread_db_find_new_threads): Add prototype.
8368 (thread_db_create_event): Check for the main thread before adding
8370 (maybe_attach_thread): Only enable event reporting if TID == 0.
8371 (thread_db_get_tls_address): Check for new threads.
8373 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8375 * linux-low.c (linux_create_inferior): Try execv before execvp.
8376 * spu-low.c (spu_create_inferior): Likewise.
8378 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8380 * linux-low.c (linux_create_inferior): Change execv to execvp.
8381 * spu-low.c (spu_create_inferior): Likewies.
8383 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8385 * Makefile.in (clean): Clean new files instead of deleted ones.
8386 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8387 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8389 * configure.srv: Specify XML files and new regformats for MIPS and
8391 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8392 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8393 an entry for the restart register.
8394 (mips_cannot_fetch_register, mips_cannot_store_register)
8395 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8396 register names to match the XML descriptions.
8397 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8398 restart register instead of $0.
8400 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8401 Markus Deuling <deuling@de.ibm.com>
8403 * remote-utils.c (decode_xfer_write): New function.
8404 * server.h (decode_xfer_write): Add prototype.
8405 * server.c (handle_query): Add PACKET_LEN argument. Support
8406 qXfer:spu:read and qXfer:spu:write packets.
8407 (main): Pass packet_len to handle_query.
8408 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8409 * target.h (target_ops): Add qxfer_spu.
8411 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8413 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8414 accessing non-seekable spufs files.
8416 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8418 * server.c (handle_query): Add reply for qC packet.
8420 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8421 Leo Zayas <lerele@champenstudios@com>
8423 * server.h (check_remote_input_interrupt_request): New function.
8424 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8425 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8426 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8427 (check_remote_input_interrupt_request): New function.
8428 * server.h (check_remote_input_interrupt_request): Declare.
8429 * win32-low.c (winapi_DebugBreakProcess,
8430 winapi_GenerateConsoleCtrlEvent): New typedefs.
8431 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8433 (win32_wait): Check for remote interrupt request
8434 with check_remote_input_interrupt_request.
8435 (win32_request_interrupt): New function.
8436 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8438 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8440 * win32-low.c (debug_registers_changed,
8441 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8442 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8443 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8444 (thread_rec): Get context using the low target.
8445 (child_add_thread): Call thread_added on the low target,
8446 which does the same thing.
8448 (do_initial_child_stuff): Remove debug registers references.
8449 Set context using the low target. Resume threads after
8450 setting the contexts.
8451 (child_continue): Remove dead variable. Remove debug
8452 registers references.
8453 (child_fetch_inferior_registers): Go through the low target.
8454 (do_child_store_inferior_registers): Remove.
8455 (child_store_inferior_registers): Go through the low target.
8456 (win32_resume): Remove debug registers references.
8457 Set context using the low target.
8458 (handle_exception): Change return type to void. Don't record
8459 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8460 first chance exception.
8461 (get_child_debug_event): Change return type to void. Remove
8462 goto loop. Always return after waiting for debug event.
8463 (win32_wait): Convert to switch statement. Handle spurious
8466 * win32-i386-low.c (debug_registers_changed,
8467 debug_registers_used): New.
8468 (initial_stuff): Rename to ...
8469 (i386_initial_stuff): ... this. Clear debug registers
8471 (store_debug_registers): Delete.
8472 (i386_get_thread_context): New.
8473 (load_debug_registers): Delete.
8474 (i386_set_thread_context): New.
8475 (i386_thread_added): New.
8476 (single_step): Rename to ...
8477 (i386_single_step): ... this.
8478 (do_fetch_inferior_registers): Rename to ...
8479 (i386_fetch_inferior_register): ... this.
8480 (i386_store_inferior_register): New.
8481 (the_low_target): Adapt to new interface.
8483 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8484 (arm_get_thread_context): New.
8485 (arm_set_thread_context): New.
8487 (do_fetch_inferior_registers): Rename to ...
8488 (arm_fetch_inferior_register): ... this.
8489 (arm_store_inferior_register): New.
8490 (arm_wince_breakpoint): Reimplement as unsigned long.
8491 (arm_wince_breakpoint_len): Define.
8492 (the_low_target): Adapt to new interface.
8494 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8495 load_debug_registers. Add get_thread_context, set_thread_context,
8496 thread_added and store_inferior_register. Rename
8497 fetch_inferior_registers to fetch_inferior_register.
8498 (regptr): Remove declaration.
8500 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8502 * linux-low.c (linux_detach): Change return type to int. Return 0.
8503 * spu-low.c (spu_detach): Likewise.
8505 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8507 * target.h (target_ops): Change return type of detach to int.
8509 (join_inferior): New.
8510 * server.c (main): Don't skip detach support on mingw32.
8511 If the inferior doesn't support detaching return error.
8512 Call join_inferior instead of using waitpid.
8513 * linux-low.c (linux_join): New.
8514 (linux_target_op): Add linux_join.
8515 * spu-low.c (spu_join): New.
8516 (spu_target_ops): Add spu_join.
8517 * win32-low.c (win32_detach): Adapt to new interface.
8518 Reopen current_process_handle before detaching. Issue a child
8519 resume before detaching.
8521 (win32_target_op): Add win32_join.
8523 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8525 * win32-low.c (win32-attach): Fix return value.
8526 * target.h (target_ops): Describe ATTACH return values.
8528 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8530 * win32-low.c (GETPROCADDRESS): Define.
8531 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8532 (winapi_DebugSetProcessKillOnExit): Likewise.
8533 (win32_create_inferior): Force usage of ansi CreateProcessA.
8534 (win32_attach): Use GETPROCADDRESS.
8535 (win32_detach): Likewise.
8537 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8539 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8541 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8543 * win32-low.c: Commit leftover changes from 2007-03-29.
8545 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8547 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8548 fields short instead of int. Add explicit padding.
8549 (i387_cache_to_fsave): Remove unnecessary casts.
8550 (i387_fsave_to_cache): Doc fix.
8551 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8553 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8555 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8556 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8558 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8560 * configure.srv (arm*-*-mingw32ce*): Move near the other
8563 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8565 * configure.ac: Add errno checking.
8566 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8567 sys/file.h and malloc.h.
8568 (AC_CHECK_DECLS): Add perror.
8569 (srv_mingwce): Handle.
8570 * configure.srv (i[34567]86-*-cygwin*): Add
8571 win32-i386-low.o to srv_tgtobj.
8572 (i[34567]86-*-mingw*): Likewise.
8573 (arm*-*-mingw32ce*): Add case.
8574 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8575 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8576 [__MINGW32CE__] (strerror): New function.
8577 [__MINGW32CE__] (errno): Define to GetLastError.
8578 [__MINGW32CE__] (COUNTOF): New macro.
8579 (remote_open): Remove extra close call.
8580 * mem-break.c (delete_breakpoint_at): New function.
8581 * mem-break.h (delete_breakpoint_at): Declare.
8582 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8583 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8584 [USE_WIN32API] (read, write): Add char* casts.
8585 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8586 * server.h: Include wincecompat.h on Windows CE.
8587 [HAVE_ERRNO_H]: Check.
8588 (perror): Declare if not declared.
8589 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8590 (perror_with_name): Remove errno declaration.
8591 * wincecompat.h: New.
8592 * wincecompat.c: New.
8594 * win32-arm-low.c: New.
8595 * win32-i386-low.c: New.
8596 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8597 (OUTMSG2): Make it safe.
8599 (COUNTOF): New macro.
8600 (NUM_REGS): Get it from the low target.
8601 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8602 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8603 (thread_rec): Let low target handle debug registers.
8604 (child_add_thread): Likewise.
8605 (child_init_thread_list): Likewise.
8606 (continue_one_thread): Likewise.
8608 (do_child_fetch_inferior_registers): Move to ...
8609 * win32-i386-low.c: ... here, and rename to ...
8610 (do_fetch_inferior_registers): ... this.
8611 * win32-low.c (child_fetch_inferior_registers):
8612 Go through the low target.
8613 (do_child_store_inferior_registers): Use regptr.
8614 (strwinerror): New function.
8615 (win32_create_inferior): Handle Windows CE.
8616 Use strwinerror instead of strerror on Windows error
8617 codes. Add program to the error output.
8618 Don't close the main thread handle on Windows CE.
8619 (win32_attach): Use coredll.dll on Windows CE.
8620 (win32_kill): Close current process and current
8622 (win32_detach): Use coredll.dll on Windows CE.
8623 (win32_resume): Let low target handle debug registers, and
8625 (handle_exception): Add/Remove initial breakpoint. Avoid
8626 non-existant WSTOPSIG on Windows CE.
8627 (win32_read_inferior_memory): Cast to remove warning.
8628 (win32_arch_string): Go through the low target.
8629 (initialize_low): Call set_breakpoint_data with the low
8630 target's breakpoint.
8631 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8632 FOP_REGNUM, mappings): Move to ...
8633 * win32-i386-low.c: ... here.
8634 * win32-low.c (win32_thread_info): Move to ...
8635 * win32-low.h: ... here.
8636 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8637 win32-arm-low.c and wincecompat.c.
8638 (all:): Add $EXEEXT.
8639 (install-only:): Likewise.
8640 (gdbserver:): Likewise.
8641 (gdbreplay:): Likewise.
8642 * config.in: Regenerate.
8643 * configure: Regenerate.
8645 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8647 * win32-low.c: Rename typedef thread_info to
8648 win32_thread_info throughout.
8650 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8652 * win32-i386-low.c: Rename to ...
8653 * win32-low.c: ... this.
8654 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8655 * Makefile.in: Likewise.
8657 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8659 * remote-utils.c (monitor_output): Constify msg parameter.
8660 * server.h (monitor_output): Likewise.
8661 * win32-i386-low.c (handle_output_debug_string): New.
8662 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8663 handle_output_debug_string.
8664 (get_child_debug_event): Likewise.
8666 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8668 * server.c (main): Correct strtoul check.
8670 2007-03-27 Jon Ringle <jon@ringle.org>
8672 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8674 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8676 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8678 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8680 * terminal.h: Check HAVE_SGTTY_H.
8682 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8684 * remote-utils.c (remote_open): Print out the assigned port number.
8686 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8688 * remote-utils.c (monitor_output): New function.
8689 * server.c (debug_threads): Define here.
8690 (monitor_show_help): New function.
8691 (handle_query): Handle qRcmd.
8692 (main): Do not handle 'd' packet.
8693 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8694 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8697 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8699 * Makefile.in (EXEEXT): New.
8700 (clean): Use $(EXEEXT).
8702 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8704 * target.h (target_ops): Rename send_signal to request_interrupt,
8705 and remove enum target_signal parameter.
8706 * linux-low.c (linux_request_interrupt): Rename from
8707 linux_send_signal, and always send SIGINT.
8708 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8709 and always send SIGINT.
8710 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8712 (input_interrupt): Likewise.
8714 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8716 * server.c (get_features_xml): Check if target implemented
8718 * win32-i386-low.c (win32_arch_string): New.
8719 (win32_target_ops): Add win32_arch_string as arch_string member.
8721 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8723 * spu-low.c (spu_arch_string): New.
8724 (spu_target_ops): Add spu_arch_string.
8726 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8728 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8729 * configure.ac: Do not check for terminal.h.
8730 * configure, config.in: Regenerated.
8732 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8734 * Makefile.in (OBS): Add $(XML_BUILTIN).
8735 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8737 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8738 (arm-with-iwmmxt.c): New.
8739 * config.in, configure: Regenerate.
8740 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8741 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8742 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8743 (arm*-*-linux*): Add iWMMXt and regset support.
8744 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8745 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8746 (arm_store_wmmxregset, target_regsets): New.
8747 * server.c (get_features_xml): Take annex argument. Check builtin
8749 (handle_query): Handle multiple annexes.
8751 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8753 * remote-utils.c [USE_WIN32API] (read, write): Define.
8754 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8757 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8759 * linux-i386-low.c (the_low_target): Set arch_string.
8760 * linux-x86-64-low.c (the_low_target): Likewise.
8761 * linux-low.c (linux_arch_string): New.
8762 (linux_target_ops): Add it.
8763 * linux-low.h (struct linux_target_ops): Add arch_string.
8764 * server.c (write_qxfer_response): Use const void * for DATA.
8765 (get_features_xml): New.
8766 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8767 * target.h (struct target_ops): Add arch_string method.
8769 2007-01-03 Denis Pilat <denis.pilat@st.com>
8770 Daniel Jacobowitz <dan@codesourcery.com>
8772 * linux-low.c (linux_kill): Handle being called with no threads.
8773 * win32-i386-low.c (win32_kill): Likewise.
8774 (get_child_debug_event): Clear current_process_handle.
8776 2006-12-30 Denis PILAT <denis.pilat@st.com>
8777 Daniel Jacobowitz <dan@codesourcery.com>
8779 * remote-utils.c (remote_open): Check the type of specified
8780 serial port devices before opening them.
8781 * server.c (main): Kill the inferior if an error occurs during
8782 the first remote_open.
8784 2006-12-05 Markus Deuling <deuling@de.ibm.com>
8786 * README: Update supported targets.
8788 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8790 * Makefile.in (clean): Remove reg-mips64.c.
8791 (reg-mips64.c, reg-mips64.o): New rules.
8792 * configure.srv: Handle mips64. Include regset support for mips.
8793 * linux-mips-low.c (union mips_register): New.
8794 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8795 (mips_breakpoint, mips_breakpoint_at): Use int.
8796 (mips_collect_register, mips_supply_register)
8797 (mips_collect_register_32bit, mips_supply_register_32bit)
8798 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8799 (mips_store_fpregset, target_regsets): New.
8800 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8802 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8804 * configure.srv: Add target "spu*-*-*".
8805 * Makefile.in (clean): Remove reg-spu.c.
8806 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8807 * spu-low.c: New file.
8809 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8811 * configure.ac: Correct td_thr_tls_get_addr test.
8812 * configure: Regenerated.
8814 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8816 * linux-low.c (linux_wait_for_event): Reformat. Use the
8818 * remote-utils.c (decode_address_to_semicolon): New.
8819 * server.c (pass_signals, handle_general_set): New.
8820 (handle_query): Mention QPassSignals for qSupported.
8821 (main): Call handle_general_set.
8822 * server.h (pass_signals, decode_address_to_semicolon): New.
8824 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8826 * server.c (handle_query): Correct error handling for read_auxv.
8828 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8830 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8831 and srv_linux_thread_db to yes.
8832 * linux-s390-low.c (s390_fill_gregset): New function.
8833 (target_regsets): Define data structure.
8835 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8837 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8838 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8839 * config.in, configure: Regenerated.
8840 * inferiors.c (gdb_id_to_thread): New function.
8841 (gdb_id_to_thread_id): Use it.
8842 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8843 * linux-low.h (struct process_info): Add th member.
8844 (thread_db_get_tls_address): New prototype.
8845 * remote-utils.c (decode_address): Make non-static.
8846 * server.c (handle_query): Handle qGetTLSAddr.
8847 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8848 * target.h (struct target_ops): Add get_tls_address.
8849 * thread-db.c (maybe_attach_thread): Save the thread handle.
8850 (thread_db_get_tls_address): New.
8852 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8854 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8855 (linux_resume_one_process): Take a siginfo_t *. Update all
8856 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8857 (struct pending_signals): Add a siginfo_t.
8858 (linux_wait_for_process): Always set last_status.
8859 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8860 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8861 * linux-low.h (struct process_info): Add last_status.
8863 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8865 * remote-utils.c (try_rle): New function.
8866 (putpkt_binary): Use it.
8868 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8870 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8871 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8872 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8873 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8874 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8877 2006-08-08 Richard Sandiford <richard@codesourcery.com>
8879 * server.c (terminal_fd): New variable.
8880 (old_foreground_pgrp): Likewise.
8881 (restore_old_foreground_pgrp): New function.
8882 (start_inferior): Record the terminal file descriptor in terminal_fd
8883 and its original foreground group in old_foreground_pgrp. Register
8884 restore_old_foreground_pgrp with atexit().
8886 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8888 * server.c (handle_query): Correct qPart to qXfer.
8890 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8892 * configure.ac: Check for more headers which are missing on
8893 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8894 * configure.srv: Add Cygwin and mingw32.
8895 * remote-utils.c: Don't include headers unconditionally which
8896 are missing on mingw32. Include <winsock.h> for mingw32.
8897 (remote_open): Adjust for mingw32 support. Flush
8898 standard error after writing to it.
8899 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8900 (unblock_async_io, enable_async_io, disable_async_io)
8901 (readchar, getpkt): Update for Winsock support.
8902 (prepare_resume_reply): Expect a protocol signal number.
8903 * server.c: Disable <sys/wait.h> on mingw32.
8904 (start_inferior): Adjust for mingw32 support. Flush
8905 standard error after writing to it.
8906 (attach_inferior): Likewise. Use protocol signal
8908 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8910 * win32-i386-low.c: New file.
8911 * Makefile.in (XM_CLIBS): Set.
8912 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8913 (win32-i386-low.o): New dependency rule.
8914 * linux-low.c (linux_wait): Use target signal numbers.
8915 * target.h (struct target_ops): Doc fix.
8916 * server.h (target_signal_to_name): New prototype.
8917 * gdbreplay.c: Don't include headers unconditionally which
8918 are missing on mingw32. Include <winsock.h> for mingw32.
8919 (remote_close, remote_open): Adjust for Winsock support.
8920 * configure, config.in: Regenerated.
8922 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8924 * server.c (decode_xfer_read, write_qxfer_response): New.
8925 (handle_query): Take a packet length argument. Handle
8926 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8927 the qSupported response.
8928 (main): Update call to handle_query.
8930 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8932 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8933 (putpkt_binary): Renamed from putpkt and adjusted for binary
8935 (putpkt): New wrapper for putpkt_binary.
8936 (readchar): Don't mask off the high bit.
8937 (decode_X_packet): New function.
8938 * server.c (main): Call putpkt_binary if a handler sets the packet
8939 length. Save the length of the incoming packet. Handle 'X'.
8940 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8942 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8944 * server.c (handle_query): Handle qSupported.
8946 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8948 * remote-utils.c (all_symbols_looked_up): New variable.
8949 (look_up_one_symbol): Check it.
8950 * server.h (look_up_one_symbol): New declaration.
8951 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8953 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8955 * Makefile.in (linux-arm-low.o): Update dependencies.
8956 * linux-arm-low.c: Include "gdb_proc_service.h".
8957 (PTRACE_GET_THREAD_AREA): Define.
8958 (ps_get_thread_area): New function.
8960 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8962 * configure.srv (m68k*-*-uclinux*): New target.
8963 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8964 (linux_resume_one_process): Remove extraneous cast.
8965 (linux_read_offsets): New.
8966 (linux_target_op): Add linux_read_offsets on mmuless systems.
8967 * server.c (handle_query): Add qOffsets logic.
8968 * target.h (struct target_ops): Add read_offsets.
8970 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8972 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8973 (PTRACE_GET_THREAD_AREA): Define.
8974 (ps_get_thread_area): New function.
8975 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8976 (linux-x86-64-low.o): Update.
8978 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8980 * configure.ac: Remove checks for prfpregset_t.
8981 * gdb_proc_service.h: New file.
8982 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8983 new "gdb_proc_service.h".
8984 * proc-service.c: Likewise.
8985 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8986 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8987 * Makefile.in (gdb_proc_service_h): Updated.
8988 * configure, config.in: Regenerated.
8990 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8992 * remote-utils.c (prepare_resume_reply): Move declaration
8993 of gdb_id_from_wait to the top of the block.
8995 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8997 * linux-low.c (regsets_store_inferior_registers): Read the regset
8998 from the target before filling it.
9000 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9002 * server.c (attach_inferior): Return SIGTRAP for a successful
9005 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9007 * Makefile.in (OBS): Add version.o.
9008 (STAGESTUFF): Delete.
9009 (version.o): Add dependencies.
9010 (version.c): Replace rule.
9011 (clean): Remove version.c.
9012 * server.c (gdbserver_version): New.
9013 (gdbserver_usage): Use printf.
9014 (main): Handle --version and --help.
9015 * server.h (version, host_name): Add declarations.
9017 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9029 * linux-x86-64-low.c:
9032 * linux-ppc64-low.c:
9041 * linux-crisv32-low.c:
9053 * gdbserver.1: Add (C) after Copyright. Update the FSF
9056 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9058 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9059 (arm_breakpoint_at): Recognize both breakpoints.
9060 (the_low_target): Use the correct breakpoint instruction.
9062 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9064 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9065 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9066 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9067 (the_low_target): Update.
9069 2005-10-25 Andreas Schwab <schwab@suse.de>
9071 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9073 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9074 (ia64_num_regs): Reduce to 462.
9076 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9078 * acinclude.m4: Correct quoting.
9079 * aclocal.m4: Regenerated.
9081 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9082 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9083 (thread_db_init): Call thread_db_err_str.
9084 * configure.ac: Check for TD_VERSION.
9085 * config.in, configure: Regenerated.
9087 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9089 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9091 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9093 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9094 is not available. Define HAVE_PTRACE_GETREGS if it is.
9095 * config.in, configure: Regenerated.
9096 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9097 * linux-i386-low.c, linux-m68k-low.c: Update to use
9098 HAVE_PTRACE_GETREGS.
9099 * linux-low.c (regsets_fetch_inferior_registers)
9100 (regsets_store_inferior_registers): Only return 0 if we processed
9102 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9103 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9105 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9107 * inferiors.c (struct thread_info): Add gdb_id.
9108 (add_thread): Add gdb_id argument.
9109 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9110 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9111 calls to add_thread.
9112 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9113 * server.c (handle_query): Use thread_to_gdb_id.
9114 (handle_v_cont, main): Use gdb_id_to_thread_id.
9115 * server.h (add_thread): Update prototype.
9116 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9119 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9121 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9122 left-padded registers.
9123 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9124 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9126 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9128 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9129 * configure: Regenerate.
9130 * config.in: Regenerate.
9131 * server.h (NEED_DECLARATION_STRERROR):
9132 Replace with !HAVE_DECL_STRERROR.
9134 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9136 * linux-low.c (linux_wait, linux_send_signal): Don't test
9137 an unsigned long variable for > 0 if it could be MAX_ULONG.
9138 * server.c (myresume): Likewise.
9139 * target.c (set_desired_inferior): Likewise.
9141 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9143 * configure.ac: Simplify and improve check for socklen_t.
9144 * configure, config.in: Regenerate.
9146 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9148 * acconfig.h: Remove.
9149 * configure.ac: Add a test for socklen_t. Use three-argument
9150 AC_DEFINE throughout.
9151 * config.in: Regenerated using autoheader 2.59.
9152 * configure: Regenerated.
9154 * gdbreplay.c (socklen_t): Provide a default.
9155 (remote_open): Use socklen_t.
9156 * remote-utils.c (socklen_t): Provide a default.
9157 (remote_open): Use socklen_t.
9158 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9161 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9163 * linux-low.c (linux_read_memory, linux_write_memory)
9164 (linux_read_auxv): Likewise.
9165 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9166 (check_mem_write): Likewise.
9167 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9169 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9170 (registers_from_string, register_data): Likewise.
9171 * server.c (handle_query, main): Likewise.
9172 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9173 (decode_M_packet): Likewise.
9174 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9175 * target.h (struct target_ops): Update read_memory, write_memory,
9177 (read_inferior_memory, write_inferior_memory): Update.
9178 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9180 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9181 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9182 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9183 linux-s390-low.c, linux-sh-low.c: Update for changes in
9184 read_inferior_memory and the_low_target->breakpoint.
9186 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9188 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9189 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9190 * configure.srv: Add powerpc64-*-linux*.
9191 * linux-ppc64-low.c: New file.
9193 2005-05-23 Orjan Friberg <orjanf@axis.com>
9195 * linux-cris-low.c: New file with support for CRIS.
9196 * linux-crisv32-low.c: Ditto for CRISv32.
9197 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9198 (clean): Add reg-cris.c and reg-crisv32.c.
9199 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9200 reg-crisv32.o, and reg-crisv32.c to make rules.
9201 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9204 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9206 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9207 of sizeof (PTRACE_XFER_TYPE).
9208 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9210 2005-05-12 Orjan Friberg <orjanf@axis.com>
9212 * target.h (struct target_ops): Add insert_watchpoint,
9213 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9214 pointers for hardware watchpoint support.
9215 * linux-low.h (struct linux_target_ops): Ditto.
9216 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9217 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9218 to linux_target_ops.
9219 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9221 * server.c (main): Recognize 'Z' and 'z' packets.
9223 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9225 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9226 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9227 (the_low_target): Add new members.
9229 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9231 * proc-service.c (ps_lgetregs): Search all_processes instead of
9234 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9236 * server.c (start_inferior): Change return type to int.
9237 (attach_inferior): Change sigptr to int *.
9238 (handle_v_cont, handle_v_requests): Change signal to int *.
9239 (main): Change signal to int.
9241 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9243 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9244 * configure.srv: Add m32r*-*-linux*.
9245 * linux-m32r-low.c: New file.
9247 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9249 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9251 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9253 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9254 Take unsigned long arguments for PIDs.
9255 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9256 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9257 (wait_for_sigstop, linux_resume_one_process)
9258 (regsets_fetch_inferior_registers, linux_send_signal)
9259 (linux_read_auxv): Likewise. Update the types of variables holding
9260 PIDs. Update format string specifiers.
9261 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9262 * remote-utils.c (prepare_resume_reply): Likewise.
9263 * server.c (cont_thread, general_thread, step_thread)
9264 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9266 (handle_query): Update format specifiers.
9267 (handle_v_cont, main): Use strtoul for thread IDs.
9268 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9269 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9270 (general_thread, step_thread, thread_from_wait)
9271 (old_thread_from_wait): Update.
9272 * target.h (struct thread_resume): Use unsigned long for THREAD.
9273 (struct target_ops): Use unsigned long for arguments to attach and
9276 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9278 * acinclude.m4: Include bfd/bfd.m4 directly.
9279 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9280 <agriffis@toolchain.org>.
9281 * aclocal.m4, configure: Regenerated.
9283 2005-01-07 Andrew Cagney <cagney@gnu.org>
9285 * configure.ac: Rename configure.in, require autoconf 2.59.
9286 * configure: Re-generate.
9288 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9290 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9292 * aclocal.m4: Regenerated.
9293 * configure: Regenerated.
9295 2004-11-21 Andreas Schwab <schwab@suse.de>
9297 * linux-m68k-low.c (m68k_num_gregs): Define.
9298 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9299 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9300 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9301 (m68k_breakpoint_at): New. Add to the_low_target.
9303 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9304 srv_linux_thread_db to yes.
9306 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9308 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9309 (ARCH_SET_FS): Likewise.
9310 (ARCH_GET_FS): Likewise.
9311 (ARCH_GET_GS): Likewise.
9313 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9315 * linux-i386-low.c (ps_get_thread_area): New.
9316 * linux-x86-64-low.c (ps_get_thread_area): New.
9317 * linux-low.c: Include <sys/syscall.h>.
9318 (linux_kill_one_process): Don't kill the first thread here.
9319 (linux_kill): Kill the first thread here.
9320 (kill_lwp): New function.
9321 (send_sigstop, linux_send_signal): Use it.
9322 * proc-service.c: Clean up #ifdefs.
9323 (fpregset_info): Delete.
9324 (ps_lgetregs): Update and enable implementation.
9325 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9327 * remote-utils.c (struct sym_cache, symbol_cache): New.
9328 (input_interrupt): Print a clearer message.
9329 (async_io_enabled): New variable.
9330 (enable_async_io, disable_async_io): Use it. Update comments.
9331 (look_up_one_symbol): Use the symbol cache.
9332 * thread-db.c (thread_db_look_up_symbols): New function.
9333 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9335 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9337 * configure.in: Test for -rdynamic.
9338 * configure: Regenerated.
9339 * Makefile (INTERNAL_LDFLAGS): New.
9340 (gdbserver, gdbreplay): Use it.
9342 2004-09-02 Andrew Cagney <cagney@gnu.org>
9344 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9346 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9348 * linux-low.c (linux_wait): Clear all_processes list also.
9350 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9352 * linux-low.c: Include <errno.h>. Remove extern declaration of
9355 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9357 * gdbreplay.c, server.h, utils.c: Update copyright years.
9359 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9361 * server.c (main): Print child status or termination signal from
9362 variable 'signal', not 'sig'.
9364 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9366 * linux-low.c (linux_read_memory): Change return type to
9367 int. Check for and return error from ptrace().
9368 * target.c (read_inferior_memory): Change return type to int. Pass
9369 back return status from the_target->read_memory().
9370 * target.h (struct target_ops): Adapt *read_memory() prototype.
9372 (read_inferior_memory): Adapt prototype.
9373 * server.c (main): Return an error packet if
9374 read_inferior_memory() returns an error.
9376 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9378 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9379 Unify with other clean targets.
9381 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9383 * server.c (handle_v_cont): Call set_desired_inferior.
9385 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9387 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9389 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9391 * linux-low.c (linux_wait): Unblock async I/O.
9392 (linux_resume): Block and enable async I/O.
9393 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9394 * server.h (block_async_io, unblock_async_io): Add prototypes.
9396 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9398 * remote-utils.c (remote_open): Print a status notice after
9400 * server.c (attach_inferior): Print a status notice after
9403 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9405 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9407 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9409 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9411 * server.c, target.h: Update copyright years.
9413 2004-02-25 Roland McGrath <roland@redhat.com>
9415 * target.h (struct target_ops): New member `read_auxv'.
9416 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9417 * linux-low.c (linux_read_auxv): New function.
9418 (linux_target_ops): Initialize `read_auxv' member to that.
9420 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9422 Committed by Jim Blandy <jimb@redhat.com>.
9424 * linux-s390-low.c (s390_num_regs): Update.
9425 (s390_regmap): Remove control registers. Use __s390x__ predefine
9426 instead of GPR_SIZE to distiguish s390 and s390x targets.
9428 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9430 * linux-low.c: Update copyright year.
9431 (check_removed_breakpoint): Clear pending_is_breakpoint.
9432 (linux_set_resume_request, linux_queue_one_thread)
9433 (resume_status_pending_p): New functions.
9434 (linux_continue_one_thread): Use process->resume.
9435 (linux_resume): Only resume threads if there are no pending events.
9436 * linux-low.h (struct process_info): Add resume request
9439 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9441 * regcache.c (new_register_cache): Clear the allocated register
9442 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9444 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9446 * linux-low.c (linux_resume): Take a struct thread_resume *
9448 (linux_wait): Update call.
9449 (resume_ptr): New static variable.
9450 (linux_continue_one_thread): Renamed from
9451 linux_continue_one_process. Use resume_ptr.
9452 (linux_resume): Use linux_continue_one_thread.
9453 * server.c (handle_v_cont, handle_v_requests): New functions.
9454 (myresume): New function.
9455 (main): Handle 'v' case.
9456 * target.h (struct thread_resume): New type.
9457 (struct target_ops): Change argument of "resume" to struct
9459 (myresume): Delete macro.
9461 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9463 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9464 (uninstall): Support DESTDIR.
9466 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9468 * configure.srv: Add xscale*linux copy of arm*linux entry.
9470 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9472 * linux-arm-low.c (arm_reinsert_addr): New function.
9473 (the_low_target): Add arm_reinsert_addr.
9475 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9477 * mem-break.c: Remove whitespace at end of file.
9479 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9481 * configure.in: Check whether we need to prototype strerror.
9482 * server.h: Optionally prototype strerror.
9483 * gdbreplay.c (perror_with_name): Use strerror.
9484 * linux-low.c (linux_attach_lwp): Use strerror.
9485 * utils.c (perror_with_name): Use strerror.
9486 * config.in, configure: Regenerated.
9488 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9490 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9491 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9493 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9495 * Makefile.in (SFILES): Update.
9496 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9497 low-sun3.c: Remove files.
9499 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9501 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9502 (linux_detach_one_process, linux_detach): New functions.
9503 (linux_target_ops): Add linux_detach.
9504 * server.c (main): Handle 'D' packet.
9505 * target.h (struct target_ops): Add "detach" member.
9506 (detach_inferior): Define.
9508 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9510 From Kelley Cook <kelleycook@wideopenwest.com>:
9511 * configure.srv: Accept i[34567]86 variants.
9513 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9515 * linux-low.c (linux_wait_for_event): Correct comment typos.
9516 (linux_resume_one_process): Call check_removed_breakpoint.
9517 (linux_send_signal): New function.
9518 (linux_target_ops): Add linux_send_signal.
9519 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9521 * target.h (struct target_ops): Add send_signal.
9523 2003-05-29 Jim Blandy <jimb@redhat.com>
9525 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9526 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9527 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9528 away part of the register's value.
9530 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9532 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9533 (linux_wait_for_event, linux_init_signals): Likewise.
9535 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9537 * configure.in: Check for stdlib.h.
9538 * configure: Regenerated.
9539 * config.in: Regenerated.
9541 2003-01-04 Andreas Schwab <schwab@suse.de>
9543 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9545 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9547 * Makefile.in: Remove obsolete code.
9549 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9551 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9552 defined(PT_FPR0_HI).
9554 2002-11-17 Stuart Hughes <seh@zee2.com>
9556 * linux-arm-low.c (arm_num_regs): Increase.
9557 (arm_regmap): Include status register.
9559 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9561 * linux-low.c (register_addr): Remove incorrect -1 check.
9563 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9565 * linux-low.c (linux_create_inferior): Call setpgid. Return
9567 (unstopped_p, linux_signal_pid): Remove.
9568 (linux_target_ops): Remove linux_signal_pid.
9569 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9570 global instead of target method.
9571 * target.h (struct target_ops): Remove signal_pid. Update comment
9572 for create_inferior.
9573 * server.c (signal_pid): New variable.
9574 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9575 gdbserver. Set the child to be the foreground process group.
9576 (attach_inferior): Set signal_pid.
9578 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9580 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9582 2002-08-20 Jim Blandy <jimb@redhat.com>
9584 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9587 2002-08-01 Andrew Cagney <cagney@redhat.com>
9589 * Makefile.in: Make chill references obsolete.
9591 2002-07-24 Kevin Buettner <kevinb@redhat.com>
9593 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9594 * configure: Regenerate.
9595 * config.in: Regenerate.
9597 2002-07-09 David O'Brien <obrien@FreeBSD.org>
9599 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9600 (perror_with_name, remote_close, remote_open, expect, play): Static.
9602 2002-07-04 Michal Ludvig <mludvig@suse.cz>
9604 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
9605 byte offsets instead of an array of indexes.
9606 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9608 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
9610 * regcache.c: Add comment.
9612 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
9614 * thread-db.c: New file.
9615 * proc-service.c: New file.
9616 * acinclude.m4: New file.
9617 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9618 proc-service.o, and thread-db.o.
9619 (linux-low.o): Add USE_THREAD_DB.
9620 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9621 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9622 * aclocal.m4: Regenerated.
9623 * config.in: Regenerated.
9624 * configure: Regenerated.
9625 * configure.in: Check for proc_service.h, sys/procfs.h,
9626 thread_db.h, and linux/elf.h headrs.
9627 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9628 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9629 Check for -lthread_db and thread support.
9630 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9631 PowerPC, and SuperH.
9632 * i387-fp.c: Constify arguments.
9633 * i387-fp.h: Likewise.
9634 * inferiors.c: (struct thread_info): Renamed from
9635 `struct inferior_info'. Remove PID member. Use generic inferior
9636 list header. All uses updated.
9637 (inferiors, signal_pid): Removed.
9638 (all_threads): New variable.
9639 (get_thread): Define.
9640 (add_inferior_to_list): New function.
9641 (for_each_inferior): New function.
9642 (change_inferior_id): New function.
9643 (add_inferior): Removed.
9644 (remove_inferior): New function.
9645 (add_thread): New function.
9646 (free_one_thread): New function.
9647 (remove_thread): New function.
9648 (clear_inferiors): Use for_each_inferior and free_one_thread.
9649 (find_inferior): New function.
9650 (find_inferior_id): New function.
9651 (inferior_target_data): Update argument type.
9652 (set_inferior_target_data): Likewise.
9653 (inferior_regcache_data): Likewise.
9654 (set_inferior_regcache_data): Likewise.
9655 * linux-low.c (linux_bp_reinsert): Remove.
9656 (all_processes, stopping_threads, using_thrads)
9657 (struct pending_signals, debug_threads, pid_of): New.
9658 (inferior_pid): Replace with macro.
9659 (struct inferior_linux_data): Remove.
9660 (get_stop_pc, add_process): New functions.
9661 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9662 Use add_process and add_thread.
9663 (linux_attach_lwp): New function, based on old linux_attach. Use
9664 add_process and add_thread. Set stop_expected for new threads.
9665 (linux_attach): New function.
9666 (linux_kill_one_process): New function.
9667 (linux_kill): Kill all LWPs.
9668 (linux_thread_alive): Use find_inferior_id.
9669 (check_removed_breakpoints, status_pending_p): New functions.
9670 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9671 Update. Use WNOHANG. Wait for cloned processes also. Update process
9672 struct for the found process.
9673 (linux_wait_for_event): New function.
9674 (linux_wait): Use it. Support LWPs.
9675 (send_sigstop, wait_for_sigstop, stop_all_processes)
9676 (linux_resume_one_process, linux_continue_one_process): New functions.
9677 (linux_resume): Support LWPs.
9678 (REGISTER_RAW_SIZE): Remove.
9679 (fetch_register): Use register_size instead. Call supply_register.
9680 (usr_store_inferior_registers): Likewise. Call collect_register.
9682 (regsets_fetch_inferior_registers): Improve error message.
9683 (regsets_store_inferior_registers): Add debugging.
9684 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9685 (unstopped_p, linux_signal_pid): New functions.
9686 (linux_target_ops): Add linux_signal_pid.
9687 (linux_init_signals): New function.
9688 (initialize_low): Call it. Initialize using_threads.
9689 * regcache.c (inferior_regcache_data): Add valid
9691 (get_regcache): Fetch registers lazily. Add fetch argument
9692 and update all callers.
9693 (regcache_invalidate_one, regcache_invalidate): New
9695 (new_register_cache): Renamed from create_register_cache.
9696 Return the new regcache.
9697 (free_register_cache): Change argument to a void *.
9698 (registers_to_string, registers_from_string): Call get_regcache
9699 with fetch flag set.
9700 (register_data): Make static. Pass fetch flag to get_regcache.
9701 (supply_register): Call get_regcache with fetch flag clear.
9702 (collect_register): Call get_regcache with fetch flag set.
9703 (collect_register_as_string): New function.
9704 * regcache.h: Update.
9705 * remote-utils.c (putpkt): Flush after debug output and use
9707 Handle input interrupts while waiting for an ACK.
9708 (input_interrupt): Use signal_pid method.
9709 (getpkt): Flush after debug output and use stderr.
9710 (outreg): Use collect_register_as_string.
9711 (new_thread_notify, dead_thread_notify): New functions.
9712 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9714 (look_up_one_symbol): Flush after debug output.
9715 * server.c (step_thread, server_waiting): New variables.
9716 (start_inferior): Don't use signal_pid. Update call to mywait.
9717 (attach_inferior): Update call to mywait.
9718 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9719 (main): Don't fetch/store registers explicitly. Use
9720 set_desired_inferior. Support proposed ``Hs'' packet. Update
9723 (struct inferior_list, struct_inferior_list_entry): New.
9724 * target.c (set_desired_inferior): New.
9725 (write_inferior_memory): Constify.
9726 (mywait): New function.
9728 (struct target_ops): New signal_pid method.
9729 (mywait): Removed macro, added prototype.
9731 * linux-low.h (regset_func): Removed.
9732 (regset_fill_func, regset_store_func): New.
9733 (enum regset_type): New.
9734 (struct regset_info): Add type field. Use new operation types.
9735 (struct linux_target_ops): stop_pc renamed to get_pc.
9736 Add decr_pc_after_break and breakpoint_at.
9737 (get_process, get_thread_proess, get_process_thread)
9738 (strut process_info, all_processes, linux_attach_lwp)
9739 (thread_db_init): New.
9741 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9742 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9743 (the_low_target): Add new members.
9744 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9745 (i386_store_fpxregset): Constify.
9746 (target_regsets): Add new kind identifier.
9747 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9748 (i386_set_pc): Add debugging.
9749 (i386_breakpoint_at): New function.
9750 (the_low_target): Add new members.
9751 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9752 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9753 (mips_breakpoint_at): New.
9754 (the_low_target): Add new members.
9755 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9756 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9757 (the_low_target): Add new members.
9758 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9759 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9760 (the_low_target): Add new members.
9761 * linux-x86-64-low.c (target_regsets): Add new kind
9764 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9766 From Martin Pool <mbp@samba.org>:
9767 * server.c (gdbserver_usage): New function.
9770 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
9772 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9775 2002-05-04 Andrew Cagney <ac131313@redhat.com>
9777 * Makefile.in: Remove obsolete code.
9779 2002-04-24 Michal Ludvig <mludvig@suse.cz>
9781 * linux-low.c (regsets_fetch_inferior_registers),
9782 (regsets_store_inferior_registers): Removed cast to int from
9784 * regcache.h: Added declaration of struct inferior_info.
9786 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9788 * inferiors.c (struct inferior_info): Add regcache_data.
9789 (add_inferior): Call create_register_cache.
9790 (clear_inferiors): Call free_register_cache.
9791 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9792 * regcache.c (struct inferior_regcache_data): New.
9793 (registers): Remove.
9794 (get_regcache): New function.
9795 (create_register_cache, free_register_cache): New functions.
9796 (set_register_cache): Don't initialize the register cache here.
9797 (registers_to_string, registers_from_string, register_data): Call
9799 * regcache.h: Add prototypes.
9800 * server.h: Likewise.
9802 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9804 * mem-break.c: New file.
9805 * mem-break.h: New file.
9806 * Makefile.in: Add mem-break.o rule; update server.h
9808 * inferiors.c (struct inferior_info): Add target_data
9810 (clear_inferiors): Free target_data member if set.
9811 (inferior_target_data, set_inferior_target_data): New functions.
9812 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9813 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9814 * linux-low.c (linux_bp_reinsert): New variable.
9815 (struct inferior_linux_data): New.
9816 (linux_create_inferior): Use set_inferior_target_data.
9817 (linux_attach): Likewise. Call add_inferior.
9818 (linux_wait_for_one_inferior): New function.
9819 (linux_wait): Call it.
9820 (linux_write_memory): Add const.
9821 (initialize_low): Call set_breakpoint_data.
9822 * linux-low.h (struct linux_target_ops): Add breakpoint
9824 * server.c (attach_inferior): Remove extra add_inferior
9826 * server.h: Include mem-break.h. Update inferior.c
9828 * target.c (read_inferior_memory)
9829 (write_inferior_memory): New functions.
9830 * target.h (read_inferior_memory)
9831 (write_inferior_memory): Change macros to prototypes.
9832 (struct target_ops): Update comments. Add const to write_memory
9835 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
9837 * linux-low.c (usr_store_inferior_registers): Support
9838 registers which are allowed to fail to store.
9839 * linux-low.h (linux_target_ops): Likewise.
9840 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9841 (ppc_cannot_store_register): FPSCR may not be storable.
9843 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9845 * server.h: Include <string.h> if HAVE_STRING_H.
9846 * ChangeLog: Correct paths in last ChangeLog entry.
9848 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9850 * linux-low.h: Remove obsolete prototypes.
9851 (struct linux_target_ops): New.
9852 (extern the_low_target): New.
9853 * linux-low.c (num_regs, regmap): Remove declarations.
9854 (register_addr): Use the_low_target explicitly.
9855 (fetch_register): Likewise.
9856 (usr_fetch_inferior_registers): Likewise.
9857 (usr_store_inferior_registers): Likewise.
9858 * linux-arm-low.c (num_regs): Remove.
9859 (arm_num_regs): Define.
9860 (arm_regmap): Renamed from regmap, made static.
9861 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9863 (arm_cannot_store_register): Renamed from cannot_store_register,
9865 (the_low_target): New.
9866 * linux-i386-low.c (num_regs): Remove.
9867 (i386_num_regs): Define.
9868 (i386_regmap): Renamed from regmap, made static.
9869 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9871 (i386_cannot_store_register): Renamed from cannot_store_register,
9873 (the_low_target): New.
9874 * linux-ia64-low.c (num_regs): Remove.
9875 (ia64_num_regs): Define.
9876 (ia64_regmap): Renamed from regmap, made static.
9877 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9879 (ia64_cannot_store_register): Renamed from cannot_store_register,
9881 (the_low_target): New.
9882 * linux-m68k-low.c (num_regs): Remove.
9883 (m68k_num_regs): Define.
9884 (m68k_regmap): Renamed from regmap, made static.
9885 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9887 (m68k_cannot_store_register): Renamed from cannot_store_register,
9889 (the_low_target): New.
9890 * linux-mips-low.c (num_regs): Remove.
9891 (mips_num_regs): Define.
9892 (mips_regmap): Renamed from regmap, made static.
9893 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9895 (mips_cannot_store_register): Renamed from cannot_store_register,
9897 (the_low_target): New.
9898 * linux-ppc-low.c (num_regs): Remove.
9899 (ppc_num_regs): Define.
9900 (ppc_regmap): Renamed from regmap, made static.
9901 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9903 (ppc_cannot_store_register): Renamed from cannot_store_register,
9905 (the_low_target): New.
9906 * linux-s390-low.c (num_regs): Remove.
9907 (s390_num_regs): Define.
9908 (s390_regmap): Renamed from regmap, made static.
9909 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9911 (s390_cannot_store_register): Renamed from cannot_store_register,
9913 (the_low_target): New.
9914 * linux-sh-low.c (num_regs): Remove.
9915 (sh_num_regs): Define.
9916 (sh_regmap): Renamed from regmap, made static.
9917 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9919 (sh_cannot_store_register): Renamed from cannot_store_register,
9921 (the_low_target): New.
9922 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9923 (the_low_target): New.
9925 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9927 * Makefile.in: Add stamp-h target.
9928 * configure.in: Create stamp-h.
9929 * configure: Regenerated.
9931 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9933 * inferiors.c: New file.
9934 * target.c: New file.
9935 * target.h: New file.
9936 * Makefile.in: Add target.o and inferiors.o. Update
9938 * linux-low.c (inferior_pid): New static variable,
9939 moved from server.c.
9940 (linux_create_inferior): Renamed from create_inferior.
9941 Call add_inferior. Return 0 on success instead of a PID.
9942 (linux_attach): Renamed from myattach.
9943 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9944 (linux_thread_alive): Renamed from mythread_alive.
9945 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9947 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9948 (regsets_store_inferior_registers): Correct error message.
9949 Add missing ``return 0''.
9950 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9951 (linux_store_registers): Renamed from store_inferior_registers.
9952 (linux_read_memory): Renamed from read_inferior_memory.
9953 (linux_write_memory): Renamed from write_inferior_memory.
9954 (linux_target_ops): New structure.
9955 (initialize_low): Call set_target_ops ().
9956 * remote-utils.c (unhexify): New function.
9957 (hexify): New function.
9958 (input_interrupt): Send signals to ``signal_pid''.
9959 * server.c (inferior_pid): Remove.
9960 (start_inferior): Update create_inferior call.
9961 (attach_inferior): Call add_inferior.
9962 (handle_query): New function.
9963 (main): Call handle_query for `q' packets.
9964 * server.h: Include "target.h". Remove obsolete prototypes.
9965 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9967 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9969 * Makefile.in: Add WARN_CFLAGS. Update configury
9971 * configure.in: Check for <string.h>
9972 * configure: Regenerate.
9973 * config.in: Regenerate.
9974 * gdbreplay.c: Include needed system headers.
9975 (remote_open): Remove strchr prototype.
9976 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9977 * regcache.c (supply_register): Change buf argument to const void *.
9978 (supply_register_by_name): Likewise.
9979 (collect_register): Change buf argument to void *.
9980 (collect_register_by_name): Likewise.
9981 * regcache.h: Add missing prototypes.
9982 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9983 * server.c (handle_query): New function.
9984 (attached): New static variable, moved out of main.
9985 (main): Quiet longjmp clobber warnings.
9986 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9987 * utils.c (error): Remove NORETURN.