1 2014-08-06 Gary Benson <gbenson@redhat.com>
3 * regcache.c (init_register_cache): Move conditionals inside if.
5 2014-08-06 Gary Benson <gbenson@redhat.com>
7 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9 2014-07-31 Gary Benson <gbenson@redhat.com>
11 * ax.h: Do not include server.h.
12 * gdbthread.h: Likewise.
13 * lynx-low.h: Likewise.
16 2014-07-30 Gary Benson <gbenson@redhat.com>
18 * server.h: Include common-defs.h.
19 Do not include config.h or build-gnulib-gdbserver/config.h.
21 2014-07-30 Gary Benson <gbenson@redhat.com>
23 * hostio-errno.c: Move server.h to top of includes list.
24 * inferiors.c: Likewise.
25 * linux-x86-low.c: Likewise.
26 * notif.c: Include server.h.
28 2014-07-24 Tom Tromey <tromey@redhat.com>
29 Gary Benson <gbenson@redhat.com>
31 * server.h (CORE_ADDR): Now unsigned.
33 2014-07-16 Pedro Alves <palves@redhat.com>
35 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
37 2014-07-15 Pedro Alves <palves@redhat.com>
39 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
42 2014-07-11 Pedro Alves <palves@redhat.com>
44 * linux-low.c (kill_wait_lwp): New function, based on
45 kill_one_lwp_callback, but use my_waitpid directly.
46 (kill_one_lwp_callback, linux_kill): Use it.
48 2014-06-23 Pedro Alves <palves@redhat.com>
50 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
51 before setting DR0..DR3.
53 2014-06-20 Gary Benson <gbenson@redhat.com>
55 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
56 * configure: Regenerated.
57 * config.in: Likewise.
59 2014-06-20 Gary Benson <gbenson@redhat.com>
61 * Makefile.in (SFILES): Update locations for files moved
63 (object file files): Reordered.
65 2014-06-20 Gary Benson <gbenson@redhat.com>
67 * i386-low.h (i386_dr_low_can_set_addr): Removed.
68 (i386_dr_low_set_addr): Likewise.
69 (i386_dr_low_get_addr): Likewise.
70 (i386_dr_low_can_set_control): Likewise.
71 (i386_dr_low_set_control): Likewise.
72 (i386_dr_low_get_control): Likewise.
73 (i386_dr_low_get_status): Likewise.
74 (i386_get_debug_register_length): Likewise.
75 * linux-x86-low.c (i386_dr_low_set_addr):
76 Changed signature. Made static.
77 (i386_dr_low_get_addr): Likewise.
78 (i386_dr_low_set_control): Likewise.
79 (i386_dr_low_get_control): Likewise.
80 (i386_dr_low_get_status): Likewise.
81 (i386_dr_low): New global variable.
82 * win32-i386-low.c (i386_dr_low_set_addr):
83 Changed signature. Made static.
84 (i386_dr_low_get_addr): Likewise.
85 (i386_dr_low_set_control): Likewise.
86 (i386_dr_low_get_control): Likewise.
87 (i386_dr_low_get_status): Likewise.
88 (i386_dr_low): New global variable.
90 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
92 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
93 * Makefile.in (AR, AR_FLAGS): Define.
94 * configure: Regenerate.
96 2014-06-19 Gary Benson <gbenson@redhat.com>
98 * Makefile.in (i386-dregs.o): New rule.
99 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
100 * i386-low.c (target.h): Remove include.
101 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
102 (DR_CONTROL_SHIFT): Likewise.
103 (DR_CONTROL_SIZE): Likewise.
104 (DR_RW_EXECUTE): Likewise.
105 (DR_RW_WRITE): Likewise.
106 (DR_RW_READ): Likewise.
107 (DR_RW_IORW): Likewise.
108 (DR_LEN_1): Likewise.
109 (DR_LEN_2): Likewise.
110 (DR_LEN_4): Likewise.
111 (DR_LEN_8): Likewise.
112 (DR_LOCAL_ENABLE_SHIFT): Likewise.
113 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
114 (DR_ENABLE_SIZE): Likewise.
115 (DR_LOCAL_SLOWDOWN): Likewise.
116 (DR_GLOBAL_SLOWDOWN): Likewise.
117 (DR_CONTROL_RESERVED): Likewise.
118 (I386_DR_CONTROL_MASK): Likewise.
119 (I386_DR_VACANT): Likewise.
120 (I386_DR_LOCAL_ENABLE): Likewise.
121 (I386_DR_GLOBAL_ENABLE): Likewise.
122 (I386_DR_DISABLE): Likewise.
123 (I386_DR_SET_RW_LEN): Likewise.
124 (I386_DR_GET_RW_LEN): Likewise.
125 (I386_DR_WATCH_HIT): Likewise.
126 (i386_wp_op_t): Likewise.
127 (i386_show_dr): Likewise.
128 (i386_length_and_rw_bits): Likewise.
129 (i386_insert_aligned_watchpoint): Likewise.
130 (i386_remove_aligned_watchpoint): Likewise.
131 (i386_handle_nonaligned_watchpoint): Likewise.
132 i386_update_inferior_debug_regs(): Likewise.
133 (i386_dr_insert_watchpoint): Likewise.
134 (i386_dr_remove_watchpoint): Likewise.
135 (i386_dr_region_ok_for_watchpoint): Likewise.
136 (i386_dr_stopped_data_address): Likewise.
137 (i386_dr_stopped_by_watchpoint): Likewise.
139 2014-06-19 Gary Benson <gbenson@redhat.com>
141 * i386-low.c (i386_dr_show): Renamed to
142 i386_show_dr and made static. All uses updated.
143 (i386_dr_length_and_rw_bits): Renamed to
144 i386_length_and_rw_bits and made static.
146 (i386_dr_insert_aligned_watchpoint): Renamed to
147 i386_insert_aligned_watchpoint and made static.
149 (i386_dr_remove_aligned_watchpoint): Renamed to
150 i386_remove_aligned_watchpoint and made static.
152 (i386_dr_update_inferior_debug_regs): Renamed to
153 i386_update_inferior_debug_regs and made static.
156 2014-06-18 Gary Benson <gbenson@redhat.com>
158 * i386-low.h (i386_dr_low_can_set_addr): New macro.
159 (i386_dr_low_can_set_control): Likewise.
160 (i386_get_debug_register_length): Likewise.
161 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
162 (i386_dr_low_can_set_control): Likewise.
163 (i386_get_debug_register_length): Likewise.
165 2014-06-17 Gary Benson <gbenson@redhat.com>
167 * i386-low.h (i386-dregs.h): New include.
168 (DR_FIRSTADDR): Now in i386-dregs.h.
169 (DR_LASTADDR): Likewise.
170 (DR_NADDR): Likewise.
171 (DR_STATUS): Likewise.
172 (DR_CONTROL): Likewise.
173 (i386_debug_reg_state): Likewise.
174 (i386_dr_insert_watchpoint): Likewise.
175 (i386_dr_remove_watchpoint): Likewise.
176 (i386_dr_region_ok_for_watchpoint): Likewise.
177 (i386_dr_stopped_data_address): Likewise.
178 (i386_dr_stopped_by_watchpoint): Likewise.
179 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
181 2014-06-18 Gary Benson <gbenson@redhat.com>
183 * i386-low.h (i386_low_insert_watchpoint): Renamed to
184 i386_dr_insert_watchpoint.
185 (i386_low_remove_watchpoint): Renamed to
186 i386_dr_remove_watchpoint.
187 (i386_low_region_ok_for_watchpoint): Renamed to
188 i386_dr_region_ok_for_watchpoint.
189 (i386_low_stopped_data_address): Renamed to
190 i386_dr_stopped_data_address.
191 (i386_low_stopped_by_watchpoint): Renamed to
192 i386_dr_stopped_by_watchpoint.
193 * i386-low.c (i386_show_dr): Renamed to
194 i386_dr_show and made nonstatic. All uses updated.
195 (i386_length_and_rw_bits): Renamed to
196 i386_dr_length_and_rw_bits and made nonstatic.
198 (i386_insert_aligned_watchpoint): Renamed to
199 i386_dr_insert_aligned_watchpoint and made nonstatic.
201 (i386_remove_aligned_watchpoint): Renamed to
202 i386_dr_remove_aligned_watchpoint and made nonstatic.
204 (i386_update_inferior_debug_regs): Renamed to
205 i386_dr_update_inferior_debug_regs and made nonstatic.
207 (i386_low_insert_watchpoint): Renamed to
208 i386_dr_insert_watchpoint. All uses updated.
209 (i386_low_remove_watchpoint): Renamed to
210 i386_dr_remove_watchpoint. All uses updated.
211 (i386_low_region_ok_for_watchpoint): Renamed to
212 i386_dr_region_ok_for_watchpoint. All uses updated.
213 (i386_low_stopped_data_address): Renamed to
214 i386_dr_stopped_data_address. All uses updated.
215 (i386_low_stopped_by_watchpoint): Renamed to
216 i386_dr_stopped_by_watchpoint. All uses updated.
218 2014-06-18 Gary Benson <gbenson@redhat.com>
220 * i386-low.c (i386_dr_low_can_set_addr): New macro.
221 (i386_dr_low_can_set_control): Likewise.
222 (i386_insert_aligned_watchpoint): New check.
224 2014-06-18 Gary Benson <gbenson@redhat.com>
226 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
229 2014-06-18 Gary Benson <gbenson@redhat.com>
231 * i386-low.c (i386_length_and_rw_bits): Use internal_error
232 instead of fatal and error.
233 (i386_handle_nonaligned_watchpoint): Likewise.
235 2014-06-18 Gary Benson <gbenson@redhat.com>
237 * i386-low.c (i386_get_debug_register_length): New macro.
238 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
239 (i386_show_dr): Use debug_printf instead of fprintf. Use
240 phex to format values.
242 2014-06-18 Gary Benson <gbenson@redhat.com>
244 * i386-low.h: Comment changes.
245 * i386-low.c: Likewise.
247 2014-06-18 Gary Benson <gbenson@redhat.com>
249 * i386-low.c: Whitespace changes.
251 2014-06-12 Tom Tromey <tromey@redhat.com>
253 * utils.c (freeargv): Remove.
255 2014-06-12 Tom Tromey <tromey@redhat.com>
257 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
258 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
259 (parse_debug_format_options): Likewise.
260 (gdbserver_usage): Likewise.
261 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
262 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
263 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
265 ($(LIBGNU)): Depend on libiberty.
266 (all-lib): Recurse into all subdirs.
267 (install-only): Invoke "install" target in subdirs.
268 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
270 * configure: Rebuild.
271 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
272 for vasprintf, vsnprintf, or gettimeofday.
273 * configure.srv: Don't add safe-ctype.o or lbasename.o to
276 2014-06-05 Joel Brobecker <brobecker@adacore.com>
278 * development.sh: Delete.
279 * Makefile.in (config.status): Adjust dependency on development.sh.
280 * configure.ac: Adjust development.sh source call.
281 * configure: Regenerate.
283 2014-06-02 Pedro Alves <palves@redhat.com>
285 * ax.c (gdb_free_agent_expr): New function.
286 * ax.h (gdb_free_agent_expr): New declaration.
287 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
289 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
291 (clear_breakpoint_conditions_and_commands): New function.
292 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
293 (clear_breakpoint_conditions_and_commands): New declaration.
295 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
297 * linux-aarch64-low.c (asm/ptrace.h): Include.
299 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
301 Fix TLS access for -static -pthread.
302 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
303 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
304 (thread_db_load_search, try_thread_db_load_1): Initialize it.
306 2014-05-20 Pedro Alves <palves@redhat.com>
308 * linux-aarch64-low.c (aarch64_insert_point)
309 (aarch64_remove_point): No longer check whether the type is
310 supported here. Adjust to new interface.
311 (the_low_target): Install aarch64_supports_z_point_type as
312 supports_z_point_type method.
313 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
314 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
315 instead of a Z packet char. Adjust.
316 (arm_supports_z_point_type): New function.
317 (arm_insert_point, arm_remove_point): Adjust to new interface.
318 (the_low_target): Install arm_supports_z_point_type.
319 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
320 (cris_insert_point, cris_remove_point): Adjust to new interface.
321 Don't check whether the type is supported here.
322 (the_low_target): Install cris_supports_z_point_type.
323 * linux-low.c (linux_supports_z_point_type): New function.
324 (linux_insert_point, linux_remove_point): Adjust to new interface.
325 * linux-low.h (struct linux_target_ops) <insert_point,
326 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
327 raw_breakpoint pointer parameter.
328 <supports_z_point_type>: New method.
329 * linux-mips-low.c (mips_supports_z_point_type): New function.
330 (mips_insert_point, mips_remove_point): Adjust to new interface.
331 Use mips_supports_z_point_type.
332 (the_low_target): Install mips_supports_z_point_type.
333 * linux-ppc-low.c (the_low_target): Install NULL as
334 supports_z_point_type method.
335 * linux-s390-low.c (the_low_target): Install NULL as
336 supports_z_point_type method.
337 * linux-sparc-low.c (the_low_target): Install NULL as
338 supports_z_point_type method.
339 * linux-x86-low.c (x86_supports_z_point_type): New function.
340 (x86_insert_point): Adjust to new insert_point interface. Use
341 insert_memory_breakpoint. Adjust to new
342 i386_low_insert_watchpoint interface.
343 (x86_remove_point): Adjust to remove_point interface. Use
344 remove_memory_breakpoint. Adjust to new
345 i386_low_remove_watchpoint interface.
346 (the_low_target): Install x86_supports_z_point_type.
347 * lynx-low.c (lynx_target_ops): Install NULL as
348 supports_z_point_type callback.
349 * nto-low.c (nto_supports_z_point_type): New.
350 (nto_insert_point, nto_remove_point): Adjust to new interface.
351 (nto_target_ops): Install nto_supports_z_point_type.
352 * mem-break.c: Adjust intro comment.
353 (struct raw_breakpoint) <raw_type, size>: New fields.
354 <inserted>: Update comment.
355 <shlib_disabled>: Delete field.
356 (enum bkpt_type) <gdb_breakpoint>: Delete value.
357 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
358 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
359 (raw_bkpt_type_to_target_hw_bp_type): New function.
360 (find_enabled_raw_code_breakpoint_at): New function.
361 (find_raw_breakpoint_at): New type and size parameters. Use them.
362 (insert_memory_breakpoint): New function, based off
363 set_raw_breakpoint_at.
364 (remove_memory_breakpoint): New function.
365 (set_raw_breakpoint_at): Reimplement.
366 (set_breakpoint): New, based on set_breakpoint_at.
367 (set_breakpoint_at): Reimplement.
368 (delete_raw_breakpoint): Go through the_target->remove_point
369 instead of assuming memory breakpoints.
370 (find_gdb_breakpoint_at): Delete.
371 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
372 (find_gdb_breakpoint): New function.
373 (set_gdb_breakpoint_at): Delete.
374 (z_type_supported): New function.
375 (set_gdb_breakpoint_1): New function, loosely based off
376 set_gdb_breakpoint_at.
377 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
378 (delete_gdb_breakpoint_at): Delete.
379 (delete_gdb_breakpoint_1): New function, loosely based off
380 delete_gdb_breakpoint_at.
381 (delete_gdb_breakpoint): New function.
382 (clear_gdb_breakpoint_conditions): Rename to ...
383 (clear_breakpoint_conditions): ... this. Don't handle a NULL
385 (add_condition_to_breakpoint): Make static.
386 (add_breakpoint_condition): Take a struct breakpoint pointer
387 instead of an address. Adjust.
388 (gdb_condition_true_at_breakpoint): Rename to ...
389 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
391 (gdb_condition_true_at_breakpoint): Reimplement.
392 (add_breakpoint_commands): Take a struct breakpoint pointer
393 instead of an address. Adjust.
394 (gdb_no_commands_at_breakpoint): Rename to ...
395 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
396 parameter. Return true if no breakpoint was found. Change debug
398 (gdb_no_commands_at_breakpoint): Reimplement.
399 (run_breakpoint_commands): Rename to ...
400 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
401 and change return type to boolean.
402 (run_breakpoint_commands): New function.
403 (gdb_breakpoint_here): Also check for Z1 breakpoints.
404 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
405 breakpoint. Go through the_target->remove_point instead of
406 assuming memory breakpoint.
407 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
408 software and hardware breakpoints.
409 (reinsert_raw_breakpoint): Go through the_target->insert_point
410 instead of assuming memory breakpoint.
411 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
412 software and hardware breakpoints.
413 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
414 Check both software and hardware breakpoints.
415 (validate_inserted_breakpoint): Assert the breakpoint is a
416 software breakpoint. Set the inserted flag to -1 instead of
417 setting shlib_disabled.
418 (delete_disabled_breakpoints): Adjust.
419 (validate_breakpoints): Only validate software breakpoints.
420 Adjust to inserted flag change.
421 (check_mem_read, check_mem_write): Skip breakpoint types other
422 than software breakpoints. Adjust to inserted flag change.
423 * mem-break.h (enum raw_bkpt_type): New enum.
424 (raw_breakpoint, struct process_info): Forward declare.
425 (Z_packet_to_target_hw_bp_type): Delete declaration.
426 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
427 (set_gdb_breakpoint, delete_gdb_breakpoint)
428 (clear_breakpoint_conditions): New declarations.
429 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
430 (breakpoint_inserted_here): Update comment.
431 (add_breakpoint_condition, add_breakpoint_commands): Replace
432 address parameter with a breakpoint pointer parameter.
433 (gdb_breakpoint_here): Update comment.
434 (delete_gdb_breakpoint_at): Delete.
435 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
436 * server.c (process_point_options): Take a struct breakpoint
437 pointer instead of an address. Adjust.
438 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
439 delete_gdb_breakpoint.
440 * spu-low.c (spu_target_ops): Install NULL as
441 supports_z_point_type method.
442 * target.h: Include mem-break.h.
443 (struct target_ops) <prepare_to_access_memory>: Update comment.
444 <supports_z_point_type>: New field.
445 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
446 instead of a char. Also take a raw breakpoint pointer.
447 * win32-arm-low.c (the_low_target): Install NULL as
448 supports_z_point_type.
449 * win32-i386-low.c (i386_supports_z_point_type): New function.
450 (i386_insert_point, i386_remove_point): Adjust to new interface.
451 (the_low_target): Install i386_supports_z_point_type.
452 * win32-low.c (win32_supports_z_point_type): New function.
453 (win32_insert_point, win32_remove_point): Adjust to new interface.
454 (win32_target_ops): Install win32_supports_z_point_type.
455 * win32-low.h (struct win32_target_ops):
456 <supports_z_point_type>: New method.
457 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
458 instead of a char. Also take a raw breakpoint pointer.
460 2014-05-20 Pedro Alves <palves@redhat.com>
462 * mem-break.h: Include break-common.h.
463 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
464 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
465 (Z_packet_to_target_hw_bp_type): New declaration.
466 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
467 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
468 (Z_PACKET_ACCESS_WP): Delete macros.
469 (Z_packet_to_hw_type): Delete function.
470 * i386-low.h: Don't include break-common.h here.
471 (Z_packet_to_hw_type): Delete declaration.
472 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
473 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
474 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
475 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
476 * linux-aarch64-low.c: Don't include break-common.h here.
477 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
478 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
479 (Z_packet_to_target_hw_bp_type): Delete function.
480 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
482 (mips_insert_point, mips_remove_point): Use
483 Z_packet_to_target_hw_bp_type.
485 2014-05-20 Pedro Alves <palves@redhat.com>
487 * linux-aarch64-low.c: Include break-common.h.
488 (enum target_point_type): Delete.
489 (Z_packet_to_point_type): Rename to ...
490 (Z_packet_to_target_hw_bp_type): ... this, and return a
491 target_hw_bp_type instead.
492 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
493 instead of an enum target_point_type.
494 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
496 (aarch64_dr_state_insert_one_point)
497 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
498 (aarch64_handle_aligned_watchpoint)
499 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
500 Take an enum target_hw_bp_type instead of an enum
502 (aarch64_supports_z_point_type): New function.
503 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
504 use Z_packet_to_target_hw_bp_type.
506 2014-05-20 Joel Brobecker <brobecker@adacore.com>
508 * configure.ac: Only use -Werror by default when DEVELOPMENT
510 * configure: Regenerate.
512 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
514 Fix gdbserver qGetTLSAddr for x86_64 -m32.
515 * linux-x86-low.c (X86_64_USER_REGS): New.
516 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
518 2014-04-28 Yao Qi <yao@codesourcery.com>
520 * Makefile.in (i386-avx512.c): Fix the typo of generated file
523 2014-04-25 Pedro Alves <palves@redhat.com>
526 * linux-low.c (linux_attach_fail_reason_string): New function.
527 (linux_attach_lwp): Delete.
528 (linux_attach_lwp_1): Rename to ...
529 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
530 argument. Remove "initial" parameter. Return int instead of
531 void. Don't error or warn here.
532 (linux_attach): Adjust to call linux_attach_lwp. Call error on
533 failure to attach to the tgid. Call warning when failing to
535 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
536 argument. Remove "initial" parameter. Return int instead of
537 void. Don't error or warn here.
538 (linux_attach_fail_reason_string): New declaration.
539 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
540 interface change. Use linux_attach_fail_reason_string.
542 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
543 Walfred Tedeschi <walfred.tedeschi@intel.com>
545 * Makefile.in: Added rules to handle new files
546 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
547 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
548 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
549 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
550 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
551 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
553 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
554 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
555 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
557 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
558 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
559 i386/x32-avx512-linux.xml.
560 * i387-fp.c (num_avx512_k_registers): New constant for number
562 (num_avx512_zmmh_low_registers): New constant for number of
563 lower ZMM registers (0-15).
564 (num_avx512_zmmh_high_registers): New constant for number of
565 higher ZMM registers (16-31).
566 (num_avx512_ymmh_registers): New contant for number of higher
567 YMM registers (ymm16-31 added by avx521 on x86_64).
568 (num_avx512_xmm_registers): New constant for number of higher
569 XMM registers (xmm16-31 added by AVX512 on x86_64).
570 (struct i387_xsave): Add space for AVX512 registers.
571 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
572 Add code to handle AVX512 registers.
573 (i387_xsave_to_cache): Add code to handle AVX512 registers.
574 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
575 prototypei from generated file.
576 (tdesc_amd64_avx512_linux): Likewise.
577 (init_registers_x32_avx512_linux): Likewise.
578 (tdesc_x32_avx512_linux): Likewise.
579 (init_registers_i386_avx512_linux): Likewise.
580 (tdesc_i386_avx512_linux): Likewise.
581 (x86_64_regmap): Add AVX512 registers.
582 (x86_linux_read_description): Add code to handle AVX512 XSTATE
584 (initialize_low_arch): Add code to initialize AVX512 registers.
586 2014-04-23 Pedro Alves <palves@redhat.com>
588 * mem-break.c (find_gdb_breakpoint_at): Make static.
589 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
591 2014-04-23 Pedro Alves <palves@redhat.com>
593 * i386-low.c: Don't include break-common.h here.
594 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
595 prototype to take target_hw_bp_type as argument instead of a Z
597 * i386-low.h: Include break-common.h here.
598 (Z_packet_to_hw_type): Declare.
599 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
601 * linux-x86-low.c (x86_insert_point): Convert the packet number to
602 a target_hw_bp_type before calling i386_low_insert_watchpoint.
603 (x86_remove_point): Convert the packet number to a
604 target_hw_bp_type before calling i386_low_remove_watchpoint.
605 * win32-i386-low.c (i386_insert_point): Convert the packet number
606 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
607 (i386_remove_point): Convert the packet number to a
608 target_hw_bp_type before calling i386_low_remove_watchpoint.
610 2014-04-23 Pedro Alves <palves@redhat.com>
612 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
614 2014-04-10 Pedro Alves <palves@redhat.com>
616 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
617 Check if the condition or command is NULL before checking if the
618 breakpoint is known. On success, return true.
619 * mem-break.h (add_breakpoint_condition): Document return.
620 (add_breakpoint_commands): Add describing comment.
621 * server.c (skip_to_semicolon): New function.
622 (process_point_options): Use it.
624 2014-04-09 Pedro Alves <palves@redhat.com>
626 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
629 2014-02-27 Pedro Alves <palves@redhat.com>
632 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
634 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
636 (last_thread_of_process_p): Take a PID argument instead of a
638 (linux_wait_for_lwp): Delete.
639 (num_lwps, check_zombie_leaders, not_stopped_callback): New
641 (linux_low_filter_event): New function, party factored out from
642 linux_wait_for_event.
643 (linux_wait_for_event): Rename to ...
644 (linux_wait_for_event_filtered): ... this. Add new filter ptid
645 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
646 sigsuspend. Check for zombie leaders.
647 (linux_wait_for_event): Reimplement as wrapper around
648 linux_wait_for_event_filtered.
649 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
650 a normal or signal exit is seen, it's the whole process exiting.
651 (wait_for_sigstop): No longer a for_each_inferior callback.
652 Rewrite on top of linux_wait_for_event_filtered.
653 (stop_all_lwps): Call wait_for_sigstop directly.
654 * server.c (resume, handle_target_event): Handle
655 TARGET_WAITKIND_NO_RESUMED.
657 2014-02-26 Joel Brobecker <brobecker@adacore.com>
659 * win32-low.c (psapi_get_dll_name,
660 * win32_CreateToolhelp32Snapshot): Delete.
661 (win32_CreateToolhelp32Snapshot, win32_Module32First)
662 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
664 (handle_load_dll): Add function description.
665 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
667 2014-02-26 Joel Brobecker <brobecker@adacore.com>
669 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
671 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
672 base address when calling win32_add_one_solib.
673 (handle_load_dll): Delete local variable load_addr.
674 Remove 0x1000 offset applied to DLL base address when calling
676 (handle_unload_dll): Add comment.
678 2014-02-26 Joel Brobecker <brobecker@adacore.com>
680 * win32-low.c (win32_add_all_dlls): Renames
681 win32_ensure_ntdll_loaded. Rewrite function documentation.
682 Adjust implementation to always load all DLLs.
683 Add 0x1000 offset to DLL base address when calling
685 (child_initialization_done): New static global.
686 (do_initial_child_stuff): Set child_initialization_done to
687 zero during child initialization, and 1 after. Replace call
688 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
690 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
691 (handle_unload_dll): Add function documentation.
692 (get_child_debug_event): Ignore load and unload DLL events
693 during child initialization.
695 2014-02-20 Doug Evans <dje@google.com>
697 Remove global all_lwps.
698 * inferiors.h (ptid_of): Move here from linux-low.h.
699 (pid_of, lwpid_of): Ditto.
700 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
701 parameter is a struct thread_info * now.
702 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
703 directly. Pass &all_threads to find_inferior instead of &all_lwps.
704 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
706 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
707 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
708 * linux-arm-low.c (update_registers_callback): Update, "entry"
709 parameter is a struct thread_info * now.
710 Fetch lwpid from current_inferior directly.
711 (arm_insert_point): Pass &all_threads to find_inferior instead of
713 (arm_remove_point): Ditto.
714 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
715 (arm_prepare_to_resume): Fetch pid from thread.
716 (arm_read_description): Fetch lwpid from current_inferior directly.
717 * linux-low.c (all_lwps): Delete.
718 (delete_lwp): Delete call to remove_inferior.
719 (handle_extended_wait): Fetch lwpid from thread.
720 (add_lwp): Don't set lwp->entry.id. Remove call to
721 add_inferior_to_list.
722 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
723 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
724 (kill_one_lwp_callback): Ditto.
725 (linux_kill): Don't dereference NULL pointer.
726 Fetch ptid,lwpid from thread.
727 (get_detach_signal): Fetch ptid from thread.
728 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
729 Simplify call to regcache_invalidate_thread.
730 (delete_lwp_callback): Update, "entry" parameter is a
731 struct thread_info * now. Fetch pid from thread.
732 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
733 (status_pending_p_callback): Update, "entry" parameter is a
734 struct thread_info * now. Fetch ptid from thread.
735 (find_lwp_pid): Update, "entry" parameter is a
736 struct thread_info * now.
737 (linux_wait_for_lwp): Fetch pid from thread.
738 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
739 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
740 (enqueue_one_deferred_signal): Fetch lwpid from thread.
741 (dequeue_one_deferred_signal): Ditto.
742 (cancel_breakpoint): Fetch ptid from current_inferior.
743 (linux_wait_for_event): Pass &all_threads to find_inferior,
744 not &all_lwps. Fetch ptid, lwpid from thread.
745 (count_events_callback): Update, "entry" parameter is a
746 struct thread_info * now.
747 (select_singlestep_lwp_callback): Ditto.
748 (select_event_lwp_callback): Ditto.
749 (cancel_breakpoints_callback): Ditto.
750 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
752 (select_event_lwp): Ditto. Fetch ptid from event_thread.
753 (unsuspend_one_lwp): Update, "entry" parameter is a
754 struct thread_info * now.
755 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
757 (linux_stabilize_threads): Ditto. And for for_each_inferior.
758 Fetch lwpid from thread, not lwp.
759 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
760 Pass &all_threads to find_inferior, not &all_lwps.
761 (send_sigstop): Fetch lwpid from thread, not lwp.
762 (send_sigstop_callback): Update, "entry" parameter is a
763 struct thread_info * now.
764 (suspend_and_send_sigstop_callback): Ditto.
765 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
766 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
767 struct thread_info * now.
768 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
770 (lwp_running): Update, "entry" parameter is a
771 struct thread_info * now.
772 (stop_all_lwps): Fetch ptid from thread.
773 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
774 (linux_resume_one_lwp): Fetch lwpid from thread.
775 (linux_set_resume_request): Update, "entry" parameter is a
776 struct thread_info * now. Fetch pid, lwpid from thread.
777 (resume_status_pending_p): Update, "entry" parameter is a
778 struct thread_info * now.
779 (need_step_over_p): Ditto. Fetch lwpid from thread.
780 (start_step_over): Fetch lwpid from thread.
781 (linux_resume_one_thread): Update, "entry" parameter is a
782 struct thread_info * now. Fetch lwpid from thread.
783 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
784 (proceed_one_lwp): Update, "entry" parameter is a
785 struct thread_info * now. Fetch lwpid from thread.
786 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
787 struct thread_info * now.
788 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
789 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
790 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
792 (regsets_store_inferior_registers): Ditto.
793 (fetch_register, store_register): Ditto.
794 (linux_read_memory, linux_write_memory): Ditto.
795 (linux_request_interrupt): Ditto.
796 (linux_read_auxv): Ditto.
797 (linux_xfer_siginfo): Ditto.
798 (linux_qxfer_spu): Ditto.
799 (linux_qxfer_libraries_svr4): Ditto.
800 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
801 moved to inferiors.h.
803 (get_thread_lwp): Update.
804 (struct lwp_info): Delete member "entry". Simplify comment for
807 * linux-mips-low.c (mips_read_description): Fetch lwpid from
808 current_inferior directly.
809 (update_watch_registers_callback): Update, "entry" parameter is a
810 struct thread_info * now. Fetch pid from thread.
811 (mips_linux_prepare_to_resume): Fetch ptid from thread.
812 (mips_insert_point): Fetch lwpid from current_inferior.
813 Pass &all_threads to find_inferior, not &all_lwps.
814 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
815 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
817 (mips_stopped_data_address): Ditto.
818 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
820 * linux-tile-low.c (tile_arch_setup): Ditto.
821 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
822 (update_debug_registers_callback): Update, "entry" parameter is a
823 struct thread_info * now. Fetch pid from thread.
824 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
825 Pass &all_threads to find_inferior, not &all_lwps.
826 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
827 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
828 Pass &all_threads to find_inferior, not &all_lwps.
829 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
830 (i386_dr_low_get_status): Ditto.
831 (x86_linux_prepare_to_resume): Fetch ptid from thread.
832 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
833 (x86_linux_read_description): Ditto.
834 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
836 2014-02-20 Doug Evans <dje@google.com>
838 * inferiors.c (get_first_inferior): Fix buglet.
840 2014-02-19 Doug Evans <dje@google.com>
842 * gdbthread.h (add_thread): Change result type to struct thread_info *.
843 * inferiors.c (add_thread): Change result type to struct thread_info *.
845 (add_lwp): Call add_thread here instead of in callers.
847 * linux-low.h (get_lwp_thread): Rewrite.
848 (struct lwp_info): New member "thread".
850 2014-02-19 Doug Evans <dje@google.com>
852 * linux-low.c (add_lwp): Change result to struct lwp_info *.
855 2014-02-19 Doug Evans <dje@google.com>
857 * inferiors.c (add_thread): Fix whitespace.
859 2014-02-19 Doug Evans <dje@google.com>
861 * dll.c (clear_dlls): Replace accessing list implemention details
863 * gdbthread.h (get_first_thread): Declare.
864 * inferiors.c (for_each_inferior_with_data): New function.
865 (get_first_thread): New function.
866 (find_thread_ptid): Simplify.
867 (get_first_inferior): New function.
868 (clear_list): Delete.
869 (one_inferior_p): New function.
870 (clear_inferior_list): New function.
871 (clear_inferiors): Update.
872 * inferiors.h (for_each_inferior_with_data): Declare.
873 (clear_inferior_list): Declare.
874 (one_inferior_p): Declare.
875 (get_first_inferior): Declare.
876 * linux-low.c (linux_wait_for_event): Replace accessing list
877 implemention details with API function.
878 * server.c (target_running): Ditto.
879 (accumulate_file_name_length): New function.
880 (emit_dll_description): New function.
881 (handle_qxfer_libraries): Replace accessing list implemention
882 details with API function.
883 (handle_qxfer_threads_worker): New function.
884 (handle_qxfer_threads_proper): Replace accessing list implemention
885 details with API function.
886 (handle_query): Ditto.
887 (visit_actioned_threads_callback_ftype): New typedef.
888 (visit_actioned_threads_data): New struct.
889 (visit_actioned_threads): Rewrite to be find_inferior callback.
890 (resume): Call find_inferior.
891 (handle_status): Replace accessing list implemention
892 details with API function.
893 (process_serial_event): Replace accessing list implemention details
895 * target.c (set_desired_inferior): Replace accessing list implemention
896 details with API function.
897 * tracepoint.c (same_process_p): New function.
898 (gdb_agent_about_to_close): Replace accessing list implemention
899 details with API function.
900 * win32-low.c (child_delete_thread): Replace accessing list
901 implemention details with API function.
902 (match_dll_by_basename): New function.
903 (dll_is_loaded_by_basename): New function.
904 (win32_ensure_ntdll_loaded): Replace accessing list implemention
905 details call to dll_is_loaded_by_basename.
907 2014-02-19 Doug Evans <dje@google.com>
909 * dll.h (struct dll_info): Add comment.
910 * gdbthread.h (struct thread_info): Add comment.
911 (current_ptid): Simplify.
912 * inferiors.c (add_process): Update.
913 (remove_process): Update.
914 * inferiors.h (struct process_info): Rename member "head" to "entry".
915 * linux-low.c (delete_lwp): Update.
917 (last_thread_of_process_p): Update.
918 (kill_one_lwp_callback, linux_kill): Update.
919 (status_pending_p_callback): Update.
920 (wait_for_sigstop): Update. Simplify read of ptid.
921 (start_step_over): Update.
922 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
923 (get_lwp_thread): Update.
924 (struct lwp_info): Rename member "head" to "entry".
925 * regcache.h (inferior_list_entry): Delete.
926 * server.c (kill_inferior_callback): Update.
927 (detach_or_kill_inferior_callback): Update.
928 (print_started_pid): Update.
929 (print_attached_pid): Update.
930 (process_serial_event): Simplify read of ptid.
931 * thread-db.c (thread_db_create_event): Update.
932 (thread_db_get_tls_address): Update.
933 * win32-low.c (current_inferior_ptid): Simplify.
935 2014-02-19 Tom Tromey <tromey@redhat.com>
937 * target.h (struct target_ops) <supports_btrace>: Add target_ops
939 (target_supports_btrace): Update.
941 2014-02-14 Yao Qi <yao@codesourcery.com>
943 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
944 (rsp-low-ipa.o): New target.
946 2014-02-12 Tom Tromey <tromey@redhat.com>
948 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
949 convert_ascii_to_int.
950 * regcache.c (registers_to_string): Likewise.
951 * remote-utils.c (decode_M_packet): Likewise.
952 * server.c (process_serial_event): Likewise.
954 2014-02-12 Tom Tromey <tromey@redhat.com>
956 * server.c (handle_query, handle_v_run): Use hex2bin, not
958 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
960 2014-02-12 Tom Tromey <tromey@redhat.com>
962 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
963 convert_int_to_ascii.
964 * regcache.c (registers_to_string, collect_register_as_string):
966 * remote-utils.c (look_up_one_symbol, relocate_instruction):
968 * server.c (process_serial_event): Likewise.
969 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
970 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
972 2014-02-12 Tom Tromey <tromey@redhat.com>
974 * remote-utils.c (look_up_one_symbol, monitor_output): Use
976 * tracepoint.c (cmd_qtstatus): Likewise.
978 2014-02-12 Tom Tromey <tromey@redhat.com>
980 * remote-utils.c (monitor_output): Pass explicit length to
983 2014-02-12 Tom Tromey <tromey@redhat.com>
985 * tracepoint.c: Include rsp-low.h.
986 * server.c: Include rsp-low.h.
987 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
988 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
990 * remote-utils.c: Include rsp-low.h.
991 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
992 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
993 (convert_int_to_ascii, convert_ascii_to_int): Move to
995 * regcache.c: Include rsp-low.h.
996 * ax.c: Include rsp-low.h.
997 * Makefile.in (SFILES): Add common/rsp-low.c.
998 (OBS): Add rsp-low.o.
999 (rsp-low.o): New target.
1001 2014-02-12 Tom Tromey <tromey@redhat.com>
1003 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1004 Include print-utils.h.
1005 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1006 (plongest, thirty_two, phex_nz): Remove.
1007 * Makefile.in (SFILES): Add common/print-utils.c.
1008 (OBS): Add print-utils.o.
1009 (print-utils-ipa.o): New target.
1010 (print-utils.o): New target.
1011 (IPA_OBJS): Add print-utils-ipa.o.
1013 2014-02-06 Tom Tromey <tromey@redhat.com>
1015 * Makefile.in (SFILES): Fix indentation.
1017 2014-02-05 Doug Evans <dje@google.com>
1019 * linux-low.c (linux_wait_for_event): Improve comment.
1020 (linux_wait_1): Keep current_inferior in sync with event_child.
1022 2014-01-22 Doug Evans <dje@google.com>
1024 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1026 2014-01-22 Doug Evans <dje@google.com>
1028 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1029 * configure: Regenerate.
1030 * config.in: Regenerate.
1031 * Makefile.in (SFILES): Add debug.c.
1033 * debug.c: New file.
1034 * debug.h: New file.
1035 * linux-aarch64-low.c (*): Update all debugging printfs to use
1036 debug_printf instead of fprintf.
1037 * linux-arm-low.c (*): Ditto.
1038 * linux-cris-low.c (*): Ditto.
1039 * linux-crisv32-low.c (*): Ditto.
1040 * linux-m32r-low.c (*): Ditto.
1041 * linux-sparc-low.c (*): Ditto.
1042 * linux-x86.c (*): Ditto.
1043 * linux-low.c (*): Ditto.
1044 (linux_wait_1): Add calls to debug_enter, debug_exit.
1045 (linux_wait): Remove redundant debugging printf.
1046 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1047 (linux_resume, unstop_all_lwps): Ditto.
1048 * mem-break.c (*): Update all debugging printfs to use
1049 debug_printf instead of fprintf.
1050 * remote-utils.c (*): Ditto.
1051 * thread-db.c (*): Ditto.
1052 * server.c #include <ctype.h>, "gdb_vecs.h".
1053 (debug_threads): Moved to debug.c.
1054 (*): Update all debugging printfs to use debug_printf instead of
1056 (start_inferior): Replace call to fflush with call to debug_flush.
1057 (monitor_show_help): Mention set debug-format.
1058 (parse_debug_format_options): New function.
1059 (handle_monitor_command): Handle "monitor set debug-format".
1060 (gdbserver_usage): Mention --debug-format.
1061 (main): Parse --debug-format.
1062 * server.h (debug_threads): Declaration moved to debug.h.
1064 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1065 trace_debug_1 that uses debug_printf.
1066 (tracepoint_look_up_symbols): Update all debugging printfs to use
1067 debug_printf instead of fprintf.
1069 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1071 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1074 2014-01-17 Pedro Alves <palves@redhat.com>
1077 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1078 defined after including gdb_proc_service.h.
1080 2014-01-16 Doug Evans <dje@google.com>
1082 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1083 (match_dll): Use it.
1085 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1087 * target.h (target_ops) <read_btrace>: Change parameters and
1088 return type to allow error reporting.
1089 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1090 trace reading errors on.
1091 * linux-low.c (linux_low_read_btrace): Pass trace reading
1093 (linux_low_disable_btrace): New.
1095 2014-01-15 Doug Evans <dje@google.com>
1097 * inferiors.c (thread_id_to_gdb_id): Delete.
1098 * inferiors.h (thread_id_to_gdb_id): Delete.
1100 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1102 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1103 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1106 2014-01-08 Pedro Alves <palves@redhat.com>
1108 * server.c (handle_status): Don't discard previous queued stop
1109 replies or thread's pending status here.
1110 (main) <disconnection>: Do it here instead.
1112 2014-01-08 Pedro Alves <palves@redhat.com>
1114 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1115 * server.c (visit_actioned_threads, handle_pending_status): New
1117 (handle_v_cont): Factor out parts to ...
1118 (resume): ... this new function. If in all-stop, and a thread
1119 being resumed has a pending status, report it without actually
1121 (myresume): Adjust to use the new 'resume' function.
1122 (clear_pending_status_callback, set_pending_status_callback)
1123 (find_status_pending_thread_callback): New functions.
1124 (handle_status): Handle the case of multiple threads having
1125 interesting statuses to report. Report threads' real last signal
1126 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1127 with an interesting thread to report the status for, instead of
1128 always reporting the status of the first thread.
1130 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1132 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1133 * gdbreplay.c (gdbreplay_version): Likewise.
1135 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1137 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1138 iov.iov_len with the real length in use.
1140 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1142 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1143 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1144 for all targets that use win32-low.c.
1145 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1146 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1148 2013-12-13 Pedro Alves <palves@redhat.com>
1150 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1151 if equal to TARGET_WAITKIND_LOADED.
1152 * win32-low.c (cached_status): New static global.
1153 (win32_wait): Add declaration.
1154 (do_initial_child_stuff): Flush all initial pending debug events
1155 up to the initial breakpoint.
1156 (win32_wait): If CACHED_STATUS was set, return that instead
1157 of doing a real wait. Remove the code resuming the execution
1158 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1159 during the initial phase. Also remove the code changing
1160 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1161 TARGET_WAITKIND_STOPPED.
1163 2013-12-11 Yao Qi <yao@codesourcery.com>
1165 * notif.c (handle_notif_ack): Return 0 if no notification
1168 2013-11-20 Doug Evans <dje@google.com>
1170 * linux-low.c (linux_set_resume_request): Fix comment.
1172 2013-11-20 Doug Evans <dje@google.com>
1174 * linux-low.c (resume_status_pending_p): Tweak comment.
1176 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1178 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1179 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1180 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1181 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1182 (srv_amd64_regobj): Add amd64-mpx.o.
1183 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1184 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1185 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1186 * i387-fp.c (num_pl_bnd_register) Added constant.
1187 (num_pl_bnd_cfg_registers) Added constant.
1188 (struct i387_xsave) Added reserved area and MPX fields.
1189 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1190 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1192 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1193 (init_registers_amd64_mpx_linux): Declare new function.
1194 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1195 (x86_64_regmap): Add MPX registers.
1196 (x86_linux_read_description): Add MPX case.
1197 (initialize_low_arch): Initialize MPX targets.
1199 2013-11-18 Tom Tromey <tromey@redhat.com>
1201 * configure: Rebuild.
1202 * configure.ac: Don't check for stdlib.h.
1203 * gdbreplay.c: Unconditionally include stdlib.h.
1205 2013-11-18 Tom Tromey <tromey@redhat.com>
1207 * config.in: Rebuild.
1208 * configure: Rebuild.
1209 * configure.ac: Don't use AC_HEADER_DIRENT.
1211 2013-11-18 Tom Tromey <tromey@redhat.com>
1213 * server.h: Don't check HAVE_STRING_H.
1214 * gdbreplay.c: Don't check HAVE_STRING_H.
1215 * configure: Rebuild.
1217 2013-11-18 Tom Tromey <tromey@redhat.com>
1219 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1222 2013-11-08 Tom Tromey <tromey@redhat.com>
1224 * configure, config.in: Rebuild.
1225 * configure.ac: Remove unused configury.
1227 2013-11-08 Tom Tromey <tromey@redhat.com>
1229 * acinclude.m4: Include common.m4, codeset.m4.
1230 * configure, config.in: Rebuild.
1231 * configure.ac: Use GDB_AC_COMMON.
1233 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1235 * linux-s390-low.c (HWCAP_S390_TE): New define.
1236 (s390_arch_setup): Consider the TE field in the HWCAP for
1237 determining 'have_regset_tdb'.
1239 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1242 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1245 2013-10-02 Pedro Alves <palves@redhat.com>
1247 * server.c (process_serial_event): Don't output "GDBserver
1248 exiting" if GDB is connected through stdio.
1249 * target.c (mywait): Likewise, be silent if GDB is connected
1252 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1254 * lynx-low.c (lynx_add_threads_after_attach): New function.
1255 (lynx_attach): Remove call to add_thread. Add call to
1256 lynx_add_threads_after_attach instead.
1258 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1260 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1261 * config.in, configure: Regenerated.
1263 2013-09-18 Yao Qi <yao@codesourcery.com>
1266 * server.c (start_inferior): Clear 'resume_info'.
1268 2013-09-16 Jiong Wang <jiwang@tilera.com>
1270 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1273 2013-09-16 Jiong Wang <jiwang@tilera.com>
1275 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1276 linux-tile-low.o to srv_tgtobj.
1278 2013-09-16 Will Newton <will.newton@linaro.org>
1280 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1283 2013-09-06 Pedro Alves <palves@redhat.com>
1285 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1286 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1287 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1288 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1289 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1290 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1292 2013-09-06 Pedro Alves <palves@redhat.com>
1294 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1295 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1297 2013-09-06 Pedro Alves <palves@redhat.com>
1299 * linux-amd64-ipa.c: Include tracepoint.h.
1300 * linux-i386-ipa.c: Include tracepoint.h.
1302 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1304 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1305 (ps_get_thread_area): New function.
1307 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1309 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1310 (initialize_low_arch): Call init_registers_crisv32 rather than
1311 init_register_crisv32.
1313 2013-09-05 Pedro Alves <palves@redhat.com>
1315 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1317 * hostio.h: ... this new file.
1318 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1319 win32-low.c: Include hostio.h.
1321 2013-09-05 Pedro Alves <palves@redhat.com>
1323 * server.h (gdb_client_data, handler_func, callback_handler_func)
1324 (delete_file_handler, add_file_handler, append_callback_event)
1325 (delete_callback_event, start_event_loop, initialize_event_loop):
1326 Move to event-loop.h and include it.
1327 * event-loop.h: New file.
1329 2013-09-05 Pedro Alves <palves@redhat.com>
1331 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1332 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1333 (loaded_dll, unloaded_dll): Move to ...
1334 * dll.h: ... this new file.
1335 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1337 2013-09-05 Pedro Alves <palves@redhat.com>
1339 * server.h (current_process, get_thread_process, all_processes)
1340 (add_inferior_to_list, for_each_inferior, current_inferior)
1341 (remove_inferior, add_process, remove_process, find_process_pid)
1342 (have_started_inferiors_p, have_attached_inferiors_p)
1343 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1344 (clear_inferiors, find_inferior, find_inferior_id)
1345 (inferior_target_data, set_inferior_target_data)
1346 (inferior_regcache_data, set_inferior_regcache_data): Move to
1347 inferiors.h, and include it.
1348 * inferiors.h: New file.
1350 2013-09-05 Pedro Alves <palves@redhat.com>
1352 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1356 2013-09-05 Pedro Alves <palves@redhat.com>
1358 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1360 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1361 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1362 (handle_tracepoint_general_set, handle_tracepoint_query)
1363 (tracepoint_finished_step, tracepoint_was_hit)
1364 (release_while_stepping_state_list, current_traceframe)
1365 (in_readonly_region, traceframe_read_mem)
1366 (fetch_traceframe_registers, traceframe_read_sdata)
1367 (traceframe_read_info, struct fast_tpoint_collect_status)
1368 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1369 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1370 (supply_fast_tracepoint_registers)
1371 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1372 (ipa_tdesc, claim_trampoline_space)
1373 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1374 (agent_mem_read, agent_get_trace_state_variable_value)
1375 (agent_set_trace_state_variable_value, agent_tsv_read)
1376 (agent_mem_read_string, get_raw_reg_func_addr)
1377 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1378 * tracepoint.h: ... this new file.
1380 2013-09-05 Pedro Alves <palves@redhat.com>
1382 * server.h (perror_with_name, error, fatal, warning, paddress)
1383 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1385 * utils.h: New file.
1387 2013-09-05 Pedro Alves <palves@redhat.com>
1389 * server.h (remote_debug, noack_mode, transport_is_reliable)
1390 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1391 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1392 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1393 (write_enn, initialize_async_io, enable_async_io)
1394 (disable_async_io, check_remote_input_interrupt_request)
1395 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1396 (dead_thread_notify, prepare_resume_reply)
1397 (decode_address_to_semicolon, decode_address, decode_m_packet)
1398 (decode_M_packet, decode_X_packet, decode_xfer_write)
1399 (decode_search_memory_packet, unhexify, hexify)
1400 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1401 (look_up_one_symbol, relocate_instruction)
1402 (monitor_output): Move to remote-utils.h, and include it.
1403 * remote-utils.h: New file.
1405 2013-09-05 Pedro Alves <palves@redhat.com>
1407 * server.h (_): Delete.
1409 2013-09-02 Pedro Alves <palves@redhat.com>
1411 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1412 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1414 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1416 2013-09-02 Pierre Muller <muller@sourceware.org>
1418 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1419 or WriteProcessMemory complete successfully and handle
1420 ERROR_PARTIAL_COPY error.
1422 2013-09-02 Pedro Alves <palves@redhat.com>
1424 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1425 error instead of EIO.
1427 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1430 * linux-low.c: Include filestuff.h.
1431 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1432 * lynx-low.c: Include filestuff.h.
1433 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1434 * server.c: Include filestuff.h.
1435 (main): Call notice_open_fds.
1436 * spu-low.c: Include filestuff.h.
1437 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1439 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1441 * Makefile.in: Explain why ../target and ../nat are not
1442 listed as include file search paths.
1443 (linux-waitpid.o): New object file rule.
1444 * configure.srv (srv_native_linux_obj): New variable.
1445 Replace all occurrences of linux native object files with
1446 $srv_native_linux_obj.
1447 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1448 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1449 (linux_enable_event_reporting): Remove declaration.
1450 (my_waitpid): Moved to common/linux-waitpid.c.
1451 (linux_wait_for_event): Pass ptid when calling
1452 linux_enable_event_reporting.
1453 (linux_supports_tracefork_flag): Remove.
1454 (linux_enable_event_reporting): Likewise.
1455 (linux_tracefork_grandchild): Remove.
1456 (STACK_SIZE): Moved to common/linux-ptrace.c.
1457 (linux_tracefork_child): Remove.
1458 (linux_test_for_tracefork): Remove.
1459 (linux_look_up_symbols): Call linux_supports_traceclone.
1460 (initialize_low): Remove call to linux_test_for_tracefork.
1461 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1462 common/linux-ptrace.h.
1463 (PTRACE_TYPE_ARG4): Likewise.
1464 Include linux-ptrace.h.
1466 2013-08-21 Pedro Alves <palves@redhat.com>
1468 * config.in: Renegerate.
1470 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1472 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1473 (SFILES): Remove $(srcdir)/common/target-common.c and
1474 add $(srcdir)/target/waitstatus.c.
1475 (OBS): Remove target-common.o and add waitstatus.o.
1476 (server_h): Remove $(srcdir)/../common/target-common.h and
1477 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1478 and $(srcdir)/../target/waitstatus.h.
1479 (target-common.o): Remove.
1480 (waitstatus.o): New target object file.
1481 * target.h: Do not include target-common.h and
1482 include target/resume.h, target/wait.h and
1483 target/waitstatus.h.
1485 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1487 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1488 to PTRACE_TYPE_ARG3.
1489 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1490 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1492 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1493 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1495 2013-07-27 Jie Zhang <jie@codesourcery.com>
1496 Daniel Jacobowitz <dan@codesourcery.com>
1497 Yao Qi <yao@codesourcery.com>
1499 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1500 (mips-linux-watch.o): New rule.
1501 (mips_linux_watch_h): New variable.
1502 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1504 * linux-mips-low.c: Include mips-linux-watch.h.
1505 (struct arch_process_info, struct arch_lwp_info): New.
1506 (update_watch_registers_callback): New function.
1507 (mips_linux_new_process, mips_linux_new_thread) New functions.
1508 (mips_linux_prepare_to_resume, mips_insert_point): New
1510 (mips_remove_point, mips_stopped_by_watchpoint): New
1512 (rsp_bp_type_to_target_hw_bp_type): New function.
1513 (mips_stopped_data_address): New function.
1514 (the_low_target): Add watchpoint support functions.
1516 2013-07-27 Yao Qi <yao@codesourcery.com>
1518 * i386-low.c: Include break-common.h.
1519 (enum target_hw_bp_type): Remove.
1521 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1523 * Makefile.in (SFILES): /common/target-common.c.
1524 (OBS): Add target-common.o.
1525 (server_h): Add $(srcdir)/../common/target-common.h.
1526 (target-common.o): New target.
1527 * server.c (queue_stop_reply_callback): Free
1528 status string after use.
1529 * target.c (target_waitstatus_to_string): Remove.
1530 * target.h: Include target-common.h.
1531 (resume_kind): Likewise.
1532 (target_waitkind): Likewise.
1533 (target_waitstatus): Likewise.
1534 (TARGET_WNOHANG): Likewise.
1536 2013-07-04 Yao Qi <yao@codesourcery.com>
1538 * Makefile.in (host_alias): Use @host_noncanonical@.
1539 (target_alias): Use @target_noncanonical@.
1540 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1541 ACX_NONCANONICAL_HOST.
1542 * configure: Regenerated.
1545 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1547 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1548 * configure: Rebuild.
1549 * Makefile.in (version_host, version_target): Get from configure.
1550 (version.c): Use $(version_host) and $(version_target).
1552 2013-07-03 Pedro Alves <palves@redhat.com>
1554 * Makefile.in (config.status): Depend on development.sh.
1555 * acinclude.m4: Include libmcheck.m4.
1556 * configure: Regenerate.
1558 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1560 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1561 attribute inside the parentheses.
1562 (winapi_DebugSetProcessKillOnExit): Ditto.
1563 (winapi_DebugBreakProcess): Ditto.
1564 (winapi_GenerateConsoleCtrlEvent): Ditto.
1566 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1568 * notif.h (notif_event): Add a dummy member to avoid compiler
1571 2013-07-01 Pedro Alves <palves@redhat.com>
1573 * hostio.c (HOSTIO_PATH_MAX): Define.
1574 (require_filename, handle_open, handle_unlink, handle_readlink):
1577 2013-07-01 Pedro Alves <palves@redhat.com>
1579 * server.h: Include "pathmax.h".
1580 * linux-low.c: Don't include sys/param.h.
1581 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1583 * win32-low.c: Don't include sys/param.h.
1584 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1586 2013-07-01 Pedro Alves <palves@redhat.com>
1588 * event-loop.c: Don't check HAVE_UNISTD_H before including
1590 * gdbreplay.c: Likewise.
1591 * remote-utils.c: Likewise.
1592 * server.c: Likewise.
1593 * configure.ac: Don't check for unistd.h.
1594 * configure: Regenerate.
1596 2013-06-28 Tom Tromey <tromey@redhat.com>
1598 * Makefile.in (version.c): Use version.in, not
1601 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1603 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1604 * configure: Rebuild.
1605 * Makefile.in (version_host, version_target): Get from configure.
1606 (version.c): Use $(version_host) and $(version_target).
1608 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1610 Fix trace-status to output user name without trailing colon.
1611 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1613 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1615 Fix trace-status to output proper start-time and stop-time.
1616 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1617 output start time and stop time in hex as gdb expects.
1619 2013-06-26 Pedro Alves <pedro@codesourcery.com>
1621 * tracepoint.c (build_traceframe_info_xml): Output trace state
1622 variables present in the trace buffer.
1624 2013-06-24 Tom Tromey <tromey@redhat.com>
1626 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1628 (version.o): Remove.
1629 * gdbreplay.c: Include version.h.
1630 (version, host_name): Don't declare.
1631 * server.h: Include version.h.
1632 (version, host_name): Don't declare.
1634 2013-06-12 Pedro Alves <palves@redhat.com>
1636 * linux-x86-low.c (linux_is_elf64): Delete global.
1637 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1638 with local linux_pid_exe_is_elf_64_file use.
1640 2013-06-11 Pedro Alves <palves@redhat.com>
1642 * linux-low.c (regset_disabled, disable_regset): New functions.
1643 (regsets_fetch_inferior_registers)
1644 (regsets_store_inferior_registers): Use them.
1645 (initialize_regsets_info); Don't allocate the disabled_regsets
1647 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1650 2013-06-11 Pedro Alves <palves@redhat.com>
1652 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1655 2013-06-11 Pedro Alves <palves@redhat.com>
1657 * linux-x86-low.c (initialize_low_arch): Call
1658 init_registers_x32_avx_linux.
1660 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1662 Fix compatibility with Android Bionic.
1663 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1666 2013-06-07 Pedro Alves <palves@redhat.com>
1669 * Makefile.in (OBS): Add tdesc.o.
1670 (IPA_OBJS): Add tdesc-ipa.o.
1671 (tdesc-ipa.o): New rule.
1672 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1674 * linux-low.c (new_inferior): Delete.
1675 (disabled_regsets, num_regsets): Delete.
1676 (linux_add_process): Adjust to set the new per-process
1678 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1679 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1680 was a stop. When calling arch_setup, switch the current inferior
1681 to the thread that got an event.
1682 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1683 (regsets_fetch_inferior_registers)
1684 (regsets_store_inferior_registers): New regsets_info parameter.
1686 (linux_register_in_regsets): New regs_info parameter. Adjust to
1688 (register_addr, fetch_register, store_register): New usrregs_info
1689 parameter. Adjust to use it.
1690 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1691 parameter regs_info. Adjust to use it.
1692 (linux_fetch_registers): Get the current inferior's regs_info, and
1694 (linux_store_registers): Ditto.
1695 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1696 (initialize_low): Don't initialize the target_regsets here. Call
1697 initialize_low_arch.
1698 * linux-low.h (target_regsets): Delete declaration.
1699 (struct regsets_info): New.
1700 (struct usrregs_info): New.
1701 (struct regs_info): New.
1702 (struct process_info_private) <new_inferior>: New field.
1703 (struct linux_target_ops): Delete the num_regs, regmap, and
1704 regset_bitmap fields. New field regs_info.
1705 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1706 * i387-fp.c (num_xmm_registers): Delete.
1707 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1708 calls to new interface.
1709 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1710 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1711 Infer the number of xmm registers from the regcache's target
1713 * i387-fp.h (num_xmm_registers): Delete.
1714 * inferiors.c (add_thread): Don't install the thread's regcache
1716 * proc-service.c (gregset_info): Fetch the current inferior's
1717 regs_info. Adjust to use it.
1718 * regcache.c: Include tdesc.h.
1719 (register_bytes, reg_defs, num_registers)
1720 (gdbserver_expedite_regs): Delete.
1721 (get_thread_regcache): If the thread doesn't have a regcache yet,
1722 create one, instead of aborting gdbserver.
1723 (regcache_invalidate_one): Rename to ...
1724 (regcache_invalidate_thread): ... this.
1725 (regcache_invalidate_one): New.
1726 (regcache_invalidate): Only invalidate registers of the current
1728 (init_register_cache): Add target_desc parameter, and use it.
1729 (new_register_cache): Ditto. Assert the target description has a
1730 non zero registers_size.
1731 (regcache_cpy): Add assertions. Adjust.
1732 (realloc_register_cache, set_register_cache): Delete.
1733 (registers_to_string, registers_from_string): Adjust.
1734 (find_register_by_name, find_regno, find_register_by_number)
1735 (register_cache_size): Add target_desc parameter, and use it.
1736 (free_register_cache_thread, free_register_cache_thread_one)
1737 (regcache_release, register_cache_size): New.
1738 (register_size): Add target_desc parameter, and use it.
1739 (register_data, supply_register, supply_register_zeroed)
1740 (supply_regblock, supply_register_by_name, collect_register)
1741 (collect_register_as_string, collect_register_by_name): Adjust.
1742 * regcache.h (struct target_desc): Forward declare.
1743 (struct regcache) <tdesc>: New field.
1744 (init_register_cache, new_register_cache): Add target_desc
1746 (regcache_invalidate_thread): Declare.
1747 (regcache_invalidate_one): Delete declaration.
1748 (regcache_release): Declare.
1749 (find_register_by_number, register_cache_size, register_size)
1750 (find_regno): Add target_desc parameter.
1751 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1753 * remote-utils.c: Include tdesc.h.
1754 (outreg, prepare_resume_reply): Adjust.
1755 * server.c: Include tdesc.h.
1756 (gdbserver_xmltarget): Delete declaration.
1757 (get_features_xml, process_serial_event): Adjust.
1758 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1760 (struct process_info) <tdesc>: New field.
1761 (ipa_tdesc): Declare.
1762 * tdesc.c: New file.
1763 * tdesc.h: New file.
1764 * tracepoint.c: Include tdesc.h.
1765 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1766 (get_context_regcache): Adjust to pass ipa_tdesc down.
1767 (do_action_at_tracepoint): Adjust to get the register cache size
1768 from the context regcache's description.
1769 (traceframe_walk_blocks): Adjust to get the register cache size
1770 from the current trace frame's description.
1771 (traceframe_get_pc): Adjust to get current trace frame's
1772 description and pass it down.
1773 (gdb_collect): Adjust to get the register cache size from the
1775 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1776 (gdbserver_xmltarget): Delete.
1777 (initialize_low_tracepoint): Set the ipa's target description.
1778 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1779 (initialize_low_tracepoint): Set the ipa's target description.
1780 * linux-x86-low.c: Include tdesc.h.
1781 [__x86_64__] (is_64bit_tdesc): New.
1782 (ps_get_thread_area, x86_get_thread_area): Use it.
1783 (i386_cannot_store_register): Rename to ...
1784 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1785 (i386_cannot_fetch_register): Rename to ...
1786 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1787 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1789 (target_regsets): Rename to ...
1790 (x86_regsets): ... this.
1791 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1793 (x86_siginfo_fixup): Use is_64bit_tdesc.
1794 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1795 (tdesc_x32_avx_linux, tdesc_x32_linux)
1796 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1798 (x86_linux_update_xmltarget): Delete.
1799 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1800 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1801 (AMD64_LINUX_USER64_CS): New.
1802 (x86_linux_read_description): New, based on
1803 x86_linux_update_xmltarget.
1804 (same_process_callback): New.
1805 (x86_arch_setup_process_callback): New.
1806 (x86_linux_update_xmltarget): New.
1807 (x86_regsets_info): New.
1808 (amd64_linux_regs_info): New.
1809 (i386_linux_usrregs_info): New.
1810 (i386_linux_regs_info): New.
1811 (x86_linux_regs_info): New.
1812 (x86_arch_setup): Reimplement.
1813 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1814 (x86_emit_ops): Ditto.
1815 (the_low_target): Adjust. Install x86_linux_regs_info,
1816 x86_cannot_fetch_register, and x86_cannot_store_register.
1817 (initialize_low_arch): New.
1818 * linux-ia64-low.c (tdesc_ia64): Declare.
1819 (ia64_fetch_register): Adjust.
1820 (ia64_usrregs_info, regs_info): New globals.
1821 (ia64_regs_info): New function.
1822 (the_low_target): Adjust.
1823 (initialize_low_arch): New function.
1824 * linux-sparc-low.c (tdesc_sparc64): Declare.
1825 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1827 (sparc_arch_setup): New function.
1828 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1829 (the_low_target): Adjust.
1830 (initialize_low_arch): New function.
1831 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1832 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1833 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1834 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1835 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1836 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1837 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1838 (tdesc_powerpc_isa205_vsx64l): Declare.
1839 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1840 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1841 (ppc_set_pc, ppc_get_hwcap): Adjust.
1842 (ppc_usrregs_info): Forward declare.
1843 (!__powerpc64__) ppc_regmap_adjusted: New global.
1844 (ppc_arch_setup): Adjust to the current process'es target
1846 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1847 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1848 (ppc_store_evrregset): Adjust.
1849 (target_regsets): Rename to ...
1850 (ppc_regsets): ... this, and make static.
1851 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1852 (ppc_regs_info): New function.
1853 (the_low_target): Adjust.
1854 (initialize_low_arch): New function.
1855 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1856 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1857 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1858 (tdesc_s390x_linux64v2): Declare.
1859 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1860 (s390_fill_gregset, s390_store_last_break): Adjust.
1861 (target_regsets): Rename to ...
1862 (s390_regsets): ... this, and make static.
1863 (s390_get_pc, s390_set_pc): Adjust.
1864 (s390_get_hwcap): New target_desc parameter, and use it.
1865 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1866 (s390_arch_setup): Adjust to set the current process'es target
1867 description. Don't adjust the regmap.
1868 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1869 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1870 (regs_info_3264): New globals.
1871 (s390_regs_info): New function.
1872 (the_low_target): Adjust.
1873 (initialize_low_arch): New function.
1874 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1875 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1876 [__mips64] (init_registers_mips_linux)
1877 (init_registers_mips_dsp_linux): Delete defines.
1878 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1879 (have_dsp): New global.
1880 (mips_read_description): New, based on mips_arch_setup.
1881 (mips_arch_setup): Reimplement.
1882 (get_usrregs_info): New function.
1883 (mips_cannot_fetch_register, mips_cannot_store_register)
1884 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1885 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1886 (target_regsets): Rename to ...
1887 (mips_regsets): ... this, and make static.
1888 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1889 (dsp_regs_info, regs_info): New globals.
1890 (mips_regs_info): New function.
1891 (the_low_target): Adjust.
1892 (initialize_low_arch): New function.
1893 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1894 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1896 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1897 (arm_read_description): New, with bits factored from
1899 (arm_arch_setup): Reimplement.
1900 (target_regsets): Rename to ...
1901 (arm_regsets): ... this, and make static.
1902 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1903 (arm_regs_info): New function.
1904 (the_low_target): Adjust.
1905 (initialize_low_arch): New function.
1906 * linux-m68k-low.c (tdesc_m68k): Declare.
1907 (target_regsets): Rename to ...
1908 (m68k_regsets): ... this, and make static.
1909 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1910 (m68k_regs_info): New function.
1911 (m68k_arch_setup): New function.
1912 (the_low_target): Adjust.
1913 (initialize_low_arch): New function.
1914 * linux-sh-low.c (tdesc_sharch): Declare.
1915 (target_regsets): Rename to ...
1916 (sh_regsets): ... this, and make static.
1917 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1918 (sh_regs_info, sh_arch_setup): New functions.
1919 (the_low_target): Adjust.
1920 (initialize_low_arch): New function.
1921 * linux-bfin-low.c (tdesc_bfin): Declare.
1922 (bfin_arch_setup): New function.
1923 (bfin_usrregs_info, regs_info): New globals.
1924 (bfin_regs_info): New function.
1925 (the_low_target): Adjust.
1926 (initialize_low_arch): New function.
1927 * linux-cris-low.c (tdesc_cris): Declare.
1928 (cris_arch_setup): New function.
1929 (cris_usrregs_info, regs_info): New globals.
1930 (cris_regs_info): New function.
1931 (the_low_target): Adjust.
1932 (initialize_low_arch): New function.
1933 * linux-cris-low.c (tdesc_crisv32): Declare.
1934 (cris_arch_setup): New function.
1935 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1936 (cris_regs_info): New function.
1937 (the_low_target): Adjust.
1938 (initialize_low_arch): New function.
1939 * linux-m32r-low.c (tdesc_m32r): Declare.
1940 (m32r_arch_setup): New function.
1941 (m32r_usrregs_info, regs_info): New globals.
1942 (m32r_regs_info): Adjust.
1943 (initialize_low_arch): New function.
1944 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1945 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1946 (tic6x_usrregs_info): Forward declare.
1947 (tic6x_read_description): New function, based on ...
1948 (tic6x_arch_setup): ... this. Reimplement.
1949 (target_regsets): Rename to ...
1950 (tic6x_regsets): ... this, and make static.
1951 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1952 (tic6x_regs_info): New function.
1953 (the_low_target): Adjust.
1954 (initialize_low_arch): New function.
1955 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1956 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1957 (target_regsets): Rename to ...
1958 (xtensa_regsets): ... this, and make static.
1959 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1961 (xtensa_arch_setup, xtensa_regs_info): New functions.
1962 (the_low_target): Adjust.
1963 (initialize_low_arch): New function.
1964 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1965 (nios2_arch_setup): Set the current process'es tdesc.
1966 (target_regsets): Rename to ...
1967 (nios2_regsets): ... this.
1968 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1969 (nios2_regs_info): New function.
1970 (the_low_target): Adjust.
1971 (initialize_low_arch): New function.
1972 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1973 (aarch64_arch_setup): Set the current process'es tdesc.
1974 (target_regsets): Rename to ...
1975 (aarch64_regsets): ... this.
1976 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1977 (aarch64_regs_info): New function.
1978 (the_low_target): Adjust.
1979 (initialize_low_arch): New function.
1980 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1982 (target_regsets): Rename to ...
1983 (tile_regsets): ... this.
1984 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1985 (tile_regs_info): New function.
1986 (tile_arch_setup): Set the current process'es tdesc.
1987 (the_low_target): Adjust.
1988 (initialize_low_arch): New function.
1989 * spu-low.c (tdesc_spu): Declare.
1990 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1991 * win32-arm-low.c (tdesc_arm): Declare.
1992 (arm_arch_setup): New function.
1993 (the_low_target): Install arm_arch_setup instead of
1995 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1996 (init_windows_x86): Rename to ...
1997 (i386_arch_setup): ... this. Set `win32_tdesc'.
1998 (the_low_target): Adjust.
1999 * win32-low.c (win32_tdesc): New global.
2000 (child_add_thread): Don't create the thread cache here.
2001 (do_initial_child_stuff): Set the new process'es tdesc.
2002 * win32-low.h (struct target_desc): Forward declare.
2003 (win32_tdesc): Declare.
2004 * lynx-i386-low.c (tdesc_i386): Declare global.
2005 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2006 * lynx-low.c (lynx_tdesc): New global.
2007 (lynx_add_process): Set the new process'es tdesc.
2008 * lynx-low.h (struct target_desc): Forward declare.
2009 (lynx_tdesc): Declare global.
2010 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2011 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2012 * nto-low.c (nto_tdesc): New global.
2013 (do_attach): Set the new process'es tdesc.
2014 * nto-low.h (struct target_desc): Forward declare.
2015 (nto_tdesc): Declare.
2016 * nto-x86-low.c (tdesc_i386): Declare.
2017 (nto_x86_arch_setup): Set `nto_tdesc'.
2019 2013-06-04 Gary Benson <gbenson@redhat.com>
2021 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2022 to qSupported response when appropriate.
2023 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2024 with nonzero-length annex.
2025 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2026 arguments supplied in annex.
2028 2013-05-31 Doug Evans <dje@google.com>
2031 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2032 64 bits in 64-cross-32 environment.
2034 2013-05-28 Pedro Alves <palves@redhat.com>
2036 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2037 (aarch64-without-fpu.c): Delete rule.
2038 * configure.srv (aarch64*-*-linux*): Remove references to
2039 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2040 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2043 2013-05-24 Pedro Alves <palves@redhat.com>
2045 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2046 instead of strchr/decode_address. Error if the range isn't split
2047 with a ','. Don't assume there's be a ':' in the action.
2049 2013-05-23 Yao Qi <yao@codesourcery.com>
2050 Pedro Alves <palves@redhat.com>
2052 * linux-low.c (lwp_in_step_range): New function.
2053 (linux_wait_1): If the thread was range stepping and stopped
2054 outside the stepping range, report the stop to GDB. Otherwise,
2055 continue stepping. Add range stepping debug output.
2056 (linux_set_resume_request): Copy the step range from the resume
2058 (linux_supports_range_stepping): New.
2059 (linux_target_ops) <supports_range_stepping>: Set to
2060 linux_supports_range_stepping.
2061 * linux-low.h (struct linux_target_ops)
2062 <supports_range_stepping>: New field.
2063 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2064 * linux-x86-low.c (x86_supports_range_stepping): New.
2065 (the_low_target) <supports_range_stepping>: Set to
2066 x86_supports_range_stepping.
2067 * server.c (handle_v_cont): Handle 'r' action.
2068 (handle_v_requests): Append ";r" if the target supports range
2070 * target.h (struct thread_resume) <step_range_start,
2071 step_range_end>: New fields.
2072 (struct target_ops) <supports_range_stepping>:
2074 (target_supports_range_stepping): New macro.
2076 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2078 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2079 confusion in comment.
2081 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2083 * lynx-low.c (struct process_info_private): New type.
2084 (lynx_add_process): New function.
2085 (lynx_create_inferior, lynx_attach): Replace calls to
2086 add_process by calls to lynx_add_process.
2087 (lynx_resume): If PTID is null, then try using
2088 current_process()->private->last_wait_event_ptid.
2090 (lynx_clear_inferiors): Delete. The contents of that function
2091 has been inlined in lynx_mourn;
2092 (lynx_wait_1): Save the ptid in the process's private data.
2093 (lynx_mourn): Free the process' private data. Replace call
2094 to lynx_clear_inferiors by call to clear_inferiors.
2096 2013-05-17 Yao Qi <yao@codesourcery.com>
2098 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2101 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2103 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2104 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2105 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2106 PT_TEXT_END_ADDR guards. Update comments.
2107 (linux_target_op) <read_offsets>: Conditionally define to
2108 linux_read_offsets if the target is UCLIBC and if it defines
2109 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2111 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2112 Andrew Jenner <andrew@codesourcery.com>
2114 * Makefile.in (SFILES): Add linux-nios2-low.c.
2115 (clean): Add action to delete nios2-linux.c.
2116 (nios2-linux.c): New rule.
2117 * configure.srv: Add nios2*-*-linux*.
2118 * linux-nios2-low.c: New.
2120 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2122 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2124 2013-04-25 Hui Zhu <hui@codesourcery.com>
2127 * ax.c (ax_printf): Add fflush.
2129 2013-04-22 Tom Tromey <tromey@redhat.com>
2131 * Makefile.in (SFILES): Add filestuff.c.
2132 (OBS): Add filestuff.o.
2133 (filestuff.o): New target.
2134 * config.in, configure: Rebuild.
2135 * configure.ac: Check for fdwalk, pipe2.
2137 2013-04-17 Pedro Alves <palves@redhat.com>
2139 * configure.ac (USE_THREAD_DB): Delete variable.
2140 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2141 Don't AC_SUBST USE_THREAD_DB.
2142 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2143 * config.in, configure: Regenerate.
2145 2013-04-16 Pedro Alves <palves@redhat.com>
2147 * linux-low.h (struct lwp_info) <thread_known>: Move under
2148 the USE_THREAD_DB #ifdef.
2150 2013-04-16 Pedro Alves <palves@redhat.com>
2152 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2153 (linux-low.o): Delete rule.
2154 * linux-low.h: Always include "gdb_thread_db.h" instead of
2155 conditionally including thread_db.h.
2156 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2159 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2161 * Makefile.in (install-only): Fix make install regression.
2163 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2165 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2166 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2168 * gdbserver.1: Remove.
2170 2013-03-22 Pedro Alves <palves@redhat.com>
2172 * linux-low.c (handle_extended_wait): Don't call
2173 linux_enable_event_reporting.
2175 2013-03-15 Tony Theodore <tonyt@logyst.com>
2178 * Makefile.in (SHELL): Use @SHELL@.
2180 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2182 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2185 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2187 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2188 Remove extraneous NULL element.
2190 2013-03-13 Yao Qi <yao@codesourcery.com>
2192 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2193 'V' block in trace frame.
2195 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2197 * target.h (struct target_ops): Add btrace ops.
2198 (target_supports_btrace): New macro.
2199 (target_enable_btrace): New macro.
2200 (target_disable_btrace): New macro.
2201 (target_read_btrace): New macro.
2202 * gdbthread.h (struct thread_info): Add btrace field.
2203 * server.c: Include btrace-common.h.
2204 (handle_btrace_general_set): New function.
2205 (handle_btrace_enable): New function.
2206 (handle_btrace_disable): New function.
2207 (handle_general_set): Call handle_btrace_general_set.
2208 (handle_qxfer_btrace): New function.
2209 (struct qxfer qxfer_packets[]): Add btrace entry.
2210 * inferiors.c (remove_thread): Disable btrace.
2211 * linux-low: Include linux-btrace.h.
2212 (linux_low_enable_btrace): New function.
2213 (linux_low_read_btrace): New function.
2214 (linux_target_ops): Add btrace ops.
2215 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2216 Add srv_linux_btrace=yes.
2217 (x86_64-*-linux*): Add linux-btrace.o.
2218 Add srv_linux_btrace=yes.
2219 * configure.ac: Define HAVE_LINUX_BTRACE.
2220 * config.in: Regenerated.
2221 * configure: Regenerated.
2223 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2225 * server.c (handle_qxfer): Preserve error message if -3 is
2227 (qxfer): Document the -3 return value.
2229 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2231 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2232 (linux_btrace_h): New variable.
2233 (linux-btrace.o): New rule.
2235 2013-03-08 Stan Shebs <stan@codesourcery.com>
2236 Hafiz Abid Qadeer <abidh@codesourcery.com>
2238 * tracepoint.c (trace_buffer_size): New global.
2239 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2240 (init_trace_buffer): Change to one-argument function. Allocate
2241 trace buffer memory.
2242 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2243 handle QTBuffer:size packet.
2244 (cmd_bigqtbuffer_size): New function.
2245 (initialize_tracepoint): Call init_trace_buffer with
2246 DEFAULT_TRACE_BUFFER_SIZE.
2247 * server.c (handle_query): Add QTBuffer:size in the
2250 2013-03-07 Yao Qi <yao@codesourcery.com>
2252 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2253 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2255 (cmd_qtsp): Adjust condition. Do post increment.
2256 Set cur_action and cur_step_action back to 0.
2258 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2261 * linux-low.c (linux_write_memory): Return early success if LEN is
2264 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2266 * configure.srv: Add x86_64-*-cygwin* as target.
2268 2013-02-28 Tom Tromey <tromey@redhat.com>
2270 * configure.ac: Invoke AC_SYS_LARGEFILE.
2271 * configure, config.in: Rebuild.
2273 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2275 * win32-low.c: Throughout, fix format strings and casts of
2276 printf-like functions to avoid type related warnings on all
2278 (get_child_debug_event): Print dwDebugEventCode as hex since
2279 that's how it's usually documented.
2281 2013-02-28 Yao Qi <yao@codesourcery.com>
2283 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2286 2013-02-27 Jiong Wang <jiwang@tilera.com>
2288 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2289 (reg-tilegx32.c): New rule.
2290 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2291 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2292 different register info initializer according to elf class.
2293 (init_registers_tilgx32): New function. The tilegx32 register info
2295 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2296 (tile_store_gregset): Likewise.
2298 2013-02-27 Yao Qi <yao@codesourcery.com>
2300 * server.c (process_point_options): Print debug message when
2301 debug_threads is true.
2303 2013-02-26 Yao Qi <yao@codesourcery.com>
2305 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2307 2013-02-19 Pedro Alves <palves@redhat.com>
2308 Kai Tietz <ktietz@redhat.com>
2312 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2313 instead of strtoul to extract address from packet.
2314 (process_serial_event) <'z'>: Likewise.
2316 2013-02-18 Yao Qi <yao@codesourcery.com>
2318 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2320 2013-02-14 Pedro Alves <palves@redhat.com>
2324 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2325 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2327 2013-02-14 Pedro Alves <palves@redhat.com>
2329 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2331 2013-02-14 Pedro Alves <palves@redhat.com>
2333 * tracepoint.c (save_string): Delete.
2334 (add_tracepoint_action): Use savestring instead of save_string.
2336 2013-02-12 Pedro Alves <palves@redhat.com>
2338 * linux-xtensa-low.c: Ditto.
2339 * xtensa-xtregs.c: Ditto.
2341 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2343 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2346 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2348 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2349 aarch64_num_wp_regs and aarch64_num_bp_regs to
2350 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2352 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2354 * linux-aarch64-low.c (ps_get_thread_area): Replace
2355 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2357 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2358 Marcus Shawcroft <marcus.shawcroft@arm.com>
2359 Nigel Stephens <nigel.stephens@arm.com>
2360 Yufeng Zhang <yufeng.zhang@arm.com>
2362 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2363 (aarch64.c, aarch64-without-fpu.c): New targets.
2364 * configure.srv (aarch64*-*-linux*): New.
2365 * linux-aarch64-low.c: New file.
2367 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2369 * linux-low.c (handle_extended_wait, linux_create_inferior)
2370 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2371 (dequeue_one_deferred_signal, linux_resume_one_thread)
2372 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2373 (linux_tracefork_grandchild, linux_test_for_tracefork)
2374 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2375 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2376 where the argument is 0.
2378 2013-01-25 Yao Qi <yao@codesourcery.com>
2380 * event-loop.c: Include "queue.h".
2381 (gdb_event_p): New typedef.
2382 (struct gdb_event) <next_event>: Remove.
2383 (event_queue): Change to QUEUE(gdb_event_p).
2384 (async_queue_event): Remove.
2385 (gdb_event_xfree): New.
2386 (initialize_event_loop): New.
2387 (process_event): Use API from QUEUE.
2388 (wait_for_event): Likewise.
2389 * server.c (main): Call initialize_event_loop.
2390 * server.h (initialize_event_loop): Declare.
2392 2013-01-18 Yao Qi <yao@codesourcery.com>
2394 * ax.h (struct eval_agent_expr_context): New.
2395 (gdb_eval_agent_expr): Update declaration.
2396 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2397 TFRAME. Add new argument CTX.
2398 * server.h (struct eval_agent_expr_context): Declare.
2399 (agent_mem_read, agent_tsv_read): Update declaration.
2400 (agent_mem_read_string): Likewise.
2401 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2402 (add_traceframe_block): Add new argument TPOINT.
2403 Increase TPOINT->traceframe_usage.
2404 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2405 eval_tracepoint_agent_expr.
2406 (condition_true_at_tracepoint): Likewise.
2407 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2408 (agent_mem_read_string, agent_tsv_read): Likewise.
2410 2013-01-16 Yao Qi <yao@codesourcery.com>
2412 * linux-low.c (linux_resume_one_lwp): Don't check
2413 'lwp->bp_reinsert != 0'.
2415 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2416 Pedro Alves <palves@redhat.com>
2418 * lynx-low.c (ptrace_request_to_str): Define a temporary
2419 macro and use it to simplify this function's implementation.
2421 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2423 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2426 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2428 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2430 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2432 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2434 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2436 * lynx-low.c (lynx_resume): Use the resume_info parameter
2437 to determine the ptid for the lynx_ptrace call, unless
2438 it is equal to minus_one_ptid, in which case we use the
2439 ptid of the current_inferior.
2440 (lynx_wait_1): After having received a thread create/exit
2441 event, resume the inferior's execution using the signaling
2442 thread's ptid, rather than the old ptid.
2444 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2446 * lynx-low.c (lynx_resume): Delete variable ret.
2448 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2450 * gdbreplay.c (gdbreplay_version): Update copyright year.
2451 * server.c (gdbserver_version): Likewise.
2453 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2455 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2458 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2460 * lynx-low.c (ptrace_request_to_str): Add handling for
2463 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2465 * lynx-low.c (lynx_attach): Delete variable new_process.
2467 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2469 * lynx-low.c (lynx_create_inferior): Delete variable
2472 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2474 * lynx-low.c (ptrace_request_to_str): Do not handle
2475 PTRACE_GETTHREADLIST if this macro does not exist.
2477 2012-12-15 Yao Qi <yao@codesourcery.com>
2479 * Makefile.in (OBS): Add notif.o.
2480 * notif.c, notif.h: New.
2481 * server.c: Include "notif.h".
2482 (struct vstop_notif) <next>: Remove.
2484 (queue_stop_reply): Update.
2485 (push_event, send_next_stop_reply): Remove.
2486 (discard_queued_stop_replies): Update.
2487 (notif_stop): New variable.
2488 (handle_v_stopped): Remove.
2489 (handle_v_requests): Don't call handle_v_stopped. Call
2490 handle_ack_notif instead.
2491 (queue_stop_reply_callback): Call notif_event_enque instead
2492 of queue_stop_reply.
2493 (handle_status): Don't call send_next_stop_reply, call
2494 notif_write_event instead.
2495 (kill_inferior_callback): Likewise.
2496 (detach_or_kill_inferior_callback): Likewise.
2497 (main): Call initialize_notif.
2498 (process_serial_event): Call QUEUE_is_empty.
2499 (handle_target_event): Call notif_push instead of push event.
2500 * server.h (push_event): Remove declaration.
2502 2012-12-10 Tom Tromey <tromey@redhat.com>
2504 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2505 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2508 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2509 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2510 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2511 (amd64-linux-ipa.o, ax.o): Rewrite.
2512 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2513 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2514 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2515 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2516 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2517 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2518 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2519 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2520 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2521 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2522 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2523 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2524 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2525 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2526 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2527 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2528 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2529 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2530 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2531 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2532 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2533 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2534 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2535 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2536 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2537 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2538 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2539 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2540 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2541 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2542 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2543 (reg-tilegx.o): Remove.
2544 (all_object_files): New macro.
2545 Include .deps files.
2546 * aclocal.m4, configure: Rebuild.
2547 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2548 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2549 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2551 2012-12-05 Tom Tromey <tromey@redhat.com>
2554 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2556 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2558 * configure.ac: Check for linux/perf_event.h.
2559 * config.in: Regenerated.
2560 * configure: Regenerated.
2562 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2564 * hostio.c (handle_readlink): Decrease buffer size
2565 parameter passed to readlink by one byte.
2567 2012-11-26 Yao Qi <yao@codesourcery.com>
2569 * configure.ac (build_warnings): Append '-Wempty-body'.
2570 * configure: Regenerated.
2571 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2574 2012-11-15 Pierre Muller <muller@sourceware.org>
2576 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2577 * config.in: Regenerate.
2578 * configure: Regenerate.
2579 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2580 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2581 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2582 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2584 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2585 instead of <sys/wait.h> header.
2586 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2588 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
2590 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2591 (various make rules): Remove -DGDBSERVER
2593 2012-11-09 Yao Qi <yao@codesourcery.com>
2595 * spu-low.c (current_ptid): Move it to ..
2596 * gdbthread.h: ... here. New.
2597 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2598 * server.c (myresume, process_serial_event): Likewise.
2599 * thread-db.c (thread_db_find_new_threads): Likewise.
2600 * tracepoint.c (run_inferior_command): Likewise.
2602 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
2604 * server.c (handle_search_memory_1): Include access length in
2607 2012-09-05 Michael Brandt <michael.brandt@axis.com>
2609 * linux-crisv32-low.c: Fix compile errors.
2611 2012-09-04 Yao Qi <yao@codesourcery.com>
2613 * tracepoint.c (cmd_qtsv): Adjust debug message.
2614 Don't check CUR_TPOINT.
2616 2012-08-28 Yao Qi <yao@codesourcery.com>
2618 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2619 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2620 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2621 Remove declarations of xmalloc, xreallloc, xstrdup and
2623 * Makefile.in (libiberty_h): New.
2624 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2625 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2627 2012-08-23 Yao Qi <yao@codesourcery.com>
2629 * server.h: Remove declaration of 'xsnprintf'.
2631 2012-08-22 Keith Seitz <keiths@redhat.com>
2633 * server.h: Include build-gnulib-gbserver/config.h.
2634 * gdbreplay.c: Likewise.
2636 2012-08-08 Doug Evans <dje@google.com>
2638 * Makefile.in (SFILES): Add gdb_vecs.c.
2639 (OBS): Add gdb_vecs.o.
2640 (gdb_vecs_h, host_defs_h): New variables.
2641 (thread-db.o): Add $(gdb_vecs_h) dependency.
2642 (gdb_vecs.o): New rule.
2643 * thread-db.c: #include "gdb_vecs.h".
2644 (thread_db_load_search): Use a vector to iterate over path elements.
2645 Handle text appearing after "$pdir".
2647 * configure.ac: Add check for strstr.
2648 * config.in: Regenerate.
2649 * configure: Regenerate.
2651 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2653 * hostio.c (handle_pread): If pread fails, fall back to attempting
2655 (handle_pwrite): Likewise for pwrite.
2657 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2659 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2660 between unsupported TYPE and unimplementable ADDR/LEN combination.
2661 (arm_insert_point): Act on new return value.
2663 2012-07-31 Pedro Alves <palves@redhat.com>
2665 * server.c (process_point_options): Only skip tokens if we find
2666 one that is unrecognized. Don't treat 'X' specially while
2667 skipping unrecognized tokens.
2669 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2671 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2672 to 4-byte-align HW breakpoint addresses for Thumb.
2674 2012-07-27 Yao Qi <yao@codesourcery.com>
2678 * server.h: Declare gdb_agent_about_to_close.
2679 * target.c (kill_inferior): Include "agent.h".
2680 New. Send command 'kill'.
2681 * target.h (kill_inferior): Removed macro.
2682 * tracepoint.c (gdb_agent_about_to_close): New.
2683 (gdb_agent_helper_thread): Handle command 'close'.
2684 Wait endlessly until the inferior stops.
2685 Install gdb_agent_remove_socket to atexit hook.
2686 (agent_socket_name): New static variable.
2687 (gdb_agent_socket_init): Replace local variable 'name' with
2688 'agent_socket_name'.
2689 (gdb_agent_remove_socket): New.
2691 2012-07-27 Yao Qi <yao@codesourcery.com>
2693 * server.c (process_point_options): Stop at 'X' when parsing.
2695 2012-07-19 Michael Eager <eager@eagercon.com>
2697 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2699 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2700 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2701 hardware breakpoint.
2703 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2705 * gdbserver/linux-low.c (initialize_low): Call
2706 linux_ptrace_init_warnings.
2708 2012-07-02 Doug Evans <dje@google.com>
2710 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2713 2012-07-02 Stan Shebs <stan@codesourcery.com>
2715 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2716 (ax.o): Add it to build rule.
2718 (OBS): Add format.o.
2719 (IPA_OBS): Add format.o.
2720 * server.c (handle_query): Claim support for breakpoint commands.
2721 (process_point_options): Add command case.
2722 (process_serial_event): Leave running if there are printfs in
2724 * mem-break.h (any_persistent_commands): Declare.
2725 (add_breakpoint_commands): Declare.
2726 (gdb_no_commands_at_breakpoint): Declare.
2727 (run_breakpoint_commands): Declare.
2728 * mem-break.c (struct point_command_list): New struct.
2729 (struct breakpoint): New field command_list.
2730 (any_persistent_commands): New function.
2731 (add_commands_to_breakpoint): New function.
2732 (add_breakpoint_commands): New function.
2733 (gdb_no_commands_at_breakpoint): New function.
2734 (run_breakpoint_commands): New function.
2735 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2737 * ax.c: Include format.h.
2738 (ax_printf): New function.
2739 (gdb_eval_agent_expr): Add printf opcode.
2741 2012-06-13 Yao Qi <yao@codesourcery.com>
2743 * server.c (start_inferior): Remove duplicated writes to fields
2744 'last_resume_kind' and 'last_status' of 'current_inferior'.
2746 2012-06-12 Yao Qi <yao@codesourcery.com>
2747 Pedro Alves <palves@redhat.com>
2749 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2751 * server.c (handle_v_cont): Extend comment.
2753 2012-06-11 Yao Qi <yao@codesourcery.com>
2755 * linux-low.c (linux_attach): Add 'static'.
2757 2012-06-06 Yao Qi <yao@codesourcery.com>
2759 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2761 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2763 Fix gcc -flto compilation warning.
2764 * server.c (main): Make variable multi_mode and attach volatile.
2766 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2768 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2769 if the platform doesn't know about it.
2771 2012-05-30 Jeff Kenton <jkenton@tilera.com>
2773 * Makefile.in (SFILES): Add linux-tile-low.c.
2774 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2775 * configure.srv: Handle tilegx-*-linux*.
2776 * linux-tile-low.c: New file.
2778 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2780 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2782 2012-05-24 Pedro Alves <palves@redhat.com>
2786 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2788 2012-05-24 Pedro Alves <palves@redhat.com>
2792 Replace target_signal with gdb_signal throughout.
2794 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2796 * linux-low.c (linux_store_registers): Avoid the copying sequence
2797 when no data has been retrieved by ptrace.
2799 2012-05-22 Will Deacon <will.deacon@arm.com>
2801 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2802 Include asm/ptrace.h.
2803 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2806 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2808 * linux-low.c (linux_store_registers): Don't re-retrieve data
2809 with ptrace that has already been obtained from /proc. Always
2810 copy any data retrieved with ptrace to the buffer supplied.
2812 2012-05-11 Yao Qi <yao@codesourcery.com>
2813 Pedro Alves <palves@redhat.com>
2815 * linux-low.c (enum stopping_threads_kind): New.
2816 (stopping_threads): Change type to `enum stopping_threads_kind'.
2817 (handle_extended_wait): If stopping and suspending threads, leave
2818 the new_lwp suspended too.
2819 (linux_wait_for_event): Adjust.
2820 (stop_all_lwps): Set `stopping_threads' to
2821 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2822 whether we're suspending threads or just stopping them. Assert no
2825 2012-04-29 Yao Qi <yao@codesourcery.com>
2827 * server.h: Move some code to ...
2828 * gdbthread.h: ... here. New.
2829 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2830 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2831 (nto-low.o, win32-low.o): Likewise.
2832 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2833 * regcache.c, remote-utils.c, server.c: Likewise.
2834 * target.c, tracepoint.c, win32-low.c: Likewise.
2836 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2838 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2839 (PTRACE_ARG4_TYPE): Likewise.
2840 (PTRACE_XFER_TYPE): Likewise.
2841 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2842 ptrace to PTRACE_ARG3_TYPE.
2843 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2844 (PTRACE_ARG4_TYPE): Likewise.
2845 (PTRACE_XFER_TYPE): Likewise.
2846 (linux_detach_one_lwp): Cast fourth argument of
2847 ptrace to long then PTRACE_ARG4_TYPE.
2848 (regsets_fetch_inferior_registers): Cast third argument of
2849 ptrace to long then PTRACE_ARG3_TYPE.
2850 (regsets_store_inferior_registers): Likewise.
2852 2012-04-20 Pedro Alves <palves@redhat.com>
2854 * configure: Regenerate.
2856 2012-04-19 Pedro Alves <palves@redhat.com>
2858 * Makefile.in (GNULIB_BUILDDIR): New.
2859 (LIBGNU, INCGNU, GNULIB_H): Adjust.
2860 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2861 (all, install-only, uninstall, clean-info, all-lib, clean): No
2862 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2863 (maintainer-clean realclean distclean): Use subdir_do.
2865 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
2866 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
2867 * acinclude.m4: Include acx_configure_dir.m4.
2868 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2869 calls. Call AC_PROG_RANLIB. Configure gnulib using
2872 (GNULIB_STDINT_H): Adjust.
2873 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2874 * gdbreplay.c: Include build-gnulib/config.h.
2875 * server.h: Likewise.
2876 * aclocal.m4: Regenerate.
2877 * config.in: Regenerate.
2878 * configure: Regenerate.
2880 2012-04-19 Pedro Alves <palves@redhat.com>
2882 * Makefile.in (LIBGNU, INCGNU): Adjust.
2883 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2884 (all, install-only, uninstall, clean-info, all-lib, clean)
2885 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2886 * configure.ac: Adjust AC_OUTPUT output.
2887 * aclocal.m4: Regenerate.
2888 * configure: Regenerate.
2890 2012-04-19 Pedro Alves <palves@redhat.com>
2892 * Makefile.in (generated_files): New.
2893 (server_h): Remove the explicit dependency on config.h, and depend
2894 on $generated_files.
2896 2012-04-19 Pedro Alves <palves@redhat.com>
2898 * Makefile.in (INCGNU): Add -Ignulib.
2900 2012-04-19 Pedro Alves <palves@redhat.com>
2902 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2903 (INCGNU): ... this, and spell out -I here.
2904 (GNULIB_LIB): Rename to ...
2906 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2908 2012-04-19 Pedro Alves <palves@redhat.com>
2910 * config.in: Regenerate.
2912 2012-04-19 Pedro Alves <palves@redhat.com>
2914 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2915 * server.h (memmem): Remove declaration.
2916 * config.in: Regenerate.
2917 * configure: Regenerate.
2919 2012-04-19 Yao Qi <yao@codesourcery.com>
2921 * Makefile.in (SFILES): Add common/vec.c.
2925 2012-04-19 Yao Qi <yao@codesourcery.com>
2927 * remote-utils.c (prepare_resume_reply): Replace with macro
2928 target_core_of_thread.
2929 * server.c (handle_qxfer_threads_proper): Likewise.
2930 * target.h (traget_core_of_thread): New macro.
2932 2012-04-18 Pedro Alves <palves@redhat.com>
2934 * aclocal.m4: Regenerate.
2935 * configure: Regenerate.
2937 2012-04-16 Yao Qi <yao@codesourcery.com>
2939 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2940 duplicated on address.
2942 2012-04-16 Yao Qi <yao@codesourcery.com>
2944 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2945 (struct tracepoint_action_ops) <send>: New field.
2946 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2947 (agent_expr_send, x_tracepoint_action_send): New.
2948 (l_tracepoint_action_send): New.
2949 (cmd_qtdp): Download and install tracepoint
2950 according to `use_agent'.
2951 (run_inferior_command): Add one more parameter `len'.
2953 (tracepoint_send_agent): New.
2954 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2956 2012-04-16 Yao Qi <yao@codesourcery.com>
2958 * tracepoint.c (download_tracepoints): Moved to ...
2959 (cmd_qtstart): ... here.
2961 2012-04-14 Yao Qi <yao@codesourcery.com>
2963 * tracepoint.c: Include inttypes.h.
2964 (struct collect_memory_action): Use sized types.
2965 (struct tracepoint): Likewise.
2966 (cmd_qtdp, stop_tracing): Update print specifiers.
2967 (cmd_qtp, response_tracepoint): Likewise.
2968 (collect_data_at_tracepoint): Likewise.
2969 (collect_data_at_step): Likewise.
2971 2012-04-14 Yao Qi <yao@codesourcery.com>
2973 Import gnulib module inttypes.
2974 * aclocal.m4, config.in, configure: Regenerated.
2976 2012-04-14 Yao Qi <yao@codesourcery.com>
2978 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2979 Makefile and config.status at last.
2981 2012-04-13 Yao Qi <yao@codesourcery.com>
2983 * tracepoint.c: Include stdint.h unconditionally.
2985 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2987 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2988 on BFD_HAVE_SYS_PROCFS_TYPE.
2989 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2990 * configure: Regenerate.
2991 * config.in: Likewise.
2993 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2995 * Makefile.in (clean): Also remove x32.c x32-linux.c
2996 x32-avx.c x32-avx-linux.c.
2997 (x32.o): New target.
2999 (x32-linux.o): Likewise.
3000 (x32-linux.c): Likewise.
3001 (x32-avx.o): Likewise.
3002 (x32-avx.c): Likewise.
3003 (x32-avx-linux.o): Likewise.
3004 (x32-avx-linux.c): Likewise.
3006 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3007 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3008 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3009 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3010 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3011 i386/x32-avx-linux.xml.
3013 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3014 (init_registers_x32_avx_linux): Likwise.
3015 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3016 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3018 2012-04-13 Pedro Alves <palves@redhat.com>
3020 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3021 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3022 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3023 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3026 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3028 * linux-x86-low.c (compat_x32_clock_t): New.
3029 (compat_x32_siginfo_t): Likewise.
3030 (compat_x32_siginfo_from_siginfo): Likewise.
3031 (siginfo_from_compat_x32_siginfo): Likewise.
3032 (linux_is_elf64): Likewise.
3033 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3034 and siginfo_from_compat_x32_siginfo for x32.
3035 (x86_arch_setup): Set linux_is_elf64.
3037 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3040 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3042 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3043 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3044 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3045 compatible with process.
3047 2012-04-12 Yao Qi <yao@codesourcery.com>
3049 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3050 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3051 (install-only, install-info, clean): Handle sub dir gnulib.
3052 (all-lib, am--refresh): New targets.
3053 (memmem.o): Remove target.
3054 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3055 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3056 (AC_REPLACE_FUNCS): Remove memmem.
3057 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3058 (AC_OUTPUT): Generate Makefile in gnulib/.
3059 * aclocal.m4, config.in, configure: Regenerated.
3061 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3063 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3065 2012-04-05 Pedro Alves <palves@redhat.com>
3067 -Werror=strict-aliasing
3069 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3072 2012-04-04 Pedro Alves <palves@redhat.com>
3074 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3075 (sparc_store_gregset_from_stack, sparc_store_gregset)
3076 (sparc_breakpoint_at): Fix formatting.
3078 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3080 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3082 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3083 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3084 * config.in: Regenerate.
3085 * configure: Likewise.
3087 2012-03-29 Pedro Alves <palves@redhat.com>
3089 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3090 Correct ptrace arguments.
3092 2012-03-28 Pedro Alves <palves@redhat.com>
3094 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3095 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3096 (IA64_FR1_REGNUM): New defines.
3097 (ia64_fetch_register): New.
3098 (the_low_target): Install it.
3099 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3101 * linux-low.c (linux_fetch_registers): Try the
3102 the_low_target.fetch_register hook first.
3104 * linux-arm-low.c (the_low_target): Adjust.
3105 * linux-bfin-low.c (the_low_target): Adjust.
3106 * linux-cris-low.c (the_low_target): Adjust.
3107 * linux-crisv32-low.c (the_low_target): Adjust.
3108 * linux-m32r-low.c (the_low_target): Adjust.
3109 * linux-m68k-low.c (the_low_target): Adjust.
3110 * linux-mips-low.c (the_low_target): Adjust.
3111 * linux-ppc-low.c (the_low_target): Adjust.
3112 * linux-s390-low.c (the_low_target): Adjust.
3113 * linux-sh-low.c (the_low_target): Adjust.
3114 * linux-sparc-low.c (the_low_target): Adjust.
3115 * linux-tic6x-low.c (the_low_target): Adjust.
3116 * linux-x86-low.c (the_low_target): Adjust.
3117 * linux-xtensa-low.c (the_low_target): Adjust.
3119 2012-03-26 Pedro Alves <palves@redhat.com>
3121 * server.c (handle_qxfer_libraries): Don't bail early if
3122 the_target->qxfer_libraries_svr4 is not NULL.
3124 2012-03-26 Pedro Alves <palves@redhat.com>
3126 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3128 2012-03-23 Pedro Alves <palves@redhat.com>
3130 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3131 "library-list-svr4" element's start tag when the the DSO list is
3134 2012-03-23 Pedro Alves <palves@redhat.com>
3136 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3137 a variable whose type size is the same as the inferior's pointer
3140 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3142 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3144 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3145 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3146 * linux-low.h: Include <signal.h>.
3147 (struct siginfo): Remove forward declaration.
3148 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3151 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3153 * .gitignore: Ignore more files.
3155 2012-03-19 Pedro Alves <palves@redhat.com>
3156 Jan Kratochvil <jan.kratochvil@redhat.com>
3158 * server.c (cont_thread, general_thread): Add describing comments.
3159 (start_inferior): Clear `cont_thread'.
3160 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3163 2012-03-15 Yao Qi <yao@codesourcery.com>
3165 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3167 (cmd_qtdp): ... here.
3169 2012-03-15 Yao Qi <yao@codesourcery.com>
3171 * tracepoint.c (struct tracepoint_action_ops): New.
3172 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3173 (m_tracepoint_action_download): New.
3174 (r_tracepoint_action_download): New.
3175 (x_tracepoint_action_download): New.
3176 (l_tracepoint_action_download): New.
3177 (add_tracepoint_action): Install `action->ops' according type.
3178 (download_tracepoint_1): Move code `download' function pointer
3179 of various tracepoint_action_ops.
3181 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3183 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3184 linux_ptrace_attach_warnings.
3186 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3188 * Makefile.in (linux-ptrace.o): New.
3189 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3190 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3191 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3192 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3193 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3195 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3197 2012-03-08 Yao Qi <yao@codesourcery.com>
3198 Pedro Alves <palves@redhat.com>
3200 Fix PR server/13392.
3201 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3203 * tracepoint.c (remove_tracepoint): New.
3204 (cmd_qtdp): Call remove_tracepoint when failed to install.
3206 2012-03-07 Pedro Alves <palves@redhat.com>
3208 * linux-low.c (get_detach_signal): New.
3209 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3210 Pass on pending signals to PTRACE_DETACH. Check the result of the
3212 * server.c (program_signals, program_signals_p): New.
3213 (handle_general_set): Handle QProgramSignals.
3214 * server.h (program_signals, program_signals_p): Declare.
3216 2012-03-05 Pedro Alves <palves@redhat.com>
3217 Jan Kratochvil <jan.kratochvil@redhat.com>
3219 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3222 2012-03-03 Yao Qi <yao@codesourcery.com>
3224 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3225 agent_look_up_symbols.
3227 2012-03-03 Yao Qi <yao@codesourcery.com>
3229 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3230 (linux-x86-low.o): Likewise.
3231 * server.h: Remove in_process_agent_loaded.
3232 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3236 2012-03-03 Yao Qi <yao@codesourcery.com>
3238 * tracepoint.c (gdb_agent_capability): New global.
3239 (in_process_agent_loaded_ust): Renamed to
3240 `in_process_agent_supports_ust'.
3242 (in_process_agent_supports_ust): Call agent_capability_check.
3243 (clear_installed_tracepoints): Assert that agent supports
3246 2012-03-03 Yao Qi <yao@codesourcery.com>
3248 * linux-low.c (linux_supports_agent): New.
3249 (linux_target_ops): Initialize field `supports_agent' with
3250 linux_supports_agent.
3251 * target.h (struct target_ops) <supports_agent>: New.
3252 (target_supports_agent): New macro.
3253 * server.c (handle_general_set): Handle packet 'QAgent'.
3254 (handle_query): Send `QAgent+'.
3255 * Makefile.in (server.o): Depends on agent.h.
3257 2012-03-03 Yao Qi <yao@codesourcery.com>
3259 * Makefile.in (OBS): Add agent.o.
3260 Add new rule for agent.o.
3261 Track dependence of tracepoint.c on agent.h.
3262 * tracepoint.c (run_inferior_command_1):
3263 (run_inferior_command): Call agent_run_command.
3264 (gdb_ust_connect_sync_socket): Deleted. Move it to
3266 (resume_thread, stop_thread): Likewise.
3267 (gdb_ust_socket_init): Renamed to ...
3268 (gdb_agent_socket_init): ... New.
3269 (gdb_ust_thread): Renamed to ...
3270 (gdb_agent_helper_thread): ... New.
3271 (gdb_ust_init): Move some code to ...
3272 (gdb_agent_init): ... here. New.
3273 [HAVE_UST]: Call gdb_ust_init.
3274 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3275 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3276 * config.in, configure: Regenerated.
3278 2012-03-02 Pedro Alves <palves@redhat.com>
3280 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3281 * linux-low.c (struct simple_pid_list): New.
3282 (stopped_pids): New a struct simple_pid_list pointer.
3283 (add_to_pid_list, pull_pid_from_list): New.
3284 (handle_extended_wait): Don't assume the first signal new children
3285 report is SIGSTOP. Adjust call to pull_pid_from_list.
3286 (linux_wait_for_lwp): Adjust.
3288 2012-03-02 Yao Qi <yao@codesourcery.com>
3290 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3293 2012-03-02 Yao Qi <yao@codesourcery.com>
3295 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3296 `stop_pc' and `tpoint'. Update caller.
3298 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3300 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3301 * linux-low.c (use_linux_regsets): New macro.
3302 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3303 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3304 (linux_register_in_regsets): New function.
3305 (usr_fetch_inferior_registers): Skip registers covered by
3307 (usr_store_inferior_registers): Likewise.
3308 (usr_fetch_inferior_registers): New macro.
3309 (usr_store_inferior_registers): Likewise.
3310 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3311 (linux_store_registers): Likewise.
3312 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3314 (init_registers_mips64_dsp_linux): Likewise.
3315 (init_registers_mips_linux): New macro.
3316 (init_registers_mips_dsp_linux): Likewise.
3317 (mips_dsp_num_regs): Likewise.
3318 (DSP_BASE, DSP_CONTROL): New fallback macros.
3319 (mips_base_regs): New macro.
3320 (mips_regmap): Use it. Fix the size.
3321 (mips_dsp_regmap): New variable.
3322 (mips_dsp_regset_bitmap): Likewise.
3323 (mips_arch_setup): New function.
3324 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3326 (mips_cannot_store_register): Likewise.
3327 (the_low_target): Update .arch_setup, .num_regs and .regmap
3328 initializers. Add .regset_bitmap initializer.
3329 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3331 * linux-bfin-low.c (the_low_target): Likewise.
3332 * linux-cris-low.c (the_low_target): Likewise.
3333 * linux-crisv32-low.c (the_low_target): Likewise.
3334 * linux-ia64-low.c (the_low_target): Likewise.
3335 * linux-m32r-low.c (the_low_target): Likewise.
3336 * linux-m68k-low.c (the_low_target): Likewise.
3337 * linux-ppc-low.c (the_low_target): Likewise.
3338 * linux-s390-low.c (the_low_target): Likewise.
3339 * linux-sh-low.c (the_low_target): Likewise.
3340 * linux-sparc-low.c (the_low_target): Likewise.
3341 * linux-tic6x-low.c (the_low_target): Likewise.
3342 * linux-x86-low.c (the_low_target): Likewise.
3343 * linux-xtensa-low.c (the_low_target): Likewise.
3344 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3345 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3346 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3348 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3349 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3351 2012-02-29 Yao Qi <yao@codesourcery.com>
3352 Pedro Alves <palves@redhat.com>
3354 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3355 `step_over_finished' is true.
3357 2012-02-27 Pedro Alves <palves@redhat.com>
3359 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3360 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3362 2012-02-27 Pedro Alves <palves@redhat.com>
3365 * linux-low.c (pid_is_stopped): New.
3366 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3368 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3370 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3373 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3375 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3377 2012-02-24 Luis Machado <lgustavo@codesourcery>
3379 * server.c (handle_query): Advertise support for target-side
3380 breakpoint condition evaluation.
3381 (process_point_options): New function.
3382 (process_serial_event): When inserting a breakpoint, check for
3383 a target-side condition that should be evaluated.
3385 * mem-break.c: Include regcache.h and ax.h.
3386 (point_cond_list_t): New data structure.
3387 (breakpoint) <cond_list>: New field.
3388 (find_gdb_breakpoint_at): Make non-static.
3389 (delete_gdb_breakpoint_at): Clear any target-side
3391 (clear_gdb_breakpoint_conditions): New function.
3392 (add_condition_to_breakpoint): Likewise.
3393 (add_breakpoint_condition): Likewise.
3394 (gdb_condition_true_at_breakpoint): Likewise.
3395 (gdb_breakpoint_here): Return result directly instead
3396 of going through a local variable.
3398 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3399 (clear_gdb_breakpoint_conditions): Likewise.
3400 (add_breakpoint_condition): Likewise.
3401 (gdb_condition_true_at_breakpoint): Likewise.
3403 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3404 (need_step_over_p): Take target-side breakpoint condition into
3407 2012-02-24 Luis Machado <lgustavo@codesourcery>
3409 * server.h: Include tracepoint.h.
3410 (agent_mem_read, agent_get_trace_state_variable_value,
3411 agent_set_trace_state_variable_value,
3412 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3413 get_set_tsv_func_addr): New prototypes.
3415 * ax.h: New include file.
3416 * ax.c: New source file.
3418 * tracepoint.c: Include ax.h.
3419 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3420 agent_expr, eval_result_type): Move to ax.h.
3421 (parse_agent_expr): Rename to ...
3422 (gdb_parse_agent_expr): ... this, make it non-static and move
3424 (unparse_agent_expr) Rename to ...
3425 (gdb_unparse_agent_expr): ... this, make it non-static and move
3427 (eval_agent_expr): Rename to ...
3428 (eval_tracepoint_agent_expr): ... this.
3429 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3430 forward declarations.
3431 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3432 (agent_get_trace_state_variable_value): New function.
3433 (agent_set_trace_state_variable_value): New function.
3434 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3435 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3436 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3437 (condition_true_at_tracepoint): Likewise.
3438 (parse_agent_expr): Rename to ...
3439 (gdb_parse_agent_expr): ... this and move to ax.c.
3440 (unparse_agent_expr): Rename to ...
3441 (gdb_unparse_agent_expr): ... this and move to ax.c.
3442 (gdb_agent_op_name): Move to ax.c.
3443 (eval_agent_expr): Rename to ...
3444 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3446 (eval_tracepoint_agent_expr): New function.
3447 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3449 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3451 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3452 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3453 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3454 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3455 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3456 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3457 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3458 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3459 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3460 (compile_bytecodes): Remove forward declaration.
3461 (is_goto_target): Move to ax.c.
3462 (compile_bytecodes): Move to ax.c and call
3463 agent_get_trace_state_variable_value (...) and
3464 agent_set_trace_state_variable_value (...).
3466 * Makefile.in: Update ax.c and IPA dependencies.
3468 2012-02-24 Pedro Alves <palves@redhat.com>
3470 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3471 (cmd_bigqtbuffer_circular): ... this. Only handle
3472 'QTBuffer:circular:'.
3473 (handle_tracepoint_general_set): Adjust.
3475 2012-02-16 Yao Qi <yao@codesourcery.com>
3477 * inferiors.c: Move code to ...
3478 * dll.c: .... here. New.
3479 * server.h: Declare clear_dlls.
3480 * Makefile.in (SFILES): Add dll.c.
3484 2012-02-11 Yao Qi <yao@codesourcery.com>
3486 * server.c: (handle_monitor_command): Add a new parameter
3488 (handle_query): Update caller.
3490 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3492 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3493 * configure, config.in: Regenerate.
3494 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3497 2012-02-02 Pedro Alves <palves@redhat.com>
3499 Try SIGKILL first, then PTRACE_KILL.
3500 * linux-low.c (linux_kill_one_lwp): New.
3501 (linux_kill_one_lwp): Rename to ...
3502 (kill_one_lwp_callback): ... this. Use the new
3505 2012-02-02 Pedro Alves <palves@redhat.com>
3507 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3510 2012-01-27 Pedro Alves <palves@redhat.com>
3512 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3513 (elf_64_file_p): Make static.
3514 (linux_pid_exe_is_elf_64_file): New.
3515 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3516 Delete declarations.
3517 (linux_pid_exe_is_elf_64_file): Declare.
3518 * linux-x86-low.c (x86_arch_setup): Use
3519 linux_pid_exe_is_elf_64_file.
3521 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3523 * linux-low.c (linux_wait_for_event_1): Rename to ...
3524 (linux_wait_for_event): ... here and merge it with former
3525 linux_wait_for_event - new variable wait_ptid, use it.
3526 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3528 2012-01-23 Pedro Alves <palves@redhat.com>
3530 * server.c (main): Avoid yet another case of infinite loop while
3531 detaching/killing after a longjmp.
3533 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3536 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3538 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3540 * hostio.c (handle_readlink): New function.
3541 (handle_vFile): Call it to handle "vFile:readlink" packets.
3543 2012-01-20 Pedro Alves <palves@redhat.com>
3544 Ulrich Weigand <ulrich.weigand@linaro.org>
3546 * server.c (handle_v_requests): Only support vAttach and vRun to
3547 start multiple processes when in extended protocol mode.
3549 2012-01-17 Pedro Alves <palves@redhat.com>
3551 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3552 memalign plus mprotect to allocate the scratch buffer.
3554 2012-01-13 Pedro Alves <palves@redhat.com>
3556 * server.c (attach_inferior): Clear `cont_thread'.
3558 2012-01-13 Pedro Alves <palves@redhat.com>
3560 * server.c (main): Avoid infinite loop while detaching/killing
3563 2012-01-09 Doug Evans <dje@google.com>
3565 * server.c (start_inferior): Set last_ptid in --wrapper case.
3567 2012-01-06 Yao Qi <yao@codesourcery.com>
3569 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3571 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3573 2012-01-04 Yao Qi <yao@codesourcery.com>
3575 * tracepoint.c (cmd_qtdp): Print debug message
3576 for static tracepoint.
3578 2012-01-04 Yao Qi <yao@codesourcery.com>
3580 * tracepoint.c (trace_vdebug): Differentiate debug message
3581 between gdbserver and IPA.
3583 2012-01-03 Yao Qi <yao@codesourcery.com>
3585 * tracepoint.c (tracepoint_was_hit): Don't collect for
3588 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3590 * terminal.h: Reformat copyright header.
3592 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3594 * server.c (gdbserver_version): Update copyright year.
3595 * gdbreplay.c (gdbreplay_version): Likewise.
3597 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3599 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3602 2011-12-18 Hui Zhu <teawater@gmail.com>
3603 * linux-low.c (linux_create_inferior): Save return value to ret.
3605 2011-12-18 Hui Zhu <teawater@gmail.com>
3607 * linux-low.c (linux_create_inferior): Save return value to ret.
3609 2011-12-16 Doug Evans <dje@google.com>
3611 * linux-low.c (linux_create_inferior): If stdio connection,
3612 redirect stdin from /dev/null, stdout to stderr.
3613 * remote-utils.c (remote_is_stdio): New static global.
3614 (remote_connection_is_stdio): New function.
3615 (remote_prepare): Handle stdio connection.
3616 (remote_open): Ditto.
3617 (remote_close): Don't close stdin for stdio connections.
3618 (read_prim,write_prim): New functions. Replace all calls to
3619 read/write to these.
3620 * server.c (main): Watch for "-" argument. Move call to
3621 remote_prepare before start_inferior.
3622 * server.h (STDIO_CONNECTION_NAME): New macro.
3623 (remote_connection_is_stdio): Declare.
3625 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3626 in debugging output.
3628 2011-12-15 Yao Qi <yao@codesourcery.com>
3630 * tracepoint.c: Include sys/syscall.h.
3631 (gdb_ust_thread): Remove preprocessor conditional.
3633 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3635 * linux-low.c (linux_detach_one_lwp): Call
3636 the_low_target.prepare_to_resume before detaching.
3638 2011-12-14 Yao Qi <yao@codesourcery.com>
3640 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3643 2011-12-14 Yao Qi <yao@codesourcery.com>
3645 * i386-low.c (i386_low_stopped_data_address): Initialize local
3648 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3652 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3653 DR_CONTROL unless necessary. Extend comments.
3654 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3655 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3657 2011-12-13 Yao Qi <yao@codesourcery.com>
3659 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3661 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3663 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3665 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3666 Print new debug message for such case.
3668 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3670 Fix overlapping memcpy.
3671 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3672 the read_inferior_memory transfer.
3673 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3674 write_inferior_memory transfer.
3675 (set_fast_tracepoint_jump): New variable buf. Use it for the
3676 read_inferior_memory and write_inferior_memory transfers.
3677 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3678 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3679 Use it for the write_inferior_memory transfer.
3680 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3683 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3685 * linux-low.c (fetch_register, store_register): Make code
3686 consistent, fix formatting.
3688 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3690 * linux-low.c (usr_store_inferior_registers): Factor out code
3691 to handle individual registers into...
3692 (store_register): ... this new function.
3694 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3696 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3697 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3698 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3699 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3700 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3701 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3702 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3703 (srv_xmlfiles): Add new XML files.
3705 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3707 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3708 (init_registers_s390_linux32v1): Add prototype.
3709 (init_registers_s390_linux32v2): Likewise.
3710 (init_registers_s390_linux64v1): Likewise.
3711 (init_registers_s390_linux64v2): Likewise.
3712 (init_registers_s390x_linux64v1): Likewise.
3713 (init_registers_s390x_linux64v2): Likewise.
3714 (s390_num_regs): Increment to 52.
3715 (s390_regmap): Add orig_r2 register.
3716 (s390_num_regs_3264): Increment to 68.
3717 (s390_regmap_3264): Add orig_r2 register.
3718 (s390_collect_ptrace_register): Handle orig_r2 register.
3719 (s390_supply_ptrace_register): Likewise.
3720 (s390_fill_last_break): New function.
3721 (s390_store_last_break): Likewise.
3722 (s390_fill_system_call): New function.
3723 (s390_store_system_call): Likewise.
3724 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3726 (s390_check_regset): New function.
3727 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3728 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3729 Update target_regsets for available register sets.
3731 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3732 Jan Kratochvil <jan.kratochvil@redhat.com>
3734 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3735 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3737 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3738 * linux-low.h (struct process_info_private): New member r_debug.
3739 * server.c (handle_qxfer_libraries): Call
3740 the_target->qxfer_libraries_svr4.
3741 (handle_qxfer_libraries_svr4): New function.
3742 (qxfer_packets): New entry "libraries-svr4".
3743 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3744 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3745 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3746 PACKET_qXfer_libraries_svr4.
3748 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3750 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3751 PSW address/mask between 8-byte and 16-byte formats.
3752 (s390_supply_ptrace_register): Likewise.
3753 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3754 basic addressing mode bit.
3756 2011-11-24 Stan Shebs <stan@codesourcery.com>
3758 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3760 2011-11-17 Stan Shebs <stan@codesourcery.com>
3762 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3763 (tracing_start_time): New global.
3764 (tracing_stop_time): New global.
3765 (tracing_user_name): New global.
3766 (tracing_notes): New global.
3767 (tracing_stop_note): New global.
3768 (cmd_qtstart): Set traceframe_usage, start_time.
3769 (stop_tracing): Set stop_time.
3770 (cmd_qtstatus): Report additional status.
3771 (cmd_qtp): New function.
3772 (handle_tracepoint_query): Call it.
3773 (cmd_qtnotes): New function.
3774 (handle_tracepoint_general_set): Call it.
3775 (get_timestamp): Rename from tsv_get_timestamp.
3777 2011-11-14 Stan Shebs <stan@codesourcery.com>
3778 Kwok Cheung Yeung <kcy@codesourcery.com>
3780 * linux-x86-low.c (small_jump_insn): New.
3781 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3782 trampoline and error message, build a trampoline and issue a small
3783 jump instruction to it.
3784 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3785 trampoline and error message.
3786 (x86_get_min_fast_tracepoint_insn_len): New.
3787 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3788 * linux-low.h (struct linux_target_ops): Add arguments to
3789 install_fast_tracepoint_jump_pad operation, add new operation.
3790 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3792 (linux_get_min_fast_tracepoint_insn_len): New function.
3793 (linux_target_op): Add new operation.
3794 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3795 (gdb_trampoline_buffer_end): Ditto.
3796 (gdb_trampoline_buffer_error): Ditto.
3797 (struct ipa_sym_addresses): Add fields for new IPA variables.
3798 (symbol_list): Add entries for new IPA variables.
3799 (struct tracepoint): Add fields to hold the address range of the
3800 trampoline used by the tracepoint.
3801 (trampoline_buffer_head): New static variable.
3802 (trampoline_buffer_tail): Ditto.
3803 (claim_trampoline_space): New function.
3804 (have_fast_tracepoint_trampoline_buffer): New function.
3805 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3807 (install_fast_tracepoint): Ditto, also add error buffer argument.
3808 (cmd_qtminftpilen): New function.
3809 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3810 (fast_tracepoint_from_trampoline_address): New function.
3811 (fast_tracepoint_collecting): Handle trampoline as part of jump
3813 (set_trampoline_buffer_space): New function.
3814 (initialize_tracepoint): Initialize new IPA variables.
3815 * target.h (struct target_ops): Add arguments to
3816 install_fast_tracepoint_jump_pad operation, add new
3817 get_min_fast_tracepoint_insn_len operation.
3818 (target_get_min_fast_tracepoint_insn_len): New.
3819 (install_fast_tracepoint_jump_pad): Add arguments.
3820 * server.h (IPA_BUFSIZ): Define.
3821 * linux-i386-ipa.c: Include extra header files.
3822 (initialize_fast_tracepoint_trampoline_buffer): New function.
3823 (initialize_low_tracepoint): Call it.
3824 * server.h (set_trampoline_buffer_space): Declare.
3825 (claim_trampoline_space): Ditto.
3826 (have_fast_tracepoint_trampoline_buffer): Ditto.
3828 2011-11-14 Yao Qi <yao@codesourcery.com>
3830 * server.c (handle_query): Handle InstallInTrace for qSupported.
3831 * tracepoint.c (add_tracepoint): Sort list.
3832 (install_tracepoint, download_tracepoint): New.
3833 (cmd_qtdp): Call them to install and download tracepoints.
3834 (sort_tracepoints): Removed.
3835 (cmd_qtstart): Update.
3837 2011-11-14 Yao Qi <yao@codesourcery.com>
3839 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3840 * mem-break.h: Declare.
3841 * tracepoint.c (cmd_qtstart): Move some code to ...
3842 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3844 (download_tracepoints): Move some code to ...
3845 (download_tracepoint_1): ... here. New.
3847 2011-11-08 Yao Qi <yao@codesourcery.com>
3849 * remote-utils.c (relocate_instruction): A comment fix.
3851 2011-11-07 Joel Brobecker <brobecker@adacore.com>
3853 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3854 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3855 dr_status_mirror and dr_control_mirror from debug_reg_state.
3856 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3857 (i386_initial_stuff): Remove use of deleted globals.
3858 (i386_get_thread_context, i386_set_thread_context,
3859 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3860 from debug_reg_state.
3862 2011-11-05 Yao Qi <yao@codesourcery.com>
3864 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3865 address as TPOINT's.
3867 2011-11-02 Stan Shebs <stan@codesourcery.com>
3869 * tracepoint.c (agent_mem_read_string): New function.
3870 (eval_agent_expr): Call it for tracenz.
3871 * server.c (handle_query): Report support for tracenz.
3873 2011-11-02 Yao Qi <yao@codesourcery.com>
3875 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3877 2011-11-02 Yao Qi <yao@codesourcery.com>
3879 * target.h: Fix a typo in comment.
3881 2011-10-31 Pedro Alves <pedro@codesourcery.com>
3883 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3884 clobber the breakpoints' shadows with fast tracepoint jumps.
3885 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3886 * target.c (write_inferior_memory): Also pass MYADDR down to
3889 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3891 * configure.ac: Check support for personality routine.
3892 * configure: Regenerate.
3893 * config.in: Likewise.
3894 * linux-low.c: Include <sys/personality.h>.
3895 Define ADDR_NO_RANDOMIZE if necessary.
3896 (linux_create_inferior): Disable address space randomization when
3897 forking inferior, if requested.
3898 (linux_supports_disable_randomization): New function.
3899 (linux_target_ops): Install it.
3900 * server.h (disable_randomization): Declare.
3901 * server.c (disable_randomization): New global variable.
3902 (handle_general_set): Handle QDisableRandomization.
3903 (handle_query): Likewise for qSupported.
3904 (main): Support --disable-randomization and --no-disable-randomization
3905 command line arguments.
3906 * target.h (struct target_ops): Add supports_disable_randomization.
3907 (target_supports_disable_randomization): New macro.
3909 2011-09-29 Mike Frysinger <vapier@gentoo.org>
3911 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3913 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3914 [!PT_GETDSBT] (target_loadmap): New definition.
3915 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3916 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3917 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3918 and PT_GETDSBT to LINUX_LOADMAP.
3919 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3920 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3922 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3924 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3925 (arm_linux_hwbp_cap): New static variable.
3926 (arm_linux_get_hwbp_cap): Replace by ...
3927 (arm_linux_init_hwbp_cap): ... this new function.
3928 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3929 (arm_linux_get_hw_watchpoint_count): Likewise.
3930 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3931 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3932 (arm_prepare_to_resume): Use perror_with_name instead of error.
3934 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3936 * linux-arm-low.c: Include <signal.h>.
3937 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3938 (struct arm_linux_hwbp_cap): New data type.
3939 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3940 (struct arm_linux_hw_breakpoint): New data type.
3941 (MAX_BPTS, MAX_WPTS): Define.
3942 (struct arch_process_info, struct arch_lwp_info): New data types.
3943 (arm_linux_get_hwbp_cap): New function.
3944 (arm_linux_get_hw_breakpoint_count): Likewise.
3945 (arm_linux_get_hw_watchpoint_count): Likewise.
3946 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3947 (arm_hwbp_control_initialize): Likewise.
3948 (arm_hwbp_control_is_enabled): Likewise.
3949 (arm_hwbp_control_is_initialized): Likewise.
3950 (arm_hwbp_control_disable): Likewise.
3951 (arm_linux_hw_breakpoint_equal): Likewise.
3952 (arm_linux_hw_point_initialize): Likewise.
3953 (struct update_registers_data): New data structure.
3954 (update_registers_callback: New function.
3955 (arm_insert_point): Likewise.
3956 (arm_remove_point): Likewise.
3957 (arm_stopped_by_watchpoint): Likewise.
3958 (arm_stopped_data_address): Likewise.
3959 (arm_new_process): Likewise.
3960 (arm_new_thread): Likewise.
3961 (arm_prepare_to_resume): Likewise.
3962 (the_low_target): Register arm_insert_point, arm_remove_point,
3963 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3964 arm_new_thread, and arm_prepare_to_resume.
3966 2011-09-15 Stan Shebs <stan@codesourcery.com>
3968 * server.h (struct emit_ops): Add compare-goto fields.
3969 * tracepoint.c (gdb_agent_op_sizes): New table.
3970 (emit_eq_goto): New function.
3971 (emit_ne_goto): New function.
3972 (emit_lt_goto): New function.
3973 (emit_le_goto): New function.
3974 (emit_gt_goto): New function.
3975 (emit_ge_goto): New function.
3976 (is_goto_target): New function.
3977 (compile_bytecodes): Recognize special cases of compare-goto
3978 combinations and call specialized emitters for them.
3979 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3980 (amd64_emit_ne_goto): New function.
3981 (amd64_emit_lt_goto): New function.
3982 (amd64_emit_le_goto): New function.
3983 (amd64_emit_gt_goto): New function.
3984 (amd64_emit_ge_goto): New function.
3985 (amd64_emit_ops): Add the new functions.
3986 (i386_emit_eq_goto): New function.
3987 (i386_emit_ne_goto): New function.
3988 (i386_emit_lt_goto): New function.
3989 (i386_emit_le_goto): New function.
3990 (i386_emit_gt_goto): New function.
3991 (i386_emit_ge_goto): New function.
3992 (i386_emit_ops): Add the new functions.
3994 2011-09-08 Stan Shebs <stan@codesourcery.com>
3996 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3997 (i386_emit_epilogue): Restore %ebx.
3999 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4001 * server.c (step_thread): Remove definition.
4002 (process_serial_event): Don't handle Hs.
4003 * server.h (step_thread): Remove declaration.
4004 * target.c (set_desired_inferior): Remove use of step_thread.
4006 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4008 * linux-low.c: Include linux-procfs.h.
4009 (linux_attach_lwp_1): Update comments.
4010 (linux_attach): Scan for existing threads when attaching to a
4011 process that is the tgid.
4012 * Makefile.in: Update dependencies.
4014 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4016 * configure.srv: Add linux-procfs.o dependencies.
4018 2011-08-14 Yao Qi <yao@codesourcery.com>
4020 * target.h (struct target_ops): Fix indent.
4021 * win32-low.c (win32_target_ops): Fix comment.
4023 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4024 Yao Qi <yao@codesourcery.com>
4026 * Makefile.in (clean): Remove tic6x-*.c files.
4027 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4028 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4029 (tic6x-c64xp-linux.c): Likewise.
4030 * configure.srv: Add support for tic6x-*-uclinux.
4031 * linux-tic6x-low.c: New.
4032 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4034 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4035 Yao Qi <yao@codesourcery.com>
4037 * target.h (struct target_ops): Add read_loadmap.
4038 * linux-low.c (struct target_loadseg): New type.
4039 (struct target_loadmap): New type.
4040 (linux_read_loadmap): New function.
4041 (linux_target_ops): Add linux_read_loadmap.
4042 * server.c (handle_query): Support qXfer:fdpic:read packet.
4043 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4046 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4048 * win32-low.c: Include <stdint.h>.
4050 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4052 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4053 to the inferior here.
4054 (i386_remove_aligned_watchpoint): Ditto.
4055 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4056 fit part of the watchpoint in the debug registers.
4057 (i386_update_inferior_debug_regs): New.
4058 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4059 registers, and only update the inferior on success.
4060 (i386_low_remove_watchpoint): Ditto.
4062 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4064 * linux-low.c (compare_ints, unique, list_threads, show_process,
4065 linux_core_of_thread): Delete.
4066 (linux_target_ops): Change linux_core_of_thread to
4067 linux_common_core_of_thread.
4068 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4069 * utils.c (malloc_failure): Change type of argument.
4070 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4071 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4072 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4073 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4074 (IPA_OBJS): Add common-utils-ipa.o.
4075 (ptid_h, linux_osdata_h): New macros.
4076 (server_h): Add common/common-utils.h, common/xml-utils.h,
4077 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4079 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4080 ptid.o, buffer.o): New rules.
4081 (linux-low.o): Add common/linux-osdata.h as a dependency.
4082 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4083 * configure.ac: Add AC_HEADER_DIRENT check.
4084 * config.in: Regenerate.
4085 * configure: Regenerate.
4086 * remote-utils.c (xml_escape_text): Delete.
4087 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4088 buffer_xml_printf): Move to common/buffer.c.
4089 * server.c (main): Remove call to initialize_inferiors.
4090 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4091 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4092 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4093 internal_error, gdb_assert, gdb_assert_fail): Delete.
4094 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4095 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4097 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4098 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4099 initialize_inferiors): Delete.
4101 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4103 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4106 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4108 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4110 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4112 2011-05-26 Yao Qi <yao@codesourcery.com>
4114 * Makefile.in (thread-db.o): Track dependence to
4115 common/gdb_thread_db.h.
4116 * thread-db.c: include gdb_thread_db.h from right place.
4118 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4120 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4121 __FILE__ and __LINE__ to internal_error.
4123 2011-05-13 Doug Evans <dje@google.com>
4125 * thread-db.c (try_thread_db_load_from_sdir): New function.
4126 (try_thread_db_load_from_dir): New function.
4127 (thread_db_load_search): Handle $sdir, ignore $pdir.
4128 Remove trying of system directories if search of
4129 libthread-db-search-path fails, that is now done via $sdir.
4131 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4133 * server.c (handle_query): Add EnableDisableTracepoints to the list
4134 of supported features.
4135 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4137 (cmd_qtenable_disable): New.
4138 (cmd_qtstart): Install tracepoints even if disabled.
4139 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4140 receiving a QTEnable or QTDisable packet.
4141 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4142 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4144 (gdb_probe): Skip data collection if static tracepoint is disabled.
4146 2011-05-10 Doug Evans <dje@google.com>
4148 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4150 2011-05-04 Doug Evans <dje@google.com>
4152 * linux-low.c (linux_join): Skip process lookup.
4153 * spu-low.c (spu_join): Ditto.
4154 * server.c (join_inferiors_callback): Delete.
4155 (process_serial_event): For 'D' packet (detach) call join_inferior
4158 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4160 * README: Don't mention xscale*-*-linux*.
4161 * configure.srv (xscale*-*-linux*): Don't handle target.
4163 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4165 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4167 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4168 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4169 (i386_emit_void_call_2): Likewise.
4171 2011-04-26 Yao Qi <yao@codesourcery.com>
4173 * linux-low.c: Move common macros to linux-ptrace.h.
4174 Include linux-ptrace.h.
4175 * Makefile.in (linux_ptrace_h): New.
4176 (linux-low.o): Depends on linux-ptrace.h.
4178 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4180 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4181 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4182 (remote_prepare): New function with most of the TCP code from ...
4183 (remote_open): ... here. Detect PORT here unconditionally. Move also
4184 setting transport_is_reliable.
4185 * server.c (run_once): New variable.
4186 (gdbserver_usage): Document it.
4187 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4188 the first run if RUN_ONCE.
4189 * server.h (run_once, remote_prepare): New declarations.
4191 2011-04-19 Tom Tromey <tromey@redhat.com>
4193 * win32-low.c (handle_load_dll): Remove duplicate "the".
4195 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4197 Remove support for old Cygwin 1.5 versions.
4198 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4199 function to avoid warning.
4200 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4203 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4205 * gdbserver/server.h (Macro _): Define it if not available.
4207 2011-03-14 Michael Snyder <msnyder@vmware.com>
4209 * hostio.c (handle_close): Remove unnecessary null test.
4211 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4213 * Makefile.in (maintainer-clean realclean distclean): Remove
4214 "make ... subdir_do" command.
4216 2011-03-10 Michael Snyder <msnyder@vmware.com>
4218 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4220 * server.c (handle_v_run): Free alloced buffer on early return.
4222 2011-03-09 Yao Qi <yao@codesourcery.com>
4225 2011-03-04 Yao Qi <yao@codesourcery.com>
4227 * Makefile.in: Remove GNU make feature --directory.
4229 2011-03-05 Yao Qi <yao@codesourcery.com>
4231 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4232 (subdir_do): New make target. Copied from gdb/Makefile.
4233 (maintainer-clean, realclean, distclean, clean): Call corresponding
4234 make targets in common/Makefile.
4236 2011-02-11 Yao Qi <yao@codesourcery.com>
4238 * configure.ac: Call AC_PROG_RANLIB.
4239 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4240 * configure: Regenerate.
4242 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4244 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4246 2011-03-06 Yao Qi <yao@codesourcery.com>
4248 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4250 2011-03-05 Yao Qi <yao@codesourcery.com>
4252 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4253 (subdir_do): New make target. Copied from gdb/Makefile.
4254 (maintainer-clean, realclean, distclean, clean): Call corresponding
4255 make targets in common/Makefile.
4257 2011-03-04 Yao Qi <yao@codesourcery.com>
4259 * Makefile.in: Remove GNU make feature --directory.
4261 2011-03-04 Michael Snyder <msnyder@vmware.com>
4263 * server.c (queue_stop_reply): Call xmalloc not malloc.
4265 2011-03-02 Michael Snyder <msnyder@vmware.com>
4267 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4269 2011-02-28 Michael Snyder <msnyder@vmware.com>
4271 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4272 (cmd_qtframe): Ditto.
4273 (cmd_qtbuffer): Ditto.
4274 (cmd_bigqtbuffer): Ditto.
4276 * utils.c (decimal2str): Initialize 'width' to nine, then
4279 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4281 * hostio.c (require_data): Free *data, not data.
4283 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4285 * hostio.c (require_data): Use free, not xfree.
4287 2011-02-27 Michael Snyder <msnyder@vmware.com>
4289 * server.c (handle_query): Discard unused value.
4291 * hostio.c (require_data): Free malloc memory before returning
4294 2011-02-26 Michael Snyder <msnyder@vmware.com>
4296 * linux-low.c (list_threads): Call closedir for dirent.
4298 2011-02-27 Michael Snyder <msnyder@vmware.com>
4300 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4301 a case statement falls through.
4303 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4305 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4308 2011-02-26 Michael Snyder <msnyder@vmware.com>
4310 * utils.c (decimal2str): Eliminate dead code and dead param.
4311 (pulongest): Drop dead param from call to decimal2str.
4314 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4316 Revert the following patch (not approved yet):
4317 2011-02-21 Hui Zhu <teawater@gmail.com>
4318 * tracepoint.c (tp_printf): New function.
4319 (eval_agent_expr): Handle gdb_agent_op_printf.
4321 2011-02-21 Hui Zhu <teawater@gmail.com>
4323 * tracepoint.c (tp_printf): New function.
4324 (eval_agent_expr): Handle gdb_agent_op_printf.
4326 2011-02-18 Tom Tromey <tromey@redhat.com>
4328 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4329 (tracepoint.o): Likewise.
4330 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4331 (gdb_agent_op_names): Likewise.
4333 2011-02-18 Tom Tromey <tromey@redhat.com>
4335 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4336 gdb_agent_op_rot>: New constants.
4337 (gdb_agent_op_names): Add pick and roll.
4338 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4341 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4343 * aclocal.m4: Regenerated with aclocal-1.11.1.
4345 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4347 * server.c (handle_qxfer_traceframe_info): New.
4348 (qxfer_packets): Register "traceframe-info".
4349 (handle_query): Report support for qXfer:traceframe-info:read+.
4350 * tracepoint.c (match_blocktype): New.
4351 (traceframe_find_block_type): Rename to ...
4352 (traceframe_walk_blocks): ... this. Add callback filter argument,
4354 (traceframe_find_block_type): New, reimplemented on top of
4355 traceframe_walk_blocks.
4356 (build_traceframe_info_xml): New.
4357 (traceframe_read_info): New.
4358 * server.h (traceframe_read_info): Declare.
4360 2011-02-11 Yao Qi <yao@codesourcery.com>
4362 * configure.ac: Call AC_PROG_RANLIB.
4363 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4364 * configure: Regenerate.
4366 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4368 * server.c (gdb_read_memory): Change return semantics to allow
4370 (handle_search_memory_1): Adjust.
4371 (process_serial_event) <'m' packet>: Handle partial transfers.
4372 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4374 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4376 * regcache.c (init_register_cache): Initialize
4377 regcache->register_status.
4378 (free_register_cache): Release regcache->register_status.
4379 (regcache_cpy): Copy register_status.
4380 (registers_to_string): Print 'x's for unavailable registers.
4381 (supply_register): Mark the register's status valid or
4382 unavailable, depending on whether a buffer was passed in or not.
4383 (supply_register_zeroed): New.
4384 (supply_regblock): Mark the registers' status valid or
4385 unavailable, depending on whether a buffer was passed in or not.
4386 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4387 (struct regcache): New `register_status' field.
4388 (supply_register_zeroed): Declare.
4389 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4390 supply_register_zeroed, rather than passing a NULL buffer to
4392 * tracepoint.c (fetch_traceframe_registers): Update comment.
4394 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4396 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4399 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4401 * server.h (decode_xfer_write): Change prototype.
4402 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4403 and don't extract the annex here.
4404 * server.c (decode_xfer_read): Remove `annex' parameter,
4405 and don't extract the annex here.
4407 (struct qxfer): New.
4408 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4409 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4410 (handle_qxfer_statictrace): New functions, abstracted out from
4411 handle_query, and made to use the struct qxfer interface.
4412 (handle_threads_qxfer_proper): Rename to ...
4413 (handle_qxfer_threads_proper): ... this.
4414 (handle_threads_qxfer): Rename to ...
4415 (handle_qxfer_threads): ... this. Adjust.
4416 (qxfer_packets): New array.
4417 (handle_qxfer): New function.
4418 (handle_query): Use handle_qxfer.
4420 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4422 * gdbreplay.c: Shorten lines of >= 80 columns.
4423 * linux-low.c: Ditto.
4424 * linux-ppc-low.c: Ditto.
4425 * linux-s390-low.c: Ditto.
4426 * linux-sparc-low.c: Ditto.
4427 * linux-x86-low.c: Ditto.
4428 * linux-xtensa-low.c: Ditto.
4429 * mem-break.c: Ditto.
4431 * regcache.h: Ditto.
4432 * remote-utils.c: Ditto.
4435 * thread-db.c: Ditto.
4436 * tracepoint.c: Ditto.
4438 * win32-low.h: Ditto.
4440 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4442 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4445 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4447 * server.c (gdbserver_version): Update copyright year in version
4449 * gdbreplay.c (gdbreplay_version): Ditto.
4451 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4453 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4454 * linux-bfin-low.c: New file.
4455 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4456 PT_DATA_ADDR for BFIN targets.
4457 * Makefile.in (SFILES): Add linux-bfin-low.c.
4458 (clean): Remove reg-bfin.c.
4459 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4460 * README: Mention supported Blackfin targets.
4462 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4464 * .gitignore: New file.
4466 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4468 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4470 2010-10-22 Jie Zhang <jie@codesourcery.com>
4472 * Makefile.in: Add FLAGS_TO_PASS variable.
4473 (install): Remove dependency of install-only and recursively
4474 invoke make for install-only.
4476 2010-10-04 Doug Evans <dje@google.com>
4478 * Makefile.in (uninstall): Use $(DESTDIR).
4480 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4484 * linux-x86-low.c (compat_siginfo_from_siginfo)
4485 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4486 si_code is < 0. Check for si_code == SI_TIMER before checking for
4489 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4491 * lynx-i386-low.c: New file.
4492 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4494 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4496 * lynx-low.c (ptrace_request_to_str): Remove handling for
4497 request values that have been removed in LynxOS 5.x.
4499 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4501 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4504 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4506 * configure.ac: Add --enable-inprocess-agent option.
4507 * configure: Rebuilt.
4509 2010-09-06 Yao Qi <yao@codesourcery.com>
4511 * linux-low.c (linux_kill): Remove unused variable.
4512 (linux_stabilize_threads): Likewise.
4513 * server.c (start_inferior): Likewise.
4514 (queue_stop_reply_callback): Likewise.
4515 * tracepoint.c (do_action_at_tracepoint): Likewise.
4517 2010-09-06 Yao Qi <yao@codesourcery.com>
4519 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4522 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4524 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4526 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4528 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4531 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4533 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4534 gdbserver/lynx-ppc-low.c: New files.
4535 * Makefile.in (lynx_low_h): New variable.
4536 (lynx-low.o, lynx-ppc-low.o): New rules.
4537 * configure.ac: On LynxOS, link with -lnetinet.
4538 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4539 * configure: regenerate.
4541 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4543 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4544 * configure.ac: Add check for vasprintf and vsnprintf.
4545 * configure, config.in: Regenerate.
4546 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4548 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4550 * gdbreplay.c: Move include of alloca.h up, next to include of
4552 * server.h: Add include of malloc.h.
4553 * mem-break.c: Remove include of malloc.h.
4554 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4556 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4558 * Makefile.in (memmem.o): Build with -Wno-error.
4560 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4562 * utils.c (xsnprintf): Make non-static.
4563 * server.h: Add xsnprintf declaration.
4564 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4565 replace calls to snprintf by calls to xsnprintf throughout.
4567 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4569 * configure.ac: Add configure check for alloca.
4570 * configure, config.in: Regenerate.
4571 * server.h: Include alloca.h if it exists.
4572 * gdbreplay.c: Include alloca.h if it exists.
4574 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4576 * linux-low.c (__SIGRTMIN): Define if not already defined.
4577 (linux_create_inferior): Check for __ANDROID__ rather than
4579 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4580 are already deferred.
4581 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4582 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4583 stopped and already has a pending signal to report.
4584 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4585 a pending signal to report or is moving out of a jump pad.
4586 (linux_init_signals): Check for __ANDROID__ rather than
4589 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4591 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4592 debug_threads check. Avoid a linear search when not doing debug
4595 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4597 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4598 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4599 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4600 (process_event): Change local fd's type to gdb_fildes_t.
4601 (create_file_handler): Adjust prototype.
4602 (delete_file_handler): Adjust prototype.
4603 (handle_file_event): Adjust prototype. Use pfildes.
4604 (create_file_event): Adjsut prototype.
4605 * remote-utils.c (remote_desc, listen_desc): Change type to
4607 * server.h: New gdb_fildes_t typedef.
4608 [USE_WIN32API]: Include winsock2.h.
4609 (delete_file_handler, add_file_handler): Adjust prototypes.
4611 * utils.c (pfildes): New.
4613 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4615 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4616 * configure: Regenerate.
4618 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4620 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4621 (linux_done_accessing_memory): ... this.
4622 (linux_target_ops): Adjust.
4623 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4624 * nto-low.c (nto_target_ops): Adjust comment.
4625 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4626 * spu-low.c (spu_target_ops): Adjust comment.
4627 * target.h (target_ops): Rename unprepare_to_access_memory field
4628 to done_accessing_memory.
4629 (unprepare_to_access_memory): Rename to ...
4630 (done_accessing_memory): ... this.
4632 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4634 * linux-low.c (linux_prepare_to_access_memory): New.
4635 (linux_unprepare_to_access_memory): New.
4636 (linux_target_ops): Install them.
4637 * server.c (read_memory): Rename to ...
4638 (gdb_read_memory): ... this. Use
4639 prepare_to_access_memory/prepare_to_access_memory.
4640 (write_memory): Rename to ...
4641 (gdb_write_memory): ... this. Use
4642 prepare_to_access_memory/prepare_to_access_memory.
4643 (handle_search_memory_1): Adjust.
4644 (process_serial_event): Adjust.
4645 * target.h (struct target_ops): New fields
4646 prepare_to_access_memory and unprepare_to_access_memory.
4647 (prepare_to_access_memory, unprepare_to_access_memory): New.
4648 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4649 prepare_to_access_memory/prepare_to_access_memory.
4650 * nto-low.c (nto_target_ops): Adjust.
4651 * spu-low.c (spu_target_ops): Adjust.
4652 * win32-low.c (win32_target_ops): Adjust.
4654 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4656 * Makefile.in (WARN_CFLAGS): Get it from configure.
4657 (WERROR_CFLAGS): New.
4658 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4659 * configure.ac: Introduce --enable-werror, which adds -Werror to
4660 the compiler command line. Enabled by default. Disable with
4661 --disable-werror. Add -Wdeclaration-after-statement
4662 Wpointer-arith and -Wformat-nonliteral to warning flags.
4663 * configure: Regenerate.
4665 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4667 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4669 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4671 * gdbreplay.c (remote_error): New.
4673 (expect): Use gdbchar. Check for error reading from GDB.
4674 Clarify sync error output.
4675 (play): Check for errors writing to GDB.
4676 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4677 * remote-utils.c (getpkt): Check for errors writing to the remote
4680 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4682 * linux-low.c (linux_wait_1): Move non-debugging code out of
4683 `debug_threads' control.
4685 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4687 * linux-low.c (linux_wait_1): Don't set last_status here.
4688 * server.c (push_event, queue_stop_reply_callback): Assert we're
4689 not pushing a TARGET_WAITKIND_IGNORE event.
4690 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4691 (myresume, handle_target_event): Set the thread's last_resume_kind
4692 and last_status from the target returned status.
4694 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4698 * linux-x86-low.c (update_debug_registers_callback): New.
4699 (i386_dr_low_set_addr): Use it.
4700 (i386_dr_low_get_addr): New.
4701 (i386_dr_low_set_control): Use update_debug_registers_callback.
4702 (i386_dr_low_get_control): New.
4703 (i386_dr_low_get_status): Adjust.
4704 * linux-low.c (linux_stop_lwp): New.
4705 * linux-low.h (linux_stop_lwp): Declare.
4707 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4708 argument instead of a i386_debug_reg_state.
4709 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4710 a i386_debug_reg_state.
4711 (i386_insert_aligned_watchpoint): Adjust.
4712 (i386_remove_aligned_watchpoint): Adjust.
4713 (i386_low_stopped_data_address): Read the debug registers from the
4714 inferior instead of from the mirrors.
4715 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4716 (i386_dr_low_get_addr): Declare.
4717 (i386_dr_low_get_control): Declare.
4718 (i386_dr_low_get_status): Change prototype.
4720 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4721 (i386_dr_low_get_addr): New.
4722 (i386_dr_low_get_control): New.
4723 (i386_dr_low_get_status): Adjust prototype. Return
4725 (i386_initial_stuff): Clear dr_status_mirror and
4727 (i386_get_thread_context): Adjust.
4728 (i386_set_thread_context): Adjust.
4729 (i386_thread_added): Adjust.
4731 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4733 * linux-low.h (linux_thread_area): Delete declaration.
4735 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4737 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4738 after its termination.
4740 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4742 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4743 (gdb_wants_all_stopped): Delete.
4744 (linux_wait_1): Don't call them.
4745 * server.c (handle_v_cont): Tag all threads as want-stopped.
4746 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4747 stopped as "client-wants-stopped".
4749 2010-07-31 Pedro Alves <pedro@codesourcery.com>
4751 * Makefile.in (signals_h): New.
4752 (server_h): Depend on it.
4753 (server.o): Don't depend on $(signals_def).
4754 (signals.o): Depend on $(signals_def).
4756 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4758 * Makefile.in (signals_def): New.
4759 (server_h): Append include/gdb/signals.h and signals_def.
4760 (server.o): Append signals_def.
4762 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4764 * server.c (handle_target_event): Use target_signal_to_host for
4765 resume_info.sig initialization.
4766 * target.h (struct thread_resume) <sig>: New comment.
4768 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4770 * server.c (handle_query): strcpy() the returned string from paddress()
4771 instead of sprintf().
4772 * utils.c (paddress): Return phex_nz().
4774 2010-07-07 Joel Brobecker <brobecker@adacore.com>
4776 * server.c (handle_v_cont): Call mourn_inferior if process
4778 (myresume): Likewise.
4780 2010-07-01 Pedro Alves <pedro@codesourcery.com>
4782 Static tracepoints, and integration with UST.
4784 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4785 * mem-break.c (uninsert_all_breakpoints)
4786 (reinsert_all_breakpoints): New.
4787 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4788 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4789 (gdb_agent_ust_loaded, helper_thread_id)
4790 (gdb_agent_helper_thread_id): New macros.
4791 (struct ipa_sym_addresses): Add addr_ust_loaded,
4792 addr_helper_thread_id, addr_cmd_buf.
4793 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4794 (in_process_agent_loaded_ust): New.
4795 (write_e_ust_not_loaded): New.
4796 (maybe_write_ipa_ust_not_loaded): New.
4797 (struct collect_static_trace_data_action): New.
4798 (enum tracepoint_type) <static_tracepoint>: New.
4799 (struct tracepoint) <handle>: Mention static tracepoints.
4800 (struct static_tracepoint_ctx): New.
4801 (CMD_BUF_SIZE): New.
4802 (add_tracepoint_action): Handle static tracepoint actions.
4803 (unprobe_marker_at): New.
4804 (clear_installed_tracepoints): Handle static tracepoints.
4805 (cmd_qtdp): Handle static tracepoints.
4806 (probe_marker_at): New.
4807 (cmd_qtstart): Handle static tracepoints.
4808 (response_tracepoint): Handle static tracepoints.
4809 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4810 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4811 (get_context_regcache): Handle static tracepoints.
4812 (do_action_at_tracepoint): Handle static tracepoint actions.
4813 (traceframe_find_block_type): Handle static trace data blocks.
4814 (traceframe_read_sdata): New.
4815 (download_tracepoints): Download static tracepoint actions.
4816 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4817 (GDB_PROBE_NAME): New.
4822 (ust_marker_to_static_tracepoint): New.
4824 (collect_ust_data_at_tracepoint): New.
4825 (gdb_ust_probe): New.
4826 (UNIX_PATH_MAX, SOCK_DIR): New.
4827 (gdb_ust_connect_sync_socket): New.
4828 (resume_thread, stop_thread): New.
4829 (run_inferior_command): New.
4830 (init_named_socket): New.
4831 (gdb_ust_socket_init): New.
4832 (cstr_to_hexstr): New.
4834 (first_marker, next_marker): New.
4835 (response_ust_marker): New.
4836 (cmd_qtfstm, cmd_qtsstm): New.
4837 (unprobe_marker_at, probe_marker_at): New.
4838 (cmd_qtstmat, gdb_ust_thread): New.
4839 (gdb_ust_init): New.
4840 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4841 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4843 (x86_64_st_collect_regmap): New.
4844 (X86_64_NUM_ST_COLLECT_GREGS): New.
4845 (AMD64_RIP_REGNUM): New.
4846 (supply_static_tracepoint_registers): New.
4847 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4849 (i386_st_collect_regmap): New.
4850 (i386_NUM_ST_COLLECT_GREGS): New.
4851 (supply_static_tracepoint_registers): New.
4852 * server.c (handle_query): Handle qXfer:statictrace:read.
4853 <qSupported>: Report support for StaticTracepoints, and
4854 qXfer:statictrace:read features.
4855 * server.h (traceframe_read_sdata)
4856 (supply_static_tracepoint_registers): Declare.
4857 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4858 (unpack_varlen_hex): Include in IPA build.
4859 * Makefile.in (ustlibs, ustinc): New.
4860 (IPA_OBJS): Add remote-utils-ipa.o.
4861 ($(IPA_LIB)): Link -ldl and -lpthread.
4863 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4864 * config.in, configure: Regenerate.
4866 2010-06-20 Ian Lance Taylor <iant@google.com>
4867 Pedro Alves <pedro@codesourcery.com>
4869 * linux-x86-low.c (always_true): Delete.
4870 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4871 trying to fool the compiler with always_true.
4873 2010-06-20 Pedro Alves <pedro@codesourcery.com>
4875 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4876 conditions in gdbserver.
4878 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4880 * spu-low.c (spu_read_memory): Wrap around local store limit.
4881 (spu_write_memory): Likewise.
4883 2010-06-15 Pedro Alves <pedro@codesourcery.com>
4885 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4886 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4888 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4890 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4891 uses with LONGEST uses.
4893 2010-06-14 Stan Shebs <stan@codesourcery.com>
4894 Pedro Alves <pedro@codesourcery.com>
4898 * linux-x86-low.c: Include limits.h.
4903 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4904 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4905 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4906 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4907 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4908 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4909 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4910 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4911 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4912 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4913 (amd64_emit_void_call_2): New.
4914 (amd64_emit_ops): New.
4915 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4916 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4917 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4918 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4919 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4920 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4921 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4922 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4923 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4924 (i386_emit_stack_adjust, i386_emit_int_call_1)
4925 (i386_emit_void_call_2): New.
4926 (i386_emit_ops): New.
4927 (x86_emit_ops): New.
4928 (the_low_target): Install x86_emit_ops.
4929 * server.h (struct emit_ops): New.
4930 (get_raw_reg_func_addr): Declare.
4931 (current_insn_ptr, emit_error): Declare.
4932 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4933 (set_trace_state_variable_value): New defines.
4934 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4935 addr_get_trace_state_variable_value and
4936 addr_set_trace_state_variable_value.
4937 (symbol_list): New fields for get_raw_reg,
4938 get_trace_state_variable_value and set_trace_state_variable_value.
4939 (condfn): New typedef.
4940 (struct tracepoint): New field `compiled_cond'.
4941 (do_action_at_tracepoint): Clear compiled_cond.
4942 (get_trace_state_variable_value, set_trace_state_variable_value):
4944 (condition_true_at_tracepoint): If there's a compiled condition,
4946 (current_insn_ptr, emit_error): New globals.
4947 (struct bytecode_address): New.
4948 (get_raw_reg_func_addr): New.
4949 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4950 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4951 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4952 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4953 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4954 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4955 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4956 (compile_tracepoint_condition, compile_bytecodes): New.
4957 * target.h (emit_ops): Forward declare.
4958 (struct target_ops): New field emit_ops.
4959 (target_emit_ops): New.
4960 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4961 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4962 * linux-low.c (linux_emit_ops): New.
4963 (linux_target_ops): Install it.
4964 * linux-low.h (struct linux_target_ops): New field emit_ops.
4966 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4968 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4969 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4971 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4972 Stan Shebs <stan@codesourcery.com>
4974 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4975 (all): Depend on $(extra_libraries).
4976 (install-only): Install the IPA.
4977 (IPA_OBJS, IPA_LIB): New.
4978 (clean): Remove the IPA lib.
4979 (IPAGENT_CFLAGS): New.
4980 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4981 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4982 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4983 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4984 * configure.ac: Check for atomic builtins support in the compiler.
4985 (IPA_DEPFILES, extra_libraries): Define.
4986 * configure.srv (ipa_obj): Add description.
4987 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4988 (i[34567]86-*-linux*): Set ipa_obj.
4989 (x86_64-*-linux*): Set ipa_obj.
4990 * linux-low.c (stabilizing_threads): New.
4991 (supports_fast_tracepoints): New.
4992 (linux_detach): Stabilize threads before detaching.
4993 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4994 the lwp is either not stabilizing, or is moving out of a jump pad.
4995 (linux_fast_tracepoint_collecting): New.
4996 (maybe_move_out_of_jump_pad): New.
4997 (enqueue_one_deferred_signal): New.
4998 (dequeue_one_deferred_signal): New.
4999 (linux_wait_for_event_1): If moving out of a jump pad, defer
5000 pending signals to later.
5001 (linux_stabilize_threads): New.
5002 (linux_wait_1): Check if threads need moving out of jump pads, and
5004 (stuck_in_jump_pad_callback): New.
5005 (move_out_of_jump_pad_callback): New.
5007 (linux_resume_one_lwp): Handle moving out of jump pads.
5008 (linux_set_resume_request): Dequeue deferred signals.
5009 (need_step_over_p): Also step over fast tracepoint jumps.
5010 (start_step_over): Also uninsert fast tracepoint jumps.
5011 (finish_step_over): Also reinsert fast tracepoint jumps.
5012 (linux_install_fast_tracepoint_jump): New.
5013 (linux_target_ops): Install linux_stabilize_threads and
5014 linux_install_fast_tracepoint_jump_pad.
5015 * linux-low.h (linux_target_ops) <get_thread_area,
5016 install_fast_tracepoint_jump_pad>: New fields.
5017 (struct lwp_info) <collecting_fast_tracepoint,
5018 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5019 (linux_get_thread_area): Declare.
5020 * linux-x86-low.c (jump_insn): New.
5021 (x86_get_thread_area): New.
5022 (append_insns): New.
5024 (amd64_install_fast_tracepoint_jump_pad): New.
5025 (i386_install_fast_tracepoint_jump_pad): New.
5026 (x86_install_fast_tracepoint_jump_pad): New.
5027 (the_low_target): Install x86_get_thread_area and
5028 x86_install_fast_tracepoint_jump_pad.
5029 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5030 (struct fast_tracepoint_jump): New.
5031 (fast_tracepoint_jump_insn): New.
5032 (fast_tracepoint_jump_shadow): New.
5033 (find_fast_tracepoint_jump_at): New.
5034 (fast_tracepoint_jump_here): New.
5035 (delete_fast_tracepoint_jump): New.
5036 (set_fast_tracepoint_jump): New.
5037 (uninsert_fast_tracepoint_jumps_at): New.
5038 (reinsert_fast_tracepoint_jumps_at): New.
5039 (set_breakpoint_at): Use write_inferior_memory.
5040 (uninsert_raw_breakpoint): Use write_inferior_memory.
5041 (check_mem_read): Mask out fast tracepoint jumps.
5042 (check_mem_write): Mask out fast tracepoint jumps.
5043 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5044 (set_fast_tracepoint_jump): Declare.
5045 (delete_fast_tracepoint_jump)
5046 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5047 (reinsert_fast_tracepoint_jumps_at): Declare.
5048 * regcache.c: Don't compile many functions when building the
5049 in-process agent library.
5050 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5051 the register buffer in the heap.
5052 (free_register_cache): If the register buffer isn't owned by the
5053 regcache, don't free it.
5054 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5055 pre-existing register caches.
5056 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5058 (convert_ascii_to_int): : Constify `from' parameter type.
5059 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5060 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5061 the needed buffer in-place.
5062 (relocate_instruction): New.
5063 * server.c (handle_query) <qSymbols>: If the target supports
5064 tracepoints, give it a chance of looking up symbols. Report
5065 support for fast tracepoints.
5066 (handle_status): Stabilize threads.
5067 (process_serial_event): Adjust.
5068 * server.h (struct fast_tracepoint_jump): Forward declare.
5069 (struct process_info) <fast_tracepoint_jumps>: New field.
5070 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5071 (decode_X_packet, decode_M_packet): Adjust.
5072 (relocate_instruction): Declare.
5073 (in_process_agent_loaded): Declare.
5074 (tracepoint_look_up_symbols): Declare.
5075 (struct fast_tpoint_collect_status): Declare.
5076 (fast_tracepoint_collecting): Declare.
5077 (force_unlock_trace_buffer): Declare.
5078 (handle_tracepoint_bkpts): Declare.
5079 (initialize_low_tracepoint)
5080 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5081 * target.h (struct target_ops) <stabilize_threads,
5082 install_fast_tracepoint_jump_pad>: New fields.
5083 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5084 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5085 [HAVE_STDINT_H]: Include stdint.h.
5086 (trace_debug_1): Rename to ...
5087 (trace_vdebug): ... this.
5088 (trace_debug): Rename to ...
5089 (trace_debug_1): ... this. Add `level' parameter.
5091 (ATTR_USED, ATTR_NOINLINE): New.
5092 (IP_AGENT_EXPORT): New.
5093 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5094 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5095 (about_to_request_buffer_space, trace_buffer_is_full)
5096 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5097 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5098 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5099 (traceframe_write_count, traceframes_created)
5100 (trace_state_variables)
5101 New renaming defines.
5102 (struct ipa_sym_addresses): New.
5103 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5105 (ipa_sym_addrs): New.
5106 (all_tracepoint_symbols_looked_up): New.
5107 (in_process_agent_loaded): New.
5108 (write_e_ipa_not_loaded): New.
5109 (maybe_write_ipa_not_loaded): New.
5110 (tracepoint_look_up_symbols): New.
5111 (debug_threads) [IN_PROCESS_AGENT]: New.
5112 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5113 (UNKNOWN_SIDE_EFFECTS): New.
5114 (stop_tracing): New.
5115 (flush_trace_buffer): New.
5116 (stop_tracing_bkpt): New.
5117 (flush_trace_buffer_bkpt): New.
5118 (read_inferior_integer): New.
5119 (read_inferior_uinteger): New.
5120 (read_inferior_data_pointer): New.
5121 (write_inferior_data_pointer): New.
5122 (write_inferior_integer): New.
5123 (write_inferior_uinteger): New.
5124 (struct collect_static_trace_data_action): Delete.
5125 (enum tracepoint_type): New.
5126 (struct tracepoint) <type>: New field `type'.
5127 <actions_str, step_actions, step_actions_str>: Only include in
5129 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5130 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5131 (tracepoints): Use IP_AGENT_EXPORT.
5132 (last_tracepoint): Don't include in the IPA.
5133 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5134 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5135 (alloced_trace_state_variables): New.
5136 (trace_state_variables): Use IP_AGENT_EXPORT.
5137 (traceframe_t): Delete unused variable.
5138 (circular_trace_buffer): Don't include in the IPA.
5139 (trace_buffer_start): Delete.
5140 (struct trace_buffer_control): New.
5141 (trace_buffer_free): Delete.
5142 (struct ipa_trace_buffer_control): New.
5143 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5144 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5146 (trace_buffer_ctrl): New.
5147 (TRACE_BUFFER_CTRL_CURR): New.
5148 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5149 Reimplement as macros.
5150 (trace_buffer_wrap): Delete.
5151 (traceframe_write_count, traceframe_read_count)
5152 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5153 (struct tracepoint_hit_ctx) <type>: New field.
5154 (struct fast_tracepoint_ctx): New.
5155 (memory_barrier): New.
5157 (record_tracepoint_error): Update atomically in the IPA.
5158 (clear_inferior_trace_buffer): New.
5159 (about_to_request_buffer_space): New.
5160 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5161 updating the same buffer.
5162 (add_tracepoint): Default the tracepoint's type to trap
5163 tracepoint, and orig_size to -1.
5164 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5166 (create_trace_state_variable): New parameter `gdb'. Handle it.
5167 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5168 (cmd_qtdp): Handle fast tracepoints.
5170 (max_jump_pad_size): New.
5171 (gdb_jump_pad_head): New.
5172 (get_jump_space_head): New.
5173 (claim_jump_space): New.
5174 (sort_tracepoints): New.
5175 (MAX_JUMP_SIZE): New.
5176 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5178 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5179 support. Upload fast traceframes, and delete internal IPA
5181 (stop_tracing_handler): New.
5182 (flush_trace_buffer_handler): New.
5183 (cmd_qtstop): Upload fast tracepoints.
5184 (response_tracepoint): Handle fast tracepoints.
5185 (tracepoint_finished_step): Upload fast traceframes. Set the
5186 tracepoint hit context's tracepoint type.
5187 (handle_tracepoint_bkpts): New.
5188 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5189 type. Add comment about fast tracepoints.
5190 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5191 non-existing action_str field.
5192 (get_context_regcache): Handle fast tracepoints.
5193 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5195 (fast_tracepoint_from_jump_pad_address): New.
5196 (fast_tracepoint_from_ipa_tpoint_address): New.
5197 (collecting_t): New.
5198 (force_unlock_trace_buffer): New.
5199 (fast_tracepoint_collecting): New.
5202 (write_inferior_data_ptr): New.
5203 (target_tp_heap): New.
5204 (target_malloc): New.
5205 (download_agent_expr): New.
5207 (download_tracepoints): New.
5208 (download_trace_state_variables): New.
5209 (upload_fast_traceframes): New.
5210 (IPA_FIRST_TRACEFRAME): New.
5211 (IPA_NEXT_TRACEFRAME_1): New.
5212 (IPA_NEXT_TRACEFRAME): New.
5213 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5214 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5215 (gdb_jump_pad_buffer_end): New.
5216 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5217 (initialize_tracepoint): Adjust.
5218 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5219 buffer. Initialize the low module.
5220 * utils.c (PREFIX, TOOLNAME): New.
5221 (malloc_failure): Use PREFIX.
5222 (error): In the IPA, an error causes an exit.
5223 (fatal, warning): Use PREFIX.
5224 (internal_error): Use TOOLNAME.
5225 (NUMCELLS): Increase to 10.
5226 * configure, config.in: Regenerate.
5228 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5230 * server.c (handle_query) <qSupported>: Do two passes over the
5231 qSupported string to avoid nesting strtok.
5233 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5235 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5237 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5239 * configure: Regenerate.
5240 * proc-service.list: New.
5242 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5244 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5247 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5249 * gdbreplay.c (remote_open): Check error return from socket() call by
5250 its equality to -1 not by it being negative.
5251 * remote-utils.c (remote_open): Likewise.
5253 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5255 * config.h: Regenerate.
5257 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5259 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5260 doesn't provide PTRACE_GET_THREAD_AREA.
5262 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5264 * linux-m68k-low.c: Include <asm/ptrace.h>
5265 (ps_get_thread_area): Implement.
5267 2010-05-03 Doug Evans <dje@google.com>
5269 * event-loop.c (struct callback_event): New struct.
5270 (callback_list): New global.
5271 (append_callback_event, delete_callback_event): New functions.
5272 (process_callback): New function.
5273 (start_event_loop): Call it.
5274 * remote-utils.c (NOT_SCHEDULED): Define.
5275 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5276 moved out of readchar.
5277 (readchar): Rewrite. Call reschedule before returning.
5278 (reset_readchar): New function.
5279 (remote_close): Call it.
5280 (process_remaining, reschedule): New functions.
5281 * server.h (callback_handler_func): New typedef.
5282 (append_callback_event, delete_callback_event): Declare.
5284 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5286 * proc-service.c (ps_pglobal_lookup): Use
5287 thread_db_look_up_one_symbol.
5288 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5289 parameter. Use it instead of all_symbols_looked_up.
5290 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5292 (all_symbols_looked_up): Don't declare.
5293 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5294 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5296 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5297 Set all_symbols_looked_up here.
5298 (thread_db_look_up_one_symbol): New.
5299 (thread_db_get_tls_address): Adjust.
5300 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5301 thread_db object on the heap, and tentatively set it in the
5303 (thread_db_init): Don't set all_symbols_looked_up here.
5304 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5306 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5308 * linux-low.c (linux_kill, linux_detach): Adjust.
5309 (status_pending_p_callback): Remove redundant statement. Check
5310 for !TARGET_WAITIKIND_IGNORE, instead of
5311 TARGET_WAITKIND_STOPPED.
5312 (handle_tracepoints): Make sure LWP is locked. Adjust.
5313 (linux_wait_for_event_1): Adjust.
5314 (linux_cancel_breakpoints): New.
5315 (unsuspend_one_lwp): New.
5316 (unsuspend_all_lwps): New.
5317 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5318 (send_sigstop_callback): Change return type to int, add new
5319 `except' parameter and handle it.
5320 (suspend_and_send_sigstop_callback): New.
5321 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5322 pass them down. If SUSPEND, also increment the lwp's suspend
5324 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5325 (need_step_over_p): Don't consider suspended LWPs.
5326 (start_step_over): Adjust.
5327 (proceed_one_lwp): Change return type to int, add new `except'
5328 parameter and handle it.
5329 (unsuspend_and_proceed_one_lwp): New.
5330 (proceed_all_lwps): Use find_inferior instead of
5332 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5333 also decrement the suspend count of LWPs. Pass `except' down,
5334 instead of hacking its suspend count.
5335 (linux_pause_all): Add `freeze' parameter. Adjust.
5336 (linux_unpause_all): New.
5337 (linux_target_ops): Install linux_unpause_all.
5338 * server.c (handle_status): Adjust.
5339 * target.h (struct target_ops): New fields `unpause_all' and
5340 `cancel_breakpoints'. Add new parameter to `pause_all'.
5341 (pause_all): Add new `freeze' parameter.
5343 (cancel_breakpoints): New.
5344 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5346 (cmd_qtstart): Pause threads.
5347 (stop_tracing): Pause threads, and cancel breakpoints.
5348 * win32-low.c (win32_target_ops): Adjust.
5350 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5352 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5353 the inferior right away from here...
5354 (linux_wait_1): ... to here, and adjust to check the thread's
5355 last_resume_kind instead of the lwp's step or stop_expected flags.
5357 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5359 * README: Use consistent `GDB' and `GDBserver' spellings.
5361 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5363 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5364 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5365 (linux_detach_one_lwp): Assume the lwp is stopped.
5366 (any_thread_of): Delete.
5367 (linux_detach): Stop all lwps here. Don't blindly delete all
5369 (delete_lwp_callback): New.
5370 (linux_mourn): Delete all lwps of the process that is gone.
5371 (linux_wait_1): Don't delete the last lwp of the process here.
5372 * mem-break.h (mark_breakpoints_out): Declare.
5373 * mem-break.c (mark_breakpoints_out): New.
5374 (free_all_breakpoints): Use it.
5375 * server.c (handle_target_event): If the process is gone, mark
5377 * thread-db.c (struct thread_db) <create_bp>: New field.
5378 (thread_db_enable_reporting): Fix prototype. Store a thread event
5379 breakpoint reference in the thread_db struct.
5380 (thread_db_load_search): Clear the thread_db object.
5381 (try_thread_db_load_1): Ditto.
5382 (switch_to_process): New.
5383 (disable_thread_event_reporting): Use it.
5384 (remove_thread_event_breakpoints): New.
5385 (thread_db_detach, thread_db_mourn): Use it.
5387 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5389 * linux-low.c (linux_enable_event_reporting): New.
5390 (linux_wait_for_event_1, handle_extended_wait): Use it.
5392 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5394 * linux-low.c (linux_kill_one_lwp, linux_kill)
5395 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5396 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5397 SIGSTOP even if the LWP is stopped.
5398 (send_sigstop_callback): New.
5399 (stop_all_lwps): Use send_sigstop_callback instead.
5400 (linux_resume_one_thread): Adjust.
5401 (proceed_one_lwp): Still proceed an LWP that the client has
5402 requested to stop, if we haven't reported it as stopped yet. Make
5403 sure that LWPs the client want stopped, have a pending SIGSTOP.
5405 2010-04-26 Doug Evans <dje@google.com>
5407 * server.c (handle_general_set): Make static.
5409 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5410 Print received char after testing for error/eof instead of before.
5411 (input_interrupt): Tweak comment.
5413 2010-04-23 Doug Evans <dje@google.com>
5415 * server.c (start_inferior): Print inferior argv if --debug.
5417 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5419 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5420 * nto-x86-low.c: Include server.h
5422 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5424 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5425 be consistent with other sources of this directory.
5426 (init_registers_amd64): Correct name of source file of this function
5429 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5431 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5434 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5436 * win32-i386-low.c: Add 64-bit support.
5437 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5438 (init_registers_amd64): Declare.
5439 (mappings): Add 64-bit version of array.
5440 (init_windows_x86): New function.
5441 (the_low_target): Change init_arch field to init_windows_x86.
5443 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5445 * win32-low.c: Adapt to support also 64-bit architecture.
5446 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5447 (get_image_name): Use SIZE_T type for local variable `done'.
5448 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5449 (toolhelp_get_dll_name): Idem.
5450 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5451 Use uintptr_t typecast to avoid warning.
5452 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5453 (handle_exception): Use phex_nz to avoid warning.
5454 (win32_wait): Remove unused local variable `process'.
5456 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5458 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5461 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5463 * configure.ac: Use `ws2_32' library for srv_mingw.
5464 * configure: Regenerate.
5465 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5466 * remote-utils.c: Likewise.
5468 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5470 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5471 if __x86_64__ is defined.
5473 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5475 * configure: Regenerate.
5477 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5479 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5480 * target.h (target_ops): New get_tib_address field.
5481 * win32-low.h (win32_thread_info): Add thread_local_base field.
5482 * win32-low.c (child_add_thread): Add tlb argument.
5483 Set thread_local_base field to TLB.
5484 (get_child_debug_event): Adapt to child_add_thread change.
5485 (win32_get_tib_address): New function.
5486 (win32_target_ops): Set get_tib_address field to
5487 win32_get_tib_address.
5488 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5490 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5492 * linux-low.c (linux_mourn): Also remove the process.
5493 * server.c (handle_target_event): Don't remove the process here.
5494 * nto-low.c (nto_mourn): New.
5495 (nto_target_ops): Install it.
5496 * spu-low.c (spu_mourn): New.
5497 (spu_target_ops): Install it.
5498 * win32-low.c (win32_mourn): New.
5499 (win32_target_ops): Install it.
5501 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5503 * server.h (buffer_xml_printf): Remove redundant `;'.
5505 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5507 * regcache.c (set_register_cache): Invalidate regcaches before
5508 changing the register cache layout.
5509 (regcache_invalidate_one): Allow a NULL regcache.
5510 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5511 regcaches before changing the register cache layout or the target
5514 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5516 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5517 variable warning on Linux/x86-64.
5519 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5521 GDBserver disconnected tracing support.
5523 * linux-low.c (linux_remove_process): Delete.
5524 (add_lwp): Don't set last_resume_kind here.
5525 (linux_kill): Use `mourn'.
5526 (linux_detach): Use `thread_db_detach', and `mourn'.
5528 (linux_attach_lwp_1): Adjust comment.
5529 (linux_attach): last_resume_kind moved the thread_info; adjust.
5530 (status_pending_p_callback): Adjust.
5531 (linux_wait_for_event_1): Adjust.
5532 (count_events_callback, select_singlestep_lwp_callback)
5533 (select_event_lwp_callback, cancel_breakpoints_callback)
5534 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5535 (proceed_one_lwp): Adjust.
5536 (linux_async): Add debug output.
5537 (linux_thread_stopped): New.
5538 (linux_pause_all): New.
5539 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5541 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5542 (thread_db_free): Delete declaration.
5543 (thread_db_detach, thread_db_mourn): Declare.
5544 * thread-db.c (thread_db_init): Use thread_db_mourn.
5545 (thread_db_free): Delete, split in two.
5546 (disable_thread_event_reporting): New.
5547 (thread_db_detach): New.
5548 (thread_db_mourn): New.
5550 * server.h (struct thread_info) <last_resume_kind>: New field.
5551 <attached>: Add comment.
5552 <gdb_detached>: New field.
5553 (handler_func): Change return type to int.
5554 (handle_serial_event, handle_target_event): Ditto.
5555 (gdb_connected): Declare.
5557 (disconnected_tracing): Declare.
5558 (stop_tracing): Declare.
5560 * server.c (handle_query) <qSupported>: Report support for
5561 disconnected tracing.
5562 (queue_stop_reply_callback): Account for running threads.
5563 (gdb_wants_thread_stopped): New.
5564 (gdb_wants_all_threads_stopped): New.
5565 (gdb_reattached_process): New.
5566 (handle_status): Clear the `gdb_detached' flag of all processes.
5567 In all-stop, stop all threads.
5568 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5569 (process_serial_event): If the remote connection breaks, or if an
5570 exit was forced with "monitor exit", force an event loop exit.
5571 Handle disconnected tracing on detach.
5572 (handle_serial_event): Adjust.
5573 (handle_target_event): If GDB isn't connected, forward events back
5574 to the inferior, unless the last process exited, in which case,
5575 exit gdbserver. Adjust interface.
5577 * remote-utils.c (remote_open): Don't block in accept. Instead
5578 register an event loop source on the listen socket file
5579 descriptor. Refactor bits into ...
5580 (listen_desc): ... this new global.
5581 (gdb_connected): ... this new function.
5582 (enable_async_notification): ... this new function.
5583 (handle_accept_event): ... this new function.
5584 (remote_close): Clear remote_desc.
5586 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5588 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5590 (mourn_inferior): Define.
5591 (target_process_qsupported): Avoid the dangling else problem.
5592 (thread_stopped): Define.
5593 (pause_all): Define.
5594 (target_waitstatus_to_string): Declare.
5595 * target.c (target_waitstatus_to_string): New.
5597 * tracepoint.c (tracing): Make extern.
5598 (disconnected_tracing): New.
5599 (stop_tracing): Make extern. Handle tracing stops due to GDB
5601 (cmd_qtdisconnected): New.
5602 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5603 (handle_tracepoint_general_set): Handle QTDisconnected.
5605 * event-loop.c (event_handler_func): Change return type to int.
5606 (process_event): Bail out if the event handler wants the event
5608 (handle_file_event): Ditto.
5609 (start_event_loop): Bail out if the event handler wants the event
5612 * nto-low.c (nto_target_ops): Adjust.
5613 * spu-low.c (spu_wait): Don't remove the process here.
5614 (spu_target_ops): Adjust.
5615 * win32-low.c (win32_wait): Don't remove the process here.
5616 (win32_target_ops): Adjust.
5618 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5620 * regcache.c (realloc_register_cache): Invalidate inferior's
5621 regcache before recreating it.
5623 2010-04-09 Pedro Alves <pedro@codesourcery.com>
5625 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5627 2010-04-09 Stan Shebs <stan@codesourcery.com>
5628 Pedro Alves <pedro@codesourcery.com>
5630 * server.h (LONGEST): New.
5631 (struct thread_info) <while_stepping>: New field.
5632 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5634 (initialize_tracepoint, handle_tracepoint_general_set)
5635 (handle_tracepoint_query, tracepoint_finished_step)
5636 (tracepoint_was_hit, release_while_stepping_state_list):
5637 (current_traceframe): Declare.
5638 * server.c (handle_general_set): Handle tracepoint packets.
5640 (write_memory): New.
5641 (handle_search_memory_1): Use read_memory.
5642 (handle_query): Report support for conditional tracepoints, trace
5643 state variables, and tracepoint sources. Handle tracepoint
5645 (main): Initialize the tracepoints module.
5646 (process_serial_event): Handle traceframe reads/writes.
5648 * linux-low.c (handle_tracepoints): New.
5649 (linux_wait_1): Call it.
5650 (linux_resume_one_lwp): Handle while-stepping.
5651 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5652 (linux_target_ops): Install them.
5653 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5655 * linux-x86-low.c (x86_supports_tracepoints): New.
5656 (the_low_target). Install it.
5658 * mem-break.h (delete_breakpoint): Declare.
5659 * mem-break.c (delete_breakpoint): Make external.
5661 * target.h (struct target_ops): Add `supports_tracepoints',
5662 `read_pc', and `write_pc' fields.
5663 (target_supports_tracepoints): Define.
5664 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5667 * regcache.h (struct regcache) <registers_owned>: New field.
5668 (init_register_cache, regcache_cpy): Declare.
5669 (regcache_read_pc, regcache_write_pc): Declare.
5670 (register_cache_size): Declare.
5671 (supply_regblock): Declare.
5672 * regcache.c (init_register_cache): New.
5673 (new_register_cache): Use it.
5674 (regcache_cpy): New.
5675 (register_cache_size): New.
5676 (supply_regblock): New.
5677 (regcache_read_pc, regcache_write_pc): New.
5679 * tracepoint.c: New.
5681 * Makefile.in (OBS): Add tracepoint.o.
5682 (tracepoint.o): New rule.
5684 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5686 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5688 (i386-mmx.c): Likewise.
5689 (i386-mmx-linux.o): Likewise.
5690 (i386-mmx-linux.c): Likewise.
5692 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5693 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5694 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5695 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5697 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5698 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5699 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5701 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5703 * Makefile.in (clean): Updated.
5705 (i386-avx.c): Likewise.
5706 (i386-avx-linux.o): Likewise.
5707 (i386-avx-linux.c): Likewise.
5708 (amd64-avx.o): Likewise.
5709 (amd64-avx.c): Likewise.
5710 (amd64-avx-linux.o): Likewise.
5711 (amd64-avx-linux.c): Likewise.
5713 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5714 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5715 (srv_amd64_regobj): Add amd64-avx.o.
5716 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5717 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5718 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5719 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5720 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5721 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5722 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5724 * i387-fp.c: Include "i386-xstate.h".
5726 (i387_cache_to_xsave): Likewise.
5727 (i387_xsave_to_cache): Likewise.
5728 (x86_xcr0): Likewise.
5730 * i387-fp.h (i387_cache_to_xsave): Likewise.
5731 (i387_xsave_to_cache): Likewise.
5732 (x86_xcr0): Likewise.
5734 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5735 * linux-crisv32-low.c (target_regsets): Likewise.
5736 * linux-m68k-low.c (target_regsets): Likewise.
5737 * linux-mips-low.c (target_regsets): Likewise.
5738 * linux-ppc-low.c (target_regsets): Likewise.
5739 * linux-s390-low.c (target_regsets): Likewise.
5740 * linux-sh-low.c (target_regsets): Likewise.
5741 * linux-sparc-low.c (target_regsets): Likewise.
5742 * linux-xtensa-low.c (target_regsets): Likewise.
5744 * linux-low.c: Include <sys/uio.h>.
5745 (regsets_fetch_inferior_registers): Support nt_type.
5746 (regsets_store_inferior_registers): Likewise.
5747 (linux_process_qsupported): New.
5748 (linux_target_ops): Add linux_process_qsupported.
5750 * linux-low.h (regset_info): Add nt_type.
5751 (linux_target_ops): Add process_qsupported.
5753 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5755 (init_registers_i386_avx_linux): New.
5756 (init_registers_amd64_avx_linux): Likewise.
5757 (xmltarget_i386_linux_no_xml): Likewise.
5758 (xmltarget_amd64_linux_no_xml): Likewise.
5759 (PTRACE_GETREGSET): Likewise.
5760 (PTRACE_SETREGSET): Likewise.
5761 (x86_fill_xstateregset): Likewise.
5762 (x86_store_xstateregset): Likewise.
5763 (use_xml): Likewise.
5764 (x86_linux_update_xmltarget): Likewise.
5765 (x86_linux_process_qsupported): Likewise.
5766 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5767 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5768 init_registers_i386_linux here. Call
5769 x86_linux_update_xmltarget.
5770 (the_low_target): Add x86_linux_process_qsupported.
5772 * server.c (handle_query): Call target_process_qsupported.
5774 * target.h (target_ops): Add process_qsupported.
5775 (target_process_qsupported): New.
5777 2010-04-03 Pedro Alves <pedro@codesourcery.com>
5779 * inferiors.c (add_thread): Set last_status kind to
5780 TARGET_WAITKIND_IGNORE.
5781 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5782 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5783 (linux_wait_1): Move `thread' local definition to block that uses
5784 it. Don't NULL initialize `event_child'.
5785 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5786 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5787 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5789 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5791 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5792 an extended waitstatus, or by a watchpoint.
5793 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5794 thread was stepping or has been stopped by a watchpoint.
5796 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5798 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5799 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5800 of another, then delete the previous, and validate all
5802 (validate_inserted_breakpoint): New.
5803 (delete_disabled_breakpoints): New.
5804 (validate_breakpoints): New.
5805 (check_mem_read): Validate breakpoints before trusting their
5806 shadow. Delete disabled breakpoints.
5807 (check_mem_write): Validate breakpoints before trusting they
5808 should be inserted. Delete disabled breakpoints.
5809 * mem-break.h (validate_breakpoints):
5810 * server.c (handle_query): Validate breakpoints when we see a
5813 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5815 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5816 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5817 if we could tell there's a GDB breakpoint at stop_pc.
5818 (need_step_over_p): Don't do a step over if we find a GDB
5819 breakpoint at the resume PC.
5821 * mem-break.c (struct raw_breakpoint): New.
5822 (enum bkpt_type): New type `gdb_breakpoint'.
5823 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5824 fields. New field `raw'.
5825 (find_raw_breakpoint_at): New.
5826 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5828 (set_breakpoint_at): Adjust.
5829 (delete_raw_breakpoint): New.
5830 (release_breakpoint): New.
5831 (delete_breakpoint): Rename to...
5832 (delete_breakpoint_1): ... this. Add proc parameter. Use
5833 release_breakpoint. Return ENOENT.
5834 (delete_breakpoint): Reimplement.
5835 (find_breakpoint_at): Delete.
5836 (find_gdb_breakpoint_at): New.
5837 (delete_breakpoint_at): Delete.
5838 (set_gdb_breakpoint_at): New.
5839 (delete_gdb_breakpoint_at): New.
5840 (gdb_breakpoint_here): New.
5841 (set_reinsert_breakpoint): Use release_breakpoint.
5842 (uninsert_breakpoint): Rename to ...
5843 (uninsert_raw_breakpoint): ... this.
5844 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5845 (reinsert_raw_breakpoint): Change parameter type to
5847 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5849 (check_breakpoints): Adjust. Use release_breakpoint.
5850 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5851 (breakpoint_inserted_here): Ditto.
5852 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5853 Don't trust the breakpoint's shadow if it is not inserted.
5854 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5855 (delete_all_breakpoints): Adjust.
5856 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5857 use delete_breakpoint_1.
5859 * mem-break.h (breakpoints_supported): Delete declaration.
5860 (set_gdb_breakpoint_at): Declare.
5861 (gdb_breakpoint_here): Declare.
5862 (delete_breakpoint_at): Delete.
5863 (delete_gdb_breakpoint_at): Declare.
5865 * server.h (struct raw_breakpoint): Forward declare.
5866 (struct process_info): New field `raw_breakpoints'.
5868 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5871 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5873 * linux-low.c (status_pending_p_callback): Fix comment.
5874 (linux_wait_for_event_1): Move most of the internal breakpoint
5875 handling from here...
5876 (linux_wait_1): ... to here.
5877 (count_events_callback): New.
5878 (select_singlestep_lwp_callback): New.
5879 (select_event_lwp_callback): New.
5880 (cancel_breakpoints_callback): New.
5881 (select_event_lwp): New.
5882 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5883 priority to all LWPs that have had events that should be reported
5884 to the client. Cancel breakpoints when about to reporting the
5885 event to the client, not while stopping lwps. No longer cancel
5886 finished single-steps here.
5887 (cancel_finished_single_step): Delete.
5888 (cancel_finished_single_steps): Delete.
5890 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5892 * mem-break.c (enum bkpt_type): New.
5893 (struct breakpoint): New field `type'.
5894 (set_breakpoint_at): Change return type to struct breakpoint
5895 pointer. Set type to `other_breakpoint' by default.
5896 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5897 in the breakpoint list.
5898 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5899 (reinsert_breakpoint): Rename to ...
5900 (reinsert_raw_breakpoint): ... this.
5901 (reinsert_breakpoints_at): Adjust.
5902 * mem-break.h (struct breakpoint): Declare.
5903 (set_breakpoint_at): Change return type to struct breakpoint
5906 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5908 * server.c (handle_query): Assign, not compare.
5910 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5912 Teach linux gdbserver to step-over-breakpoints.
5914 * linux-low.c (can_hardware_single_step): New.
5915 (supports_breakpoints): New.
5916 (handle_extended_wait): If stopping threads, read the stop pc of
5919 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5920 low target doesn't support retrieving the PC.
5921 (add_lwp): Set last_resume_kind to resume_continue.
5922 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5923 (linux_attach): Don't clear stop_expected. Set the lwp's
5924 last_resume_kind to resume_stop.
5925 (linux_detach_one_lwp): Don't check for removed breakpoints.
5926 (check_removed_breakpoint): Delete.
5927 (status_pending_p): Rename to ...
5928 (status_pending_p_callback): ... this. Don't check for removed
5929 breakpoints. Don't consider threads that are stopped from GDB's
5931 (linux_wait_for_lwp): Always read the stop_pc here.
5932 (cancel_breakpoint): New.
5933 (step_over_bkpt): New global.
5934 (linux_wait_for_event_1): Implement stepping over breakpoints.
5935 (gdb_wants_lwp_stopped): New.
5936 (gdb_wants_all_stopped): New.
5937 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5938 single-step traps here. Store the thread's last reported target
5940 (send_sigstop): Don't clear stop_expected. Always set it,
5942 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5943 (cancel_finished_single_step): New.
5944 (cancel_finished_single_steps): New.
5945 (wait_for_sigstop): Don't cancel finished single-step traps here.
5946 (linux_resume_one_lwp): Don't check for removed breakpoints.
5947 Don't set `step' on non-hardware step archs.
5948 (linux_set_resume_request): Ignore resume_stop requests if already
5949 stopping or stopped. Set the lwp's last_resume_kind.
5950 (resume_status_pending_p): Don't check for removed breakpoints.
5951 (need_step_over_p): New.
5952 (start_step_over): New.
5953 (finish_step_over): New.
5954 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5955 requests. Clear the thread's last reported target waitstatus.
5956 Don't use the `suspended' flag. Don't consider pending breakpoints.
5957 (linux_resume): Start a step-over if necessary.
5958 (proceed_one_lwp): New.
5959 (proceed_all_lwps): New.
5960 (unstop_all_lwps): New.
5961 * linux-low.h (struct lwp_info): Rewrite comment for the
5962 `suspended' flag. Add the `stop_pc' field. Delete the
5963 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5964 Add `'last_resume_kind' and `need_step_over' fields.
5965 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5966 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5967 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5968 (set_raw_breakpoint_at): New.
5969 (set_breakpoint_at): Rewrite to use it.
5970 (reinsert_breakpoint_handler): Delete.
5971 (set_reinsert_breakpoint): New.
5972 (reinsert_breakpoint_by_bp): Delete.
5973 (delete_reinsert_breakpoints): New.
5974 (uninsert_breakpoint): Rewrite.
5975 (uninsert_breakpoints_at): New.
5976 (reinsert_breakpoint): Rewrite.
5977 (reinsert_breakpoints_at): New.
5978 (check_breakpoints): Rewrite.
5979 (breakpoint_here): New.
5980 (breakpoint_inserted_here): New.
5981 (check_mem_read): Adjust.
5982 * mem-break.h (breakpoints_supported, breakpoint_here)
5983 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5984 (reinsert_breakpoint_by_bp): Delete declaration.
5985 (delete_reinsert_breakpoints): Declare.
5986 (reinsert_breakpoint): Delete declaration.
5987 (reinsert_breakpoints_at): Declare.
5988 (uninsert_breakpoint): Delete declaration.
5989 (uninsert_breakpoints_at): Declare.
5990 (check_breakpoints): Adjust prototype.
5991 * server.h: Adjust include order.
5992 (struct thread_info): Declare here. Add a `last_status' field.
5994 2010-03-23 Michael Snyder <msnyder@vmware.com>
5996 * server.c (crc32): New function.
5997 (handle_query): Add handling for 'qCRC:' request.
5999 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6001 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6002 lwp had been stopped by a watchpoint.
6004 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6006 * server.h (internal_error): Declare.
6007 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6008 * utils.c (internal_error): New function.
6010 2010-03-15 Andreas Schwab <schwab@redhat.com>
6012 * configure.srv: Fix typo setting srv_regobj.
6014 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6016 * linux-low.c (fetch_register): Avoid passing a non string literal
6018 (usr_store_inferior_registers): Ditto.
6020 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6022 * linux-low.c (linux_write_memory): Bail out early if peeking
6025 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6027 * linux-low.h (struct lwp_info): New fields
6028 `stopped_by_watchpoint' and `stopped_data_address'.
6029 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6030 here, and cache them in the lwp object.
6031 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6033 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6035 (linux_stopped_by_watchpoint): Rewrite.
6036 (linux_stopped_data_address): Rewrite.
6038 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6040 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6041 switching the current inferior, not before.
6043 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6045 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6046 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6047 i386-linux.c and amd64-linux.c.
6048 (reg-i386.o): Removed.
6049 (reg-i386.c): Likewise.
6050 (reg-i386-linux.o): Likewise.
6051 (reg-i386-linux.c): Likewise.
6052 (reg-x86-64.o): Likewise.
6053 (reg-x86-64.c): Likewise.
6054 (reg-x86-64-linux.o): Likewise.
6055 (reg-x86-64-linux.c): Likewise.
6058 (i386-linux.o): Likewise.
6059 (i386-linux.c): Likewise.
6060 (amd64.o): Likewise.
6061 (amd64.c): Likewise.
6062 (amd64-linux.o): Likewise.
6063 (amd64-linux.c): Likewise.
6065 * configure.srv (srv_i386_regobj): New.
6066 (srv_i386_linux_regobj): Likewise.
6067 (srv_amd64_regobj): Likewise.
6068 (srv_amd64_linux_regobj): Likewise.
6069 (srv_i386_32bit_xmlfiles): Likewise.
6070 (srv_i386_64bit_xmlfiles): Likewise.
6071 (srv_i386_xmlfiles): Likewise.
6072 (srv_amd64_xmlfiles): Likewise.
6073 (srv_i386_linux_xmlfiles): Likewise.
6074 (srv_amd64_linux_xmlfiles): Likewise.
6075 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6076 srv_xmlfiles to $srv_i386_xmlfiles.
6077 (i[34567]86-*-mingw32ce*): Likewise.
6078 (i[34567]86-*-mingw*): Likewise.
6079 (i[34567]86-*-nto*): Likewise.
6080 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6081 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6082 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6083 (x86_64-*-linux*): Likewise.
6085 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6086 (init_registers_amd64_linux): New.
6087 (x86_arch_setup): Replace init_registers_x86_64_linux with
6088 init_registers_amd64_linux.
6090 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6092 * configure.ac: Check for libdl. If it is not available link against
6093 static libthread_db.
6094 * configure: Regenerate.
6096 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6100 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6101 handing a read watchpoint.
6102 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6104 2010-02-12 Doug Evans <dje@google.com>
6106 * linux-low.c (linux_supports_tracefork_flag): Document.
6107 (linux_look_up_symbols): Add comment.
6109 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6111 * regcache.c (supply_register): Clear regcache if buf is NULL.
6113 2010-02-02 Nicolas Roche <roche@sourceware.org>
6114 Joel Brobecker <brobecker@adacore.com>
6116 * inferiors.c (find_inferior): Add function documentation.
6117 (unloaded_dll): Handle the case where the unloaded dll has not
6118 been previously registered in the dll list.
6120 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6122 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6123 (thumb2_breakpoint): New.
6124 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6126 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6128 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6129 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6132 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6134 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6136 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6138 * linux-s390-low.c (s390_collect_ptrace_register)
6139 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6141 2010-01-21 Doug Evans <dje@google.com>
6143 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6144 (PTRACE_ARG4_TYPE): New macro.
6145 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6146 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6147 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6148 (usr_store_inferior_registers): Ditto.
6149 (linux_read_memory, linux_write_memory): Ditto.
6150 (linux_test_for_tracefork): Ditto.
6152 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6153 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6155 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6157 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6160 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6162 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6163 prototype to take a regcache. Adjust.
6165 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6167 * regcache.h (struct thread_info): Forward declare.
6168 (struct regcache): New.
6169 (new_register_cache): Adjust prototype.
6170 (get_thread_regcache): Declare.
6171 (free_register_cache): Adjust prototype.
6172 (registers_to_string, registers_from_string): Ditto.
6173 (supply_register, supply_register_by_name, collect_register)
6174 (collect_register_as_string, collect_register_by_name): Ditto.
6175 * regcache.c (struct inferior_regcache_data): Delete.
6176 (get_regcache): Rename to ...
6177 (get_thread_regcache): ... this. Adjust. Switch inferior before
6179 (regcache_invalidate_one): Adjust.
6180 (regcache_invalidate): Fix prototype.
6181 (new_register_cache): Return the new register cache.
6182 (free_register_cache): Change prototype.
6183 (realloc_register_cache): Adjust.
6184 (registers_to_string): Change prototype to take a regcache. Adjust.
6185 (registers_from_string): Ditto.
6186 (register_data): Ditto.
6187 (supply_register): Ditto.
6188 (supply_register_by_name): Ditto.
6189 (collect_register): Ditto.
6190 (collect_register_as_string): Ditto.
6191 (collect_register_by_name): Ditto.
6192 * server.c (process_serial_event): Adjust.
6193 * linux-low.h (regset_fill_func, regset_store_func): Change
6195 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6197 * linux-low.c (get_stop_pc): Adjust.
6198 (check_removed_breakpoint): Adjust.
6199 (linux_wait_for_event): Adjust.
6200 (linux_resume_one_lwp): Adjust.
6201 (fetch_register): Add regcache parameter. Adjust.
6202 (usr_store_inferior_registers): Ditto.
6203 (regsets_fetch_inferior_registers): Ditto.
6204 (regsets_store_inferior_registers): Ditto.
6205 (linux_fetch_registers, linux_store_registers): Ditto.
6206 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6208 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6210 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6211 prototype to take a regcache.
6212 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6213 * remote-utils.c (convert_ascii_to_int, outreg)
6214 (prepare_resume_reply): Change prototype to take a regcache.
6216 * target.h (struct target_ops) <fetch_registers, store_registers>:
6217 Change prototype to take a regcache.
6218 (fetch_inferior_registers, store_inferior_registers): Change
6219 prototype to take a regcache. Adjust.
6220 * proc-service.c (ps_lgetregs): Adjust.
6221 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6222 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6223 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6224 take a regcache. Adjust.
6225 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6226 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6227 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6228 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6229 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6230 (cris_cannot_fetch_register):
6231 (cris_breakpoint_at): Change prototype to take a regcache.
6233 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6234 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6235 to take a regcache. Adjust.
6236 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6238 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6239 take a regcache. Adjust.
6240 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6241 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6242 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6243 * linux-mips-low.c (mips_get_pc):
6244 (mips_set_pc): Change prototype to take a regcache. Adjust.
6245 (mips_reinsert_addr): Adjust.
6246 (mips_collect_register): Change prototype to take a regcache.
6248 (mips_supply_register):
6249 (mips_collect_register_32bit, mips_supply_register_32bit)
6250 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6251 (mips_store_fpregset): Ditto.
6252 * linux-ppc-low.c (ppc_supply_ptrace_register)
6253 (ppc_supply_ptrace_register): Ditto.
6254 (parse_spufs_run): Adjust.
6255 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6256 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6257 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6258 take a regcache. Adjust.
6259 * linux-s390-low.c (s390_collect_ptrace_register)
6260 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6261 (s390_set_pc): Change prototype to take a regcache. Adjust.
6262 (s390_arch_setup): Adjust.
6263 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6264 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6265 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6266 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6267 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6269 (sparc_breakpoint_at): Adjust.
6270 * linux-xtensa-low.c (xtensa_fill_gregset):
6271 (xtensa_store_gregset):
6272 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6273 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6274 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6275 prototype to take a regcache. Adjust.
6276 * win32-arm-low.c (arm_fetch_inferior_register)
6277 (arm_store_inferior_register): Change prototype to take a
6279 * win32-i386-low.c (i386_fetch_inferior_register)
6280 (i386_store_inferior_register): Change prototype to take a
6282 * win32-low.c (child_fetch_inferior_registers)
6283 (child_store_inferior_registers): Change prototype to take a
6285 (win32_wait): Adjust.
6286 (win32_fetch_inferior_registers): Change prototype to take a
6288 (win32_store_inferior_registers): Adjust.
6289 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6290 store_inferior_register>: Change prototype to take a regcache.
6292 2010-01-20 Doug Evans <dje@google.com>
6294 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6296 (linux_wait_for_event1, linux_init_signals): Ditto.
6297 (W_STOPCODE): Provide definition if missing.
6299 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6301 * linux-low.c (linux_core_of_thread): New.
6302 (compare_ints, show_process, list_threads): New.
6303 (linux_qxfer_osdata): Report threads and cores.
6304 (linux_target_op): Register linux_core_of_thread.
6305 * remote-utils.c (prepare_resume_reply): Report the core.
6306 (buffer_xml_printf): Support %d specifier.
6307 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6309 (handle_query): Handle qXfer:threads. Announce availability
6311 * target.h (struct target_ops): New field core_of_thread.
6313 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6315 * Makefile.in (clean): Remove new generated files.
6316 (reg-s390.o, reg-s390.c): Remove rules.
6317 (reg-s390x.o, reg-s390x.c): Likewise.
6318 (s390-linux32.o, s390-linux32.c): Add rules.
6319 (s390-linux64.o, s390-linux64.c): Likewise.
6320 (s390x-linux64.o, s390x-linux64.c): Likewise.
6321 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6322 * linux-s390-low.c: Include <elf.h>.
6323 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6324 (init_registers_s390): Remove prototype.
6325 (init_registers_s390x): Likewise.
6326 (init_registers_s390_linux32): Add prototype.
6327 (init_registers_s390_linux64): Likewise.
6328 (init_registers_s390x_linux64): Likewise.
6329 (s390_num_regs_3264): New define.
6330 (s390_regmap_3264): New global variable.
6331 (s390_cannot_fetch_register): Remove obsolete check.
6332 (s390_cannot_store_register): Likewise.
6333 (s390_collect_ptrace_register): Handle upper/lower register halves.
6334 (s390_supply_ptrace_register): Likewise.
6335 (s390_fill_gregset): Update to register number changes.
6336 (s390_get_hwcap): New routine.
6337 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6338 Install appropriate regmap and register set.
6340 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6342 * server.c (gdbserver_version): Update copyright year to 2010.
6343 * gdbreplay.c (gdbreplay_version): Likewise.
6345 2009-12-28 Doug Evans <dje@google.com>
6347 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6348 elf/external.h. Include <elf.h> instead but only if necessary.
6350 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6352 * linux-low.c (linux_remove_process): Remove `detaching'
6353 parameter. Don't release/detach from thread_db here.
6354 (linux_kill): Release/detach from thread_db here, ...
6355 (linux_detach): ... and here, before actually detaching.
6356 (linux_wait_1): ... and here, when a process exits.
6357 * thread-db.c (any_thread_of): New.
6358 (thread_db_free): Switch the current inferior to a thread of the
6361 2009-12-21 Doug Evans <dje@google.com>
6363 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6365 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6366 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6367 warning ifndef __NR_tkill. Move setting of errno there too.
6368 Delete unnecessary resetting of errno after syscall.
6369 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6371 * configure.ac: Check for dladdr.
6372 * config.in: Regenerate.
6373 * configure: Regenerate.
6374 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6375 (try_thread_db_load): Update.
6377 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6379 2009-12-18 Doug Evans <dje@google.com>
6381 * event-loop.c: Include unistd.h if it exists.
6383 * linux-low.c (my_waitpid): Move definition away from being in
6384 between linux_tracefork_child/linux_test_for_tracefork.
6386 * gdb_proc_service.h (psaddr_t): Fix type.
6387 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6388 signature to match glibc.
6390 2009-12-16 Doug Evans <dje@google.com>
6392 * linux-low.c (linux_read_memory): Fix argument to read.
6394 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6396 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6397 events, don't leave current_inferior pointing at null.
6399 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6401 * win32-low.c (LOG): Delete.
6402 (OUTMSG): Output to stderr.
6403 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6404 on compile time LOG macro.
6405 (win32_wait): Fix debug output.
6407 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6409 * win32-low.c (win32_add_one_solib): If the dll name is
6410 "ntdll.dll", prepend the system directory to the dll path.
6412 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6414 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6416 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6417 Vladimir Prus <vladimir@codesourcery.com>
6419 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6420 * configure.ac: Check for __mcoldfire__ and set
6421 gdb_cv_m68k_is_coldfire.
6422 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6423 reg-cf.o and reg-m68k.o.
6424 * configure: Regenerated.
6426 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6428 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6429 Pass it to thread_db_free.
6430 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6431 proper `detaching' argument to linux_remove_process.
6432 * linux-low.h (thread_db_free): Add `detaching' parameter.
6433 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6435 (thread_db_free): Add `detaching' parameter. Only
6436 call td_ta_clear_event if detaching from process.
6438 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6440 * thread-db.c (thread_db_free): Fix typo.
6442 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6445 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6447 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6449 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6450 with an i686 compiler.
6451 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6453 * configure: Rebuilt.
6455 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6459 * server.c (handle_search_memory_1): Correct read_addr initialization
6460 in loop for searching subsequent chunks.
6462 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6464 * configure.ac: New --with-libthread-db option.
6465 * thread-db.c: Allow direct dependence on libthread_db.
6466 (thread_db_free): Adjust.
6467 * config.in: Regenerate.
6468 * configure: Likewise.
6470 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6473 * thread-db.c (attach_thread): New function.
6474 (maybe_attach_thread): Return success/failure.
6475 (find_new_threads_callback): Adjust.
6476 (thread_db_find_new_threads): Loop until no new threads.
6478 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6480 * proc-service.c (ps_lgetregs): Formatting.
6482 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6484 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6485 * configure.ac: Adjust.
6486 * linux-low.h (struct process_info_private): Move members to struct
6488 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6489 * linux-low.c (linux_remove_process): Adjust.
6490 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6491 * server.c (handle_query): Move code ...
6492 (handle_monitor_command): ... here. New function.
6493 * target.h (struct target_ops): New member.
6494 * thread-db.c (struct thread_db): New.
6495 (libthread_db_search_path): New variable.
6496 (thread_db_create_event, thread_db_enable_reporting)
6497 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6498 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6499 (try_thread_db_load_1, dladdr_to_soname): New functions.
6500 (try_thread_db_load, thread_db_load_search): New functions.
6501 (thread_db_init): Search for libthread_db.
6502 (thread_db_free): New function.
6503 (thread_db_handle_monitor_command): Likewise.
6504 * config.in: Regenerate.
6505 * configure: Regenerate.
6507 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6509 * spu-low.c (spu_kill): Wait for inferior to terminate.
6510 Call clear_inferiors.
6511 (spu_detach): Call clear_inferiors.
6513 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6515 * aclocal.m4: Regenerate.
6516 * config.in: Likewise.
6517 * configure: Likewise.
6519 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6521 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6522 (parse_spufs_run): New function.
6523 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6524 (ppc_breakpoint_at): Handle SPU breakpoints.
6526 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6528 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6529 (SPUFS_MAGIC): Define.
6530 (spu_enumerate_spu_ids): New function.
6531 (linux_qxfer_spu): New function.
6532 (linux_target_ops): Install linux_qxfer_spu.
6534 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6536 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6537 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6538 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6539 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6540 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6541 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6542 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6543 (init_registers_powerpc_cell32l): Add prototype.
6544 (init_registers_powerpc_cell64l): Likewise.
6545 (ppc_arch_setup): Detect Cell/B.E. architecture.
6547 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6549 * Makefile.in (datarootdir): New variable.
6551 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6553 * linux-low.c (linux_write_memory): Update debugging output.
6554 * Makefile.in (clean): Add new descriptions.
6555 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6556 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6557 * configure.srv: Add new files for arm*-*-linux*.
6558 * linux-arm-low.c: Add new declarations.
6559 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6560 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6561 (HWCAP_VFPv3D16): New.
6562 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6563 instead of __IWMMXT__.
6564 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6565 (arm_arch_setup): New.
6566 (target_regsets): Remove #ifdef. Add VFP regset.
6567 (the_low_target): Use arm_arch_setup.
6569 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6571 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6572 the main thread again.
6574 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6576 Adding Neutrino gdbserver.
6577 * configure: Regenerated.
6578 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6579 * configure.srv (i[34567]86-*-nto*): New target.
6580 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6581 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6582 (nto_comctrl) [__QNX__]: New function.
6583 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6585 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
6587 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6590 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6591 Pedro Alves <pedro@codesourcery.com>
6593 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6594 don't support CONTEXT_EXTENDED_REGISTERS.
6595 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6596 (the_low_target): Install them.
6597 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6598 failing with ERROR_PIPE_NOT_CONNECTED.
6600 2009-06-30 Doug Evans <dje@google.com>
6601 Pierre Muller <muller@ics.u-strasbg.fr>
6603 Add h/w watchpoint support to x86-linux, win32-i386.
6604 * Makefile.in (SFILES): Add i386-low.c
6605 (i386_low_h): Define.
6606 (i386-low.o): Add dependencies.
6607 (linux-x86-low.o): Add i386-low.h dependency.
6608 (win32-i386-low.o): Ditto.
6609 * i386-low.c: New file.
6610 * i386-low.h: New file.
6611 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6612 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6613 * linux-low.c (linux_add_process): Initialize arch_private.
6614 (linux_remove_process): Free arch_private.
6615 (add_lwp): Initialize arch_private.
6616 (delete_lwp): Free arch_private.
6617 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6619 * linux-low.h (process_info_private): New member arch_private.
6620 (lwp_info): New member arch_private.
6621 (linux_target_ops): New members new_process, new_thread,
6623 (ptid_of): New macro.
6624 * linux-x86-low.c: Include stddef.h, i386-low.h.
6625 (arch_process_info): New struct.
6626 (arch_lwp_info): New struct.
6627 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6628 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6629 (i386_dr_low_get_status): New function.
6630 (x86_insert_point, x86_remove_point): New functions.
6631 (x86_stopped_by_watchpoint): New function.
6632 (x86_stopped_data_address): New function.
6633 (x86_linux_new_process, x86_linux_new_thread): New functions.
6634 (x86_linux_prepare_to_resume): New function.
6635 (the_low_target): Add entries for insert_point, remove_point,
6636 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6638 * server.c (debug_hw_points): New global.
6639 (monitor_show_help): Document set debug-hw-points.
6640 (handle_query): Process "set debug-hw-points".
6641 * server.h (debug_hw_points): Declare.
6642 (paddress): Declare.
6643 * utils.c (NUMCELLS, CELLSIZE): New macros.
6644 (get_sell, xsnprintf, paddress): New functions.
6645 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6646 remove_point, stopped_by_watchpoint, stopped_data_address.
6647 * win32-i386-low.c: Include i386-low.h.
6648 (debug_reg_state): Replaces dr.
6649 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6650 (i386_dr_low_get_status): New function.
6651 (i386_insert_point, i386_remove_point): New functions.
6652 (i386_stopped_by_watchpoint): New function.
6653 (i386_stopped_data_address): New function.
6654 (i386_initial_stuff): Update.
6655 (get_thread_context,set_thread_context,i386_thread_added): Update.
6656 (the_low_target): Add entries for insert_point,
6657 remove_point, stopped_by_watchpoint, stopped_data_address.
6658 * win32-low.c (win32_insert_watchpoint): New function.
6659 (win32_remove_watchpoint): New function.
6660 (win32_stopped_by_watchpoint): New function.
6661 (win32_stopped_data_address): New function.
6662 (win32_target_ops): Add entries for insert_watchpoint,
6663 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6664 * win32-low.h (win32_target_ops): New members insert_point,
6665 remove_point, stopped_by_watchpoint, stopped_data_address.
6667 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6669 * server.c (process_serial_event): Re-return unsupported, not
6670 error, if the type isn't recognized. Re-allow supporting only
6671 insert or remove packets. Also call require_running for
6672 breakpoints. Add missing break statement to default case. Tidy.
6673 * target.h (struct target_ops): Rename insert_watchpoint to
6674 insert_point, and remove_watchpoint to remove_point.
6676 * linux-low.h (struct linux_target_ops): Likewise.
6677 * linux-low.c (linux_insert_watchpoint): Rename to ...
6678 (linux_insert_point): ... this. Adjust.
6679 (linux_remove_watchpoint): Rename to ...
6680 (linux_remove_point): ... this. Adjust.
6681 (linux_target_ops): Adjust.
6682 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6683 (cris_insert_point): ... this.
6684 (cris_remove_watchpoint): Rename to ...
6685 (cris_remove_point): ... this.
6686 (the_low_target): Adjust.
6688 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6690 * server.c (handle_v_kill): Pass signal_pid to
6691 kill_inferior if multi_process is zero.
6693 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6695 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6696 * target.h (target_ops): Comment for *_watchpoint to make it clear
6697 the functions can get types '0' and '1'.
6699 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6701 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6702 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6703 * regcache.c (get_regcache): Likewise.
6704 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6705 * win32-low.c (child_fetch_inferior_registers): Remove check for
6708 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6709 Pedro Alves <pedro@codesourcery.com>
6711 * target.h (struct target_ops) <supports_multi_process>: New
6713 (target_supports_multi_process): New.
6714 * server.c (handle_query): Even if GDB reports support, only
6715 enable multi-process if the target also supports it. Report
6716 multi-process support only if the target backend supports it.
6717 * linux-low.c (linux_supports_multi_process): New function.
6718 (linux_target_ops): Install it as target_supports_multi_process
6721 2009-05-24 Doug Evans <dje@google.com>
6723 Global renaming of find_thread_pid to find_thread_ptid.
6724 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6725 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6726 All callers updated.
6728 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6729 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6732 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6733 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6734 (linux_resume_one_lwp): Ditto.
6736 2009-05-23 Doug Evans <dje@google.com>
6738 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6739 from struct inferior_list_entry * to struct lwp_info *.
6740 All callers updated.
6742 2009-05-13 Doug Evans <dje@google.com>
6744 * linux-x86-low.c: Don't include assert.h.
6745 (x86_siginfo_fixup): Use fatal, not assert.
6746 (x86_arch_setup): Fix comment.
6748 2009-05-12 Doug Evans <dje@google.com>
6750 Biarch support for i386/amd64 gdbserver.
6751 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6752 Add linux-x86-low.c.
6753 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6754 (linux-x86-low.o): Add.
6755 * linux-x86-64-low.c: Delete.
6756 * linux-i386-low.c: Delete.
6757 * linux-x86-low.c: New file.
6758 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6760 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6762 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6763 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6764 (linux_child_pid_to_exec_file): New function.
6765 (elf_64_header_p, elf_64_file_p): New functions.
6766 (siginfo_fixup): New function.
6767 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6768 give target a chance to convert layout.
6769 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6770 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6772 2009-05-07 Doug Evans <dje@google.com>
6774 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6775 (regsets_store_inferior_registers): Ditto.
6777 2009-05-06 Pedro Alves <pedro@codesourcery.com>
6781 * linux-low.c (must_set_ptrace_flags): Delete.
6782 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6784 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6785 `lwp->must_set_ptrace_flags' instead.
6786 (linux_wait_for_event_1): Set ptrace options here.
6787 (linux_wait_1): ... not here.
6789 2009-04-30 Doug Evans <dje@google.com>
6791 * inferiors.c (started_inferior_callback): New function.
6792 (attached_inferior_callback): New function.
6793 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6794 * server.c (print_started_pid, print_attached_pid): New functions.
6795 (detach_or_kill_for_exit): New function.
6796 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6797 * server.h (have_started_inferiors_p): Declare.
6798 (have_attached_inferiors_p): Declare.
6800 * inferiors.c (remove_process): Fix memory leak, free process.
6801 * linux-low.c (linux_remove_process): New function.
6802 (linux_kill): Call it instead of remove_process.
6803 (linux_detach, linux_wait_1): Ditto.
6805 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6807 * configure.srv: Add x86 Windows CE target.
6809 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6811 * inferiors.c (get_thread_process): Make global.
6812 * server.h (get_thread_process): Add prototype.
6813 * thread-db.c (find_one_thread): Use get_thread_process
6814 instead of current_process.
6815 (thread_db_get_tls_address): Do not crash if called when
6816 thread layer is not yet initialized.
6818 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6820 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6821 * spu-low.c (current_tid): Rename to ...
6822 (current_ptid): ... this.
6823 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6824 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6825 ptid_get_lwp (current_ptid) instead of current_tid.
6826 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6827 instead of current_tid. Use find_process_pid to verify pid
6828 argument is valid. Pass proper argument to remove_process.
6829 (spu_thread_alive): Compare current_ptid instead of current_tid.
6830 (spu_resume): Likewise.
6832 2009-04-02 Pedro Alves <pedro@codesourcery.com>
6834 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6837 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6839 Implement the multiprocess extensions, and add linux multiprocess
6842 * server.h (ULONGEST): Declare.
6843 (struct ptid, ptid_t): New.
6844 (minus_one_ptid, null_ptid): Declare.
6845 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6846 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6847 (struct inferior_list_entry): Change `id' type from unsigned from
6849 (struct sym_cache, struct breakpoint, struct
6850 process_info_private): Forward declare.
6851 (struct process_info): Declare.
6852 (current_process): Declare.
6853 (all_processes): Declare.
6854 (initialize_inferiors): Declare.
6855 (add_thread): Adjust to use ptid_t.
6856 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6857 (add_process, remove_process, find_thread_pid): Declare.
6858 (find_inferior_id): Adjust to use ptid_t.
6859 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6860 (multi_process): Declare.
6861 (push_event): Adjust to use ptid_t.
6862 (read_ptid, write_ptid): Declare.
6863 (prepare_resume_reply): Adjust to use ptid_t.
6864 (clear_symbol_cache): Declare.
6865 * inferiors.c (all_processes): New.
6866 (null_ptid, minus_one_ptid): New.
6867 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6868 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6869 (add_thread): Change unsigned long to ptid. Remove gdb_id
6871 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6872 (gdb_id_to_thread): Rename to ...
6873 (find_thread_pid): ... this. Change unsigned long to ptid.
6874 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6875 (loaded_dll, pull_pid_from_list): Adjust.
6876 (add_process, remove_process, find_process_pid)
6877 (get_thread_process, current_process, initialize_inferiors): New.
6878 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6879 (struct target_waitstatus) <related_pid>: Ditto.
6880 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6882 (struct target_ops) <join>: Add `pid' argument.
6883 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6884 (struct target_ops) <wait>: Add `ptid' field. Change return type
6886 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6887 (mywait): Add `ptid' argument. Change return type to ptid_t.
6888 (target_pid_to_str): Declare.
6889 * target.c (set_desired_inferior): Adjust to use ptids.
6890 (mywait): Add new `ptid' argument. Adjust.
6891 (target_pid_to_str): New.
6892 * mem-break.h (free_all_breakpoints): Declare.
6893 * mem-break.c (breakpoints): Delelete.
6894 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6895 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6896 to use per-process breakpoint list.
6897 (free_all_breakpoints): New.
6898 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6899 (symbol_cache, all_symbols_looked_up): Delete.
6901 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6903 (prepare_resume_reply): Change ptid argument's type from unsigned
6904 long to ptid_t. Adjust. Implement W;process and X;process.
6905 (free_sym_cache, clear_symbol_cache): New.
6906 (look_up_one_symbol): Adjust to per-process symbol cache. *
6907 * server.c (cont_thread, general_thread, step_thread): Change type
6910 (multi_process): New.
6911 (last_ptid): Change type to ptid_t.
6912 (struct vstop_notif) <ptid>: Change type to ptid_t.
6913 (queue_stop_reply, push_event): Change `ptid' argument's type to
6915 (discard_queued_stop_replies): Add `pid' argument.
6916 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6917 changes. Don't reference the `attached' global.
6918 (attach_inferior): Adjust to mywait interface changes.
6919 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6920 features. Handle and report "multiprocess+". Handle
6922 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6924 (handle_v_kill): New.
6925 (handle_v_stopped): Adjust to use target_pid_to_str.
6926 (handle_v_requests): Allow multiple attaches and runs when
6927 multiprocess extensions are in effect. Handle "vKill".
6928 (myresume): Adjust to use ptids.
6929 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6930 (handle_status): Adjust to discard_queued_stop_replies interface
6932 (first_thread_of, kill_inferior_callback)
6933 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6934 (main): Call initialize_inferiors. Adjust to use ptids, killing
6935 and detaching from all inferiors. Handle multiprocess packet
6937 * linux-low.h: Include gdb_proc_service.h.
6938 (struct process_info_private): New.
6939 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6940 <lwpid_of>: Use ptid_get_lwp.
6941 (get_lwp_thread): Adjust.
6942 (struct lwp_info): Add `dead' member.
6943 (find_lwp_pid): Declare.
6944 * linux-low.c (thread_db_active): Delete.
6945 (new_inferior): Adjust comment.
6946 (inferior_pid): Delete.
6947 (linux_add_process): New.
6948 (handle_extended_wait): Adjust.
6949 (add_lwp): Change unsigned long to ptid.
6950 (linux_create_inferior): Add process to processes table. Adjust
6951 to use ptids. Don't set new_inferior here.
6952 (linux_attach_lwp): Rename to ...
6953 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6954 it. Adjust to use ptids.
6955 (linux_attach_lwp): New.
6956 (linux_attach): Add process to processes table. Don't set
6958 (struct counter): New.
6959 (second_thread_of_pid_p, last_thread_of_process_p): New.
6960 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6962 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6963 processes. Remove process from process table.
6964 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6965 to multiple processes.
6966 (any_thread_of): New.
6967 (linux_detach): Add `pid' argument, and handle it. Remove process
6968 from processes table.
6969 (linux_join): Add `pid' argument. Handle it.
6970 (linux_thread_alive): Change unsighed long argument to ptid_t.
6971 Consider dead lwps as not being alive.
6972 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6973 threads we're not interested in.
6974 (same_lwp, find_lwp_pid): New.
6975 (linux_wait_for_lwp): Change `pid' argument's type from int to
6977 (linux_wait_for_event): Rename to ...
6978 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6979 from int to ptid_t. Adjust.
6980 (linux_wait_for_event): New.
6981 (linux_wait_1): Add `ptid' argument. Change return type to
6982 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6983 that exit from the process table.
6984 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6986 (mark_lwp_dead): New.
6987 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6988 stopping all threads, mark its main lwp as dead.
6989 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6991 (fetch_register, usr_store_inferior_registers)
6992 (regsets_fetch_inferior_registers)
6993 (regsets_store_inferior_registers, linux_read_memory)
6994 (linux_write_memory): Inline `inferior_pid'.
6995 (linux_look_up_symbols): Adjust to use per-process
6997 (linux_request_interrupt): Adjust to use ptids.
6998 (linux_read_auxv): Inline `inferior_pid'.
6999 (initialize_low): Don't reference thread_db_active.
7000 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7001 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7002 (ps_getpid): Return the pid of the current inferior.
7003 * thread-db.c (proc_handle, thread_agent): Delete.
7004 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7006 (find_one_thread): Change argument type to ptid_t. Adjust to
7008 (maybe_attach_thread): Adjust to per-process data and ptids.
7009 (thread_db_find_new_threads): Ditto.
7010 (thread_db_init): Ditto.
7011 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7012 processes table. Adjust to use ptids.
7013 (spu_kill, spu_detach): Adjust interface. Remove process from
7015 (spu_join, spu_thread_alive): Adjust interface.
7016 (spu_wait): Adjust interface. Remove process from processes
7017 table. Adjust to use ptids.
7018 * win32-low.c (current_inferior_tid): Delete.
7019 (current_inferior_ptid): New.
7020 (debug_event_ptid): New.
7021 (thread_rec): Take a ptid. Adjust.
7022 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7023 (child_delete_thread): Ditto.
7024 (do_initial_child_stuff): Add `attached' argument. Add process to
7026 (child_fetch_inferior_registers, child_store_inferior_registers):
7028 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7029 (win32_attach): Pass 1 to do_initial_child_stuff.
7030 (win32_kill): Adjust interface. Remove process from processes
7032 (win32_detach): Ditto.
7033 (win32_join): Adjust interface.
7034 (win32_thread_alive): Take a ptid.
7035 (win32_resume): Adjust to use ptids.
7036 (get_child_debug_event): Ditto.
7037 (win32_wait): Adjust interface. Remove exiting process from
7040 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7042 Non-stop mode support.
7044 * server.h (non_stop): Declare.
7045 (gdb_client_data, handler_func): Declare.
7046 (delete_file_handler, add_file_handler, start_event_loop):
7048 (handle_serial_event, handle_target_event, push_event)
7049 (putpkt_notif): Declare.
7050 * target.h (enum resume_kind): New.
7051 (struct thread_resume): Replace `step' field by `kind' field.
7052 (TARGET_WNOHANG): Define.
7053 (struct target_ops) <wait>: Add `options' argument.
7054 <supports_non_stop, async, start_non_stop>: New fields.
7055 (target_supports_non_stop, target_async): New.
7056 (start_non_stop): Declare.
7057 (mywait): Add `options' argument.
7058 * target.c (mywait): Add `options' argument. Print child exit
7060 (start_non_stop): New.
7061 * server.c (non_stop, own_buf, mem_buf): New globals.
7062 (struct vstop_notif): New.
7063 (notif_queue): New global.
7064 (queue_stop_reply, push_event, discard_queued_stop_replies)
7065 (send_next_stop_reply): New.
7066 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7068 (attach_inferior): In non-stop mode, don't wait for the target
7070 (handle_general_set): Handle QNonStop.
7071 (handle_query): When handling qC, return the current general
7072 thread, instead of the first thread of the list.
7073 (handle_query): If the backend supports non-stop mode, include
7074 QNonStop+ in the qSupported query response.
7075 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7077 (handle_v_attach, handle_v_run): Handle non-stop mode.
7078 (handle_v_stopped): New.
7079 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7080 (myresume): Adjust to use resume_kind. Handle non-stop.
7081 (queue_stop_reply_callback): New.
7082 (handle_status): Handle non-stop mode.
7083 (main): Clear non_stop flag on reconnection. Use the event-loop.
7084 Refactor serial protocol handling from here ...
7085 (process_serial_event): ... to this new function. When GDB
7086 selects any thread, select one here. In non-stop mode, wait until
7087 GDB acks all pending events before exiting.
7088 (handle_serial_event, handle_target_event): New.
7089 * remote-utils.c (remote_open): Install remote_desc in the event
7091 (remote_close): Remove remote_desc from the event loop.
7092 (putpkt_binary): Rename to...
7093 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7094 (putpkt_binary): New as wrapper around putpkt_binary_1.
7095 (putpkt_notif): New.
7096 (prepare_resume_reply): In non-stop mode, don't change the
7098 * event-loop.c: New.
7099 * Makefile.in (OBJ): Add event-loop.o.
7100 (event-loop.o): New rule.
7102 * linux-low.h (pid_of): Moved here.
7104 (get_lwp_thread): Use lwpid_of.
7105 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7106 * linux-low.c (pid_of): Delete.
7107 (inferior_pid): Use lwpid_of.
7108 (linux_event_pipe): New.
7109 (target_is_async_p): New.
7111 (handle_extended_wait): Use lwpid_of.
7112 (add_lwp): Don't set lwpid field.
7113 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7114 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7115 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7116 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7117 first. Adjust to linux_wait_for_event interface changes. Use
7119 (linux_detach): Don't delete the main lwp here.
7120 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7121 (status_pending_p): Don't consider explicitly suspended lwps.
7122 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7123 pointer. Add OPTIONS argument. Change return type to int. Use
7124 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7125 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7126 pointer. Add status pointer argument. Return a pid instead of a
7127 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7128 changes. In non-stop mode, don't switch to a random thread.
7129 (linux_wait): Rename to...
7130 (linux_wait_1): ... this. Add target_options argument, and handle
7131 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7132 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7133 clean exit and signal exit code. Don't stop all threads in
7134 non-stop mode. In all-stop mode, only stop all threads when
7135 reporting a stop to GDB. Handle explicit thread stop requests.
7136 (async_file_flush, async_file_mark): New.
7138 (send_sigstop): Use lwpid_of.
7139 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7140 interface changes. In non-stop mode, don't switch to a random
7142 (linux_resume_one_lwp): Use lwpid_of.
7143 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7144 (linux_resume_one_thread): ... this. Handle resume_stop. In
7145 non-stop mode, don't look for pending flag in all threads.
7146 (resume_status_pending_p): Don't consider explicitly suspended
7148 (my_waitpid): Reimplement. Emulate __WALL.
7149 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7151 (sigchld_handler, linux_supports_non_stop, linux_async)
7152 (linux_start_non_stop): New.
7153 (linux_target_ops): Register linux_supports_non_stop, linux_async
7154 and linux_start_non_stop.
7155 (initialize_low): Install SIGCHLD handler.
7156 * thread-db.c (thread_db_create_event, find_one_thread)
7157 (thread_db_get_tls_address): Use lwpid_of.
7158 * win32-low.c (win32_detach): Adjust to use resume_kind.
7159 (win32_wait): Add `options' argument.
7160 * spu-low.c (spu_resume): Adjust to use resume_kind.
7161 (spu_wait): Add `options' argument.
7163 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7165 Decouple target code from remote protocol.
7167 * target.h (enum target_waitkind): New.
7168 (struct target_waitstatus): New.
7169 (struct target_ops) <wait>: Return an unsigned long. Take a
7170 target_waitstatus pointer instead of a char pointer.
7172 * target.c (mywait): Change prototype to return an unsigned long.
7173 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7174 * server.h (thread_from_wait, old_thread_from_wait): Delete
7176 (prepare_resume_reply): Change prototype to take a
7178 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7179 (last_status, last_ptid): New.
7180 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7181 pid instead of a signal.
7182 (attach_inferior): Remove "status" and "signal" parameters.
7184 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7186 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7187 (handle_v_requests, myresume): Remove "status" and "signal"
7189 (handle_status): New.
7190 (main): Delete local `status'. Adjust.
7191 * remote-utils.c: Include target.h.
7192 (prepare_resume_reply): Change prototype to take a
7193 target_waitstatus. Adjust.
7195 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7197 * spu-low.c (spu_wait): Adjust.
7198 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7200 (win32_wait): Adjust.
7202 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7204 * target.h (struct thread_resume): Delete leave_stopped member.
7205 (struct target_ops): Add a `n' argument to the `resume' callback.
7206 * server.c (start_inferior): Adjust.
7207 (handle_v_cont, myresume): Adjust.
7208 * linux-low.c (check_removed_breakpoint): Adjust to resume
7209 interface change, and to removed leave_stopped field.
7210 (resume_ptr): Delete.
7211 (struct thread_resume_array): New.
7212 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7213 resume interface change.
7214 (linux_continue_one_thread, linux_queue_one_thread)
7215 (resume_status_pending_p): Check if the resume field is NULL
7216 instead of checking the leave_stopped member.
7217 (linux_resume): Adjust to the target resume interface change.
7218 * spu-low.c (spu_resume): Adjust to the target resume interface
7220 * win32-low.c (win32_detach, win32_resume): Ditto.
7222 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7224 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7226 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7228 (linux_continue_one_thread): Only preserve the stepping flag if
7229 there's a pending breakpoint.
7231 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7233 * server.c (main): After the inferior having exited, call
7234 remote_close before exiting gdbserver.
7236 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7238 Fix size of FPSCR in Power 7 processors.
7239 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7240 (PPC_FEATURE_HAS_DFP): New #define.
7241 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7244 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7246 * server.c (handle_query) Whitespace and formatting.
7248 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7250 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7251 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7252 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7253 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7254 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7255 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7256 Makefile.in, configure.ac: Fix whitespace throughout.
7257 * configure: Regenerate.
7259 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7261 * inferiors.c (find_inferior): Make it safe for the callback
7262 function to delete the currently iterated inferior.
7264 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7266 * Makefile.in (linuw_low_h): Move higher.
7267 (thread-db.o): Depend on $(linux_low_h).
7269 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7271 Rename "process" to "lwp" throughout.
7273 * linux-low.c (all_processes): Rename to...
7274 (all_lwps): ... this.
7275 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7276 (add_process): Rename to ...
7277 (add_lwp): ... this. Adjust.
7278 (linux_create_inferior): Adjust.
7279 (linux_attach_lwp): Adjust.
7280 (linux_attach): Adjust.
7281 (linux_kill_one_process): Rename to ...
7282 (linux_kill_one_lwp): ... this. Adjust.
7283 (linux_kill): Adjust.
7284 (linux_detach_one_process): Rename to ...
7285 (linux_detach_one_lwp): ... this. Adjust.
7286 (linux_detach): Adjust.
7287 (check_removed_breakpoint): Adjust.
7288 (status_pending_p): Adjust.
7289 (linux_wait_for_process): Rename to ...
7290 (linux_wait_for_lwp): ... this. Adjust.
7291 (linux_wait_for_event): Adjust.
7292 (send_sigstop): Adjust.
7293 (wait_for_sigstop): Adjust.
7294 (stop_all_processes): Rename to ...
7295 (stop_all_lwps): ... this.
7296 (linux_resume_one_process): Rename to ...
7297 (linux_resume_one_lwp): ... this. Adjust.
7298 (linux_set_resume_request, linux_continue_one_thread)
7299 (linux_queue_one_thread, resume_status_pending_p)
7300 (usr_store_inferior_registers, regsets_store_inferior_registers)
7301 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7303 * linux-low.h (get_process): Rename to ...
7304 (get_lwp): ... this. Adjust.
7305 (get_thread_process): Rename to ...
7306 (get_thread_lwp): ... this. Adjust.
7307 (get_process_thread): Rename to ...
7308 (get_lwp_thread): ... this. Adjust.
7309 (struct process_info): Rename to ...
7310 (struct lwp_info): ... this.
7311 (all_processes): Rename to ...
7312 (all_lwps): ... this.
7313 * proc-service.c (ps_lgetregs): Adjust.
7314 * thread-db.c (thread_db_create_event, find_one_thread)
7315 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7317 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7319 * server.c (handle_query): Handle "qAttached".
7321 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7323 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7324 GPLv3, update license URL.
7326 2009-03-01 Doug Evans <dje@google.com>
7328 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7329 (server_h): Add gdb_signals.h.
7330 (signals.o): Update.
7331 * server.h (target_signal_from_host,target_signal_to_host_p)
7332 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7334 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7336 * remote-utils.c (getpkt): Also generate remote-debug
7337 information if noack_mode is set.
7339 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7341 * server.c (handle_query): Report qXfer:siginfo:read and
7342 qXfer:siginfo:write as supported and handle them.
7343 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7344 * linux-low.c (linux_xfer_siginfo): New.
7345 (linux_target_ops): Set it.
7347 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7349 * server.c (gdbserver_usage): Mention --remote-debug.
7350 (main): Accept '--remote-debug' switch.
7352 2009-01-18 Doug Evans <dje@google.com>
7354 * regcache.c (new_register_cache): No need to check result of xcalloc.
7355 * server.c (handle_search_memory): Back out calls to xmalloc,
7356 result is checked and error is returned to user upon failure.
7357 (handle_query): Ditto. Add more checks for result of malloc.
7358 (handle_v_cont): Check result of malloc, report error back to
7360 (handle_v_run): Ditto. Call freeargv.
7361 * server.h (freeargv): Declare.
7362 * utils.c (freeargv): New fn.
7364 2009-01-15 Doug Evans <dje@google.com>
7366 * gdbreplay.c (perror_with_name): Make arg const char *.
7367 * server.h (target_signal_to_name): Make return type const char *.
7368 * thread-db.c (thread_db_err_str): Make return type const char *.
7369 * utils.c (perror_with_name): Make arg const char *.
7371 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7373 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7374 when handling a EXIT_PROCESS_DEBUG_EVENT.
7376 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7378 * gdbreplay.c (gdbreplay_version): Update copyright year.
7379 * server.c (gdbserver_version): Likewise.
7381 2009-01-05 Doug Evans <dje@google.com>
7383 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7384 (handle_extended_wait): Improve comment.
7386 2008-12-13 Doug Evans <dje@google.com>
7388 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7389 * server.h (ATTR_MALLOC): New macro.
7390 (xmalloc,xcalloc,xstrdup): Declare.
7391 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7392 * inferiors.c: Ditto.
7393 * linux-low.c: Ditto.
7394 * mem-break.c: Ditto.
7395 * regcache.c: Ditto.
7396 * remote-utils.c: Ditto.
7399 * win32-low.c: Ditto.
7401 2008-12-12 Doug Evans <dje@google.com>
7403 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7404 in debugging printf.
7406 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7408 2008-12-09 Doug Evans <dje@google.com>
7410 * linux-low.h (struct process_info): Delete member tid, unused.
7411 * thread-db.c (find_one_thread): Update.
7412 (maybe_attach_thread): Update.
7414 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7416 * target.h (struct target_ops): Add qxfer_osdata member.
7417 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7419 (linux_qxfer_osdata): New functions.
7420 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7422 * server.c (handle_query): Handle "qXfer:osdata:read:".
7423 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7424 (buffer_xml_printf): New functions.
7425 * server.h (struct buffer): New.
7426 (buffer_grow_str, buffer_grow_str0): New macros.
7427 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7428 (buffer_xml_printf): Declare.
7430 2008-11-24 Doug Evans <dje@google.com>
7432 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7434 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7436 * server.c (handle_v_run): Always use the supplied argument list.
7438 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7440 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7441 (xtensa_regmap_table): Add entry for scompare1.
7443 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7445 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7446 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7447 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7448 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7449 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7450 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7451 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7452 XML target descriptions.
7453 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7454 when inferior is running on an ISA 2.05 or later processor. Add
7455 special case to return offset for full 64-bit slot of FPSCR when
7458 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7460 * Makefile.in (SFILES, clean): Added sparc64 files.
7461 (reg-sparc64.o, reg-sparc64.c): New.
7462 * configure.srv (sparc*-*-linux*): New configuration.
7463 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7464 syscall arguments for SPARC.
7465 (regsets_store_inferior_registers): Likewise.
7466 * linux-sparc-low.c: New file.
7468 2008-10-21 Doug Evans <dje@google.com>
7470 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7471 (READLINE_DIR,READLINE_DEP): Delete.
7472 (INTERNAL_CFLAGS): Update.
7473 (LINTFLAGS): Update.
7475 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7477 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7478 whole argv from the last run, not just argv[0].
7480 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7482 * regcache.c (new_register_cache): Return NULL if the register
7483 cache size isn't known yet.
7484 (free_register_cache): Avoid dereferencing a NULL regcache.
7486 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7488 * configure.srv: Merge MIPS and MIPS64.
7490 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7492 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7494 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7496 * Makefile.in: Add required vsx dependencies.
7498 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7499 Declare init_registers_powerpc_vsx32l.
7500 Declare init_registers_powerpc_vsx64l.
7501 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7502 (ppc_arch_setup): Check for VSX in hwcap.
7503 (ppc_fill_vsxregset): New function.
7504 (ppc_store_vsxregset): New function.
7505 Add new VSX entry in regset_info target_regsets.
7507 * configure.srv: Add new VSX dependencies.
7509 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7511 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7512 (remote_open): Set or clear transport_is_reliable.
7513 (putpkt_binary): Don't expect acks in noack mode.
7514 (getpkt): Don't send ack/nac in noack mode.
7515 * server.c (handle_general_set): Handle QStartNoAckMode.
7516 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7518 (main): Reset noack_mode on every connection.
7519 * server.h (noack_mode): Declare.
7521 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7523 * Makefile.in (GDBREPLAY_OBS): New variable.
7524 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7526 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7527 Daniel Jacobowitz <dan@codesourcery.com>
7529 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7530 (usr_store_inferior_registers): Likewise.
7531 (regsets_store_inferior_registers): Likewise.
7533 2008-07-31 Rolf Jansen <rj@surtec.com>
7534 Pedro Alves <pedro@codesourcery.com>
7536 * configure.ac: Check for memmem declaration.
7537 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7538 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7539 (disable_packet_qfThreadInfo): Unconditionally compile.
7540 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7541 * configure, config.in: Regenerate.
7543 2008-07-28 Doug Kwan <dougkwan@google.com>
7545 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7546 (linux_write_memory): Remove declaration of errno.
7548 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7550 * linux-low.c (handle_extended_wait): Do not use "status"
7551 variable uninitialized.
7553 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7555 * server.c (handle_v_attach): Inhibit reporting dll changes.
7557 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7559 * remote-utils.c (prepare_resume_reply): If requested, don't
7560 output "thread:TID" in the T stop reply.
7562 * server.c (disable_packet_vCont, disable_packet_Tthread)
7563 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7564 (handle_query): If requested, disable support for qC, qfThreadInfo
7566 (handle_v_requests): If requested, disable support for vCont.
7567 (gdbserver_show_disableable): New.
7568 (main): Handle --disable-packet and --disable-packet=LIST.
7570 * server.h (disable_packet_vCont, disable_packet_Tthread)
7571 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7573 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7575 * server.c (gdbserver_usage): Mention --version.
7577 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7579 * Makefile.in (gdbreplay.o): New rule.
7581 2008-06-06 Joseph Myers <joseph@codesourcery.com>
7583 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7584 message, not gdbserver.
7586 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
7587 Nathan Sidwell <nathan@codesourcery.com>
7588 Joseph Myers <joseph@codesourcery.com>
7590 * acinclude.m4: Include ../../config/acx.m4.
7591 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7592 * configure, config.in: Regenerate.
7593 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7594 * server.c (gdbserver_version): Print PKGVERSION.
7595 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7596 (main): Adjust gdbserver_usage calls.
7597 * gdbreplay.c (version, host_name): Add declarations.
7598 (gdbreplay_version, gdbreplay_usage): New.
7599 (main): Accept --version and --help options.
7601 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7603 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7604 (arm_breakpoint_at): Handle Thumb.
7605 (the_low_target): Add comment.
7607 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7609 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7611 2008-05-09 Doug Evans <dje@google.com>
7613 * server.h (decode_search_memory_packet): Declare.
7614 * remote-utils.c (decode_search_memory_packet): New fn.
7615 * server.c (handle_search_memory_1): New fn.
7616 (handle_search_memory): New fn.
7617 (handle_query): Process qSearch:memory packets.
7619 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7621 * regcache.c (registers_length): Remove.
7622 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7623 full register packet.
7624 * regcache.h (registers_length): Remove prototype.
7625 * server.h (PBUFSIZ): Define to 16384.
7627 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7629 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7630 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7631 powerpc-64l.o, and powerpc-altivec64l.o.
7632 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7633 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7634 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7635 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7636 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7639 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7640 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7641 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7642 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7643 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7644 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7645 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7646 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7647 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7648 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7651 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7652 (init_registers_powerpc_32l): ... this new prototype.
7653 (init_registers_powerpc_32): Remove, replace by ...
7654 (init_registers_powerpc_altivec32l): ... this new prototype.
7655 (init_registers_powerpc_e500): Remove, replace by ...
7656 (init_registers_powerpc_e500l): ... this new prototype.
7657 (init_registers_ppc64): Remove, replace by ...
7658 (init_registers_powerpc_64l): ... this new prototype.
7659 (init_registers_powerpc_64): Remove, replace by ...
7660 (init_registers_powerpc_altivec64l): ... this new prototype.
7661 (ppc_num_regs): Set to 73.
7662 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7663 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7664 (ppc_cannot_store_register): Handle orig_r3 and trap.
7665 (ppc_arch_setup): Update init_registers_... calls.
7666 (ppc_fill_gregset): Handle orig_r3 and trap.
7668 * inferiors.c (clear_inferiors): Reset current_inferior.
7670 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7672 * acinclude.m4: Add override.m4.
7673 * configure: Regenerate.
7675 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7677 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7678 initial call to init_register_ppc64.
7680 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7682 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7683 single powerpc*-*-linux* case.
7684 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7686 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7688 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7689 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7691 * linux-ppc-low.c: Include <elf.h>.
7692 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7693 (ppc_hwcap): New global variable.
7694 (ppc_regmap): Remove __SPE__ #ifdef sections.
7695 (ppc_regmap_e500): New global variable.
7696 (ppc_cannot_store_register): Update __SPE__ special case.
7697 (ppc_get_hwcap): New function.
7698 (ppc_arch_setup): Use it to determine whether inferior supports
7699 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7700 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7701 Do not access registers if target does not support AltiVec.
7702 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7703 Do not access registers if target does not support SPE.
7704 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7706 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7708 * linux-low.c (disabled_regsets, num_regsets): New.
7709 (use_regsets_p): Delete.
7710 (linux_wait_for_process): Clear disabled_regsets.
7711 (regsets_fetch_inferior_registers): Check and set it.
7712 (regsets_store_inferior_registers): Likewise.
7713 (linux_fetch_registers, linux_store_registers): Do not use
7715 (initialize_low): Allocate disabled_regsets.
7717 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7719 * Makefile.in (LIBOBJS): New.
7721 (memmem.o): New rule.
7722 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7723 * configure: Regenerated.
7725 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7727 * server.c (handle_query): Never return "unsupported" for
7728 qXfer:features:read queries.
7730 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7732 * server.c (get_features_xml): Fix inverted condition.
7733 (handle_query): Always support qXfer:feature:read.
7735 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7737 * server.c (wrapper_argv): New.
7738 (start_inferior): Handle wrapper_argv. If set, expect an extra
7740 (gdbserver_usage): Document --wrapper.
7741 (main): Parse --wrapper.
7743 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7745 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7746 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7747 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7748 (ppc_set_pc): Likewise.
7749 (ppc_arch_setup): New function.
7750 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7751 of collect_register.
7752 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
7754 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7756 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7757 instead of linux-ppc64-low.o.
7758 * linux-ppc64-low.c: Remove file.
7759 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7760 (linux-ppc64-low.o): Remove rule.
7762 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7763 (init_registers_powerpc_64): Likewise.
7764 (ppc_regmap): Conditionally define depending on __powerpc64__.
7765 (ppc_cannot_store_register): Do not special-case "fpscr" when
7766 compiled on __powerpc64__.
7767 (ppc_collect_ptrace_register): New function.
7768 (ppc_supply_ptrace_register): New function.
7769 (ppc_breakpoint): Change type to "unsigned int".
7770 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7771 (the_low_target): Conditionally provide initializers for the
7772 arch_setup member depending on __powerpc64__. Install
7773 collect_ptrace_register and supply_ptrace_register members.
7775 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7777 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7778 * server.c (gdbserver_xmltarget): Define.
7779 (get_features_xml): Use it to replace "target.xml" and arch_string.
7781 * configure.srv: Remove srv_xmltarget. Add XML files that were
7782 mentioned there to srv_xmlfiles instead. Remove conditional tests
7783 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7784 srv_xmlfiles and srv_regobj to include all possible choices.
7785 * configure.ac (srv_xmltarget): Remove.
7786 (srv_xmlfiles): Do not add "target.xml".
7787 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7788 checks for supplementary target information.
7789 * configure: Regenerate.
7790 * Makefile.in (XML_TARGET): Remove.
7791 (target.xml): Remove rule.
7792 (clean): Do not clean up target.xml.
7793 (.PRECIOUS): Do not mention target.xml.
7795 * target.h (struct target_ops): Remove arch_string member.
7796 * linux-low.c (linux_arch_string): Remove.
7797 (linux_target_ops): Remove arch_string initializer.
7798 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7799 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7800 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7801 * spu-low.c (spu_arch_string): Remove.
7802 (spu_target_ops): Remove arch_string initializer.
7803 * win32-low.c (win32_arch_string): Remove.
7804 (win32_target_ops): Remove arch_string initializer.
7805 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7806 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7807 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7809 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7811 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7812 by collect_ptrace_register and supply_ptrace_register hooks.
7813 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7814 instead of checking for the_low_target.left_pad_xfer.
7815 (usr_store_inferior_registers): Use collect_ptrace_register callback
7816 instead of checking for the_low_target.left_pad_xfer.
7818 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7819 (s390_supply_ptrace_register): Likewise.
7820 (s390_fill_gregset): Call s390_collect_ptrace_register.
7821 (the_low_target): Update.
7823 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7824 (ppc_supply_ptrace_register): Likewise.
7825 (the_low_target): Update.
7827 * linux-i386-low.c (the_low_target): Update.
7828 * linux-x86-64-low.c (the_low_target): Update.
7830 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7832 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7833 reg-s390.o and reg-s390x.o.
7835 * linux-low.c (new_inferior): New global variable.
7836 (linux_create_inferior, linux_attach): Set it.
7837 (linux_wait_for_process): Call the_low_target.arch_setup after the
7838 target has stopped for the first time.
7839 (initialize_low): Do not call the_low_target.arch_setup.
7841 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7842 (s390_set_pc): Likewise.
7843 (s390_arch_setup): New function.
7844 (the_low_target): Use s390_arch_setup as arch_setup routine.
7846 * regcache.c (realloc_register_cache): New function.
7847 (set_register_cache): Call it for each existing regcache.
7849 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7851 * server.h (init_registers): Remove prototype.
7853 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7854 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7855 instead of init_registers ().
7856 * linux-arm-low.c (init_registers_arm): Add prototype.
7857 (init_registers_arm_with_iwmmxt): Likewise.
7858 (the_low_target): Add initializer for arch_setup field.
7859 * linux-cris-low.c (init_registers_cris): Add prototype.
7860 (the_low_target): Add initializer for arch_setup field.
7861 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7862 (the_low_target): Add initializer for arch_setup field.
7863 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7864 (the_low_target): Add initializer for arch_setup field.
7865 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7866 (the_low_target): Add initializer for arch_setup field.
7867 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7868 (the_low_target): Add initializer for arch_setup field.
7869 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7870 (the_low_target): Add initializer for arch_setup field.
7871 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7872 (init_registers_mips64_linux): Likewise.
7873 (the_low_target): Add initializer for arch_setup field.
7874 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7875 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7876 (the_low_target): Add initializer for arch_setup field.
7877 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7878 (init_registers_powerpc_64): Likewise.
7879 (the_low_target): Add initializer for arch_setup field.
7880 * linux-s390-low.c (init_registers_s390): Add prototype.
7881 (init_registers_s390x): Likewise.
7882 (the_low_target): Add initializer for arch_setup field.
7883 * linux-sh-low.c (init_registers_sh): Add prototype.
7884 (the_low_target): Add initializer for arch_setup field.
7885 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7886 (the_low_target): Add initializer for arch_setup field.
7887 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7888 (the_low_target): Add initializer for arch_setup field.
7890 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7891 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7892 instead of init_registers ().
7893 * win32-arm-low.c (init_registers_arm): Add prototype.
7894 (the_low_target): Add initializer for arch_setup field.
7895 * win32-i386-low.c (init_registers_i386): Add prototype.
7896 (the_low_target): Add initializer for arch_setup field.
7898 * spu-low.c (init_registers_spu): Add prototype.
7899 (initialize_low): Call initialie_registers_spu () instead of
7900 initialize_registers ().
7902 2008-02-19 Pedro Alves <pedro@codesourcery.com>
7904 * server.c (handle_v_requests): When handling the vRun and vAttach
7905 packets, if already debugging a process, don't kill it. Return an
7908 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7910 * server.c (handle_query): Correct length check.
7912 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7914 * win32-low.c (do_initial_child_stuff): Add process handle
7915 parameter. Set current_process_handle and current_process_id from the
7916 parameters. Clear globals.
7917 (win32_create_inferior): Don't set current_process_handle and
7918 current_process_id here. Instead pass them on the call to
7919 do_initial_child_stuff.
7920 (win32_attach): Likewise.
7921 (win32_clear_inferiors): New.
7922 (win32_kill): Don't close the current process handle or the
7923 current thread handle here. Instead call win32_clear_inferiors.
7924 (win32_detach): Don't open a new handle to the process. Call
7925 win32_clear_inferiors.
7926 (win32_join): Don't rely on current_process_handle; open a new
7927 handle using the process id.
7928 (win32_wait): Call win32_clear_inferiors when the inferior process
7931 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7933 * server.c (monitor_show_help): Add "exit".
7935 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7937 * Makefile.in (SFILES): Add linux-xtensa-low.c.
7938 (clean): Add reg-xtensa.c.
7939 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
7940 * configure.srv (xtensa*-*-linux*) New target.
7941 * linux-xtensa-low.c: New.
7942 * xtensa-xtregs.c: New.
7944 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7946 * hostio.c: Don't include errno.h.
7947 (errno_to_fileio_errno): Move to hostio-errno.
7948 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7949 error number outputting to the target->hostio_last_error callback.
7950 (hostio_packet_error): Use FILEIO_EINVAL directly.
7951 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7952 calls to hostio_error.
7953 * hostio-errno.c: New.
7954 * server.h (hostio_last_error_from_errno): Declare.
7955 * target.h (target_ops): Add hostio_last_error member.
7956 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7957 as hostio_last_error handler.
7958 * spu-low.c (spu_target_ops): Likewise.
7959 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7960 (wince_hostio_last_error): New functions.
7961 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7962 as hostio_last_error handler.
7963 (win32_target_ops) [!_WIN32_WCE]: Register
7964 hostio_last_error_from_errno as hostio_last_error handler.
7965 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7966 (hostio-errno.o): New rule.
7967 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7968 * configure.srv (srv_hostio_err_objs): New variable. Default to
7970 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7971 * configure: Regenerate.
7973 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7975 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7976 (linux_kill, linux_detach): Clean up the process list.
7977 * remote-utils.c (remote_open): Improve port number parsing.
7978 (putpkt_binary, input_interrupt): Only send interrupts if the target
7980 * server.c (extended_protocol): Make static.
7981 (attached): Define earlier.
7982 (exit_requested, response_needed, program_argv): New variables.
7983 (target_running): New.
7984 (start_inferior): Clear attached here.
7985 (attach_inferior): Set attached here.
7986 (require_running): Define.
7987 (handle_query): Use require_running and target_running. Implement
7989 (handle_v_attach, handle_v_run): New.
7990 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7991 (gdbserver_usage): Update.
7992 (main): Redo argument parsing. Handle --debug and --multi. Handle
7993 --attach along with other options or after the port. Save
7994 program_argv. Support no initial program. Resynchronize
7995 communication with GDB after an error. Handle "monitor exit".
7996 Use require_running and target_running. Always allow the extended
7997 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7998 restart in extended mode.
7999 * README: Refer to the GDB manual. Update --attach usage.
8001 2007-12-20 Andreas Schwab <schwab@suse.de>
8003 * linux-low.c (STACK_SIZE): Define.
8004 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8005 (linux_test_for_tracefork): Likewise.
8007 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8009 * linux-low.c (linux_wait_for_event): Update messages. Do not
8010 reinsert auto-delete breakpoints.
8011 * mem-break.c (struct breakpoint): Change return type of handler to
8013 (set_breakpoint_at): Update handler type.
8014 (reinsert_breakpoint_handler): Return 1 instead of calling
8016 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8018 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8019 * mem-break.h (set_breakpoint_at): Update handler type.
8020 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8021 * win32-low.c (auto_delete_breakpoint): New.
8022 (get_child_debug_event): Use it.
8024 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8026 * configure.ac: Check for pread and pwrite.
8027 * hostio.c (handle_pread): Fall back to lseek and read.
8028 (handle_pwrite): Fall back to lseek and write.
8029 * config.in, configure: Regenerated.
8031 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8033 * server.c (myresume): Add own_buf argument.
8034 (main): Update calls.
8036 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8038 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8039 * remote-utils.c (remote_open): Do not call disable_async_io.
8040 (block_async_io): Delete.
8041 (unblock_async_io): Make static.
8042 (initialize_async_io): New.
8043 * server.c (handle_v_cont): Handle async I/O here.
8044 (myresume): Likewise. Move other common resume tasks here...
8045 (main): ... from here. Call initialize_async_io. Disable async
8046 I/O before the main loop.
8047 * server.h (initialize_async_io): Declare.
8048 (block_async_io, unblock_async_io): Delete prototypes.
8049 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8051 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8053 * remote-utils.c (readchar): Allow binary data in received messages.
8055 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8057 * win32-low.c (attaching): New global.
8058 (win32_create_inferior): Clear the `attaching' global.
8059 (win32_attach): Set the `attaching' global.
8060 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8061 attaching. Only set a breakpoint at the entry point if not
8064 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8066 * server.c (main): Don't report dll events on the initial
8067 connection on attaches.
8069 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8071 * server.c (main): Relax numerical bases supported for the pid of
8072 the --attach command line argument.
8074 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8076 * win32-low.c (win32_attach): Call OpenProcess before
8077 DebugActiveProcess, not after. Add last error output to error
8080 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8082 * win32-low.c (win32_get_thread_context)
8083 (win32_set_thread_context): New functions.
8084 (thread_rec): Use win32_get_thread_context.
8085 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8086 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8089 2007-12-03 Leo Zayas
8090 Pedro Alves <pedro_alves@portugalmail.pt>
8092 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8094 (child_add_thread): Minor cleanup.
8095 (child_continue): Resume artificially suspended threads before
8096 calling ContinueDebugEvent.
8097 (suspend_one_thread): New.
8098 (fake_breakpoint_event): New.
8099 (get_child_debug_event): Change return type to int. Check here if
8100 gdb sent an interrupt request. If a soft interrupt was requested,
8101 fake a breakpoint event. Return 0 if there is no event to handle,
8103 (win32_wait): Don't check here if gdb sent an interrupt request.
8104 Ensure there is a valid event to handle.
8105 (win32_request_interrupt): Add soft interruption method as last
8108 2007-12-03 Leo Zayas
8109 Pedro Alves <pedro_alves@portugalmail.pt>
8111 * win32-low.h (win32_thread_info): Add descriptions to the
8112 structure members. Replace `suspend_count' counter by a
8114 * win32-low.c (thread_rec): Update condition of when to get the
8115 context from the inferior. Rely on ContextFlags being set if it
8116 has already been retrieved. Only suspend the inferior thread if
8117 we haven't already. Warn if that fails.
8118 (continue_one_thread): s/suspend_count/suspended/. Only call
8119 ResumeThread once. Warn if that fails.
8121 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8123 * win32-low.c (win32_wait): Don't read from the inferior when it
8126 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8128 * Makefile.in (win32_low_h): New variable.
8129 (win32-low.o): Add dependency on $(win32_low_h).
8130 (win32-arm-low.o, win32-i386-low.o): New rules.
8132 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8134 * hostio.c: Correct copyright year.
8136 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8138 * Makefile.in (OBS): Add hostio.o.
8139 (hostio.o): New rule.
8140 * server.h (handle_vFile): Declare.
8141 * hostio.c: New file.
8142 * server.c (handle_v_requests): Take packet_len and new_packet_len
8143 for binary packets. Call handle_vFile.
8144 (main): Update call to handle_v_requests.
8146 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8148 * linux-low.c: Include <sched.h>.
8150 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8152 * linux-low.c (linux_tracefork_grandchild): New.
8153 (linux_tracefork_child): Use clone.
8154 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8156 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8158 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8160 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8162 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8164 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8166 * inferiors.c (change_inferior_id): Delete.
8167 (add_pid_to_list, pull_pid_from_list): New.
8168 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8169 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8170 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8171 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8172 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8173 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8174 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8175 (using_threads): Always set to 1.
8176 (handle_extended_wait): New.
8177 (add_process): Do not set TID.
8178 (linux_create_inferior): Set must_set_ptrace_flags.
8179 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8180 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8181 (linux_thread_alive): Rename TID argument to LWPID.
8182 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8183 (linux_wait_for_event): Do not use TID or check using_threads. Update
8184 call to dead_thread_notify. Call handle_extended_wait.
8185 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8186 (send_sigstop): Delete sigstop_sent.
8187 (wait_for_sigstop): Avoid TID.
8188 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8189 (linux_test_for_tracefork): New.
8190 (linux_lookup_signals): Use thread_db_active and
8191 linux_supports_tracefork_flag.
8192 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8193 * linux-low.h (get_process_thread): Avoid TID.
8194 (struct process_ifo): Move thread_known and tid to the end. Remove
8196 (linux_attach_lwp, thread_db_init): Update prototypes.
8197 * server.h (change_inferior_id): Delete prototype.
8198 (add_pid_to_list, pull_pid_from_list): New prototypes.
8199 * thread-db.c (thread_db_use_events): New.
8200 (find_first_thread): Rename to...
8201 (find_one_thread): ...this. Update callers and messages. Do not
8202 call fatal. Check thread_db_use_events. Do not call
8203 change_inferior_id or new_thread_notify.
8204 (maybe_attach_thread): Update. Do not call new_thread_notify.
8205 (thread_db_init): Set thread_db_use_events. Check use_events.
8206 * utils.c (fatal, warning): Correct message prefix.
8208 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8210 * Makefile.in (clean): Remove new files.
8211 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8212 (powerpc-64.o, powerpc-64.c): New rules.
8213 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8214 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8216 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8218 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8219 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8220 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8221 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8222 (target_regsets): Add AltiVec and SPE register sets.
8223 * configure.ac: Check for AltiVec and SPE.
8224 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8225 (ppc_fill_vrregset, ppc_store_vrregset): New.
8226 (target_regsets): Add AltiVec register set.
8227 * configure: Regenerated.
8229 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8231 * linux-low.c (O_LARGEFILE): Define.
8232 (linux_read_memory): Use /proc/PID/mem.
8233 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8234 * configure, config.in: Regenerated.
8236 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8238 * linux-low.c (linux_wait_for_event): Do not pass signals while
8241 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8243 * win32-low.c (create_process): New.
8244 (win32_create_inferior): Use create_process instead of
8245 CreateProcess. If create_process failed retry appending an ".exe"
8246 suffix. Store the GetLastError result immediatelly after
8247 create_process calls and use it on the call to error.
8249 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8251 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8253 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8255 * configure.ac: Switch license to GPLv3.
8257 2007-08-01 Michael Snyder <msnyder@access-company.com>
8259 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8261 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8263 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8265 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8266 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8267 CloseToolhelp32Snapshot.
8268 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8269 CloseToolhelp32Snapshot.
8271 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8273 * server.c (main): Check for inferior exit before main loop.
8275 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8277 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8278 instead of on tmp_desc.
8280 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8281 Daniel Jacobowitz <dan@codesourcery.com>
8283 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8284 (add_thread): Minor cleanups.
8285 (clear_inferiors): Move lower in the file. Clear the DLL
8287 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8288 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8289 (xml_escape_text): New.
8290 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8292 (handle_v_cont): Report errors.
8293 (gdbserver_version): Update.
8294 (main): Correct size of own_buf. Do not report initial DLL events.
8295 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8296 (unloaded_dll, xml_escape_text): New.
8297 * win32-low.c (enum target_waitkind): Update comments.
8298 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8299 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8300 (win32_EnumProcessModules, win32_GetModuleInformation)
8301 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8302 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8303 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8304 (win32_Module32First, win32_Module32Next, load_toolhelp)
8305 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8306 (get_child_debug_event): Handle DLL events.
8307 (win32_wait): Likewise.
8309 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8311 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8312 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8314 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8316 * win32-low.c (handle_output_debug_string): Ignore event if not
8319 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8321 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8323 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8325 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8327 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8329 * inferiors.c (change_inferior_id): Add comment.
8330 * linux-low.c (check_removed_breakpoint): Add an early
8331 prototype. Improve debug output.
8332 (linux_attach): Doc update.
8333 (linux_detach_one_process, linux_detach): Clean up before releasing
8335 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8336 * linux-low.h (struct process_info): Doc improvement.
8337 * mem-break.c (delete_all_breakpoints): New.
8338 * mem-break.h (delete_all_breakpoints): New prototype.
8339 * thread-db.c (find_first_thread): New.
8340 (thread_db_create_event): Call it instead of
8341 thread_db_find_new_threads. Clean up unused variables.
8342 (maybe_attach_thread): Remove first thread handling.
8343 (thread_db_find_new_threads): Use find_first_thread.
8344 (thread_db_get_tls_address): Likewise.
8346 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8348 * thread-db.c (thread_db_find_new_threads): Add prototype.
8349 (thread_db_create_event): Check for the main thread before adding
8351 (maybe_attach_thread): Only enable event reporting if TID == 0.
8352 (thread_db_get_tls_address): Check for new threads.
8354 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8356 * linux-low.c (linux_create_inferior): Try execv before execvp.
8357 * spu-low.c (spu_create_inferior): Likewise.
8359 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8361 * linux-low.c (linux_create_inferior): Change execv to execvp.
8362 * spu-low.c (spu_create_inferior): Likewies.
8364 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8366 * Makefile.in (clean): Clean new files instead of deleted ones.
8367 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8368 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8370 * configure.srv: Specify XML files and new regformats for MIPS and
8372 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8373 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8374 an entry for the restart register.
8375 (mips_cannot_fetch_register, mips_cannot_store_register)
8376 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8377 register names to match the XML descriptions.
8378 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8379 restart register instead of $0.
8381 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8382 Markus Deuling <deuling@de.ibm.com>
8384 * remote-utils.c (decode_xfer_write): New function.
8385 * server.h (decode_xfer_write): Add prototype.
8386 * server.c (handle_query): Add PACKET_LEN argument. Support
8387 qXfer:spu:read and qXfer:spu:write packets.
8388 (main): Pass packet_len to handle_query.
8389 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8390 * target.h (target_ops): Add qxfer_spu.
8392 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8394 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8395 accessing non-seekable spufs files.
8397 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8399 * server.c (handle_query): Add reply for qC packet.
8401 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8402 Leo Zayas <lerele@champenstudios@com>
8404 * server.h (check_remote_input_interrupt_request): New function.
8405 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8406 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8407 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8408 (check_remote_input_interrupt_request): New function.
8409 * server.h (check_remote_input_interrupt_request): Declare.
8410 * win32-low.c (winapi_DebugBreakProcess,
8411 winapi_GenerateConsoleCtrlEvent): New typedefs.
8412 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8414 (win32_wait): Check for remote interrupt request
8415 with check_remote_input_interrupt_request.
8416 (win32_request_interrupt): New function.
8417 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8419 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8421 * win32-low.c (debug_registers_changed,
8422 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8423 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8424 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8425 (thread_rec): Get context using the low target.
8426 (child_add_thread): Call thread_added on the low target,
8427 which does the same thing.
8429 (do_initial_child_stuff): Remove debug registers references.
8430 Set context using the low target. Resume threads after
8431 setting the contexts.
8432 (child_continue): Remove dead variable. Remove debug
8433 registers references.
8434 (child_fetch_inferior_registers): Go through the low target.
8435 (do_child_store_inferior_registers): Remove.
8436 (child_store_inferior_registers): Go through the low target.
8437 (win32_resume): Remove debug registers references.
8438 Set context using the low target.
8439 (handle_exception): Change return type to void. Don't record
8440 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8441 first chance exception.
8442 (get_child_debug_event): Change return type to void. Remove
8443 goto loop. Always return after waiting for debug event.
8444 (win32_wait): Convert to switch statement. Handle spurious
8447 * win32-i386-low.c (debug_registers_changed,
8448 debug_registers_used): New.
8449 (initial_stuff): Rename to ...
8450 (i386_initial_stuff): ... this. Clear debug registers
8452 (store_debug_registers): Delete.
8453 (i386_get_thread_context): New.
8454 (load_debug_registers): Delete.
8455 (i386_set_thread_context): New.
8456 (i386_thread_added): New.
8457 (single_step): Rename to ...
8458 (i386_single_step): ... this.
8459 (do_fetch_inferior_registers): Rename to ...
8460 (i386_fetch_inferior_register): ... this.
8461 (i386_store_inferior_register): New.
8462 (the_low_target): Adapt to new interface.
8464 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8465 (arm_get_thread_context): New.
8466 (arm_set_thread_context): New.
8468 (do_fetch_inferior_registers): Rename to ...
8469 (arm_fetch_inferior_register): ... this.
8470 (arm_store_inferior_register): New.
8471 (arm_wince_breakpoint): Reimplement as unsigned long.
8472 (arm_wince_breakpoint_len): Define.
8473 (the_low_target): Adapt to new interface.
8475 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8476 load_debug_registers. Add get_thread_context, set_thread_context,
8477 thread_added and store_inferior_register. Rename
8478 fetch_inferior_registers to fetch_inferior_register.
8479 (regptr): Remove declaration.
8481 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8483 * linux-low.c (linux_detach): Change return type to int. Return 0.
8484 * spu-low.c (spu_detach): Likewise.
8486 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8488 * target.h (target_ops): Change return type of detach to int.
8490 (join_inferior): New.
8491 * server.c (main): Don't skip detach support on mingw32.
8492 If the inferior doesn't support detaching return error.
8493 Call join_inferior instead of using waitpid.
8494 * linux-low.c (linux_join): New.
8495 (linux_target_op): Add linux_join.
8496 * spu-low.c (spu_join): New.
8497 (spu_target_ops): Add spu_join.
8498 * win32-low.c (win32_detach): Adapt to new interface.
8499 Reopen current_process_handle before detaching. Issue a child
8500 resume before detaching.
8502 (win32_target_op): Add win32_join.
8504 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8506 * win32-low.c (win32-attach): Fix return value.
8507 * target.h (target_ops): Describe ATTACH return values.
8509 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8511 * win32-low.c (GETPROCADDRESS): Define.
8512 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8513 (winapi_DebugSetProcessKillOnExit): Likewise.
8514 (win32_create_inferior): Force usage of ansi CreateProcessA.
8515 (win32_attach): Use GETPROCADDRESS.
8516 (win32_detach): Likewise.
8518 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8520 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8522 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8524 * win32-low.c: Commit leftover changes from 2007-03-29.
8526 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8528 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8529 fields short instead of int. Add explicit padding.
8530 (i387_cache_to_fsave): Remove unnecessary casts.
8531 (i387_fsave_to_cache): Doc fix.
8532 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8534 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8536 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8537 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8539 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8541 * configure.srv (arm*-*-mingw32ce*): Move near the other
8544 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8546 * configure.ac: Add errno checking.
8547 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8548 sys/file.h and malloc.h.
8549 (AC_CHECK_DECLS): Add perror.
8550 (srv_mingwce): Handle.
8551 * configure.srv (i[34567]86-*-cygwin*): Add
8552 win32-i386-low.o to srv_tgtobj.
8553 (i[34567]86-*-mingw*): Likewise.
8554 (arm*-*-mingw32ce*): Add case.
8555 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8556 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8557 [__MINGW32CE__] (strerror): New function.
8558 [__MINGW32CE__] (errno): Define to GetLastError.
8559 [__MINGW32CE__] (COUNTOF): New macro.
8560 (remote_open): Remove extra close call.
8561 * mem-break.c (delete_breakpoint_at): New function.
8562 * mem-break.h (delete_breakpoint_at): Declare.
8563 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8564 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8565 [USE_WIN32API] (read, write): Add char* casts.
8566 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8567 * server.h: Include wincecompat.h on Windows CE.
8568 [HAVE_ERRNO_H]: Check.
8569 (perror): Declare if not declared.
8570 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8571 (perror_with_name): Remove errno declaration.
8572 * wincecompat.h: New.
8573 * wincecompat.c: New.
8575 * win32-arm-low.c: New.
8576 * win32-i386-low.c: New.
8577 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8578 (OUTMSG2): Make it safe.
8580 (COUNTOF): New macro.
8581 (NUM_REGS): Get it from the low target.
8582 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8583 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8584 (thread_rec): Let low target handle debug registers.
8585 (child_add_thread): Likewise.
8586 (child_init_thread_list): Likewise.
8587 (continue_one_thread): Likewise.
8589 (do_child_fetch_inferior_registers): Move to ...
8590 * win32-i386-low.c: ... here, and rename to ...
8591 (do_fetch_inferior_registers): ... this.
8592 * win32-low.c (child_fetch_inferior_registers):
8593 Go through the low target.
8594 (do_child_store_inferior_registers): Use regptr.
8595 (strwinerror): New function.
8596 (win32_create_inferior): Handle Windows CE.
8597 Use strwinerror instead of strerror on Windows error
8598 codes. Add program to the error output.
8599 Don't close the main thread handle on Windows CE.
8600 (win32_attach): Use coredll.dll on Windows CE.
8601 (win32_kill): Close current process and current
8603 (win32_detach): Use coredll.dll on Windows CE.
8604 (win32_resume): Let low target handle debug registers, and
8606 (handle_exception): Add/Remove initial breakpoint. Avoid
8607 non-existant WSTOPSIG on Windows CE.
8608 (win32_read_inferior_memory): Cast to remove warning.
8609 (win32_arch_string): Go through the low target.
8610 (initialize_low): Call set_breakpoint_data with the low
8611 target's breakpoint.
8612 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8613 FOP_REGNUM, mappings): Move to ...
8614 * win32-i386-low.c: ... here.
8615 * win32-low.c (win32_thread_info): Move to ...
8616 * win32-low.h: ... here.
8617 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8618 win32-arm-low.c and wincecompat.c.
8619 (all:): Add $EXEEXT.
8620 (install-only:): Likewise.
8621 (gdbserver:): Likewise.
8622 (gdbreplay:): Likewise.
8623 * config.in: Regenerate.
8624 * configure: Regenerate.
8626 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8628 * win32-low.c: Rename typedef thread_info to
8629 win32_thread_info throughout.
8631 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8633 * win32-i386-low.c: Rename to ...
8634 * win32-low.c: ... this.
8635 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8636 * Makefile.in: Likewise.
8638 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8640 * remote-utils.c (monitor_output): Constify msg parameter.
8641 * server.h (monitor_output): Likewise.
8642 * win32-i386-low.c (handle_output_debug_string): New.
8643 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8644 handle_output_debug_string.
8645 (get_child_debug_event): Likewise.
8647 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8649 * server.c (main): Correct strtoul check.
8651 2007-03-27 Jon Ringle <jon@ringle.org>
8653 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8655 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8657 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8659 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8661 * terminal.h: Check HAVE_SGTTY_H.
8663 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8665 * remote-utils.c (remote_open): Print out the assigned port number.
8667 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8669 * remote-utils.c (monitor_output): New function.
8670 * server.c (debug_threads): Define here.
8671 (monitor_show_help): New function.
8672 (handle_query): Handle qRcmd.
8673 (main): Do not handle 'd' packet.
8674 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8675 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8678 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8680 * Makefile.in (EXEEXT): New.
8681 (clean): Use $(EXEEXT).
8683 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8685 * target.h (target_ops): Rename send_signal to request_interrupt,
8686 and remove enum target_signal parameter.
8687 * linux-low.c (linux_request_interrupt): Rename from
8688 linux_send_signal, and always send SIGINT.
8689 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8690 and always send SIGINT.
8691 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8693 (input_interrupt): Likewise.
8695 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8697 * server.c (get_features_xml): Check if target implemented
8699 * win32-i386-low.c (win32_arch_string): New.
8700 (win32_target_ops): Add win32_arch_string as arch_string member.
8702 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8704 * spu-low.c (spu_arch_string): New.
8705 (spu_target_ops): Add spu_arch_string.
8707 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8709 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8710 * configure.ac: Do not check for terminal.h.
8711 * configure, config.in: Regenerated.
8713 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8715 * Makefile.in (OBS): Add $(XML_BUILTIN).
8716 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8718 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8719 (arm-with-iwmmxt.c): New.
8720 * config.in, configure: Regenerate.
8721 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8722 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8723 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8724 (arm*-*-linux*): Add iWMMXt and regset support.
8725 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8726 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8727 (arm_store_wmmxregset, target_regsets): New.
8728 * server.c (get_features_xml): Take annex argument. Check builtin
8730 (handle_query): Handle multiple annexes.
8732 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8734 * remote-utils.c [USE_WIN32API] (read, write): Define.
8735 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8738 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8740 * linux-i386-low.c (the_low_target): Set arch_string.
8741 * linux-x86-64-low.c (the_low_target): Likewise.
8742 * linux-low.c (linux_arch_string): New.
8743 (linux_target_ops): Add it.
8744 * linux-low.h (struct linux_target_ops): Add arch_string.
8745 * server.c (write_qxfer_response): Use const void * for DATA.
8746 (get_features_xml): New.
8747 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8748 * target.h (struct target_ops): Add arch_string method.
8750 2007-01-03 Denis Pilat <denis.pilat@st.com>
8751 Daniel Jacobowitz <dan@codesourcery.com>
8753 * linux-low.c (linux_kill): Handle being called with no threads.
8754 * win32-i386-low.c (win32_kill): Likewise.
8755 (get_child_debug_event): Clear current_process_handle.
8757 2006-12-30 Denis PILAT <denis.pilat@st.com>
8758 Daniel Jacobowitz <dan@codesourcery.com>
8760 * remote-utils.c (remote_open): Check the type of specified
8761 serial port devices before opening them.
8762 * server.c (main): Kill the inferior if an error occurs during
8763 the first remote_open.
8765 2006-12-05 Markus Deuling <deuling@de.ibm.com>
8767 * README: Update supported targets.
8769 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8771 * Makefile.in (clean): Remove reg-mips64.c.
8772 (reg-mips64.c, reg-mips64.o): New rules.
8773 * configure.srv: Handle mips64. Include regset support for mips.
8774 * linux-mips-low.c (union mips_register): New.
8775 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8776 (mips_breakpoint, mips_breakpoint_at): Use int.
8777 (mips_collect_register, mips_supply_register)
8778 (mips_collect_register_32bit, mips_supply_register_32bit)
8779 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8780 (mips_store_fpregset, target_regsets): New.
8781 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8783 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8785 * configure.srv: Add target "spu*-*-*".
8786 * Makefile.in (clean): Remove reg-spu.c.
8787 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8788 * spu-low.c: New file.
8790 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8792 * configure.ac: Correct td_thr_tls_get_addr test.
8793 * configure: Regenerated.
8795 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8797 * linux-low.c (linux_wait_for_event): Reformat. Use the
8799 * remote-utils.c (decode_address_to_semicolon): New.
8800 * server.c (pass_signals, handle_general_set): New.
8801 (handle_query): Mention QPassSignals for qSupported.
8802 (main): Call handle_general_set.
8803 * server.h (pass_signals, decode_address_to_semicolon): New.
8805 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8807 * server.c (handle_query): Correct error handling for read_auxv.
8809 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8811 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8812 and srv_linux_thread_db to yes.
8813 * linux-s390-low.c (s390_fill_gregset): New function.
8814 (target_regsets): Define data structure.
8816 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8818 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8819 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8820 * config.in, configure: Regenerated.
8821 * inferiors.c (gdb_id_to_thread): New function.
8822 (gdb_id_to_thread_id): Use it.
8823 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8824 * linux-low.h (struct process_info): Add th member.
8825 (thread_db_get_tls_address): New prototype.
8826 * remote-utils.c (decode_address): Make non-static.
8827 * server.c (handle_query): Handle qGetTLSAddr.
8828 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8829 * target.h (struct target_ops): Add get_tls_address.
8830 * thread-db.c (maybe_attach_thread): Save the thread handle.
8831 (thread_db_get_tls_address): New.
8833 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8835 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8836 (linux_resume_one_process): Take a siginfo_t *. Update all
8837 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8838 (struct pending_signals): Add a siginfo_t.
8839 (linux_wait_for_process): Always set last_status.
8840 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8841 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8842 * linux-low.h (struct process_info): Add last_status.
8844 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8846 * remote-utils.c (try_rle): New function.
8847 (putpkt_binary): Use it.
8849 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8851 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8852 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8853 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8854 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8855 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8858 2006-08-08 Richard Sandiford <richard@codesourcery.com>
8860 * server.c (terminal_fd): New variable.
8861 (old_foreground_pgrp): Likewise.
8862 (restore_old_foreground_pgrp): New function.
8863 (start_inferior): Record the terminal file descriptor in terminal_fd
8864 and its original foreground group in old_foreground_pgrp. Register
8865 restore_old_foreground_pgrp with atexit().
8867 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8869 * server.c (handle_query): Correct qPart to qXfer.
8871 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8873 * configure.ac: Check for more headers which are missing on
8874 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8875 * configure.srv: Add Cygwin and mingw32.
8876 * remote-utils.c: Don't include headers unconditionally which
8877 are missing on mingw32. Include <winsock.h> for mingw32.
8878 (remote_open): Adjust for mingw32 support. Flush
8879 standard error after writing to it.
8880 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8881 (unblock_async_io, enable_async_io, disable_async_io)
8882 (readchar, getpkt): Update for Winsock support.
8883 (prepare_resume_reply): Expect a protocol signal number.
8884 * server.c: Disable <sys/wait.h> on mingw32.
8885 (start_inferior): Adjust for mingw32 support. Flush
8886 standard error after writing to it.
8887 (attach_inferior): Likewise. Use protocol signal
8889 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8891 * win32-i386-low.c: New file.
8892 * Makefile.in (XM_CLIBS): Set.
8893 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8894 (win32-i386-low.o): New dependency rule.
8895 * linux-low.c (linux_wait): Use target signal numbers.
8896 * target.h (struct target_ops): Doc fix.
8897 * server.h (target_signal_to_name): New prototype.
8898 * gdbreplay.c: Don't include headers unconditionally which
8899 are missing on mingw32. Include <winsock.h> for mingw32.
8900 (remote_close, remote_open): Adjust for Winsock support.
8901 * configure, config.in: Regenerated.
8903 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8905 * server.c (decode_xfer_read, write_qxfer_response): New.
8906 (handle_query): Take a packet length argument. Handle
8907 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8908 the qSupported response.
8909 (main): Update call to handle_query.
8911 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8913 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8914 (putpkt_binary): Renamed from putpkt and adjusted for binary
8916 (putpkt): New wrapper for putpkt_binary.
8917 (readchar): Don't mask off the high bit.
8918 (decode_X_packet): New function.
8919 * server.c (main): Call putpkt_binary if a handler sets the packet
8920 length. Save the length of the incoming packet. Handle 'X'.
8921 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8923 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8925 * server.c (handle_query): Handle qSupported.
8927 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8929 * remote-utils.c (all_symbols_looked_up): New variable.
8930 (look_up_one_symbol): Check it.
8931 * server.h (look_up_one_symbol): New declaration.
8932 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8934 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8936 * Makefile.in (linux-arm-low.o): Update dependencies.
8937 * linux-arm-low.c: Include "gdb_proc_service.h".
8938 (PTRACE_GET_THREAD_AREA): Define.
8939 (ps_get_thread_area): New function.
8941 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8943 * configure.srv (m68k*-*-uclinux*): New target.
8944 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8945 (linux_resume_one_process): Remove extraneous cast.
8946 (linux_read_offsets): New.
8947 (linux_target_op): Add linux_read_offsets on mmuless systems.
8948 * server.c (handle_query): Add qOffsets logic.
8949 * target.h (struct target_ops): Add read_offsets.
8951 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8953 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8954 (PTRACE_GET_THREAD_AREA): Define.
8955 (ps_get_thread_area): New function.
8956 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8957 (linux-x86-64-low.o): Update.
8959 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8961 * configure.ac: Remove checks for prfpregset_t.
8962 * gdb_proc_service.h: New file.
8963 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8964 new "gdb_proc_service.h".
8965 * proc-service.c: Likewise.
8966 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8967 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8968 * Makefile.in (gdb_proc_service_h): Updated.
8969 * configure, config.in: Regenerated.
8971 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8973 * remote-utils.c (prepare_resume_reply): Move declaration
8974 of gdb_id_from_wait to the top of the block.
8976 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8978 * linux-low.c (regsets_store_inferior_registers): Read the regset
8979 from the target before filling it.
8981 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8983 * server.c (attach_inferior): Return SIGTRAP for a successful
8986 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8988 * Makefile.in (OBS): Add version.o.
8989 (STAGESTUFF): Delete.
8990 (version.o): Add dependencies.
8991 (version.c): Replace rule.
8992 (clean): Remove version.c.
8993 * server.c (gdbserver_version): New.
8994 (gdbserver_usage): Use printf.
8995 (main): Handle --version and --help.
8996 * server.h (version, host_name): Add declarations.
8998 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9010 * linux-x86-64-low.c:
9013 * linux-ppc64-low.c:
9022 * linux-crisv32-low.c:
9034 * gdbserver.1: Add (C) after Copyright. Update the FSF
9037 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9039 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9040 (arm_breakpoint_at): Recognize both breakpoints.
9041 (the_low_target): Use the correct breakpoint instruction.
9043 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9045 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9046 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9047 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9048 (the_low_target): Update.
9050 2005-10-25 Andreas Schwab <schwab@suse.de>
9052 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9054 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9055 (ia64_num_regs): Reduce to 462.
9057 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9059 * acinclude.m4: Correct quoting.
9060 * aclocal.m4: Regenerated.
9062 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9063 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9064 (thread_db_init): Call thread_db_err_str.
9065 * configure.ac: Check for TD_VERSION.
9066 * config.in, configure: Regenerated.
9068 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9070 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9072 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9074 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9075 is not available. Define HAVE_PTRACE_GETREGS if it is.
9076 * config.in, configure: Regenerated.
9077 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9078 * linux-i386-low.c, linux-m68k-low.c: Update to use
9079 HAVE_PTRACE_GETREGS.
9080 * linux-low.c (regsets_fetch_inferior_registers)
9081 (regsets_store_inferior_registers): Only return 0 if we processed
9083 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9084 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9086 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9088 * inferiors.c (struct thread_info): Add gdb_id.
9089 (add_thread): Add gdb_id argument.
9090 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9091 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9092 calls to add_thread.
9093 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9094 * server.c (handle_query): Use thread_to_gdb_id.
9095 (handle_v_cont, main): Use gdb_id_to_thread_id.
9096 * server.h (add_thread): Update prototype.
9097 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9100 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9102 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9103 left-padded registers.
9104 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9105 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9107 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9109 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9110 * configure: Regenerate.
9111 * config.in: Regenerate.
9112 * server.h (NEED_DECLARATION_STRERROR):
9113 Replace with !HAVE_DECL_STRERROR.
9115 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9117 * linux-low.c (linux_wait, linux_send_signal): Don't test
9118 an unsigned long variable for > 0 if it could be MAX_ULONG.
9119 * server.c (myresume): Likewise.
9120 * target.c (set_desired_inferior): Likewise.
9122 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9124 * configure.ac: Simplify and improve check for socklen_t.
9125 * configure, config.in: Regenerate.
9127 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9129 * acconfig.h: Remove.
9130 * configure.ac: Add a test for socklen_t. Use three-argument
9131 AC_DEFINE throughout.
9132 * config.in: Regenerated using autoheader 2.59.
9133 * configure: Regenerated.
9135 * gdbreplay.c (socklen_t): Provide a default.
9136 (remote_open): Use socklen_t.
9137 * remote-utils.c (socklen_t): Provide a default.
9138 (remote_open): Use socklen_t.
9139 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9142 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9144 * linux-low.c (linux_read_memory, linux_write_memory)
9145 (linux_read_auxv): Likewise.
9146 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9147 (check_mem_write): Likewise.
9148 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9150 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9151 (registers_from_string, register_data): Likewise.
9152 * server.c (handle_query, main): Likewise.
9153 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9154 (decode_M_packet): Likewise.
9155 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9156 * target.h (struct target_ops): Update read_memory, write_memory,
9158 (read_inferior_memory, write_inferior_memory): Update.
9159 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9161 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9162 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9163 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9164 linux-s390-low.c, linux-sh-low.c: Update for changes in
9165 read_inferior_memory and the_low_target->breakpoint.
9167 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9169 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9170 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9171 * configure.srv: Add powerpc64-*-linux*.
9172 * linux-ppc64-low.c: New file.
9174 2005-05-23 Orjan Friberg <orjanf@axis.com>
9176 * linux-cris-low.c: New file with support for CRIS.
9177 * linux-crisv32-low.c: Ditto for CRISv32.
9178 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9179 (clean): Add reg-cris.c and reg-crisv32.c.
9180 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9181 reg-crisv32.o, and reg-crisv32.c to make rules.
9182 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9185 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9187 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9188 of sizeof (PTRACE_XFER_TYPE).
9189 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9191 2005-05-12 Orjan Friberg <orjanf@axis.com>
9193 * target.h (struct target_ops): Add insert_watchpoint,
9194 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9195 pointers for hardware watchpoint support.
9196 * linux-low.h (struct linux_target_ops): Ditto.
9197 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9198 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9199 to linux_target_ops.
9200 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9202 * server.c (main): Recognize 'Z' and 'z' packets.
9204 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9206 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9207 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9208 (the_low_target): Add new members.
9210 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9212 * proc-service.c (ps_lgetregs): Search all_processes instead of
9215 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9217 * server.c (start_inferior): Change return type to int.
9218 (attach_inferior): Change sigptr to int *.
9219 (handle_v_cont, handle_v_requests): Change signal to int *.
9220 (main): Change signal to int.
9222 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9224 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9225 * configure.srv: Add m32r*-*-linux*.
9226 * linux-m32r-low.c: New file.
9228 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9230 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9232 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9234 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9235 Take unsigned long arguments for PIDs.
9236 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9237 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9238 (wait_for_sigstop, linux_resume_one_process)
9239 (regsets_fetch_inferior_registers, linux_send_signal)
9240 (linux_read_auxv): Likewise. Update the types of variables holding
9241 PIDs. Update format string specifiers.
9242 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9243 * remote-utils.c (prepare_resume_reply): Likewise.
9244 * server.c (cont_thread, general_thread, step_thread)
9245 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9247 (handle_query): Update format specifiers.
9248 (handle_v_cont, main): Use strtoul for thread IDs.
9249 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9250 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9251 (general_thread, step_thread, thread_from_wait)
9252 (old_thread_from_wait): Update.
9253 * target.h (struct thread_resume): Use unsigned long for THREAD.
9254 (struct target_ops): Use unsigned long for arguments to attach and
9257 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9259 * acinclude.m4: Include bfd/bfd.m4 directly.
9260 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9261 <agriffis@toolchain.org>.
9262 * aclocal.m4, configure: Regenerated.
9264 2005-01-07 Andrew Cagney <cagney@gnu.org>
9266 * configure.ac: Rename configure.in, require autoconf 2.59.
9267 * configure: Re-generate.
9269 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9271 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9273 * aclocal.m4: Regenerated.
9274 * configure: Regenerated.
9276 2004-11-21 Andreas Schwab <schwab@suse.de>
9278 * linux-m68k-low.c (m68k_num_gregs): Define.
9279 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9280 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9281 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9282 (m68k_breakpoint_at): New. Add to the_low_target.
9284 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9285 srv_linux_thread_db to yes.
9287 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9289 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9290 (ARCH_SET_FS): Likewise.
9291 (ARCH_GET_FS): Likewise.
9292 (ARCH_GET_GS): Likewise.
9294 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9296 * linux-i386-low.c (ps_get_thread_area): New.
9297 * linux-x86-64-low.c (ps_get_thread_area): New.
9298 * linux-low.c: Include <sys/syscall.h>.
9299 (linux_kill_one_process): Don't kill the first thread here.
9300 (linux_kill): Kill the first thread here.
9301 (kill_lwp): New function.
9302 (send_sigstop, linux_send_signal): Use it.
9303 * proc-service.c: Clean up #ifdefs.
9304 (fpregset_info): Delete.
9305 (ps_lgetregs): Update and enable implementation.
9306 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9308 * remote-utils.c (struct sym_cache, symbol_cache): New.
9309 (input_interrupt): Print a clearer message.
9310 (async_io_enabled): New variable.
9311 (enable_async_io, disable_async_io): Use it. Update comments.
9312 (look_up_one_symbol): Use the symbol cache.
9313 * thread-db.c (thread_db_look_up_symbols): New function.
9314 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9316 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9318 * configure.in: Test for -rdynamic.
9319 * configure: Regenerated.
9320 * Makefile (INTERNAL_LDFLAGS): New.
9321 (gdbserver, gdbreplay): Use it.
9323 2004-09-02 Andrew Cagney <cagney@gnu.org>
9325 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9327 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9329 * linux-low.c (linux_wait): Clear all_processes list also.
9331 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9333 * linux-low.c: Include <errno.h>. Remove extern declaration of
9336 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9338 * gdbreplay.c, server.h, utils.c: Update copyright years.
9340 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9342 * server.c (main): Print child status or termination signal from
9343 variable 'signal', not 'sig'.
9345 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9347 * linux-low.c (linux_read_memory): Change return type to
9348 int. Check for and return error from ptrace().
9349 * target.c (read_inferior_memory): Change return type to int. Pass
9350 back return status from the_target->read_memory().
9351 * target.h (struct target_ops): Adapt *read_memory() prototype.
9353 (read_inferior_memory): Adapt prototype.
9354 * server.c (main): Return an error packet if
9355 read_inferior_memory() returns an error.
9357 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9359 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9360 Unify with other clean targets.
9362 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9364 * server.c (handle_v_cont): Call set_desired_inferior.
9366 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9368 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9370 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9372 * linux-low.c (linux_wait): Unblock async I/O.
9373 (linux_resume): Block and enable async I/O.
9374 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9375 * server.h (block_async_io, unblock_async_io): Add prototypes.
9377 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9379 * remote-utils.c (remote_open): Print a status notice after
9381 * server.c (attach_inferior): Print a status notice after
9384 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9386 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9388 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9390 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9392 * server.c, target.h: Update copyright years.
9394 2004-02-25 Roland McGrath <roland@redhat.com>
9396 * target.h (struct target_ops): New member `read_auxv'.
9397 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9398 * linux-low.c (linux_read_auxv): New function.
9399 (linux_target_ops): Initialize `read_auxv' member to that.
9401 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9403 Committed by Jim Blandy <jimb@redhat.com>.
9405 * linux-s390-low.c (s390_num_regs): Update.
9406 (s390_regmap): Remove control registers. Use __s390x__ predefine
9407 instead of GPR_SIZE to distiguish s390 and s390x targets.
9409 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9411 * linux-low.c: Update copyright year.
9412 (check_removed_breakpoint): Clear pending_is_breakpoint.
9413 (linux_set_resume_request, linux_queue_one_thread)
9414 (resume_status_pending_p): New functions.
9415 (linux_continue_one_thread): Use process->resume.
9416 (linux_resume): Only resume threads if there are no pending events.
9417 * linux-low.h (struct process_info): Add resume request
9420 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9422 * regcache.c (new_register_cache): Clear the allocated register
9423 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9425 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9427 * linux-low.c (linux_resume): Take a struct thread_resume *
9429 (linux_wait): Update call.
9430 (resume_ptr): New static variable.
9431 (linux_continue_one_thread): Renamed from
9432 linux_continue_one_process. Use resume_ptr.
9433 (linux_resume): Use linux_continue_one_thread.
9434 * server.c (handle_v_cont, handle_v_requests): New functions.
9435 (myresume): New function.
9436 (main): Handle 'v' case.
9437 * target.h (struct thread_resume): New type.
9438 (struct target_ops): Change argument of "resume" to struct
9440 (myresume): Delete macro.
9442 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9444 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9445 (uninstall): Support DESTDIR.
9447 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9449 * configure.srv: Add xscale*linux copy of arm*linux entry.
9451 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9453 * linux-arm-low.c (arm_reinsert_addr): New function.
9454 (the_low_target): Add arm_reinsert_addr.
9456 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9458 * mem-break.c: Remove whitespace at end of file.
9460 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9462 * configure.in: Check whether we need to prototype strerror.
9463 * server.h: Optionally prototype strerror.
9464 * gdbreplay.c (perror_with_name): Use strerror.
9465 * linux-low.c (linux_attach_lwp): Use strerror.
9466 * utils.c (perror_with_name): Use strerror.
9467 * config.in, configure: Regenerated.
9469 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9471 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9472 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9474 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9476 * Makefile.in (SFILES): Update.
9477 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9478 low-sun3.c: Remove files.
9480 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9482 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9483 (linux_detach_one_process, linux_detach): New functions.
9484 (linux_target_ops): Add linux_detach.
9485 * server.c (main): Handle 'D' packet.
9486 * target.h (struct target_ops): Add "detach" member.
9487 (detach_inferior): Define.
9489 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9491 From Kelley Cook <kelleycook@wideopenwest.com>:
9492 * configure.srv: Accept i[34567]86 variants.
9494 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9496 * linux-low.c (linux_wait_for_event): Correct comment typos.
9497 (linux_resume_one_process): Call check_removed_breakpoint.
9498 (linux_send_signal): New function.
9499 (linux_target_ops): Add linux_send_signal.
9500 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9502 * target.h (struct target_ops): Add send_signal.
9504 2003-05-29 Jim Blandy <jimb@redhat.com>
9506 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9507 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9508 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9509 away part of the register's value.
9511 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9513 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9514 (linux_wait_for_event, linux_init_signals): Likewise.
9516 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9518 * configure.in: Check for stdlib.h.
9519 * configure: Regenerated.
9520 * config.in: Regenerated.
9522 2003-01-04 Andreas Schwab <schwab@suse.de>
9524 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9526 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9528 * Makefile.in: Remove obsolete code.
9530 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9532 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9533 defined(PT_FPR0_HI).
9535 2002-11-17 Stuart Hughes <seh@zee2.com>
9537 * linux-arm-low.c (arm_num_regs): Increase.
9538 (arm_regmap): Include status register.
9540 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9542 * linux-low.c (register_addr): Remove incorrect -1 check.
9544 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9546 * linux-low.c (linux_create_inferior): Call setpgid. Return
9548 (unstopped_p, linux_signal_pid): Remove.
9549 (linux_target_ops): Remove linux_signal_pid.
9550 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9551 global instead of target method.
9552 * target.h (struct target_ops): Remove signal_pid. Update comment
9553 for create_inferior.
9554 * server.c (signal_pid): New variable.
9555 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9556 gdbserver. Set the child to be the foreground process group.
9557 (attach_inferior): Set signal_pid.
9559 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9561 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9563 2002-08-20 Jim Blandy <jimb@redhat.com>
9565 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9568 2002-08-01 Andrew Cagney <cagney@redhat.com>
9570 * Makefile.in: Make chill references obsolete.
9572 2002-07-24 Kevin Buettner <kevinb@redhat.com>
9574 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9575 * configure: Regenerate.
9576 * config.in: Regenerate.
9578 2002-07-09 David O'Brien <obrien@FreeBSD.org>
9580 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9581 (perror_with_name, remote_close, remote_open, expect, play): Static.
9583 2002-07-04 Michal Ludvig <mludvig@suse.cz>
9585 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
9586 byte offsets instead of an array of indexes.
9587 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9589 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
9591 * regcache.c: Add comment.
9593 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
9595 * thread-db.c: New file.
9596 * proc-service.c: New file.
9597 * acinclude.m4: New file.
9598 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9599 proc-service.o, and thread-db.o.
9600 (linux-low.o): Add USE_THREAD_DB.
9601 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9602 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9603 * aclocal.m4: Regenerated.
9604 * config.in: Regenerated.
9605 * configure: Regenerated.
9606 * configure.in: Check for proc_service.h, sys/procfs.h,
9607 thread_db.h, and linux/elf.h headrs.
9608 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9609 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9610 Check for -lthread_db and thread support.
9611 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9612 PowerPC, and SuperH.
9613 * i387-fp.c: Constify arguments.
9614 * i387-fp.h: Likewise.
9615 * inferiors.c: (struct thread_info): Renamed from
9616 `struct inferior_info'. Remove PID member. Use generic inferior
9617 list header. All uses updated.
9618 (inferiors, signal_pid): Removed.
9619 (all_threads): New variable.
9620 (get_thread): Define.
9621 (add_inferior_to_list): New function.
9622 (for_each_inferior): New function.
9623 (change_inferior_id): New function.
9624 (add_inferior): Removed.
9625 (remove_inferior): New function.
9626 (add_thread): New function.
9627 (free_one_thread): New function.
9628 (remove_thread): New function.
9629 (clear_inferiors): Use for_each_inferior and free_one_thread.
9630 (find_inferior): New function.
9631 (find_inferior_id): New function.
9632 (inferior_target_data): Update argument type.
9633 (set_inferior_target_data): Likewise.
9634 (inferior_regcache_data): Likewise.
9635 (set_inferior_regcache_data): Likewise.
9636 * linux-low.c (linux_bp_reinsert): Remove.
9637 (all_processes, stopping_threads, using_thrads)
9638 (struct pending_signals, debug_threads, pid_of): New.
9639 (inferior_pid): Replace with macro.
9640 (struct inferior_linux_data): Remove.
9641 (get_stop_pc, add_process): New functions.
9642 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9643 Use add_process and add_thread.
9644 (linux_attach_lwp): New function, based on old linux_attach. Use
9645 add_process and add_thread. Set stop_expected for new threads.
9646 (linux_attach): New function.
9647 (linux_kill_one_process): New function.
9648 (linux_kill): Kill all LWPs.
9649 (linux_thread_alive): Use find_inferior_id.
9650 (check_removed_breakpoints, status_pending_p): New functions.
9651 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9652 Update. Use WNOHANG. Wait for cloned processes also. Update process
9653 struct for the found process.
9654 (linux_wait_for_event): New function.
9655 (linux_wait): Use it. Support LWPs.
9656 (send_sigstop, wait_for_sigstop, stop_all_processes)
9657 (linux_resume_one_process, linux_continue_one_process): New functions.
9658 (linux_resume): Support LWPs.
9659 (REGISTER_RAW_SIZE): Remove.
9660 (fetch_register): Use register_size instead. Call supply_register.
9661 (usr_store_inferior_registers): Likewise. Call collect_register.
9663 (regsets_fetch_inferior_registers): Improve error message.
9664 (regsets_store_inferior_registers): Add debugging.
9665 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9666 (unstopped_p, linux_signal_pid): New functions.
9667 (linux_target_ops): Add linux_signal_pid.
9668 (linux_init_signals): New function.
9669 (initialize_low): Call it. Initialize using_threads.
9670 * regcache.c (inferior_regcache_data): Add valid
9672 (get_regcache): Fetch registers lazily. Add fetch argument
9673 and update all callers.
9674 (regcache_invalidate_one, regcache_invalidate): New
9676 (new_register_cache): Renamed from create_register_cache.
9677 Return the new regcache.
9678 (free_register_cache): Change argument to a void *.
9679 (registers_to_string, registers_from_string): Call get_regcache
9680 with fetch flag set.
9681 (register_data): Make static. Pass fetch flag to get_regcache.
9682 (supply_register): Call get_regcache with fetch flag clear.
9683 (collect_register): Call get_regcache with fetch flag set.
9684 (collect_register_as_string): New function.
9685 * regcache.h: Update.
9686 * remote-utils.c (putpkt): Flush after debug output and use
9688 Handle input interrupts while waiting for an ACK.
9689 (input_interrupt): Use signal_pid method.
9690 (getpkt): Flush after debug output and use stderr.
9691 (outreg): Use collect_register_as_string.
9692 (new_thread_notify, dead_thread_notify): New functions.
9693 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9695 (look_up_one_symbol): Flush after debug output.
9696 * server.c (step_thread, server_waiting): New variables.
9697 (start_inferior): Don't use signal_pid. Update call to mywait.
9698 (attach_inferior): Update call to mywait.
9699 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9700 (main): Don't fetch/store registers explicitly. Use
9701 set_desired_inferior. Support proposed ``Hs'' packet. Update
9704 (struct inferior_list, struct_inferior_list_entry): New.
9705 * target.c (set_desired_inferior): New.
9706 (write_inferior_memory): Constify.
9707 (mywait): New function.
9709 (struct target_ops): New signal_pid method.
9710 (mywait): Removed macro, added prototype.
9712 * linux-low.h (regset_func): Removed.
9713 (regset_fill_func, regset_store_func): New.
9714 (enum regset_type): New.
9715 (struct regset_info): Add type field. Use new operation types.
9716 (struct linux_target_ops): stop_pc renamed to get_pc.
9717 Add decr_pc_after_break and breakpoint_at.
9718 (get_process, get_thread_proess, get_process_thread)
9719 (strut process_info, all_processes, linux_attach_lwp)
9720 (thread_db_init): New.
9722 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9723 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9724 (the_low_target): Add new members.
9725 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9726 (i386_store_fpxregset): Constify.
9727 (target_regsets): Add new kind identifier.
9728 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9729 (i386_set_pc): Add debugging.
9730 (i386_breakpoint_at): New function.
9731 (the_low_target): Add new members.
9732 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9733 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9734 (mips_breakpoint_at): New.
9735 (the_low_target): Add new members.
9736 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9737 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9738 (the_low_target): Add new members.
9739 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9740 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9741 (the_low_target): Add new members.
9742 * linux-x86-64-low.c (target_regsets): Add new kind
9745 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9747 From Martin Pool <mbp@samba.org>:
9748 * server.c (gdbserver_usage): New function.
9751 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
9753 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9756 2002-05-04 Andrew Cagney <ac131313@redhat.com>
9758 * Makefile.in: Remove obsolete code.
9760 2002-04-24 Michal Ludvig <mludvig@suse.cz>
9762 * linux-low.c (regsets_fetch_inferior_registers),
9763 (regsets_store_inferior_registers): Removed cast to int from
9765 * regcache.h: Added declaration of struct inferior_info.
9767 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9769 * inferiors.c (struct inferior_info): Add regcache_data.
9770 (add_inferior): Call create_register_cache.
9771 (clear_inferiors): Call free_register_cache.
9772 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9773 * regcache.c (struct inferior_regcache_data): New.
9774 (registers): Remove.
9775 (get_regcache): New function.
9776 (create_register_cache, free_register_cache): New functions.
9777 (set_register_cache): Don't initialize the register cache here.
9778 (registers_to_string, registers_from_string, register_data): Call
9780 * regcache.h: Add prototypes.
9781 * server.h: Likewise.
9783 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9785 * mem-break.c: New file.
9786 * mem-break.h: New file.
9787 * Makefile.in: Add mem-break.o rule; update server.h
9789 * inferiors.c (struct inferior_info): Add target_data
9791 (clear_inferiors): Free target_data member if set.
9792 (inferior_target_data, set_inferior_target_data): New functions.
9793 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9794 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9795 * linux-low.c (linux_bp_reinsert): New variable.
9796 (struct inferior_linux_data): New.
9797 (linux_create_inferior): Use set_inferior_target_data.
9798 (linux_attach): Likewise. Call add_inferior.
9799 (linux_wait_for_one_inferior): New function.
9800 (linux_wait): Call it.
9801 (linux_write_memory): Add const.
9802 (initialize_low): Call set_breakpoint_data.
9803 * linux-low.h (struct linux_target_ops): Add breakpoint
9805 * server.c (attach_inferior): Remove extra add_inferior
9807 * server.h: Include mem-break.h. Update inferior.c
9809 * target.c (read_inferior_memory)
9810 (write_inferior_memory): New functions.
9811 * target.h (read_inferior_memory)
9812 (write_inferior_memory): Change macros to prototypes.
9813 (struct target_ops): Update comments. Add const to write_memory
9816 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
9818 * linux-low.c (usr_store_inferior_registers): Support
9819 registers which are allowed to fail to store.
9820 * linux-low.h (linux_target_ops): Likewise.
9821 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9822 (ppc_cannot_store_register): FPSCR may not be storable.
9824 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9826 * server.h: Include <string.h> if HAVE_STRING_H.
9827 * ChangeLog: Correct paths in last ChangeLog entry.
9829 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9831 * linux-low.h: Remove obsolete prototypes.
9832 (struct linux_target_ops): New.
9833 (extern the_low_target): New.
9834 * linux-low.c (num_regs, regmap): Remove declarations.
9835 (register_addr): Use the_low_target explicitly.
9836 (fetch_register): Likewise.
9837 (usr_fetch_inferior_registers): Likewise.
9838 (usr_store_inferior_registers): Likewise.
9839 * linux-arm-low.c (num_regs): Remove.
9840 (arm_num_regs): Define.
9841 (arm_regmap): Renamed from regmap, made static.
9842 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9844 (arm_cannot_store_register): Renamed from cannot_store_register,
9846 (the_low_target): New.
9847 * linux-i386-low.c (num_regs): Remove.
9848 (i386_num_regs): Define.
9849 (i386_regmap): Renamed from regmap, made static.
9850 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9852 (i386_cannot_store_register): Renamed from cannot_store_register,
9854 (the_low_target): New.
9855 * linux-ia64-low.c (num_regs): Remove.
9856 (ia64_num_regs): Define.
9857 (ia64_regmap): Renamed from regmap, made static.
9858 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9860 (ia64_cannot_store_register): Renamed from cannot_store_register,
9862 (the_low_target): New.
9863 * linux-m68k-low.c (num_regs): Remove.
9864 (m68k_num_regs): Define.
9865 (m68k_regmap): Renamed from regmap, made static.
9866 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9868 (m68k_cannot_store_register): Renamed from cannot_store_register,
9870 (the_low_target): New.
9871 * linux-mips-low.c (num_regs): Remove.
9872 (mips_num_regs): Define.
9873 (mips_regmap): Renamed from regmap, made static.
9874 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9876 (mips_cannot_store_register): Renamed from cannot_store_register,
9878 (the_low_target): New.
9879 * linux-ppc-low.c (num_regs): Remove.
9880 (ppc_num_regs): Define.
9881 (ppc_regmap): Renamed from regmap, made static.
9882 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9884 (ppc_cannot_store_register): Renamed from cannot_store_register,
9886 (the_low_target): New.
9887 * linux-s390-low.c (num_regs): Remove.
9888 (s390_num_regs): Define.
9889 (s390_regmap): Renamed from regmap, made static.
9890 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9892 (s390_cannot_store_register): Renamed from cannot_store_register,
9894 (the_low_target): New.
9895 * linux-sh-low.c (num_regs): Remove.
9896 (sh_num_regs): Define.
9897 (sh_regmap): Renamed from regmap, made static.
9898 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9900 (sh_cannot_store_register): Renamed from cannot_store_register,
9902 (the_low_target): New.
9903 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9904 (the_low_target): New.
9906 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9908 * Makefile.in: Add stamp-h target.
9909 * configure.in: Create stamp-h.
9910 * configure: Regenerated.
9912 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9914 * inferiors.c: New file.
9915 * target.c: New file.
9916 * target.h: New file.
9917 * Makefile.in: Add target.o and inferiors.o. Update
9919 * linux-low.c (inferior_pid): New static variable,
9920 moved from server.c.
9921 (linux_create_inferior): Renamed from create_inferior.
9922 Call add_inferior. Return 0 on success instead of a PID.
9923 (linux_attach): Renamed from myattach.
9924 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9925 (linux_thread_alive): Renamed from mythread_alive.
9926 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9928 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9929 (regsets_store_inferior_registers): Correct error message.
9930 Add missing ``return 0''.
9931 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9932 (linux_store_registers): Renamed from store_inferior_registers.
9933 (linux_read_memory): Renamed from read_inferior_memory.
9934 (linux_write_memory): Renamed from write_inferior_memory.
9935 (linux_target_ops): New structure.
9936 (initialize_low): Call set_target_ops ().
9937 * remote-utils.c (unhexify): New function.
9938 (hexify): New function.
9939 (input_interrupt): Send signals to ``signal_pid''.
9940 * server.c (inferior_pid): Remove.
9941 (start_inferior): Update create_inferior call.
9942 (attach_inferior): Call add_inferior.
9943 (handle_query): New function.
9944 (main): Call handle_query for `q' packets.
9945 * server.h: Include "target.h". Remove obsolete prototypes.
9946 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9948 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9950 * Makefile.in: Add WARN_CFLAGS. Update configury
9952 * configure.in: Check for <string.h>
9953 * configure: Regenerate.
9954 * config.in: Regenerate.
9955 * gdbreplay.c: Include needed system headers.
9956 (remote_open): Remove strchr prototype.
9957 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9958 * regcache.c (supply_register): Change buf argument to const void *.
9959 (supply_register_by_name): Likewise.
9960 (collect_register): Change buf argument to void *.
9961 (collect_register_by_name): Likewise.
9962 * regcache.h: Add missing prototypes.
9963 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9964 * server.c (handle_query): New function.
9965 (attached): New static variable, moved out of main.
9966 (main): Quiet longjmp clobber warnings.
9967 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9968 * utils.c (error): Remove NORETURN.