1 2015-07-30 Yao Qi <yao.qi@linaro.org>
3 * linux-arm-low.c: Include arch/arm.h.
4 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5 (arm_store_gregset): Likewise.
7 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10 ptrace's 4th parameter.
12 2015-07-27 Yao Qi <yao.qi@linaro.org>
14 * configure.srv (case aarch64*-*-linux*): Don't set
17 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
19 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
21 * linux-arm-low.c: Likewise.
22 * linux-cris-low.c: Likewise.
23 * linux-crisv32-low.c: Likewise.
24 * linux-low.c: Likewise.
25 * linux-m68k-low.c: Likewise.
26 * linux-mips-low.c: Likewise.
27 * linux-nios2-low.c: Likewise.
28 * linux-s390-low.c: Likewise.
29 * linux-sparc-low.c: Likewise.
30 * linux-tic6x-low.c: Likewise.
31 * linux-tile-low.c: Likewise.
32 * linux-x86-low.c: Likewise.
34 2015-07-24 Pedro Alves <palves@redhat.com>
36 * config.in: Regenerate.
37 * configure: Regenerate.
39 2015-07-24 Pedro Alves <palves@redhat.com>
41 * acinclude.m4: Include ../ptrace.m4.
42 * configure.ac: Call GDB_AC_PTRACE.
43 * config.in, configure: Regenerate.
45 2015-07-24 Yao Qi <yao.qi@linaro.org>
47 * linux-low.c (linux_create_inferior): Remove setting to
48 proc->priv->new_inferior.
49 (linux_attach): Likewise.
50 (linux_low_filter_event): Likewise.
51 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
53 2015-07-24 Yao Qi <yao.qi@linaro.org>
55 * linux-low.c (linux_arch_setup): New function.
56 (linux_low_filter_event): If proc->tdesc is NULL and
57 proc->attached is true, call the_low_target.arch_setup.
58 Otherwise, keep status pending, and return.
59 (linux_resume_one_lwp_throw): Don't call get_pc if
60 thread->while_stepping isn't NULL. Don't call
61 get_thread_regcache if proc->tdesc is NULL.
62 (need_step_over_p): Return 0 if proc->tdesc is NULL.
63 (linux_target_ops): Install arch_setup.
64 * server.c (start_inferior): Call the_target->arch_setup.
65 * target.h (struct target_ops) <arch_setup>: New field.
66 (target_arch_setup): New marco.
67 * lynx-low.c (lynx_target_ops): Update.
68 * nto-low.c (nto_target_ops): Update.
69 * spu-low.c (spu_target_ops): Update.
70 * win32-low.c (win32_target_ops): Update.
72 2015-07-24 Yao Qi <yao.qi@linaro.org>
74 * linux-low.c (linux_add_process): Don't set
75 proc->priv->new_inferior.
76 (linux_create_inferior): Set proc->priv->new_inferior to 1.
77 (linux_attach): Likewise.
79 2015-07-24 Yao Qi <yao.qi@linaro.org>
81 * server.c (start_inferior): Code refactor.
83 2015-07-24 Yao Qi <yao.qi@linaro.org>
85 * server.c (process_serial_event): Set general_thread.
87 2015-07-21 Yao Qi <yao.qi@linaro.org>
89 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
90 aarch64_linux_get_debug_reg_capacity.
92 2015-07-17 Yao Qi <yao.qi@linaro.org>
94 * Makefile.in (aarch64-linux-hw-point.o): New rule.
95 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
96 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
97 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
98 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
99 (AARCH64_HWP_ALIGNMENT): Likewise.
100 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
101 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
102 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
103 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
104 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
105 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
106 (struct aarch64_debug_reg_state): Likewise.
107 (struct arch_lwp_info): Likewise.
108 (aarch64_align_watchpoint): Likewise.
109 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
110 (aarch64_watchpoint_length): Likewise.
111 (aarch64_point_encode_ctrl_reg): Likewise
112 (aarch64_point_is_aligned): Likewise.
113 (aarch64_align_watchpoint): Likewise.
114 (aarch64_linux_set_debug_regs):
115 (aarch64_dr_state_insert_one_point): Likewise.
116 (aarch64_dr_state_remove_one_point): Likewise.
117 (aarch64_handle_breakpoint): Likewise.
118 (aarch64_handle_aligned_watchpoint): Likewise.
119 (aarch64_handle_unaligned_watchpoint): Likewise.
120 (aarch64_handle_watchpoint): Likewise.
122 2015-07-17 Yao Qi <yao.qi@linaro.org>
124 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
125 and don't aarch64_get_debug_reg_state. All callers update.
126 (aarch64_handle_aligned_watchpoint): Likewise.
127 (aarch64_handle_unaligned_watchpoint): Likewise.
128 (aarch64_handle_watchpoint): Likewise.
129 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
130 (aarch64_remove_point): Likewise.
132 2015-07-17 Yao Qi <yao.qi@linaro.org>
134 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
136 (aarch64_handle_unaligned_watchpoint): Likewise.
138 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
140 Revert the previous 3 commits:
141 Move gdb_regex* to common/
142 Move linux_find_memory_regions_full & co.
143 gdbserver build-id attribute generator
145 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
146 Jan Kratochvil <jan.kratochvil@redhat.com>
148 gdbserver build-id attribute generator.
149 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
150 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
151 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
153 (get_dynamic): Use find_pdhr to traverse program headers.
154 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
155 (compare_mapping_entry_range, struct find_memory_region_callback_data)
156 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
157 (get_hex_build_id): New.
158 (linux_qxfer_libraries_svr4): Add optional build-id attribute
159 to reply XML document.
161 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
162 Jan Kratochvil <jan.kratochvil@redhat.com>
164 * target.c: Include target/target-utils.h and fcntl.h.
165 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
166 (target_fileio_read_stralloc): New functions.
168 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
170 * Makefile.in (OBS): Add gdb_regex.o.
172 * config.in: Rebuilt.
173 * configure: Rebuilt.
175 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
176 Jan Kratochvil <jan.kratochvil@redhat.com>
178 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
179 * Makefile.in (OBS): Add target-utils.o.
180 (linux-maps.o, target-utils.o): New.
181 * configure.srv (srv_linux_obj): Add linux-maps.o.
183 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
185 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
187 (the_low_target): Install it.
189 2015-07-14 Pedro Alves <palves@redhat.com>
191 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
192 Instead, ignore ECHILD, and throw an error for other errnos.
194 2015-07-10 Pedro Alves <palves@redhat.com>
196 * event-loop.c (struct callback_event) <data>: Change type to
197 gdb_client_data instance instead of gdb_client_data pointer.
198 (append_callback_event): Adjust.
200 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
202 * linux-aarch64-low.c: Add comments for each linux_target_ops
203 method. Remove comments already covered in target_ops and
204 linux_target_ops definitions.
205 (the_low_target): Add comments for each unimplemented method.
207 2015-07-09 Yao Qi <yao.qi@linaro.org>
209 * linux-aarch64-low.c (aarch64_regmap): Remove.
210 (aarch64_usrregs_info): Remove.
211 (regs_info): Set field usrregs to NULL.
213 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
215 * linux-low.c: Include "rsp-low.h"
216 (linux_low_encode_pt_config, linux_low_encode_raw): New.
217 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
218 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
219 (handle_btrace_enable_pt): New.
220 (handle_btrace_general_set): Support "pt".
221 (handle_btrace_conf_general_set): Support "pt:size".
223 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
225 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
228 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
230 * linux-aarch64-low.c: Remove comment about endianness.
231 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
232 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
235 2015-06-24 Gary Benson <gbenson@redhat.com>
237 * linux-i386-ipa.c (stdint.h): Do not include.
238 * lynx-i386-low.c (stdint.h): Likewise.
239 * lynx-ppc-low.c (stdint.h): Likewise.
240 * mem-break.c (stdint.h): Likewise.
241 * thread-db.c (stdint.h): Likewise.
242 * tracepoint.c (stdint.h): Likewise.
243 * win32-low.c (stdint.h): Likewise.
245 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
247 * server.c (write_qxfer_response): Update call to
248 remote_escape_output.
250 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
251 Jan Kratochvil <jan.kratochvil@redhat.com>
253 Merge multiple hex conversions.
254 * gdbreplay.c (tohex): Rename to 'fromhex'.
255 (logchar): Use fromhex.
257 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
259 * server.c (handle_qxfer_libraries): Set `version' attribute for
262 2015-06-10 Gary Benson <gbenson@redhat.com>
264 * target.h (struct target_ops) <multifs_open>: New field.
265 <multifs_unlink>: Likewise.
266 <multifs_readlink>: Likewise.
267 * linux-low.c (nat/linux-namespaces.h): New include.
268 (linux_target_ops): Initialize the_target->multifs_open,
269 the_target->multifs_unlink and the_target->multifs_readlink.
270 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
271 * hostio.c (hostio_fs_pid): New static variable.
272 (hostio_handle_new_gdb_connection): New function.
273 (handle_setfs): Likewise.
274 (handle_open): Use the_target->multifs_open as appropriate.
275 (handle_unlink): Use the_target->multifs_unlink as appropriate.
276 (handle_readlink): Use the_target->multifs_readlink as
278 (handle_vFile): Handle vFile:setfs packets.
279 * server.c (handle_query): Call hostio_handle_new_gdb_connection
280 after target_handle_new_gdb_connection.
282 2015-06-10 Gary Benson <gbenson@redhat.com>
284 * configure.ac (AC_CHECK_FUNCS): Add setns.
285 * config.in: Regenerate.
286 * configure: Likewise.
287 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
288 (linux-namespaces.o): New rule.
289 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
291 2015-06-09 Gary Benson <gbenson@redhat.com>
293 * hostio.c (handle_open): Process mode argument with
296 2015-06-01 Yao Qi <yao.qi@linaro.org>
298 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
299 * linux-x86-low.c: Likewise.
301 2015-05-28 Don Breazeal <donb@codesourcery.com>
303 * linux-low.c (handle_extended_wait): Initialize
304 thread_info.last_resume_kind for new fork children.
306 2015-05-15 Pedro Alves <palves@redhat.com>
308 * target.h (target_handle_new_gdb_connection): Rewrite using if
311 2015-05-14 Joel Brobecker <brobecker@adacore.com>
313 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
314 * configure, config.in: Regenerate.
315 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
318 2015-05-12 Don Breazeal <donb@codesourcery.com>
320 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
321 PTRACE_EVENT_VFORK_DONE.
322 (linux_low_ptrace_options, extended_event_reported): Add vfork
324 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
325 and "vforkdone" for RSP 'T' Stop Reply Packet.
326 * server.h (report_vfork_events): Declare
329 2015-05-12 Don Breazeal <donb@codesourcery.com>
331 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
332 (the_low_target) <new_fork>: Initialize new member.
333 * linux-arm-low.c (arm_new_fork): New function.
334 (the_low_target) <new_fork>: Initialize new member.
335 * linux-low.c (handle_extended_wait): Call new target function
337 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
338 * linux-mips-low.c (mips_add_watchpoint): New function
339 extracted from mips_insert_point.
340 (the_low_target) <new_fork>: Initialize new member.
341 (mips_linux_new_fork): New function.
342 (mips_insert_point): Call mips_add_watchpoint.
343 * linux-x86-low.c (x86_linux_new_fork): New function.
344 (the_low_target) <new_fork>: Initialize new member.
346 2015-05-12 Don Breazeal <donb@codesourcery.com>
348 * linux-low.c (handle_extended_wait): Implement return value,
349 rename argument 'event_child' to 'event_lwp', handle
350 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
351 (linux_low_ptrace_options): New function.
352 (linux_low_filter_event): Call linux_low_ptrace_options,
353 use different argument fo linux_enable_event_reporting,
354 use return value from handle_extended_wait.
355 (extended_event_reported): New function.
356 (linux_wait_1): Call extended_event_reported and set
357 status to report fork events.
358 (linux_write_memory): Add pid to debug message.
359 (reset_lwp_ptrace_options_callback): New function.
360 (linux_handle_new_gdb_connection): New function.
361 (linux_target_ops): Initialize new structure member.
362 * linux-low.h (struct lwp_info) <waitstatus>: New member.
363 * lynx-low.c: Initialize new structure member.
364 * remote-utils.c (prepare_resume_reply): Implement stop reason
365 "fork" for "T" stop message.
366 * server.c (handle_query): Call handle_new_gdb_connection.
367 * server.h (report_fork_events): Declare global flag.
368 * target.h (struct target_ops) <handle_new_gdb_connection>:
370 (target_handle_new_gdb_connection): New macro.
371 * win32-low.c: Initialize new structure member.
373 2015-05-12 Don Breazeal <donb@codesourcery.com>
375 * mem-break.c (APPEND_TO_LIST): Define macro.
376 (clone_agent_expr): New function.
377 (clone_one_breakpoint): New function.
378 (clone_all_breakpoints): New function.
379 * mem-break.h: Declare new functions.
381 2015-05-12 Don Breazeal <donb@codesourcery.com>
383 * linux-low.c (linux_supports_fork_events): New function.
384 (linux_supports_vfork_events): New function.
385 (linux_target_ops): Initialize new structure members.
386 (initialize_low): Call linux_check_ptrace_features.
387 * lynx-low.c (lynx_target_ops): Initialize new structure
389 * server.c (report_fork_events, report_vfork_events):
391 (handle_query): Add new features to qSupported packet and
393 (captured_main): Initialize new global variables.
394 * target.h (struct target_ops) <supports_fork_events>:
396 <supports_vfork_events>: New member.
397 (target_supports_fork_events): New macro.
398 (target_supports_vfork_events): New macro.
399 * win32-low.c (win32_target_ops): Initialize new structure
402 2015-05-12 Gary Benson <gbenson@redhat.com>
404 * server.c (handle_qxfer_exec_file): Use current process
407 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
409 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
410 Remove HAVE_PTRACE_GETREGS conditionals.
411 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
412 instead of PTRACE_GETREGS and PTRACE_SETREGS.
414 2015-05-08 Yao Qi <yao.qi@linaro.org>
416 * linux-low.c (linux_supports_conditional_breakpoints): New
418 (linux_target_ops): Install new target method.
419 * lynx-low.c (lynx_target_ops): Install NULL hook for
420 supports_conditional_breakpoints.
421 * nto-low.c (nto_target_ops): Likewise.
422 * spu-low.c (spu_target_ops): Likewise.
423 * win32-low.c (win32_target_ops): Likewise.
424 * server.c (handle_query): Check
425 target_supports_conditional_breakpoints.
426 * target.h (struct target_ops) <supports_conditional_breakpoints>:
428 (target_supports_conditional_breakpoints): New macro.
430 2015-05-06 Pedro Alves <palves@redhat.com>
433 * server.c (start_inferior): If the process exits, mourn it.
435 2015-04-21 Gary Benson <gbenson@redhat.com>
437 * hostio.c (fileio_open_flags_to_host): Factored out to
438 fileio_to_host_openflags in common/fileio.c. Single use
441 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
443 * linux-xtensa-low.c (xtensa_fill_gregset)
444 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
447 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
449 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
450 (regs_info): Replace usrregs pointer with NULL.
452 2015-04-17 Gary Benson <gbenson@redhat.com>
454 * target.h (struct target_ops) <pid_to_exec_file>: New field.
455 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
456 * server.c (handle_qxfer_exec_file): New function.
457 (qxfer_packets): Add exec-file entry.
458 (handle_query): Report qXfer:exec-file:read as supported packet.
460 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
462 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
464 2015-04-09 Gary Benson <gbenson@redhat.com>
466 * hostio-errno.c (errno_to_fileio_error): Remove function.
467 Update caller to use remote_fileio_to_fio_error.
469 2015-04-09 Yao Qi <yao.qi@linaro.org>
471 * linux-low.c (linux_insert_point): Call
472 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
473 (linux_remove_point): Call remove_memory_breakpoint if type is
475 * linux-x86-low.c (x86_insert_point): Don't call
476 insert_memory_breakpoint.
477 (x86_remove_point): Don't call remove_memory_breakpoint.
479 2015-04-01 Pedro Alves <palves@redhat.com>
480 Cleber Rosa <crosa@redhat.com>
482 * server.c (gdbserver_usage): Reorganize and extend the usage
485 2015-03-24 Pedro Alves <palves@redhat.com>
487 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
488 output. Also dump TRAP_TRACE.
489 (linux_low_filter_event): In debug output, distinguish a
490 resume_stop SIGSTOP from a delayed SIGSTOP.
492 2015-03-24 Gary Benson <gbenson@redhat.com>
494 * linux-x86-low.c (x86_linux_new_thread): Moved to
496 (x86_linux_prepare_to_resume): Likewise.
498 2015-03-24 Gary Benson <gbenson@redhat.com>
500 * Makefile.in (x86-linux-dregs.o): New rule.
501 * configure.srv: Add x86-linux-dregs.o to relevant targets.
502 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
503 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
504 (x86_linux_dr_get): Likewise.
505 (x86_linux_dr_set): Likewise.
506 (update_debug_registers_callback): Likewise.
507 (x86_linux_dr_set_addr): Likewise.
508 (x86_linux_dr_get_addr): Likewise.
509 (x86_linux_dr_set_control): Likewise.
510 (x86_linux_dr_get_control): Likewise.
511 (x86_linux_dr_get_status): Likewise.
512 (x86_linux_update_debug_registers): Likewise.
514 2015-03-24 Gary Benson <gbenson@redhat.com>
516 * linux-x86-low.c (x86_linux_update_debug_registers):
517 New function, factored out from...
518 (x86_linux_prepare_to_resume): ...this.
520 2015-03-24 Gary Benson <gbenson@redhat.com>
522 * linux-x86-low.c (x86_linux_dr_get): Update comments.
523 (x86_linux_dr_set): Likewise.
524 (update_debug_registers_callback): Likewise.
525 (x86_linux_dr_set_addr): Likewise.
526 (x86_linux_dr_get_addr): Likewise.
527 (x86_linux_dr_set_control): Likewise.
528 (x86_linux_dr_get_control): Likewise.
529 (x86_linux_dr_get_status): Likewise.
530 (x86_linux_prepare_to_resume): Likewise.
532 2015-03-24 Gary Benson <gbenson@redhat.com>
534 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
535 Use perror_with_name. Pass string through gettext.
536 (x86_linux_dr_set): Likewise.
538 2015-03-24 Gary Benson <gbenson@redhat.com>
540 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
541 (x86_linux_dr_set_addr): ...this.
542 (x86_dr_low_get_addr): Rename to...
543 (x86_linux_dr_get_addr): ...this.
544 (x86_dr_low_set_control): Rename to...
545 (x86_linux_dr_set_control): ...this.
546 (x86_dr_low_get_control): Rename to...
547 (x86_linux_dr_get_control): ...this.
548 (x86_dr_low_get_status): Rename to...
549 (x86_linux_dr_get_status): ...this.
550 (x86_dr_low): Update with new function names.
552 2015-03-24 Gary Benson <gbenson@redhat.com>
554 * Makefile.in (x86-linux.o): New rule.
555 * configure.srv: Add x86-linux.o to relevant targets.
556 * linux-low.c (lwp_set_arch_private_info): New function.
557 (lwp_arch_private_info): Likewise.
558 * linux-x86-low.c: Include nat/x86-linux.h.
559 (arch_lwp_info): Removed structure.
560 (update_debug_registers_callback):
561 Use lwp_set_debug_registers_changed.
562 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
563 and lwp_set_debug_registers_changed.
564 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
566 2015-03-24 Gary Benson <gbenson@redhat.com>
568 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
569 * linux-arm-low.c (arm_new_thread): Likewise.
570 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
571 * linux-mips-low.c (mips_linux_new_thread): Likewise.
572 * linux-x86-low.c (x86_linux_new_thread): Likewise.
573 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
575 2015-03-24 Gary Benson <gbenson@redhat.com>
577 * linux-low.c (ptid_of_lwp): New function.
578 (lwp_is_stopped): Likewise.
579 (lwp_stop_reason): Likewise.
580 * linux-x86-low.c (update_debug_registers_callback):
582 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
585 2015-03-24 Gary Benson <gbenson@redhat.com>
587 * linux-low.h (linux_stop_lwp): Remove declaration.
589 2015-03-24 Gary Benson <gbenson@redhat.com>
591 * linux-low.h: Include nat/linux-nat.h.
592 * linux-low.c (iterate_over_lwps_args): New structure.
593 (iterate_over_lwps_filter): New function.
594 (iterate_over_lwps): Likewise.
595 * linux-x86-low.c (update_debug_registers_callback):
596 Update signature to what iterate_over_lwps expects.
597 Remove PID check that iterate_over_lwps now performs.
598 (x86_dr_low_set_addr): Use iterate_over_lwps.
599 (x86_dr_low_set_control): Likewise.
601 2015-03-24 Gary Benson <gbenson@redhat.com>
603 * linux-x86-low.c (x86_debug_reg_state): New function.
604 (x86_linux_prepare_to_resume): Use the above.
606 2015-03-24 Gary Benson <gbenson@redhat.com>
608 * linux-low.c (current_lwp_ptid): New function.
609 * linux-x86-low.c: Include nat/linux-nat.h.
610 (x86_dr_low_get_addr): Use current_lwp_ptid.
611 (x86_dr_low_get_control): Likewise.
612 (x86_dr_low_get_status): Likewise.
614 2015-03-20 Pedro Alves <palves@redhat.com>
616 * tracepoint.c (cmd_qtstatus): Make "str" const.
618 2015-03-20 Pedro Alves <palves@redhat.com>
620 * server.c (handle_general_set): Make "req_str" const.
622 2015-03-19 Pedro Alves <palves@redhat.com>
624 * linux-low.c (linux_resume_one_lwp): Rename to ...
625 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
626 instead call perror_with_name.
627 (check_ptrace_stopped_lwp_gone): New function.
628 (linux_resume_one_lwp): Reimplement as wrapper around
629 linux_resume_one_lwp_throw that swallows errors if the LWP is
632 2015-03-19 Pedro Alves <palves@redhat.com>
634 * linux-low.c (count_events_callback, select_event_lwp_callback):
635 No longer check whether the thread has resume_stop as last resume
638 2015-03-19 Pedro Alves <palves@redhat.com>
640 * linux-low.c (count_events_callback, select_event_lwp_callback):
641 Use the lwp's status_pending_p field, not the thread's.
643 2015-03-19 Pedro Alves <palves@redhat.com>
645 * linux-low.c (select_event_lwp_callback): Update comments to
646 no longer mention SIGTRAP.
648 2015-03-18 Gary Benson <gbenson@redhat.com>
650 * server.c (handle_query): Do not report vFile:fstat as supported.
652 2015-03-11 Gary Benson <gbenson@redhat.com>
654 * hostio.c (sys/types.h): New include.
655 (sys/stat.h): Likewise.
656 (common-remote-fileio.h): Likewise.
657 (handle_fstat): New function.
658 (handle_vFile): Handle vFile:fstat packets.
660 2015-03-11 Gary Benson <gbenson@redhat.com>
662 * configure.ac (AC_CHECK_MEMBERS): Add checks for
663 struct stat.st_blocks and struct stat.st_blksize.
664 * configure: Regenerate.
665 * config.in: Likewise.
666 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
667 (OBS): Add common-remote-fileio.o.
668 (common-remote-fileio.o): New rule.
670 2015-03-09 Pedro Alves <palves@redhat.com>
672 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
673 'struct sockaddr' pointer in 'accept' call.
675 2015-03-09 Pedro Alves <palves@redhat.com>
678 2015-03-07 Pedro Alves <palves@redhat.com>
679 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
680 or <winsock2.h> here. Instead include "gdb_socket.h".
681 (remote_open): Use union gdb_sockaddr_u.
682 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
683 or <winsock2.h> here. Instead include "gdb_socket.h".
684 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
685 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
687 (init_named_socket, gdb_agent_helper_thread): Use union
690 2015-03-07 Pedro Alves <palves@redhat.com>
692 * configure.ac (build_warnings): Move
693 -Wdeclaration-after-statement to the C-specific set.
694 * configure: Regenerate.
696 2015-03-07 Pedro Alves <palves@redhat.com>
698 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
699 or <winsock2.h> here. Instead include "gdb_socket.h".
700 (remote_open): Use union gdb_sockaddr_u.
701 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
702 or <winsock2.h> here. Instead include "gdb_socket.h".
703 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
704 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
706 (init_named_socket, gdb_agent_helper_thread): Use union
709 2015-03-07 Pedro Alves <palves@redhat.com>
711 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
714 2015-03-06 Yao Qi <yao.qi@linaro.org>
716 * linux-aarch64-low.c (aarch64_insert_point): Use
717 show_debug_regs as a boolean.
718 (aarch64_remove_point): Likewise.
720 2015-03-05 Pedro Alves <palves@redhat.com>
722 * lynx-low.c (lynx_target_ops): Install NULL hooks for
723 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
724 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
725 * nto-low.c (nto_target_ops): Likewise.
726 * spu-low.c (spu_target_ops): Likewise.
727 * win32-low.c (win32_target_ops): Likewise.
729 2015-03-04 Pedro Alves <palves@redhat.com>
731 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
732 Decide whether a breakpoint triggered based on the SIGTRAP's
734 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
735 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
736 (linux_low_filter_event): Check for breakpoints before checking
738 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
740 (linux_stopped_by_sw_breakpoint)
741 (linux_supports_stopped_by_sw_breakpoint)
742 (linux_stopped_by_hw_breakpoint)
743 (linux_supports_stopped_by_hw_breakpoint): New functions.
744 (linux_target_ops): Install new target methods.
746 2015-03-04 Pedro Alves <palves@redhat.com>
748 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
749 * server.c (swbreak_feature, hwbreak_feature): New globals.
750 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
751 (captured_main): Clear swbreak_feature and hwbreak_feature.
752 * server.h (swbreak_feature, hwbreak_feature): Declare.
753 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
754 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
755 supports_stopped_by_hw_breakpoint>: New fields.
756 (target_supports_stopped_by_sw_breakpoint)
757 (target_stopped_by_sw_breakpoint)
758 (target_supports_stopped_by_hw_breakpoint)
759 (target_stopped_by_hw_breakpoint): Declare.
761 2015-03-04 Pedro Alves <palves@redhat.com>
763 enum lwp_stop_reason -> enum target_stop_reason
764 * linux-low.c (check_stopped_by_breakpoint): Adjust.
765 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
766 (linux_wait_1, stuck_in_jump_pad_callback)
767 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
768 (linux_stopped_by_watchpoint):
769 * linux-low.h (enum lwp_stop_reason): Delete.
770 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
771 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
773 2015-03-04 Yao Qi <yao.qi@linaro.org>
775 * Makefile.in (SFILES): Add linux-aarch64-low.c.
777 2015-03-03 Gary Benson <gbenson@redhat.com>
779 * hostio.c (handle_vFile): Fix prefix lengths.
781 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
783 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
786 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
788 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
789 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
790 (clean): Add "rm -f" for above C files.
791 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
792 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
793 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
794 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
795 * linux-s390-low.c (HWCAP_S390_VX): New macro.
796 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
797 (init_registers_s390x_vx_linux64)
798 (init_registers_s390x_tevx_linux64)
799 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
800 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
802 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
803 (s390_store_vxrs_high): New functions.
804 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
806 (s390_arch_setup): Add logic for selecting one of the new target
807 descriptions. Activate the new vector regsets if applicable.
808 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
809 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
810 and init_registers_s390x_tevx_linux64.
812 2015-03-01 Pedro Alves <palves@redhat.com>
814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
817 2015-02-27 Pedro Alves <palves@redhat.com>
819 * linux-x86-low.c (u_debugreg_offset): New function.
820 (x86_linux_dr_get, x86_linux_dr_set): Use it.
822 2015-02-27 Pedro Alves <palves@redhat.com>
824 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
825 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
826 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
827 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
828 (ps_lsetfpregs, ps_getpid)
829 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
830 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
831 (ps_lsetxregs, ps_plog): Declare.
833 2015-02-27 Pedro Alves <palves@redhat.com>
835 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
836 IP_AGENT_EXPORT_FUNC.
837 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
838 IP_AGENT_EXPORT_FUNC.
839 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
840 (IP_AGENT_EXPORT): Delete.
841 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
842 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
843 (gdb_trampoline_buffer_error, collecting, gdb_collect)
844 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
845 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
846 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
847 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
848 (traceframe_read_count, traceframe_write_count)
849 (traceframes_created, trace_state_variables, get_raw_reg)
850 (get_trace_state_variable_value, set_trace_state_variable_value)
851 (ust_loaded, helper_thread_id, cmd_buf): Use
852 IPA_SYM_EXPORTED_NAME.
853 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
854 (tracepoints) Use IP_AGENT_EXPORT_VAR.
855 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
856 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
857 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
858 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
859 EXTERN_C_PUSH/EXTERN_C_POP.
860 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
861 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
862 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
863 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
864 (traceframe_write_count, traceframe_read_count)
865 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
866 (about_to_request_buffer_space, get_trace_state_variable_value)
867 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
868 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
869 EXTERN_C_PUSH/EXTERN_C_POP.
870 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
871 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
872 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
873 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
874 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
875 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
876 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
877 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
879 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
880 (IP_AGENT_EXPORT_VAR_DECL): Define.
882 (gdb_agent_get_raw_reg): Declare.
884 2015-02-27 Tom Tromey <tromey@redhat.com>
885 Pedro Alves <palves@redhat.com>
887 Rename symbols whose names are reserved C++ keywords throughout.
889 2015-02-27 Pedro Alves <palves@redhat.com>
891 * Makefile.in (COMPILER): New, get it from autoconf.
892 (CXX): Get from autoconf instead.
893 (COMPILE.pre): Use COMPILER.
894 (CC-LD): Rename to ...
895 (CC_LD): ... this. Use COMPILER.
896 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
897 (CXX_FOR_TARGET): Default to g++ instead of gcc.
898 * acinclude.m4: Include build-with-cxx.m4.
899 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
900 Disable -Werror by default if building in C++ mode.
901 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
902 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
903 the C++ compiler. Save/restore CXXFLAGS too.
904 * configure: Regenerate.
906 2015-02-27 Pedro Alves <palves@redhat.com>
908 * acinclude.m4: Include libiberty.m4.
909 * configure.ac: Call libiberty_INIT.
910 * config.in, configure: Regenerate.
912 2015-02-26 Pedro Alves <palves@redhat.com>
914 * linux-low.c (linux_wait_1): When incrementing the PC past a
915 program breakpoint always use the_low_target.breakpoint_len as
916 increment, rather than the maximum between that and
917 the_low_target.decr_pc_after_break.
919 2015-02-23 Pedro Alves <palves@redhat.com>
921 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
922 thread was doing a step-over; always adjust the PC if
923 we stepped over a permanent breakpoint.
924 (linux_wait_1): If we stepped over breakpoint that was on top of a
925 permanent breakpoint, manually advance the PC past it.
927 2015-02-23 Pedro Alves <palves@redhat.com>
929 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
931 (x86_fill_gregset, x86_store_gregset): Use it when handling
934 2015-02-20 Pedro Alves <palves@redhat.com>
936 * thread-db.c: Include "nat/linux-procfs.h".
937 (thread_db_init): Skip listing new threads if the kernel supports
938 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
940 2015-02-20 Pedro Alves <palves@redhat.com>
942 * linux-low.c (status_pending_p_callback): Use ptid_match.
944 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
947 * linux-low.c (wstatus_maybe_breakpoint): Remove.
948 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
949 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
951 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
954 * tracepoint.c (cmd_qtinit): Add check for current_thread.
956 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
958 * linux-low.c (linux_low_btrace_conf): Print size.
959 * server.c (handle_btrace_conf_general_set): New.
960 (hanle_general_set): Call handle_btrace_conf_general_set.
961 (handle_query): Report Qbtrace-conf:bts:size as supported.
963 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
965 * linux-low.c (linux_low_enable_btrace): Update parameters.
966 (linux_low_btrace_conf): New.
967 (linux_target_ops)<to_btrace_conf>: Initialize.
968 * server.c (current_btrace_conf): New.
969 (handle_btrace_enable): Rename to ...
970 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
971 to target_enable_btrace. Update comment. Update users.
972 (handle_qxfer_btrace_conf): New.
973 (qxfer_packets): Add btrace-conf entry.
974 (handle_query): Report qXfer:btrace-conf:read as supported packet.
975 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
976 (target_ops)<read_btrace_conf>: New.
977 (target_enable_btrace): Update parameters.
978 (target_read_btrace_conf): New.
980 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
982 * server.c (handle_btrace_general_set): Remove call to
983 target_supports_btrace.
984 (supported_btrace_packets): New.
985 (handle_query): Call supported_btrace_packets.
986 * target.h: include btrace-common.h.
987 (btrace_target_info): Removed.
988 (supports_btrace, target_supports_btrace): Update parameters.
990 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
992 * Makefile.in (SFILES): Add common/btrace-common.c.
993 (OBS): Add common/btrace-common.o.
994 (btrace-common.o): Add build rules.
995 * linux-low: Include btrace-common.h.
996 (linux_low_read_btrace): Use struct btrace_data. Call
997 btrace_data_init and btrace_data_fini.
999 2015-02-06 Pedro Alves <palves@redhat.com>
1001 * thread-db.c (find_new_threads_callback): Add debug output.
1003 2015-02-04 Pedro Alves <palves@redhat.com>
1005 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1006 (resume_stopped_resumed_lwps): New function.
1007 (linux_wait_for_event_filtered): Use it.
1009 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1011 * Makefile.in (SFILES): Add linux-personality.c.
1012 (linux-personality.o): New rule.
1013 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1014 list of objects to be built.
1015 * linux-low.c: Include nat/linux-personality.h.
1016 (linux_create_inferior): Remove code to disable address space
1017 randomization (moved to ../nat/linux-personality.c). Create
1018 cleanup to disable address space randomization.
1020 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1022 * Makefile.in (posix-strerror.o): New rule.
1023 (mingw-strerror.o): Likewise.
1024 * configure: Regenerated.
1025 * configure.ac: Source file ../common/common.host. Initialize new
1026 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1028 2015-01-14 Yao Qi <yao@codesourcery.com>
1030 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1031 (ppc-linux.o): New rule.
1032 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1033 * configure.ac: AC_CHECK_FUNCS(getauxval).
1034 * config.in: Re-generated.
1035 * configure: Re-generated.
1036 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1037 ppc64_64bit_inferior_p
1039 2015-01-14 Yao Qi <yao@codesourcery.com>
1041 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1042 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1043 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1044 (PT_ORIG_R3, PT_TRAP): Likewise.
1045 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1046 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1047 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1049 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1051 * i387-fp.c (i387_cache_to_xsave): In look over
1052 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1053 zmmh_low_space field by use of zmmh_high_space.
1055 2015-01-09 Pedro Alves <palves@redhat.com>
1057 * linux-low.c (step_over_bkpt): Move higher up in the file.
1058 (handle_extended_wait): Don't store the stop_pc here.
1059 (get_stop_pc): Adjust comments and rename to ...
1060 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1061 stopped for a software breakpoint or hardware breakpoint.
1062 (thread_still_has_status_pending_p): New function.
1063 (status_pending_p_callback): Use
1064 thread_still_has_status_pending_p. If the event is no longer
1065 interesting, resume the LWP.
1066 (handle_tracepoints): Add assert.
1067 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1068 (wstatus_maybe_breakpoint): New function.
1069 (cancel_breakpoint): Delete function.
1070 (check_stopped_by_watchpoint): New function, factored out from
1071 linux_low_filter_event.
1072 (lp_status_maybe_breakpoint): Delete function.
1073 (linux_low_filter_event): Remove filter_ptid argument.
1074 Leave thread group exits pending here. Store the LWP's stop PC.
1075 Always leave events pending.
1076 (linux_wait_for_event_filtered): Pull all events out of the
1077 kernel, and leave them all pending.
1078 (count_events_callback, select_event_lwp_callback): Consider all
1080 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1081 (select_event_lwp): Only give preference to the stepping LWP in
1082 all-stop mode. Adjust comments.
1083 (ignore_event): New function.
1084 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1085 references to cancel_breakpoints. Adjust to renames. Also give
1086 equal priority to all LWPs that have had events in non-stop mode.
1087 If reporting a software breakpoint event, unadjust the LWP's PC.
1088 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1089 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1091 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1092 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1093 (linux_stopped_by_watchpoint): Adjust.
1094 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1095 * linux-low.h (enum lwp_stop_reason): New.
1096 (struct lwp_info) <stop_pc>: Adjust comment.
1097 <stopped_by_watchpoint>: Delete field.
1098 <stop_reason>: New field.
1099 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1100 * mem-break.c (software_breakpoint_inserted_here)
1101 (hardware_breakpoint_inserted_here): New function.
1102 * mem-break.h (software_breakpoint_inserted_here)
1103 (hardware_breakpoint_inserted_here): Declare.
1104 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1105 (cancel_breakpoints): Delete.
1106 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1107 (upload_fast_traceframes): Remove references to
1110 2015-01-09 Pedro Alves <palves@redhat.com>
1112 * thread-db.c (find_new_threads_callback): Ignore thread if the
1113 kernel thread ID is -1.
1115 2015-01-09 Pedro Alves <palves@redhat.com>
1117 * linux-low.c (linux_attach_fail_reason_string): Move to
1118 nat/linux-ptrace.c, and rename.
1119 (linux_attach_lwp): Update comment.
1120 (attach_proc_task_lwp_callback): New function.
1121 (linux_attach): Adjust to rename and use
1122 linux_proc_attach_tgid_threads.
1123 (linux_attach_fail_reason_string): Delete declaration.
1125 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1127 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1128 * server.c (gdbserver_version): Likewise.
1130 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1132 * remote-utils.c: Include ctype.h.
1133 (input_interrupt): Explicitly handle the case when the char
1134 received is the NUL byte. Improve the printing of non-ASCII
1137 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1139 * linux-low.c (linux_low_filter_event): Update call to
1140 linux_enable_event_reporting following the addition of
1141 a new parameter to that function.
1143 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1146 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1147 (AARCH64_FPCR_REGNO): Likewise.
1148 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1149 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1150 (aarch64_store_fpregset): Likewise.
1152 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1154 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1155 Remove FIXME comment about assumption about N.
1157 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1159 * configure.ac: If large-file support is disabled in GDBserver,
1160 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1161 * configure: Regenerate.
1163 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1165 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1166 warning upon ENODATA from ptrace.
1167 * linux-s390-low.c (s390_store_tdb): New.
1168 (s390_regsets): Add regset for NT_S390_TDB.
1170 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1172 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1173 without a fill_function.
1174 * linux-s390-low.c (s390_fill_last_break): Remove.
1175 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1176 (s390_arch_setup): Use regset's size instead of fill_function for
1179 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1181 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1182 the regset's store function when ptrace returned an error.
1183 * regcache.c (get_thread_regcache): Invalidate register cache
1184 before fetching inferior's registers.
1186 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1188 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1189 while-loop as for-loop.
1190 (regsets_store_inferior_registers): Likewise.
1192 2014-11-28 Yao Qi <yao@codesourcery.com>
1194 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1195 * config.in, configure: Re-generate.
1196 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1199 2014-11-21 Yao Qi <yao@codesourcery.com>
1201 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1202 (AC_CHECK_HEADERS): Remove malloc.h.
1203 * configure: Re-generated.
1204 * config.in: Re-generated.
1205 * server.h: Don't include alloca.h and malloc.h.
1206 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1207 Don't include malloc.h.
1209 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1211 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1212 corresponding ERRNO check in same block.
1214 2014-11-12 Pedro Alves <palves@redhat.com>
1216 * server.c (cont_thread): Update comment.
1217 (start_inferior, attach_inferior): No longer clear cont_thread.
1218 (handle_v_cont): No longer set cont_thread.
1219 (captured_main): Clear cont_thread each time a GDB connects.
1221 2014-11-12 Pedro Alves <palves@redhat.com>
1223 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1224 thread, and don't resume all threads if the Hc thread has exited.
1226 2014-11-12 Pedro Alves <palves@redhat.com>
1228 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1229 the process group instead of to a specific LWP.
1231 2014-10-15 Pedro Alves <palves@redhat.com>
1234 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1236 (arm_set_thread_context): Delete.
1237 (the_low_target): Adjust.
1238 * win32-i386-low.c (debug_registers_changed)
1239 (debug_registers_used): Delete.
1240 (update_debug_registers_callback): New function.
1241 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1242 needing to update their debug registers.
1243 (win32_get_current_dr): New function.
1244 (x86_dr_low_get_addr, x86_dr_low_get_control)
1245 (x86_dr_low_get_status): Fetch the debug register from the thread
1247 (i386_initial_stuff): Adjust.
1248 (i386_get_thread_context): Remove current_event parameter. Don't
1249 clear debug_registers_changed nor copy DR values to
1251 (i386_set_thread_context): Delete.
1252 (i386_prepare_to_resume): New function.
1253 (i386_thread_added): Mark the thread as needing to update irs
1255 (the_low_target): Remove i386_set_thread_context and install
1256 i386_prepare_to_resume.
1257 * win32-low.c (win32_get_thread_context): Adjust.
1258 (win32_set_thread_context): Use SetThreadContext
1260 (win32_prepare_to_resume): New function.
1261 (win32_require_context): New function, factored out from ...
1262 (thread_rec): ... this.
1263 (continue_one_thread): Call win32_prepare_to_resume on each thread
1264 we're about to continue.
1265 (win32_resume): Call win32_prepare_to_resume on the event thread.
1266 * win32-low.h (struct win32_thread_info)
1267 <debug_registers_changed>: New field.
1268 (struct win32_target_ops): Change prototype of set_thread_context,
1269 delete set_thread_context and add prepare_to_resume.
1270 (win32_require_context): New declaration.
1272 2014-10-08 Gary Benson <gbenson@redhat.com>
1274 * server.h: Do not include common-exceptions.h.
1276 2014-10-08 Gary Benson <gbenson@redhat.com>
1278 * server.h: Do not include cleanups.h.
1280 2014-09-30 James Hogan <james.hogan@imgtec.com>
1282 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1285 2014-09-23 Yao Qi <yao@codesourcery.com>
1287 * linux-low.c (lp_status_maybe_breakpoint): New function.
1288 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1289 (count_events_callback): Likewise.
1290 (select_event_lwp_callback): Likewise.
1291 (cancel_breakpoints_callback): Likewise.
1293 2014-09-19 Don Breazeal <donb@codesourcery.com>
1295 * linux-low.c (handle_extended_wait): Call
1296 linux_ptrace_get_extended_event.
1297 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1298 linux_is_extended_waitstatus.
1300 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1302 * Makefile.in (CPPFLAGS): Define.
1303 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1304 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1306 2014-09-16 Gary Benson <gbenson@redhat.com>
1308 * inferiors.h (current_inferior): Renamed as...
1309 (current_thread): New variable. All uses updated.
1310 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1311 (maybe_move_out_of_jump_pad): Likewise.
1312 (cancel_breakpoint): Likewise.
1313 (linux_low_filter_event): Likewise.
1314 (wait_for_sigstop): Likewise.
1315 (linux_resume_one_lwp): Likewise.
1316 (need_step_over_p): Likewise.
1317 (start_step_over): Likewise.
1318 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1319 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1320 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1321 and save_inferior as saved_thread.
1322 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1324 (regcache_invalidate_thread): Likewise.
1325 * remote-utils.c (prepare_resume_reply): Likewise.
1326 * thread-db.c (thread_db_get_tls_address): Likewise.
1327 (disable_thread_event_reporting): Likewise.
1328 (remove_thread_event_breakpoints): Likewise.
1329 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1331 * target.h (set_desired_inferior): Renamed as...
1332 (set_desired_thread): New declaration. All uses updated.
1333 * server.c (myresume): Updated comment to reference thread instead
1335 (handle_serial_event): Likewise.
1336 (handle_target_event): Likewise.
1338 2014-09-12 Tom Tromey <tromey@redhat.com>
1339 Gary Benson <gbenson@redhat.com>
1341 * regcache.h: Include common-regcache.h.
1342 (regcache_read_pc): Don't declare.
1343 * regcache.c (get_thread_regcache_for_ptid): New function.
1345 2014-09-11 Tom Tromey <tromey@redhat.com>
1346 Gary Benson <gbenson@redhat.com>
1348 * symbol.c: New file.
1349 * Makefile.in (SFILES): Add symbol.c.
1350 (OBS): Add symbol.o.
1352 2014-09-11 Gary Benson <gbenson@redhat.com>
1354 * target.c (target_stop_ptid, target_continue_ptid): New
1357 2014-09-11 Tom Tromey <tromey@redhat.com>
1358 Gary Benson <gbenson@redhat.com>
1360 * target.h: Include target/target.h.
1361 * target.c (target_read_memory, target_read_uint32)
1362 (target_write_memory): New functions.
1364 2014-09-11 Gary Benson <gbenson@redhat.com>
1366 * server.h (debug_hw_points): Don't declare.
1367 * server.c (debug_hw_points): Don't define. Replace all uses
1368 with show_debug_regs.
1369 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1370 all uses with show_debug_regs.
1372 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1374 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1375 endianness into account.
1376 (ppc_supply_ptrace_register): Likewise.
1378 2014-09-03 James Hogan <james.hogan@imgtec.com>
1380 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1381 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1383 2014-09-03 Gary Benson <gbenson@redhat.com>
1385 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1386 ALL_DEBUG_ADDRESS_REGISTERS.
1388 2014-09-02 Gary Benson <gbenson@redhat.com>
1390 * i386-low.h: Renamed as...
1391 * x86-low.h: New file. All type, function and variable name
1392 prefixes changed from "i386_" to "x86_". All references updated.
1393 * i386-low.c: Renamed as...
1394 * x86-low.c: New file. All type, function and variable name
1395 prefixes changed from "i386_" to "x86_". All references updated.
1397 2014-09-02 Gary Benson <gbenson@redhat.com>
1399 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1400 (x86_linux_new_thread): Likewise.
1402 2014-08-29 Gary Benson <gbenson@redhat.com>
1404 * server.h (setjmp.h): Do not include.
1405 (toplevel): Do not declare.
1406 (common-exceptions.h): Include.
1407 (cleanups.h): Likewise.
1408 * server.c (toplevel): Do not define.
1409 (exit_code): New static global.
1410 (detach_or_kill_for_exit_cleanup): New function.
1411 (main): New function. Original main renamed to...
1412 (captured_main): New function.
1413 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1415 2014-08-29 Gary Benson <gbenson@redhat.com>
1417 * Makefile.in (SFILES): Add common/common-exceptions.c.
1418 (OBS): Add common-exceptions.o.
1419 (common-exceptions.o): New rule.
1420 * utils.c (prepare_to_throw_exception): New function.
1422 2014-08-29 Gary Benson <gbenson@redhat.com>
1424 * config.in: Regenerate.
1425 * configure: Likewise.
1427 2014-08-29 Gary Benson <gbenson@redhat.com>
1429 * Makefile.in (SFILES): Add common/cleanups.c.
1431 (cleanups.o): New rule.
1433 2014-08-29 Gary Benson <gbenson@redhat.com>
1435 * utils.c (internal_vwarning): New function.
1437 2014-08-28 Gary Benson <gbenson@redhat.com>
1439 * utils.h (fatal): Remove declaration.
1440 * utils.c (fatal): Remove function.
1442 2014-08-28 Gary Benson <gbenson@redhat.com>
1444 * tracepoint.c (gdb_agent_init): Replace fatal with
1446 (initialize_tracepoint): Likewise.
1448 2014-08-28 Gary Benson <gbenson@redhat.com>
1450 * remote-utils.c (remote_prepare): Replace fatal with error.
1452 2014-08-28 Gary Benson <gbenson@redhat.com>
1454 * linux-low.c (linux_async): Replace fatal with warning.
1456 (linux_start_non_stop): Return -1 if linux_async failed.
1458 2014-08-28 Gary Benson <gbenson@redhat.com>
1460 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1462 (i386_dr_low_get_addr): Remove vague comment.
1463 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1466 2014-08-28 Gary Benson <gbenson@redhat.com>
1468 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1469 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1471 (linux_resume_one_lwp): Likewise.
1472 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1474 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1475 with internal_error.
1476 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1477 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1478 (find_register_by_name): Replace fatal with internal_error.
1479 (find_regno): Likewise.
1480 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1481 * thread-db.c (thread_db_create_event): Likewise.
1482 (thread_db_load_search): Likewise.
1483 (try_thread_db_load_1): Likewise.
1484 * tracepoint.c (get_jump_space_head): Replace fatal with
1486 (claim_trampoline_space): Likewise.
1487 (have_fast_tracepoint_trampoline_buffer): Likewise.
1488 (cmd_qtstart): Likewise.
1489 (stop_tracing): Likewise.
1490 (fast_tracepoint_collecting): Likewise.
1491 (target_malloc): Likewise.
1492 (download_tracepoint): Likewise.
1493 (download_trace_state_variables): Replace check with gdb_assert.
1494 (upload_fast_traceframes): Replace fatal with internal_error.
1496 2014-08-19 Tom Tromey <tromey@redhat.com>
1497 Gary Benson <gbenson@redhat.com>
1499 * Makefile.in (SFILES): Add common/common-debug.c.
1500 (OBS): Add common-debug.o.
1501 (common-debug.o): New rule.
1502 * debug.h (debug_printf): Don't declare.
1503 * debug.c (debug_printf): Renamed and rewritten as...
1504 (debug_vprintf): New function.
1506 2014-08-19 Gary Benson <gbenson@redhat.com>
1508 * utils.h: Do not include print-utils.h.
1510 2014-08-19 Tom Tromey <tromey@redhat.com>
1511 Gary Benson <gbenson@redhat.com>
1513 * server.h: Add static assertion.
1514 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1516 2014-08-19 Tom Tromey <tromey@redhat.com>
1517 Gary Benson <gbenson@redhat.com>
1519 * Makefile.in (SFILES): Add common/errors.c.
1520 (OBS): Add errors.o.
1521 (IPA_OBS): Add errors-ipa.o.
1522 (errors.o): New rule.
1523 (errors-ipa.o): Likewise.
1524 * utils.h (perror_with_name, error, warning): Don't declare.
1525 * utils.c (warning): Renamed and rewritten as...
1526 (vwarning): New function.
1527 (error): Renamed and rewritten as...
1528 (verror): New function.
1529 (internal_error): Renamed and rewritten as...
1530 (internal_verror): New function.
1532 2014-08-07 Gary Benson <gbenson@redhat.com>
1534 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1535 * configure: Regenerate.
1536 * config.in: Likewise.
1537 * server.h: Do not include errno.h.
1538 * event-loop.c: Likewise.
1539 * hostio-errno.c: Likewise.
1540 * linux-low.c: Likewise.
1541 * remote-utils.c: Likewise.
1542 * spu-low.c: Likewise.
1543 * utils.c: Likewise.
1544 * gdbreplay.c: Unconditionally include errno.h.
1546 2014-08-07 Gary Benson <gbenson@redhat.com>
1548 * server.h: Do not include string.h.
1549 * event-loop.c: Likewise.
1550 * linux-low.c: Likewise.
1551 * regcache.c: Likewise.
1552 * remote-utils.c: Likewise.
1553 * spu-low.c: Likewise.
1554 * utils.c: Likewise.
1556 2014-08-07 Gary Benson <gbenson@redhat.com>
1558 * server.h: Do not include gdb_assert.h.
1560 2014-08-07 Gary Benson <gbenson@redhat.com>
1562 * server.h: Do not include common-utils.h.
1564 2014-08-07 Gary Benson <gbenson@redhat.com>
1566 * server.h: Do not include ptid.h.
1567 * notif.h: Likewise.
1569 2014-08-07 Gary Benson <gbenson@redhat.com>
1571 * server.h: Do not include gdb_locale.h.
1573 2014-08-07 Gary Benson <gbenson@redhat.com>
1575 * server.h: Do not include gdb/signals.h.
1576 * win32-low.c: Likewise.
1578 2014-08-07 Gary Benson <gbenson@redhat.com>
1580 * server.h: Do not include pathmax.h.
1582 2014-08-07 Gary Benson <gbenson@redhat.com>
1584 * server.h: Do not include libiberty.h.
1585 * linux-bfin-low.c: Likewise.
1587 2014-08-07 Gary Benson <gbenson@redhat.com>
1589 * server.h: Do not include ansidecl.h.
1591 2014-08-07 Gary Benson <gbenson@redhat.com>
1593 * linux-x86-low.c: Do not include stddef.h.
1594 * lynx-ppc-low.c: Likewise.
1595 * tracepoint.c: Likewise.
1597 2014-08-07 Gary Benson <gbenson@redhat.com>
1599 * server.h: Do not include stdarg.h.
1600 * nto-low.c: Likewise.
1602 2014-08-07 Gary Benson <gbenson@redhat.com>
1604 * server.h: Do not include stdlib.h.
1605 * inferiors.c: Likewise.
1606 * linux-low.c: Likewise.
1607 * regcache.c: Likewise.
1608 * spu-low.c: Likewise.
1609 * tracepoint.c: Likewise.
1610 * utils.c: Likewise.
1612 2014-08-07 Gary Benson <gbenson@redhat.com>
1614 * server.h: Do not include stdio.h.
1615 * linux-low.c: Likewise.
1616 * remote-utils.c: Likewise.
1617 * spu-low.c: Likewise.
1618 * utils.c: Likewise.
1619 * wincecompat.c: Likewise.
1621 2014-08-06 Gary Benson <gbenson@redhat.com>
1623 * regcache.c (init_register_cache): Move conditionals inside if.
1625 2014-08-06 Gary Benson <gbenson@redhat.com>
1627 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1629 2014-07-31 Gary Benson <gbenson@redhat.com>
1631 * ax.h: Do not include server.h.
1632 * gdbthread.h: Likewise.
1633 * lynx-low.h: Likewise.
1634 * notif.h: Likewise.
1636 2014-07-30 Gary Benson <gbenson@redhat.com>
1638 * server.h: Include common-defs.h.
1639 Do not include config.h or build-gnulib-gdbserver/config.h.
1641 2014-07-30 Gary Benson <gbenson@redhat.com>
1643 * hostio-errno.c: Move server.h to top of includes list.
1644 * inferiors.c: Likewise.
1645 * linux-x86-low.c: Likewise.
1646 * notif.c: Include server.h.
1648 2014-07-24 Tom Tromey <tromey@redhat.com>
1649 Gary Benson <gbenson@redhat.com>
1651 * server.h (CORE_ADDR): Now unsigned.
1653 2014-07-16 Pedro Alves <palves@redhat.com>
1655 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1657 2014-07-15 Pedro Alves <palves@redhat.com>
1659 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1662 2014-07-11 Pedro Alves <palves@redhat.com>
1664 * linux-low.c (kill_wait_lwp): New function, based on
1665 kill_one_lwp_callback, but use my_waitpid directly.
1666 (kill_one_lwp_callback, linux_kill): Use it.
1668 2014-06-23 Pedro Alves <palves@redhat.com>
1670 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1671 before setting DR0..DR3.
1673 2014-06-20 Gary Benson <gbenson@redhat.com>
1675 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1676 * configure: Regenerated.
1677 * config.in: Likewise.
1679 2014-06-20 Gary Benson <gbenson@redhat.com>
1681 * Makefile.in (SFILES): Update locations for files moved
1683 (object file files): Reordered.
1685 2014-06-20 Gary Benson <gbenson@redhat.com>
1687 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1688 (i386_dr_low_set_addr): Likewise.
1689 (i386_dr_low_get_addr): Likewise.
1690 (i386_dr_low_can_set_control): Likewise.
1691 (i386_dr_low_set_control): Likewise.
1692 (i386_dr_low_get_control): Likewise.
1693 (i386_dr_low_get_status): Likewise.
1694 (i386_get_debug_register_length): Likewise.
1695 * linux-x86-low.c (i386_dr_low_set_addr):
1696 Changed signature. Made static.
1697 (i386_dr_low_get_addr): Likewise.
1698 (i386_dr_low_set_control): Likewise.
1699 (i386_dr_low_get_control): Likewise.
1700 (i386_dr_low_get_status): Likewise.
1701 (i386_dr_low): New global variable.
1702 * win32-i386-low.c (i386_dr_low_set_addr):
1703 Changed signature. Made static.
1704 (i386_dr_low_get_addr): Likewise.
1705 (i386_dr_low_set_control): Likewise.
1706 (i386_dr_low_get_control): Likewise.
1707 (i386_dr_low_get_status): Likewise.
1708 (i386_dr_low): New global variable.
1710 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1712 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1713 * Makefile.in (AR, AR_FLAGS): Define.
1714 * configure: Regenerate.
1716 2014-06-19 Gary Benson <gbenson@redhat.com>
1718 * Makefile.in (i386-dregs.o): New rule.
1719 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1720 * i386-low.c (target.h): Remove include.
1721 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1722 (DR_CONTROL_SHIFT): Likewise.
1723 (DR_CONTROL_SIZE): Likewise.
1724 (DR_RW_EXECUTE): Likewise.
1725 (DR_RW_WRITE): Likewise.
1726 (DR_RW_READ): Likewise.
1727 (DR_RW_IORW): Likewise.
1728 (DR_LEN_1): Likewise.
1729 (DR_LEN_2): Likewise.
1730 (DR_LEN_4): Likewise.
1731 (DR_LEN_8): Likewise.
1732 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1733 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1734 (DR_ENABLE_SIZE): Likewise.
1735 (DR_LOCAL_SLOWDOWN): Likewise.
1736 (DR_GLOBAL_SLOWDOWN): Likewise.
1737 (DR_CONTROL_RESERVED): Likewise.
1738 (I386_DR_CONTROL_MASK): Likewise.
1739 (I386_DR_VACANT): Likewise.
1740 (I386_DR_LOCAL_ENABLE): Likewise.
1741 (I386_DR_GLOBAL_ENABLE): Likewise.
1742 (I386_DR_DISABLE): Likewise.
1743 (I386_DR_SET_RW_LEN): Likewise.
1744 (I386_DR_GET_RW_LEN): Likewise.
1745 (I386_DR_WATCH_HIT): Likewise.
1746 (i386_wp_op_t): Likewise.
1747 (i386_show_dr): Likewise.
1748 (i386_length_and_rw_bits): Likewise.
1749 (i386_insert_aligned_watchpoint): Likewise.
1750 (i386_remove_aligned_watchpoint): Likewise.
1751 (i386_handle_nonaligned_watchpoint): Likewise.
1752 i386_update_inferior_debug_regs(): Likewise.
1753 (i386_dr_insert_watchpoint): Likewise.
1754 (i386_dr_remove_watchpoint): Likewise.
1755 (i386_dr_region_ok_for_watchpoint): Likewise.
1756 (i386_dr_stopped_data_address): Likewise.
1757 (i386_dr_stopped_by_watchpoint): Likewise.
1759 2014-06-19 Gary Benson <gbenson@redhat.com>
1761 * i386-low.c (i386_dr_show): Renamed to
1762 i386_show_dr and made static. All uses updated.
1763 (i386_dr_length_and_rw_bits): Renamed to
1764 i386_length_and_rw_bits and made static.
1766 (i386_dr_insert_aligned_watchpoint): Renamed to
1767 i386_insert_aligned_watchpoint and made static.
1769 (i386_dr_remove_aligned_watchpoint): Renamed to
1770 i386_remove_aligned_watchpoint and made static.
1772 (i386_dr_update_inferior_debug_regs): Renamed to
1773 i386_update_inferior_debug_regs and made static.
1776 2014-06-18 Gary Benson <gbenson@redhat.com>
1778 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1779 (i386_dr_low_can_set_control): Likewise.
1780 (i386_get_debug_register_length): Likewise.
1781 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1782 (i386_dr_low_can_set_control): Likewise.
1783 (i386_get_debug_register_length): Likewise.
1785 2014-06-17 Gary Benson <gbenson@redhat.com>
1787 * i386-low.h (i386-dregs.h): New include.
1788 (DR_FIRSTADDR): Now in i386-dregs.h.
1789 (DR_LASTADDR): Likewise.
1790 (DR_NADDR): Likewise.
1791 (DR_STATUS): Likewise.
1792 (DR_CONTROL): Likewise.
1793 (i386_debug_reg_state): Likewise.
1794 (i386_dr_insert_watchpoint): Likewise.
1795 (i386_dr_remove_watchpoint): Likewise.
1796 (i386_dr_region_ok_for_watchpoint): Likewise.
1797 (i386_dr_stopped_data_address): Likewise.
1798 (i386_dr_stopped_by_watchpoint): Likewise.
1799 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1801 2014-06-18 Gary Benson <gbenson@redhat.com>
1803 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1804 i386_dr_insert_watchpoint.
1805 (i386_low_remove_watchpoint): Renamed to
1806 i386_dr_remove_watchpoint.
1807 (i386_low_region_ok_for_watchpoint): Renamed to
1808 i386_dr_region_ok_for_watchpoint.
1809 (i386_low_stopped_data_address): Renamed to
1810 i386_dr_stopped_data_address.
1811 (i386_low_stopped_by_watchpoint): Renamed to
1812 i386_dr_stopped_by_watchpoint.
1813 * i386-low.c (i386_show_dr): Renamed to
1814 i386_dr_show and made nonstatic. All uses updated.
1815 (i386_length_and_rw_bits): Renamed to
1816 i386_dr_length_and_rw_bits and made nonstatic.
1818 (i386_insert_aligned_watchpoint): Renamed to
1819 i386_dr_insert_aligned_watchpoint and made nonstatic.
1821 (i386_remove_aligned_watchpoint): Renamed to
1822 i386_dr_remove_aligned_watchpoint and made nonstatic.
1824 (i386_update_inferior_debug_regs): Renamed to
1825 i386_dr_update_inferior_debug_regs and made nonstatic.
1827 (i386_low_insert_watchpoint): Renamed to
1828 i386_dr_insert_watchpoint. All uses updated.
1829 (i386_low_remove_watchpoint): Renamed to
1830 i386_dr_remove_watchpoint. All uses updated.
1831 (i386_low_region_ok_for_watchpoint): Renamed to
1832 i386_dr_region_ok_for_watchpoint. All uses updated.
1833 (i386_low_stopped_data_address): Renamed to
1834 i386_dr_stopped_data_address. All uses updated.
1835 (i386_low_stopped_by_watchpoint): Renamed to
1836 i386_dr_stopped_by_watchpoint. All uses updated.
1838 2014-06-18 Gary Benson <gbenson@redhat.com>
1840 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1841 (i386_dr_low_can_set_control): Likewise.
1842 (i386_insert_aligned_watchpoint): New check.
1844 2014-06-18 Gary Benson <gbenson@redhat.com>
1846 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1849 2014-06-18 Gary Benson <gbenson@redhat.com>
1851 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1852 instead of fatal and error.
1853 (i386_handle_nonaligned_watchpoint): Likewise.
1855 2014-06-18 Gary Benson <gbenson@redhat.com>
1857 * i386-low.c (i386_get_debug_register_length): New macro.
1858 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1859 (i386_show_dr): Use debug_printf instead of fprintf. Use
1860 phex to format values.
1862 2014-06-18 Gary Benson <gbenson@redhat.com>
1864 * i386-low.h: Comment changes.
1865 * i386-low.c: Likewise.
1867 2014-06-18 Gary Benson <gbenson@redhat.com>
1869 * i386-low.c: Whitespace changes.
1871 2014-06-12 Tom Tromey <tromey@redhat.com>
1873 * utils.c (freeargv): Remove.
1875 2014-06-12 Tom Tromey <tromey@redhat.com>
1877 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1878 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1879 (parse_debug_format_options): Likewise.
1880 (gdbserver_usage): Likewise.
1881 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1882 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1883 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1885 ($(LIBGNU)): Depend on libiberty.
1886 (all-lib): Recurse into all subdirs.
1887 (install-only): Invoke "install" target in subdirs.
1888 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1890 * configure: Rebuild.
1891 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1892 for vasprintf, vsnprintf, or gettimeofday.
1893 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1896 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1898 * development.sh: Delete.
1899 * Makefile.in (config.status): Adjust dependency on development.sh.
1900 * configure.ac: Adjust development.sh source call.
1901 * configure: Regenerate.
1903 2014-06-02 Pedro Alves <palves@redhat.com>
1905 * ax.c (gdb_free_agent_expr): New function.
1906 * ax.h (gdb_free_agent_expr): New declaration.
1907 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1909 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1911 (clear_breakpoint_conditions_and_commands): New function.
1912 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1913 (clear_breakpoint_conditions_and_commands): New declaration.
1915 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1917 * linux-aarch64-low.c (asm/ptrace.h): Include.
1919 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1921 Fix TLS access for -static -pthread.
1922 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1923 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1924 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1926 2014-05-20 Pedro Alves <palves@redhat.com>
1928 * linux-aarch64-low.c (aarch64_insert_point)
1929 (aarch64_remove_point): No longer check whether the type is
1930 supported here. Adjust to new interface.
1931 (the_low_target): Install aarch64_supports_z_point_type as
1932 supports_z_point_type method.
1933 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1934 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1935 instead of a Z packet char. Adjust.
1936 (arm_supports_z_point_type): New function.
1937 (arm_insert_point, arm_remove_point): Adjust to new interface.
1938 (the_low_target): Install arm_supports_z_point_type.
1939 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1940 (cris_insert_point, cris_remove_point): Adjust to new interface.
1941 Don't check whether the type is supported here.
1942 (the_low_target): Install cris_supports_z_point_type.
1943 * linux-low.c (linux_supports_z_point_type): New function.
1944 (linux_insert_point, linux_remove_point): Adjust to new interface.
1945 * linux-low.h (struct linux_target_ops) <insert_point,
1946 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1947 raw_breakpoint pointer parameter.
1948 <supports_z_point_type>: New method.
1949 * linux-mips-low.c (mips_supports_z_point_type): New function.
1950 (mips_insert_point, mips_remove_point): Adjust to new interface.
1951 Use mips_supports_z_point_type.
1952 (the_low_target): Install mips_supports_z_point_type.
1953 * linux-ppc-low.c (the_low_target): Install NULL as
1954 supports_z_point_type method.
1955 * linux-s390-low.c (the_low_target): Install NULL as
1956 supports_z_point_type method.
1957 * linux-sparc-low.c (the_low_target): Install NULL as
1958 supports_z_point_type method.
1959 * linux-x86-low.c (x86_supports_z_point_type): New function.
1960 (x86_insert_point): Adjust to new insert_point interface. Use
1961 insert_memory_breakpoint. Adjust to new
1962 i386_low_insert_watchpoint interface.
1963 (x86_remove_point): Adjust to remove_point interface. Use
1964 remove_memory_breakpoint. Adjust to new
1965 i386_low_remove_watchpoint interface.
1966 (the_low_target): Install x86_supports_z_point_type.
1967 * lynx-low.c (lynx_target_ops): Install NULL as
1968 supports_z_point_type callback.
1969 * nto-low.c (nto_supports_z_point_type): New.
1970 (nto_insert_point, nto_remove_point): Adjust to new interface.
1971 (nto_target_ops): Install nto_supports_z_point_type.
1972 * mem-break.c: Adjust intro comment.
1973 (struct raw_breakpoint) <raw_type, size>: New fields.
1974 <inserted>: Update comment.
1975 <shlib_disabled>: Delete field.
1976 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1977 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1978 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1979 (raw_bkpt_type_to_target_hw_bp_type): New function.
1980 (find_enabled_raw_code_breakpoint_at): New function.
1981 (find_raw_breakpoint_at): New type and size parameters. Use them.
1982 (insert_memory_breakpoint): New function, based off
1983 set_raw_breakpoint_at.
1984 (remove_memory_breakpoint): New function.
1985 (set_raw_breakpoint_at): Reimplement.
1986 (set_breakpoint): New, based on set_breakpoint_at.
1987 (set_breakpoint_at): Reimplement.
1988 (delete_raw_breakpoint): Go through the_target->remove_point
1989 instead of assuming memory breakpoints.
1990 (find_gdb_breakpoint_at): Delete.
1991 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1992 (find_gdb_breakpoint): New function.
1993 (set_gdb_breakpoint_at): Delete.
1994 (z_type_supported): New function.
1995 (set_gdb_breakpoint_1): New function, loosely based off
1996 set_gdb_breakpoint_at.
1997 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1998 (delete_gdb_breakpoint_at): Delete.
1999 (delete_gdb_breakpoint_1): New function, loosely based off
2000 delete_gdb_breakpoint_at.
2001 (delete_gdb_breakpoint): New function.
2002 (clear_gdb_breakpoint_conditions): Rename to ...
2003 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2005 (add_condition_to_breakpoint): Make static.
2006 (add_breakpoint_condition): Take a struct breakpoint pointer
2007 instead of an address. Adjust.
2008 (gdb_condition_true_at_breakpoint): Rename to ...
2009 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2011 (gdb_condition_true_at_breakpoint): Reimplement.
2012 (add_breakpoint_commands): Take a struct breakpoint pointer
2013 instead of an address. Adjust.
2014 (gdb_no_commands_at_breakpoint): Rename to ...
2015 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2016 parameter. Return true if no breakpoint was found. Change debug
2018 (gdb_no_commands_at_breakpoint): Reimplement.
2019 (run_breakpoint_commands): Rename to ...
2020 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2021 and change return type to boolean.
2022 (run_breakpoint_commands): New function.
2023 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2024 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2025 breakpoint. Go through the_target->remove_point instead of
2026 assuming memory breakpoint.
2027 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2028 software and hardware breakpoints.
2029 (reinsert_raw_breakpoint): Go through the_target->insert_point
2030 instead of assuming memory breakpoint.
2031 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2032 software and hardware breakpoints.
2033 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2034 Check both software and hardware breakpoints.
2035 (validate_inserted_breakpoint): Assert the breakpoint is a
2036 software breakpoint. Set the inserted flag to -1 instead of
2037 setting shlib_disabled.
2038 (delete_disabled_breakpoints): Adjust.
2039 (validate_breakpoints): Only validate software breakpoints.
2040 Adjust to inserted flag change.
2041 (check_mem_read, check_mem_write): Skip breakpoint types other
2042 than software breakpoints. Adjust to inserted flag change.
2043 * mem-break.h (enum raw_bkpt_type): New enum.
2044 (raw_breakpoint, struct process_info): Forward declare.
2045 (Z_packet_to_target_hw_bp_type): Delete declaration.
2046 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2047 (set_gdb_breakpoint, delete_gdb_breakpoint)
2048 (clear_breakpoint_conditions): New declarations.
2049 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2050 (breakpoint_inserted_here): Update comment.
2051 (add_breakpoint_condition, add_breakpoint_commands): Replace
2052 address parameter with a breakpoint pointer parameter.
2053 (gdb_breakpoint_here): Update comment.
2054 (delete_gdb_breakpoint_at): Delete.
2055 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2056 * server.c (process_point_options): Take a struct breakpoint
2057 pointer instead of an address. Adjust.
2058 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2059 delete_gdb_breakpoint.
2060 * spu-low.c (spu_target_ops): Install NULL as
2061 supports_z_point_type method.
2062 * target.h: Include mem-break.h.
2063 (struct target_ops) <prepare_to_access_memory>: Update comment.
2064 <supports_z_point_type>: New field.
2065 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2066 instead of a char. Also take a raw breakpoint pointer.
2067 * win32-arm-low.c (the_low_target): Install NULL as
2068 supports_z_point_type.
2069 * win32-i386-low.c (i386_supports_z_point_type): New function.
2070 (i386_insert_point, i386_remove_point): Adjust to new interface.
2071 (the_low_target): Install i386_supports_z_point_type.
2072 * win32-low.c (win32_supports_z_point_type): New function.
2073 (win32_insert_point, win32_remove_point): Adjust to new interface.
2074 (win32_target_ops): Install win32_supports_z_point_type.
2075 * win32-low.h (struct win32_target_ops):
2076 <supports_z_point_type>: New method.
2077 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2078 instead of a char. Also take a raw breakpoint pointer.
2080 2014-05-20 Pedro Alves <palves@redhat.com>
2082 * mem-break.h: Include break-common.h.
2083 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2084 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2085 (Z_packet_to_target_hw_bp_type): New declaration.
2086 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2087 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2088 (Z_PACKET_ACCESS_WP): Delete macros.
2089 (Z_packet_to_hw_type): Delete function.
2090 * i386-low.h: Don't include break-common.h here.
2091 (Z_packet_to_hw_type): Delete declaration.
2092 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2093 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2094 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2095 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2096 * linux-aarch64-low.c: Don't include break-common.h here.
2097 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2098 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2099 (Z_packet_to_target_hw_bp_type): Delete function.
2100 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2102 (mips_insert_point, mips_remove_point): Use
2103 Z_packet_to_target_hw_bp_type.
2105 2014-05-20 Pedro Alves <palves@redhat.com>
2107 * linux-aarch64-low.c: Include break-common.h.
2108 (enum target_point_type): Delete.
2109 (Z_packet_to_point_type): Rename to ...
2110 (Z_packet_to_target_hw_bp_type): ... this, and return a
2111 target_hw_bp_type instead.
2112 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2113 instead of an enum target_point_type.
2114 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2116 (aarch64_dr_state_insert_one_point)
2117 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2118 (aarch64_handle_aligned_watchpoint)
2119 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2120 Take an enum target_hw_bp_type instead of an enum
2122 (aarch64_supports_z_point_type): New function.
2123 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2124 use Z_packet_to_target_hw_bp_type.
2126 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2128 * configure.ac: Only use -Werror by default when DEVELOPMENT
2130 * configure: Regenerate.
2132 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2134 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2135 * linux-x86-low.c (X86_64_USER_REGS): New.
2136 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2138 2014-04-28 Yao Qi <yao@codesourcery.com>
2140 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2143 2014-04-25 Pedro Alves <palves@redhat.com>
2146 * linux-low.c (linux_attach_fail_reason_string): New function.
2147 (linux_attach_lwp): Delete.
2148 (linux_attach_lwp_1): Rename to ...
2149 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2150 argument. Remove "initial" parameter. Return int instead of
2151 void. Don't error or warn here.
2152 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2153 failure to attach to the tgid. Call warning when failing to
2155 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2156 argument. Remove "initial" parameter. Return int instead of
2157 void. Don't error or warn here.
2158 (linux_attach_fail_reason_string): New declaration.
2159 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2160 interface change. Use linux_attach_fail_reason_string.
2162 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2163 Walfred Tedeschi <walfred.tedeschi@intel.com>
2165 * Makefile.in: Added rules to handle new files
2166 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2167 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2168 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2169 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2170 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2171 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2173 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2174 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2175 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2176 i386/x32-avx512.xml.
2177 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2178 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2179 i386/x32-avx512-linux.xml.
2180 * i387-fp.c (num_avx512_k_registers): New constant for number
2182 (num_avx512_zmmh_low_registers): New constant for number of
2183 lower ZMM registers (0-15).
2184 (num_avx512_zmmh_high_registers): New constant for number of
2185 higher ZMM registers (16-31).
2186 (num_avx512_ymmh_registers): New contant for number of higher
2187 YMM registers (ymm16-31 added by avx521 on x86_64).
2188 (num_avx512_xmm_registers): New constant for number of higher
2189 XMM registers (xmm16-31 added by AVX512 on x86_64).
2190 (struct i387_xsave): Add space for AVX512 registers.
2191 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2192 Add code to handle AVX512 registers.
2193 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2194 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2195 prototypei from generated file.
2196 (tdesc_amd64_avx512_linux): Likewise.
2197 (init_registers_x32_avx512_linux): Likewise.
2198 (tdesc_x32_avx512_linux): Likewise.
2199 (init_registers_i386_avx512_linux): Likewise.
2200 (tdesc_i386_avx512_linux): Likewise.
2201 (x86_64_regmap): Add AVX512 registers.
2202 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2204 (initialize_low_arch): Add code to initialize AVX512 registers.
2206 2014-04-23 Pedro Alves <palves@redhat.com>
2208 * mem-break.c (find_gdb_breakpoint_at): Make static.
2209 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2211 2014-04-23 Pedro Alves <palves@redhat.com>
2213 * i386-low.c: Don't include break-common.h here.
2214 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2215 prototype to take target_hw_bp_type as argument instead of a Z
2217 * i386-low.h: Include break-common.h here.
2218 (Z_packet_to_hw_type): Declare.
2219 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2221 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2222 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2223 (x86_remove_point): Convert the packet number to a
2224 target_hw_bp_type before calling i386_low_remove_watchpoint.
2225 * win32-i386-low.c (i386_insert_point): Convert the packet number
2226 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2227 (i386_remove_point): Convert the packet number to a
2228 target_hw_bp_type before calling i386_low_remove_watchpoint.
2230 2014-04-23 Pedro Alves <palves@redhat.com>
2232 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2234 2014-04-10 Pedro Alves <palves@redhat.com>
2236 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2237 Check if the condition or command is NULL before checking if the
2238 breakpoint is known. On success, return true.
2239 * mem-break.h (add_breakpoint_condition): Document return.
2240 (add_breakpoint_commands): Add describing comment.
2241 * server.c (skip_to_semicolon): New function.
2242 (process_point_options): Use it.
2244 2014-04-09 Pedro Alves <palves@redhat.com>
2246 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2249 2014-02-27 Pedro Alves <palves@redhat.com>
2252 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2254 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2256 (last_thread_of_process_p): Take a PID argument instead of a
2258 (linux_wait_for_lwp): Delete.
2259 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2261 (linux_low_filter_event): New function, party factored out from
2262 linux_wait_for_event.
2263 (linux_wait_for_event): Rename to ...
2264 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2265 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2266 sigsuspend. Check for zombie leaders.
2267 (linux_wait_for_event): Reimplement as wrapper around
2268 linux_wait_for_event_filtered.
2269 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2270 a normal or signal exit is seen, it's the whole process exiting.
2271 (wait_for_sigstop): No longer a for_each_inferior callback.
2272 Rewrite on top of linux_wait_for_event_filtered.
2273 (stop_all_lwps): Call wait_for_sigstop directly.
2274 * server.c (resume, handle_target_event): Handle
2275 TARGET_WAITKIND_NO_RESUMED.
2277 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2279 * win32-low.c (psapi_get_dll_name,
2280 * win32_CreateToolhelp32Snapshot): Delete.
2281 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2282 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2284 (handle_load_dll): Add function description.
2285 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2287 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2289 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2291 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2292 base address when calling win32_add_one_solib.
2293 (handle_load_dll): Delete local variable load_addr.
2294 Remove 0x1000 offset applied to DLL base address when calling
2295 win32_add_one_solib.
2296 (handle_unload_dll): Add comment.
2298 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2300 * win32-low.c (win32_add_all_dlls): Renames
2301 win32_ensure_ntdll_loaded. Rewrite function documentation.
2302 Adjust implementation to always load all DLLs.
2303 Add 0x1000 offset to DLL base address when calling
2304 win32_add_one_solib.
2305 (child_initialization_done): New static global.
2306 (do_initial_child_stuff): Set child_initialization_done to
2307 zero during child initialization, and 1 after. Replace call
2308 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2310 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2311 (handle_unload_dll): Add function documentation.
2312 (get_child_debug_event): Ignore load and unload DLL events
2313 during child initialization.
2315 2014-02-20 Doug Evans <dje@google.com>
2317 Remove global all_lwps.
2318 * inferiors.h (ptid_of): Move here from linux-low.h.
2319 (pid_of, lwpid_of): Ditto.
2320 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2321 parameter is a struct thread_info * now.
2322 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2323 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2324 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2326 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2327 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2328 * linux-arm-low.c (update_registers_callback): Update, "entry"
2329 parameter is a struct thread_info * now.
2330 Fetch lwpid from current_inferior directly.
2331 (arm_insert_point): Pass &all_threads to find_inferior instead of
2333 (arm_remove_point): Ditto.
2334 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2335 (arm_prepare_to_resume): Fetch pid from thread.
2336 (arm_read_description): Fetch lwpid from current_inferior directly.
2337 * linux-low.c (all_lwps): Delete.
2338 (delete_lwp): Delete call to remove_inferior.
2339 (handle_extended_wait): Fetch lwpid from thread.
2340 (add_lwp): Don't set lwp->entry.id. Remove call to
2341 add_inferior_to_list.
2342 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2343 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2344 (kill_one_lwp_callback): Ditto.
2345 (linux_kill): Don't dereference NULL pointer.
2346 Fetch ptid,lwpid from thread.
2347 (get_detach_signal): Fetch ptid from thread.
2348 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2349 Simplify call to regcache_invalidate_thread.
2350 (delete_lwp_callback): Update, "entry" parameter is a
2351 struct thread_info * now. Fetch pid from thread.
2352 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2353 (status_pending_p_callback): Update, "entry" parameter is a
2354 struct thread_info * now. Fetch ptid from thread.
2355 (find_lwp_pid): Update, "entry" parameter is a
2356 struct thread_info * now.
2357 (linux_wait_for_lwp): Fetch pid from thread.
2358 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2359 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2360 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2361 (dequeue_one_deferred_signal): Ditto.
2362 (cancel_breakpoint): Fetch ptid from current_inferior.
2363 (linux_wait_for_event): Pass &all_threads to find_inferior,
2364 not &all_lwps. Fetch ptid, lwpid from thread.
2365 (count_events_callback): Update, "entry" parameter is a
2366 struct thread_info * now.
2367 (select_singlestep_lwp_callback): Ditto.
2368 (select_event_lwp_callback): Ditto.
2369 (cancel_breakpoints_callback): Ditto.
2370 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2372 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2373 (unsuspend_one_lwp): Update, "entry" parameter is a
2374 struct thread_info * now.
2375 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2377 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2378 Fetch lwpid from thread, not lwp.
2379 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2380 Pass &all_threads to find_inferior, not &all_lwps.
2381 (send_sigstop): Fetch lwpid from thread, not lwp.
2382 (send_sigstop_callback): Update, "entry" parameter is a
2383 struct thread_info * now.
2384 (suspend_and_send_sigstop_callback): Ditto.
2385 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2386 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2387 struct thread_info * now.
2388 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2390 (lwp_running): Update, "entry" parameter is a
2391 struct thread_info * now.
2392 (stop_all_lwps): Fetch ptid from thread.
2393 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2394 (linux_resume_one_lwp): Fetch lwpid from thread.
2395 (linux_set_resume_request): Update, "entry" parameter is a
2396 struct thread_info * now. Fetch pid, lwpid from thread.
2397 (resume_status_pending_p): Update, "entry" parameter is a
2398 struct thread_info * now.
2399 (need_step_over_p): Ditto. Fetch lwpid from thread.
2400 (start_step_over): Fetch lwpid from thread.
2401 (linux_resume_one_thread): Update, "entry" parameter is a
2402 struct thread_info * now. Fetch lwpid from thread.
2403 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2404 (proceed_one_lwp): Update, "entry" parameter is a
2405 struct thread_info * now. Fetch lwpid from thread.
2406 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2407 struct thread_info * now.
2408 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2409 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2410 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2412 (regsets_store_inferior_registers): Ditto.
2413 (fetch_register, store_register): Ditto.
2414 (linux_read_memory, linux_write_memory): Ditto.
2415 (linux_request_interrupt): Ditto.
2416 (linux_read_auxv): Ditto.
2417 (linux_xfer_siginfo): Ditto.
2418 (linux_qxfer_spu): Ditto.
2419 (linux_qxfer_libraries_svr4): Ditto.
2420 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2421 moved to inferiors.h.
2423 (get_thread_lwp): Update.
2424 (struct lwp_info): Delete member "entry". Simplify comment for
2427 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2428 current_inferior directly.
2429 (update_watch_registers_callback): Update, "entry" parameter is a
2430 struct thread_info * now. Fetch pid from thread.
2431 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2432 (mips_insert_point): Fetch lwpid from current_inferior.
2433 Pass &all_threads to find_inferior, not &all_lwps.
2434 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2435 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2437 (mips_stopped_data_address): Ditto.
2438 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2440 * linux-tile-low.c (tile_arch_setup): Ditto.
2441 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2442 (update_debug_registers_callback): Update, "entry" parameter is a
2443 struct thread_info * now. Fetch pid from thread.
2444 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2445 Pass &all_threads to find_inferior, not &all_lwps.
2446 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2447 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2448 Pass &all_threads to find_inferior, not &all_lwps.
2449 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2450 (i386_dr_low_get_status): Ditto.
2451 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2452 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2453 (x86_linux_read_description): Ditto.
2454 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2456 2014-02-20 Doug Evans <dje@google.com>
2458 * inferiors.c (get_first_inferior): Fix buglet.
2460 2014-02-19 Doug Evans <dje@google.com>
2462 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2463 * inferiors.c (add_thread): Change result type to struct thread_info *.
2464 All callers updated.
2465 (add_lwp): Call add_thread here instead of in callers.
2466 All callers updated.
2467 * linux-low.h (get_lwp_thread): Rewrite.
2468 (struct lwp_info): New member "thread".
2470 2014-02-19 Doug Evans <dje@google.com>
2472 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2473 All callers updated.
2475 2014-02-19 Doug Evans <dje@google.com>
2477 * inferiors.c (add_thread): Fix whitespace.
2479 2014-02-19 Doug Evans <dje@google.com>
2481 * dll.c (clear_dlls): Replace accessing list implemention details
2483 * gdbthread.h (get_first_thread): Declare.
2484 * inferiors.c (for_each_inferior_with_data): New function.
2485 (get_first_thread): New function.
2486 (find_thread_ptid): Simplify.
2487 (get_first_inferior): New function.
2488 (clear_list): Delete.
2489 (one_inferior_p): New function.
2490 (clear_inferior_list): New function.
2491 (clear_inferiors): Update.
2492 * inferiors.h (for_each_inferior_with_data): Declare.
2493 (clear_inferior_list): Declare.
2494 (one_inferior_p): Declare.
2495 (get_first_inferior): Declare.
2496 * linux-low.c (linux_wait_for_event): Replace accessing list
2497 implemention details with API function.
2498 * server.c (target_running): Ditto.
2499 (accumulate_file_name_length): New function.
2500 (emit_dll_description): New function.
2501 (handle_qxfer_libraries): Replace accessing list implemention
2502 details with API function.
2503 (handle_qxfer_threads_worker): New function.
2504 (handle_qxfer_threads_proper): Replace accessing list implemention
2505 details with API function.
2506 (handle_query): Ditto.
2507 (visit_actioned_threads_callback_ftype): New typedef.
2508 (visit_actioned_threads_data): New struct.
2509 (visit_actioned_threads): Rewrite to be find_inferior callback.
2510 (resume): Call find_inferior.
2511 (handle_status): Replace accessing list implemention
2512 details with API function.
2513 (process_serial_event): Replace accessing list implemention details
2515 * target.c (set_desired_inferior): Replace accessing list implemention
2516 details with API function.
2517 * tracepoint.c (same_process_p): New function.
2518 (gdb_agent_about_to_close): Replace accessing list implemention
2519 details with API function.
2520 * win32-low.c (child_delete_thread): Replace accessing list
2521 implemention details with API function.
2522 (match_dll_by_basename): New function.
2523 (dll_is_loaded_by_basename): New function.
2524 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2525 details call to dll_is_loaded_by_basename.
2527 2014-02-19 Doug Evans <dje@google.com>
2529 * dll.h (struct dll_info): Add comment.
2530 * gdbthread.h (struct thread_info): Add comment.
2531 (current_ptid): Simplify.
2532 * inferiors.c (add_process): Update.
2533 (remove_process): Update.
2534 * inferiors.h (struct process_info): Rename member "head" to "entry".
2535 * linux-low.c (delete_lwp): Update.
2537 (last_thread_of_process_p): Update.
2538 (kill_one_lwp_callback, linux_kill): Update.
2539 (status_pending_p_callback): Update.
2540 (wait_for_sigstop): Update. Simplify read of ptid.
2541 (start_step_over): Update.
2542 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2543 (get_lwp_thread): Update.
2544 (struct lwp_info): Rename member "head" to "entry".
2545 * regcache.h (inferior_list_entry): Delete.
2546 * server.c (kill_inferior_callback): Update.
2547 (detach_or_kill_inferior_callback): Update.
2548 (print_started_pid): Update.
2549 (print_attached_pid): Update.
2550 (process_serial_event): Simplify read of ptid.
2551 * thread-db.c (thread_db_create_event): Update.
2552 (thread_db_get_tls_address): Update.
2553 * win32-low.c (current_inferior_ptid): Simplify.
2555 2014-02-19 Tom Tromey <tromey@redhat.com>
2557 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2559 (target_supports_btrace): Update.
2561 2014-02-14 Yao Qi <yao@codesourcery.com>
2563 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2564 (rsp-low-ipa.o): New target.
2566 2014-02-12 Tom Tromey <tromey@redhat.com>
2568 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2569 convert_ascii_to_int.
2570 * regcache.c (registers_to_string): Likewise.
2571 * remote-utils.c (decode_M_packet): Likewise.
2572 * server.c (process_serial_event): Likewise.
2574 2014-02-12 Tom Tromey <tromey@redhat.com>
2576 * server.c (handle_query, handle_v_run): Use hex2bin, not
2578 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2580 2014-02-12 Tom Tromey <tromey@redhat.com>
2582 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2583 convert_int_to_ascii.
2584 * regcache.c (registers_to_string, collect_register_as_string):
2586 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2588 * server.c (process_serial_event): Likewise.
2589 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2590 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2592 2014-02-12 Tom Tromey <tromey@redhat.com>
2594 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2595 bin2hex, not hexify.
2596 * tracepoint.c (cmd_qtstatus): Likewise.
2598 2014-02-12 Tom Tromey <tromey@redhat.com>
2600 * remote-utils.c (monitor_output): Pass explicit length to
2603 2014-02-12 Tom Tromey <tromey@redhat.com>
2605 * tracepoint.c: Include rsp-low.h.
2606 * server.c: Include rsp-low.h.
2607 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2608 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2610 * remote-utils.c: Include rsp-low.h.
2611 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2612 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2613 (convert_int_to_ascii, convert_ascii_to_int): Move to
2615 * regcache.c: Include rsp-low.h.
2616 * ax.c: Include rsp-low.h.
2617 * Makefile.in (SFILES): Add common/rsp-low.c.
2618 (OBS): Add rsp-low.o.
2619 (rsp-low.o): New target.
2621 2014-02-12 Tom Tromey <tromey@redhat.com>
2623 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2624 Include print-utils.h.
2625 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2626 (plongest, thirty_two, phex_nz): Remove.
2627 * Makefile.in (SFILES): Add common/print-utils.c.
2628 (OBS): Add print-utils.o.
2629 (print-utils-ipa.o): New target.
2630 (print-utils.o): New target.
2631 (IPA_OBJS): Add print-utils-ipa.o.
2633 2014-02-06 Tom Tromey <tromey@redhat.com>
2635 * Makefile.in (SFILES): Fix indentation.
2637 2014-02-05 Doug Evans <dje@google.com>
2639 * linux-low.c (linux_wait_for_event): Improve comment.
2640 (linux_wait_1): Keep current_inferior in sync with event_child.
2642 2014-01-22 Doug Evans <dje@google.com>
2644 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2646 2014-01-22 Doug Evans <dje@google.com>
2648 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2649 * configure: Regenerate.
2650 * config.in: Regenerate.
2651 * Makefile.in (SFILES): Add debug.c.
2653 * debug.c: New file.
2654 * debug.h: New file.
2655 * linux-aarch64-low.c (*): Update all debugging printfs to use
2656 debug_printf instead of fprintf.
2657 * linux-arm-low.c (*): Ditto.
2658 * linux-cris-low.c (*): Ditto.
2659 * linux-crisv32-low.c (*): Ditto.
2660 * linux-m32r-low.c (*): Ditto.
2661 * linux-sparc-low.c (*): Ditto.
2662 * linux-x86.c (*): Ditto.
2663 * linux-low.c (*): Ditto.
2664 (linux_wait_1): Add calls to debug_enter, debug_exit.
2665 (linux_wait): Remove redundant debugging printf.
2666 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2667 (linux_resume, unstop_all_lwps): Ditto.
2668 * mem-break.c (*): Update all debugging printfs to use
2669 debug_printf instead of fprintf.
2670 * remote-utils.c (*): Ditto.
2671 * thread-db.c (*): Ditto.
2672 * server.c #include <ctype.h>, "gdb_vecs.h".
2673 (debug_threads): Moved to debug.c.
2674 (*): Update all debugging printfs to use debug_printf instead of
2676 (start_inferior): Replace call to fflush with call to debug_flush.
2677 (monitor_show_help): Mention set debug-format.
2678 (parse_debug_format_options): New function.
2679 (handle_monitor_command): Handle "monitor set debug-format".
2680 (gdbserver_usage): Mention --debug-format.
2681 (main): Parse --debug-format.
2682 * server.h (debug_threads): Declaration moved to debug.h.
2684 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2685 trace_debug_1 that uses debug_printf.
2686 (tracepoint_look_up_symbols): Update all debugging printfs to use
2687 debug_printf instead of fprintf.
2689 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2691 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2694 2014-01-17 Pedro Alves <palves@redhat.com>
2697 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2698 defined after including gdb_proc_service.h.
2700 2014-01-16 Doug Evans <dje@google.com>
2702 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2703 (match_dll): Use it.
2705 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2707 * target.h (target_ops) <read_btrace>: Change parameters and
2708 return type to allow error reporting.
2709 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2710 trace reading errors on.
2711 * linux-low.c (linux_low_read_btrace): Pass trace reading
2713 (linux_low_disable_btrace): New.
2715 2014-01-15 Doug Evans <dje@google.com>
2717 * inferiors.c (thread_id_to_gdb_id): Delete.
2718 * inferiors.h (thread_id_to_gdb_id): Delete.
2720 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2722 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2723 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2726 2014-01-08 Pedro Alves <palves@redhat.com>
2728 * server.c (handle_status): Don't discard previous queued stop
2729 replies or thread's pending status here.
2730 (main) <disconnection>: Do it here instead.
2732 2014-01-08 Pedro Alves <palves@redhat.com>
2734 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2735 * server.c (visit_actioned_threads, handle_pending_status): New
2737 (handle_v_cont): Factor out parts to ...
2738 (resume): ... this new function. If in all-stop, and a thread
2739 being resumed has a pending status, report it without actually
2741 (myresume): Adjust to use the new 'resume' function.
2742 (clear_pending_status_callback, set_pending_status_callback)
2743 (find_status_pending_thread_callback): New functions.
2744 (handle_status): Handle the case of multiple threads having
2745 interesting statuses to report. Report threads' real last signal
2746 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2747 with an interesting thread to report the status for, instead of
2748 always reporting the status of the first thread.
2750 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2752 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2753 * gdbreplay.c (gdbreplay_version): Likewise.
2755 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2757 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2758 iov.iov_len with the real length in use.
2760 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2762 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2763 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2764 for all targets that use win32-low.c.
2765 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2766 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2768 2013-12-13 Pedro Alves <palves@redhat.com>
2770 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2771 if equal to TARGET_WAITKIND_LOADED.
2772 * win32-low.c (cached_status): New static global.
2773 (win32_wait): Add declaration.
2774 (do_initial_child_stuff): Flush all initial pending debug events
2775 up to the initial breakpoint.
2776 (win32_wait): If CACHED_STATUS was set, return that instead
2777 of doing a real wait. Remove the code resuming the execution
2778 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2779 during the initial phase. Also remove the code changing
2780 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2781 TARGET_WAITKIND_STOPPED.
2783 2013-12-11 Yao Qi <yao@codesourcery.com>
2785 * notif.c (handle_notif_ack): Return 0 if no notification
2788 2013-11-20 Doug Evans <dje@google.com>
2790 * linux-low.c (linux_set_resume_request): Fix comment.
2792 2013-11-20 Doug Evans <dje@google.com>
2794 * linux-low.c (resume_status_pending_p): Tweak comment.
2796 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2798 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2799 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2800 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2801 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2802 (srv_amd64_regobj): Add amd64-mpx.o.
2803 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2804 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2805 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2806 * i387-fp.c (num_pl_bnd_register) Added constant.
2807 (num_pl_bnd_cfg_registers) Added constant.
2808 (struct i387_xsave) Added reserved area and MPX fields.
2809 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2810 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2812 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2813 (init_registers_amd64_mpx_linux): Declare new function.
2814 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2815 (x86_64_regmap): Add MPX registers.
2816 (x86_linux_read_description): Add MPX case.
2817 (initialize_low_arch): Initialize MPX targets.
2819 2013-11-18 Tom Tromey <tromey@redhat.com>
2821 * configure: Rebuild.
2822 * configure.ac: Don't check for stdlib.h.
2823 * gdbreplay.c: Unconditionally include stdlib.h.
2825 2013-11-18 Tom Tromey <tromey@redhat.com>
2827 * config.in: Rebuild.
2828 * configure: Rebuild.
2829 * configure.ac: Don't use AC_HEADER_DIRENT.
2831 2013-11-18 Tom Tromey <tromey@redhat.com>
2833 * server.h: Don't check HAVE_STRING_H.
2834 * gdbreplay.c: Don't check HAVE_STRING_H.
2835 * configure: Rebuild.
2837 2013-11-18 Tom Tromey <tromey@redhat.com>
2839 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2842 2013-11-08 Tom Tromey <tromey@redhat.com>
2844 * configure, config.in: Rebuild.
2845 * configure.ac: Remove unused configury.
2847 2013-11-08 Tom Tromey <tromey@redhat.com>
2849 * acinclude.m4: Include common.m4, codeset.m4.
2850 * configure, config.in: Rebuild.
2851 * configure.ac: Use GDB_AC_COMMON.
2853 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2855 * linux-s390-low.c (HWCAP_S390_TE): New define.
2856 (s390_arch_setup): Consider the TE field in the HWCAP for
2857 determining 'have_regset_tdb'.
2859 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2862 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2865 2013-10-02 Pedro Alves <palves@redhat.com>
2867 * server.c (process_serial_event): Don't output "GDBserver
2868 exiting" if GDB is connected through stdio.
2869 * target.c (mywait): Likewise, be silent if GDB is connected
2872 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2874 * lynx-low.c (lynx_add_threads_after_attach): New function.
2875 (lynx_attach): Remove call to add_thread. Add call to
2876 lynx_add_threads_after_attach instead.
2878 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2880 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2881 * config.in, configure: Regenerated.
2883 2013-09-18 Yao Qi <yao@codesourcery.com>
2886 * server.c (start_inferior): Clear 'resume_info'.
2888 2013-09-16 Jiong Wang <jiwang@tilera.com>
2890 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2893 2013-09-16 Jiong Wang <jiwang@tilera.com>
2895 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2896 linux-tile-low.o to srv_tgtobj.
2898 2013-09-16 Will Newton <will.newton@linaro.org>
2900 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2903 2013-09-06 Pedro Alves <palves@redhat.com>
2905 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2906 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2907 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2908 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2909 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2910 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2912 2013-09-06 Pedro Alves <palves@redhat.com>
2914 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2915 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2917 2013-09-06 Pedro Alves <palves@redhat.com>
2919 * linux-amd64-ipa.c: Include tracepoint.h.
2920 * linux-i386-ipa.c: Include tracepoint.h.
2922 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2924 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2925 (ps_get_thread_area): New function.
2927 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2929 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2930 (initialize_low_arch): Call init_registers_crisv32 rather than
2931 init_register_crisv32.
2933 2013-09-05 Pedro Alves <palves@redhat.com>
2935 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2937 * hostio.h: ... this new file.
2938 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2939 win32-low.c: Include hostio.h.
2941 2013-09-05 Pedro Alves <palves@redhat.com>
2943 * server.h (gdb_client_data, handler_func, callback_handler_func)
2944 (delete_file_handler, add_file_handler, append_callback_event)
2945 (delete_callback_event, start_event_loop, initialize_event_loop):
2946 Move to event-loop.h and include it.
2947 * event-loop.h: New file.
2949 2013-09-05 Pedro Alves <palves@redhat.com>
2951 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2952 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2953 (loaded_dll, unloaded_dll): Move to ...
2954 * dll.h: ... this new file.
2955 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2957 2013-09-05 Pedro Alves <palves@redhat.com>
2959 * server.h (current_process, get_thread_process, all_processes)
2960 (add_inferior_to_list, for_each_inferior, current_inferior)
2961 (remove_inferior, add_process, remove_process, find_process_pid)
2962 (have_started_inferiors_p, have_attached_inferiors_p)
2963 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2964 (clear_inferiors, find_inferior, find_inferior_id)
2965 (inferior_target_data, set_inferior_target_data)
2966 (inferior_regcache_data, set_inferior_regcache_data): Move to
2967 inferiors.h, and include it.
2968 * inferiors.h: New file.
2970 2013-09-05 Pedro Alves <palves@redhat.com>
2972 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2976 2013-09-05 Pedro Alves <palves@redhat.com>
2978 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2980 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2981 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2982 (handle_tracepoint_general_set, handle_tracepoint_query)
2983 (tracepoint_finished_step, tracepoint_was_hit)
2984 (release_while_stepping_state_list, current_traceframe)
2985 (in_readonly_region, traceframe_read_mem)
2986 (fetch_traceframe_registers, traceframe_read_sdata)
2987 (traceframe_read_info, struct fast_tpoint_collect_status)
2988 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2989 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2990 (supply_fast_tracepoint_registers)
2991 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2992 (ipa_tdesc, claim_trampoline_space)
2993 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2994 (agent_mem_read, agent_get_trace_state_variable_value)
2995 (agent_set_trace_state_variable_value, agent_tsv_read)
2996 (agent_mem_read_string, get_raw_reg_func_addr)
2997 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2998 * tracepoint.h: ... this new file.
3000 2013-09-05 Pedro Alves <palves@redhat.com>
3002 * server.h (perror_with_name, error, fatal, warning, paddress)
3003 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3005 * utils.h: New file.
3007 2013-09-05 Pedro Alves <palves@redhat.com>
3009 * server.h (remote_debug, noack_mode, transport_is_reliable)
3010 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3011 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3012 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3013 (write_enn, initialize_async_io, enable_async_io)
3014 (disable_async_io, check_remote_input_interrupt_request)
3015 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3016 (dead_thread_notify, prepare_resume_reply)
3017 (decode_address_to_semicolon, decode_address, decode_m_packet)
3018 (decode_M_packet, decode_X_packet, decode_xfer_write)
3019 (decode_search_memory_packet, unhexify, hexify)
3020 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3021 (look_up_one_symbol, relocate_instruction)
3022 (monitor_output): Move to remote-utils.h, and include it.
3023 * remote-utils.h: New file.
3025 2013-09-05 Pedro Alves <palves@redhat.com>
3027 * server.h (_): Delete.
3029 2013-09-02 Pedro Alves <palves@redhat.com>
3031 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3032 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3034 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3036 2013-09-02 Pierre Muller <muller@sourceware.org>
3038 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3039 or WriteProcessMemory complete successfully and handle
3040 ERROR_PARTIAL_COPY error.
3042 2013-09-02 Pedro Alves <palves@redhat.com>
3044 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3045 error instead of EIO.
3047 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3050 * linux-low.c: Include filestuff.h.
3051 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3052 * lynx-low.c: Include filestuff.h.
3053 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3054 * server.c: Include filestuff.h.
3055 (main): Call notice_open_fds.
3056 * spu-low.c: Include filestuff.h.
3057 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3059 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3061 * Makefile.in: Explain why ../target and ../nat are not
3062 listed as include file search paths.
3063 (linux-waitpid.o): New object file rule.
3064 * configure.srv (srv_native_linux_obj): New variable.
3065 Replace all occurrences of linux native object files with
3066 $srv_native_linux_obj.
3067 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3068 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3069 (linux_enable_event_reporting): Remove declaration.
3070 (my_waitpid): Moved to common/linux-waitpid.c.
3071 (linux_wait_for_event): Pass ptid when calling
3072 linux_enable_event_reporting.
3073 (linux_supports_tracefork_flag): Remove.
3074 (linux_enable_event_reporting): Likewise.
3075 (linux_tracefork_grandchild): Remove.
3076 (STACK_SIZE): Moved to common/linux-ptrace.c.
3077 (linux_tracefork_child): Remove.
3078 (linux_test_for_tracefork): Remove.
3079 (linux_look_up_symbols): Call linux_supports_traceclone.
3080 (initialize_low): Remove call to linux_test_for_tracefork.
3081 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3082 common/linux-ptrace.h.
3083 (PTRACE_TYPE_ARG4): Likewise.
3084 Include linux-ptrace.h.
3086 2013-08-21 Pedro Alves <palves@redhat.com>
3088 * config.in: Renegerate.
3090 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3092 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3093 (SFILES): Remove $(srcdir)/common/target-common.c and
3094 add $(srcdir)/target/waitstatus.c.
3095 (OBS): Remove target-common.o and add waitstatus.o.
3096 (server_h): Remove $(srcdir)/../common/target-common.h and
3097 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3098 and $(srcdir)/../target/waitstatus.h.
3099 (target-common.o): Remove.
3100 (waitstatus.o): New target object file.
3101 * target.h: Do not include target-common.h and
3102 include target/resume.h, target/wait.h and
3103 target/waitstatus.h.
3105 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3107 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3108 to PTRACE_TYPE_ARG3.
3109 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3110 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3112 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3113 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3115 2013-07-27 Jie Zhang <jie@codesourcery.com>
3116 Daniel Jacobowitz <dan@codesourcery.com>
3117 Yao Qi <yao@codesourcery.com>
3119 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3120 (mips-linux-watch.o): New rule.
3121 (mips_linux_watch_h): New variable.
3122 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3124 * linux-mips-low.c: Include mips-linux-watch.h.
3125 (struct arch_process_info, struct arch_lwp_info): New.
3126 (update_watch_registers_callback): New function.
3127 (mips_linux_new_process, mips_linux_new_thread) New functions.
3128 (mips_linux_prepare_to_resume, mips_insert_point): New
3130 (mips_remove_point, mips_stopped_by_watchpoint): New
3132 (rsp_bp_type_to_target_hw_bp_type): New function.
3133 (mips_stopped_data_address): New function.
3134 (the_low_target): Add watchpoint support functions.
3136 2013-07-27 Yao Qi <yao@codesourcery.com>
3138 * i386-low.c: Include break-common.h.
3139 (enum target_hw_bp_type): Remove.
3141 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3143 * Makefile.in (SFILES): /common/target-common.c.
3144 (OBS): Add target-common.o.
3145 (server_h): Add $(srcdir)/../common/target-common.h.
3146 (target-common.o): New target.
3147 * server.c (queue_stop_reply_callback): Free
3148 status string after use.
3149 * target.c (target_waitstatus_to_string): Remove.
3150 * target.h: Include target-common.h.
3151 (resume_kind): Likewise.
3152 (target_waitkind): Likewise.
3153 (target_waitstatus): Likewise.
3154 (TARGET_WNOHANG): Likewise.
3156 2013-07-04 Yao Qi <yao@codesourcery.com>
3158 * Makefile.in (host_alias): Use @host_noncanonical@.
3159 (target_alias): Use @target_noncanonical@.
3160 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3161 ACX_NONCANONICAL_HOST.
3162 * configure: Regenerated.
3165 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3167 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3168 * configure: Rebuild.
3169 * Makefile.in (version_host, version_target): Get from configure.
3170 (version.c): Use $(version_host) and $(version_target).
3172 2013-07-03 Pedro Alves <palves@redhat.com>
3174 * Makefile.in (config.status): Depend on development.sh.
3175 * acinclude.m4: Include libmcheck.m4.
3176 * configure: Regenerate.
3178 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3180 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3181 attribute inside the parentheses.
3182 (winapi_DebugSetProcessKillOnExit): Ditto.
3183 (winapi_DebugBreakProcess): Ditto.
3184 (winapi_GenerateConsoleCtrlEvent): Ditto.
3186 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3188 * notif.h (notif_event): Add a dummy member to avoid compiler
3191 2013-07-01 Pedro Alves <palves@redhat.com>
3193 * hostio.c (HOSTIO_PATH_MAX): Define.
3194 (require_filename, handle_open, handle_unlink, handle_readlink):
3197 2013-07-01 Pedro Alves <palves@redhat.com>
3199 * server.h: Include "pathmax.h".
3200 * linux-low.c: Don't include sys/param.h.
3201 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3203 * win32-low.c: Don't include sys/param.h.
3204 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3206 2013-07-01 Pedro Alves <palves@redhat.com>
3208 * event-loop.c: Don't check HAVE_UNISTD_H before including
3210 * gdbreplay.c: Likewise.
3211 * remote-utils.c: Likewise.
3212 * server.c: Likewise.
3213 * configure.ac: Don't check for unistd.h.
3214 * configure: Regenerate.
3216 2013-06-28 Tom Tromey <tromey@redhat.com>
3218 * Makefile.in (version.c): Use version.in, not
3221 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3223 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3224 * configure: Rebuild.
3225 * Makefile.in (version_host, version_target): Get from configure.
3226 (version.c): Use $(version_host) and $(version_target).
3228 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3230 Fix trace-status to output user name without trailing colon.
3231 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3233 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3235 Fix trace-status to output proper start-time and stop-time.
3236 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3237 output start time and stop time in hex as gdb expects.
3239 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3241 * tracepoint.c (build_traceframe_info_xml): Output trace state
3242 variables present in the trace buffer.
3244 2013-06-24 Tom Tromey <tromey@redhat.com>
3246 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3248 (version.o): Remove.
3249 * gdbreplay.c: Include version.h.
3250 (version, host_name): Don't declare.
3251 * server.h: Include version.h.
3252 (version, host_name): Don't declare.
3254 2013-06-12 Pedro Alves <palves@redhat.com>
3256 * linux-x86-low.c (linux_is_elf64): Delete global.
3257 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3258 with local linux_pid_exe_is_elf_64_file use.
3260 2013-06-11 Pedro Alves <palves@redhat.com>
3262 * linux-low.c (regset_disabled, disable_regset): New functions.
3263 (regsets_fetch_inferior_registers)
3264 (regsets_store_inferior_registers): Use them.
3265 (initialize_regsets_info); Don't allocate the disabled_regsets
3267 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3270 2013-06-11 Pedro Alves <palves@redhat.com>
3272 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3275 2013-06-11 Pedro Alves <palves@redhat.com>
3277 * linux-x86-low.c (initialize_low_arch): Call
3278 init_registers_x32_avx_linux.
3280 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3282 Fix compatibility with Android Bionic.
3283 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3286 2013-06-07 Pedro Alves <palves@redhat.com>
3289 * Makefile.in (OBS): Add tdesc.o.
3290 (IPA_OBJS): Add tdesc-ipa.o.
3291 (tdesc-ipa.o): New rule.
3292 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3294 * linux-low.c (new_inferior): Delete.
3295 (disabled_regsets, num_regsets): Delete.
3296 (linux_add_process): Adjust to set the new per-process
3298 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3299 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3300 was a stop. When calling arch_setup, switch the current inferior
3301 to the thread that got an event.
3302 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3303 (regsets_fetch_inferior_registers)
3304 (regsets_store_inferior_registers): New regsets_info parameter.
3306 (linux_register_in_regsets): New regs_info parameter. Adjust to
3308 (register_addr, fetch_register, store_register): New usrregs_info
3309 parameter. Adjust to use it.
3310 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3311 parameter regs_info. Adjust to use it.
3312 (linux_fetch_registers): Get the current inferior's regs_info, and
3314 (linux_store_registers): Ditto.
3315 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3316 (initialize_low): Don't initialize the target_regsets here. Call
3317 initialize_low_arch.
3318 * linux-low.h (target_regsets): Delete declaration.
3319 (struct regsets_info): New.
3320 (struct usrregs_info): New.
3321 (struct regs_info): New.
3322 (struct process_info_private) <new_inferior>: New field.
3323 (struct linux_target_ops): Delete the num_regs, regmap, and
3324 regset_bitmap fields. New field regs_info.
3325 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3326 * i387-fp.c (num_xmm_registers): Delete.
3327 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3328 calls to new interface.
3329 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3330 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3331 Infer the number of xmm registers from the regcache's target
3333 * i387-fp.h (num_xmm_registers): Delete.
3334 * inferiors.c (add_thread): Don't install the thread's regcache
3336 * proc-service.c (gregset_info): Fetch the current inferior's
3337 regs_info. Adjust to use it.
3338 * regcache.c: Include tdesc.h.
3339 (register_bytes, reg_defs, num_registers)
3340 (gdbserver_expedite_regs): Delete.
3341 (get_thread_regcache): If the thread doesn't have a regcache yet,
3342 create one, instead of aborting gdbserver.
3343 (regcache_invalidate_one): Rename to ...
3344 (regcache_invalidate_thread): ... this.
3345 (regcache_invalidate_one): New.
3346 (regcache_invalidate): Only invalidate registers of the current
3348 (init_register_cache): Add target_desc parameter, and use it.
3349 (new_register_cache): Ditto. Assert the target description has a
3350 non zero registers_size.
3351 (regcache_cpy): Add assertions. Adjust.
3352 (realloc_register_cache, set_register_cache): Delete.
3353 (registers_to_string, registers_from_string): Adjust.
3354 (find_register_by_name, find_regno, find_register_by_number)
3355 (register_cache_size): Add target_desc parameter, and use it.
3356 (free_register_cache_thread, free_register_cache_thread_one)
3357 (regcache_release, register_cache_size): New.
3358 (register_size): Add target_desc parameter, and use it.
3359 (register_data, supply_register, supply_register_zeroed)
3360 (supply_regblock, supply_register_by_name, collect_register)
3361 (collect_register_as_string, collect_register_by_name): Adjust.
3362 * regcache.h (struct target_desc): Forward declare.
3363 (struct regcache) <tdesc>: New field.
3364 (init_register_cache, new_register_cache): Add target_desc
3366 (regcache_invalidate_thread): Declare.
3367 (regcache_invalidate_one): Delete declaration.
3368 (regcache_release): Declare.
3369 (find_register_by_number, register_cache_size, register_size)
3370 (find_regno): Add target_desc parameter.
3371 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3373 * remote-utils.c: Include tdesc.h.
3374 (outreg, prepare_resume_reply): Adjust.
3375 * server.c: Include tdesc.h.
3376 (gdbserver_xmltarget): Delete declaration.
3377 (get_features_xml, process_serial_event): Adjust.
3378 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3380 (struct process_info) <tdesc>: New field.
3381 (ipa_tdesc): Declare.
3382 * tdesc.c: New file.
3383 * tdesc.h: New file.
3384 * tracepoint.c: Include tdesc.h.
3385 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3386 (get_context_regcache): Adjust to pass ipa_tdesc down.
3387 (do_action_at_tracepoint): Adjust to get the register cache size
3388 from the context regcache's description.
3389 (traceframe_walk_blocks): Adjust to get the register cache size
3390 from the current trace frame's description.
3391 (traceframe_get_pc): Adjust to get current trace frame's
3392 description and pass it down.
3393 (gdb_collect): Adjust to get the register cache size from the
3395 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3396 (gdbserver_xmltarget): Delete.
3397 (initialize_low_tracepoint): Set the ipa's target description.
3398 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3399 (initialize_low_tracepoint): Set the ipa's target description.
3400 * linux-x86-low.c: Include tdesc.h.
3401 [__x86_64__] (is_64bit_tdesc): New.
3402 (ps_get_thread_area, x86_get_thread_area): Use it.
3403 (i386_cannot_store_register): Rename to ...
3404 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3405 (i386_cannot_fetch_register): Rename to ...
3406 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3407 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3409 (target_regsets): Rename to ...
3410 (x86_regsets): ... this.
3411 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3413 (x86_siginfo_fixup): Use is_64bit_tdesc.
3414 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3415 (tdesc_x32_avx_linux, tdesc_x32_linux)
3416 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3418 (x86_linux_update_xmltarget): Delete.
3419 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3420 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3421 (AMD64_LINUX_USER64_CS): New.
3422 (x86_linux_read_description): New, based on
3423 x86_linux_update_xmltarget.
3424 (same_process_callback): New.
3425 (x86_arch_setup_process_callback): New.
3426 (x86_linux_update_xmltarget): New.
3427 (x86_regsets_info): New.
3428 (amd64_linux_regs_info): New.
3429 (i386_linux_usrregs_info): New.
3430 (i386_linux_regs_info): New.
3431 (x86_linux_regs_info): New.
3432 (x86_arch_setup): Reimplement.
3433 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3434 (x86_emit_ops): Ditto.
3435 (the_low_target): Adjust. Install x86_linux_regs_info,
3436 x86_cannot_fetch_register, and x86_cannot_store_register.
3437 (initialize_low_arch): New.
3438 * linux-ia64-low.c (tdesc_ia64): Declare.
3439 (ia64_fetch_register): Adjust.
3440 (ia64_usrregs_info, regs_info): New globals.
3441 (ia64_regs_info): New function.
3442 (the_low_target): Adjust.
3443 (initialize_low_arch): New function.
3444 * linux-sparc-low.c (tdesc_sparc64): Declare.
3445 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3447 (sparc_arch_setup): New function.
3448 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3449 (the_low_target): Adjust.
3450 (initialize_low_arch): New function.
3451 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3452 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3453 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3454 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3455 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3456 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3457 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3458 (tdesc_powerpc_isa205_vsx64l): Declare.
3459 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3460 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3461 (ppc_set_pc, ppc_get_hwcap): Adjust.
3462 (ppc_usrregs_info): Forward declare.
3463 (!__powerpc64__) ppc_regmap_adjusted: New global.
3464 (ppc_arch_setup): Adjust to the current process'es target
3466 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3467 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3468 (ppc_store_evrregset): Adjust.
3469 (target_regsets): Rename to ...
3470 (ppc_regsets): ... this, and make static.
3471 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3472 (ppc_regs_info): New function.
3473 (the_low_target): Adjust.
3474 (initialize_low_arch): New function.
3475 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3476 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3477 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3478 (tdesc_s390x_linux64v2): Declare.
3479 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3480 (s390_fill_gregset, s390_store_last_break): Adjust.
3481 (target_regsets): Rename to ...
3482 (s390_regsets): ... this, and make static.
3483 (s390_get_pc, s390_set_pc): Adjust.
3484 (s390_get_hwcap): New target_desc parameter, and use it.
3485 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3486 (s390_arch_setup): Adjust to set the current process'es target
3487 description. Don't adjust the regmap.
3488 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3489 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3490 (regs_info_3264): New globals.
3491 (s390_regs_info): New function.
3492 (the_low_target): Adjust.
3493 (initialize_low_arch): New function.
3494 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3495 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3496 [__mips64] (init_registers_mips_linux)
3497 (init_registers_mips_dsp_linux): Delete defines.
3498 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3499 (have_dsp): New global.
3500 (mips_read_description): New, based on mips_arch_setup.
3501 (mips_arch_setup): Reimplement.
3502 (get_usrregs_info): New function.
3503 (mips_cannot_fetch_register, mips_cannot_store_register)
3504 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3505 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3506 (target_regsets): Rename to ...
3507 (mips_regsets): ... this, and make static.
3508 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3509 (dsp_regs_info, regs_info): New globals.
3510 (mips_regs_info): New function.
3511 (the_low_target): Adjust.
3512 (initialize_low_arch): New function.
3513 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3514 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3516 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3517 (arm_read_description): New, with bits factored from
3519 (arm_arch_setup): Reimplement.
3520 (target_regsets): Rename to ...
3521 (arm_regsets): ... this, and make static.
3522 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3523 (arm_regs_info): New function.
3524 (the_low_target): Adjust.
3525 (initialize_low_arch): New function.
3526 * linux-m68k-low.c (tdesc_m68k): Declare.
3527 (target_regsets): Rename to ...
3528 (m68k_regsets): ... this, and make static.
3529 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3530 (m68k_regs_info): New function.
3531 (m68k_arch_setup): New function.
3532 (the_low_target): Adjust.
3533 (initialize_low_arch): New function.
3534 * linux-sh-low.c (tdesc_sharch): Declare.
3535 (target_regsets): Rename to ...
3536 (sh_regsets): ... this, and make static.
3537 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3538 (sh_regs_info, sh_arch_setup): New functions.
3539 (the_low_target): Adjust.
3540 (initialize_low_arch): New function.
3541 * linux-bfin-low.c (tdesc_bfin): Declare.
3542 (bfin_arch_setup): New function.
3543 (bfin_usrregs_info, regs_info): New globals.
3544 (bfin_regs_info): New function.
3545 (the_low_target): Adjust.
3546 (initialize_low_arch): New function.
3547 * linux-cris-low.c (tdesc_cris): Declare.
3548 (cris_arch_setup): New function.
3549 (cris_usrregs_info, regs_info): New globals.
3550 (cris_regs_info): New function.
3551 (the_low_target): Adjust.
3552 (initialize_low_arch): New function.
3553 * linux-cris-low.c (tdesc_crisv32): Declare.
3554 (cris_arch_setup): New function.
3555 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3556 (cris_regs_info): New function.
3557 (the_low_target): Adjust.
3558 (initialize_low_arch): New function.
3559 * linux-m32r-low.c (tdesc_m32r): Declare.
3560 (m32r_arch_setup): New function.
3561 (m32r_usrregs_info, regs_info): New globals.
3562 (m32r_regs_info): Adjust.
3563 (initialize_low_arch): New function.
3564 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3565 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3566 (tic6x_usrregs_info): Forward declare.
3567 (tic6x_read_description): New function, based on ...
3568 (tic6x_arch_setup): ... this. Reimplement.
3569 (target_regsets): Rename to ...
3570 (tic6x_regsets): ... this, and make static.
3571 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3572 (tic6x_regs_info): New function.
3573 (the_low_target): Adjust.
3574 (initialize_low_arch): New function.
3575 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3576 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3577 (target_regsets): Rename to ...
3578 (xtensa_regsets): ... this, and make static.
3579 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3581 (xtensa_arch_setup, xtensa_regs_info): New functions.
3582 (the_low_target): Adjust.
3583 (initialize_low_arch): New function.
3584 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3585 (nios2_arch_setup): Set the current process'es tdesc.
3586 (target_regsets): Rename to ...
3587 (nios2_regsets): ... this.
3588 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3589 (nios2_regs_info): New function.
3590 (the_low_target): Adjust.
3591 (initialize_low_arch): New function.
3592 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3593 (aarch64_arch_setup): Set the current process'es tdesc.
3594 (target_regsets): Rename to ...
3595 (aarch64_regsets): ... this.
3596 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3597 (aarch64_regs_info): New function.
3598 (the_low_target): Adjust.
3599 (initialize_low_arch): New function.
3600 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3602 (target_regsets): Rename to ...
3603 (tile_regsets): ... this.
3604 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3605 (tile_regs_info): New function.
3606 (tile_arch_setup): Set the current process'es tdesc.
3607 (the_low_target): Adjust.
3608 (initialize_low_arch): New function.
3609 * spu-low.c (tdesc_spu): Declare.
3610 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3611 * win32-arm-low.c (tdesc_arm): Declare.
3612 (arm_arch_setup): New function.
3613 (the_low_target): Install arm_arch_setup instead of
3615 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3616 (init_windows_x86): Rename to ...
3617 (i386_arch_setup): ... this. Set `win32_tdesc'.
3618 (the_low_target): Adjust.
3619 * win32-low.c (win32_tdesc): New global.
3620 (child_add_thread): Don't create the thread cache here.
3621 (do_initial_child_stuff): Set the new process'es tdesc.
3622 * win32-low.h (struct target_desc): Forward declare.
3623 (win32_tdesc): Declare.
3624 * lynx-i386-low.c (tdesc_i386): Declare global.
3625 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3626 * lynx-low.c (lynx_tdesc): New global.
3627 (lynx_add_process): Set the new process'es tdesc.
3628 * lynx-low.h (struct target_desc): Forward declare.
3629 (lynx_tdesc): Declare global.
3630 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3631 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3632 * nto-low.c (nto_tdesc): New global.
3633 (do_attach): Set the new process'es tdesc.
3634 * nto-low.h (struct target_desc): Forward declare.
3635 (nto_tdesc): Declare.
3636 * nto-x86-low.c (tdesc_i386): Declare.
3637 (nto_x86_arch_setup): Set `nto_tdesc'.
3639 2013-06-04 Gary Benson <gbenson@redhat.com>
3641 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3642 to qSupported response when appropriate.
3643 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3644 with nonzero-length annex.
3645 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3646 arguments supplied in annex.
3648 2013-05-31 Doug Evans <dje@google.com>
3651 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3652 64 bits in 64-cross-32 environment.
3654 2013-05-28 Pedro Alves <palves@redhat.com>
3656 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3657 (aarch64-without-fpu.c): Delete rule.
3658 * configure.srv (aarch64*-*-linux*): Remove references to
3659 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3660 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3663 2013-05-24 Pedro Alves <palves@redhat.com>
3665 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3666 instead of strchr/decode_address. Error if the range isn't split
3667 with a ','. Don't assume there's be a ':' in the action.
3669 2013-05-23 Yao Qi <yao@codesourcery.com>
3670 Pedro Alves <palves@redhat.com>
3672 * linux-low.c (lwp_in_step_range): New function.
3673 (linux_wait_1): If the thread was range stepping and stopped
3674 outside the stepping range, report the stop to GDB. Otherwise,
3675 continue stepping. Add range stepping debug output.
3676 (linux_set_resume_request): Copy the step range from the resume
3678 (linux_supports_range_stepping): New.
3679 (linux_target_ops) <supports_range_stepping>: Set to
3680 linux_supports_range_stepping.
3681 * linux-low.h (struct linux_target_ops)
3682 <supports_range_stepping>: New field.
3683 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3684 * linux-x86-low.c (x86_supports_range_stepping): New.
3685 (the_low_target) <supports_range_stepping>: Set to
3686 x86_supports_range_stepping.
3687 * server.c (handle_v_cont): Handle 'r' action.
3688 (handle_v_requests): Append ";r" if the target supports range
3690 * target.h (struct thread_resume) <step_range_start,
3691 step_range_end>: New fields.
3692 (struct target_ops) <supports_range_stepping>:
3694 (target_supports_range_stepping): New macro.
3696 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3698 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3699 confusion in comment.
3701 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3703 * lynx-low.c (struct process_info_private): New type.
3704 (lynx_add_process): New function.
3705 (lynx_create_inferior, lynx_attach): Replace calls to
3706 add_process by calls to lynx_add_process.
3707 (lynx_resume): If PTID is null, then try using
3708 current_process()->private->last_wait_event_ptid.
3710 (lynx_clear_inferiors): Delete. The contents of that function
3711 has been inlined in lynx_mourn;
3712 (lynx_wait_1): Save the ptid in the process's private data.
3713 (lynx_mourn): Free the process' private data. Replace call
3714 to lynx_clear_inferiors by call to clear_inferiors.
3716 2013-05-17 Yao Qi <yao@codesourcery.com>
3718 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3721 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3723 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3724 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3725 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3726 PT_TEXT_END_ADDR guards. Update comments.
3727 (linux_target_op) <read_offsets>: Conditionally define to
3728 linux_read_offsets if the target is UCLIBC and if it defines
3729 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3731 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3732 Andrew Jenner <andrew@codesourcery.com>
3734 * Makefile.in (SFILES): Add linux-nios2-low.c.
3735 (clean): Add action to delete nios2-linux.c.
3736 (nios2-linux.c): New rule.
3737 * configure.srv: Add nios2*-*-linux*.
3738 * linux-nios2-low.c: New.
3740 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3742 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3744 2013-04-25 Hui Zhu <hui@codesourcery.com>
3747 * ax.c (ax_printf): Add fflush.
3749 2013-04-22 Tom Tromey <tromey@redhat.com>
3751 * Makefile.in (SFILES): Add filestuff.c.
3752 (OBS): Add filestuff.o.
3753 (filestuff.o): New target.
3754 * config.in, configure: Rebuild.
3755 * configure.ac: Check for fdwalk, pipe2.
3757 2013-04-17 Pedro Alves <palves@redhat.com>
3759 * configure.ac (USE_THREAD_DB): Delete variable.
3760 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3761 Don't AC_SUBST USE_THREAD_DB.
3762 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3763 * config.in, configure: Regenerate.
3765 2013-04-16 Pedro Alves <palves@redhat.com>
3767 * linux-low.h (struct lwp_info) <thread_known>: Move under
3768 the USE_THREAD_DB #ifdef.
3770 2013-04-16 Pedro Alves <palves@redhat.com>
3772 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3773 (linux-low.o): Delete rule.
3774 * linux-low.h: Always include "gdb_thread_db.h" instead of
3775 conditionally including thread_db.h.
3776 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3779 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3781 * Makefile.in (install-only): Fix make install regression.
3783 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3785 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3786 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3788 * gdbserver.1: Remove.
3790 2013-03-22 Pedro Alves <palves@redhat.com>
3792 * linux-low.c (handle_extended_wait): Don't call
3793 linux_enable_event_reporting.
3795 2013-03-15 Tony Theodore <tonyt@logyst.com>
3798 * Makefile.in (SHELL): Use @SHELL@.
3800 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3802 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3805 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3807 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3808 Remove extraneous NULL element.
3810 2013-03-13 Yao Qi <yao@codesourcery.com>
3812 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3813 'V' block in trace frame.
3815 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3817 * target.h (struct target_ops): Add btrace ops.
3818 (target_supports_btrace): New macro.
3819 (target_enable_btrace): New macro.
3820 (target_disable_btrace): New macro.
3821 (target_read_btrace): New macro.
3822 * gdbthread.h (struct thread_info): Add btrace field.
3823 * server.c: Include btrace-common.h.
3824 (handle_btrace_general_set): New function.
3825 (handle_btrace_enable): New function.
3826 (handle_btrace_disable): New function.
3827 (handle_general_set): Call handle_btrace_general_set.
3828 (handle_qxfer_btrace): New function.
3829 (struct qxfer qxfer_packets[]): Add btrace entry.
3830 * inferiors.c (remove_thread): Disable btrace.
3831 * linux-low: Include linux-btrace.h.
3832 (linux_low_enable_btrace): New function.
3833 (linux_low_read_btrace): New function.
3834 (linux_target_ops): Add btrace ops.
3835 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3836 Add srv_linux_btrace=yes.
3837 (x86_64-*-linux*): Add linux-btrace.o.
3838 Add srv_linux_btrace=yes.
3839 * configure.ac: Define HAVE_LINUX_BTRACE.
3840 * config.in: Regenerated.
3841 * configure: Regenerated.
3843 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3845 * server.c (handle_qxfer): Preserve error message if -3 is
3847 (qxfer): Document the -3 return value.
3849 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3851 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3852 (linux_btrace_h): New variable.
3853 (linux-btrace.o): New rule.
3855 2013-03-08 Stan Shebs <stan@codesourcery.com>
3856 Hafiz Abid Qadeer <abidh@codesourcery.com>
3858 * tracepoint.c (trace_buffer_size): New global.
3859 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3860 (init_trace_buffer): Change to one-argument function. Allocate
3861 trace buffer memory.
3862 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3863 handle QTBuffer:size packet.
3864 (cmd_bigqtbuffer_size): New function.
3865 (initialize_tracepoint): Call init_trace_buffer with
3866 DEFAULT_TRACE_BUFFER_SIZE.
3867 * server.c (handle_query): Add QTBuffer:size in the
3870 2013-03-07 Yao Qi <yao@codesourcery.com>
3872 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3873 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3875 (cmd_qtsp): Adjust condition. Do post increment.
3876 Set cur_action and cur_step_action back to 0.
3878 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3881 * linux-low.c (linux_write_memory): Return early success if LEN is
3884 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3886 * configure.srv: Add x86_64-*-cygwin* as target.
3888 2013-02-28 Tom Tromey <tromey@redhat.com>
3890 * configure.ac: Invoke AC_SYS_LARGEFILE.
3891 * configure, config.in: Rebuild.
3893 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3895 * win32-low.c: Throughout, fix format strings and casts of
3896 printf-like functions to avoid type related warnings on all
3898 (get_child_debug_event): Print dwDebugEventCode as hex since
3899 that's how it's usually documented.
3901 2013-02-28 Yao Qi <yao@codesourcery.com>
3903 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3906 2013-02-27 Jiong Wang <jiwang@tilera.com>
3908 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3909 (reg-tilegx32.c): New rule.
3910 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3911 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3912 different register info initializer according to elf class.
3913 (init_registers_tilgx32): New function. The tilegx32 register info
3915 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3916 (tile_store_gregset): Likewise.
3918 2013-02-27 Yao Qi <yao@codesourcery.com>
3920 * server.c (process_point_options): Print debug message when
3921 debug_threads is true.
3923 2013-02-26 Yao Qi <yao@codesourcery.com>
3925 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3927 2013-02-19 Pedro Alves <palves@redhat.com>
3928 Kai Tietz <ktietz@redhat.com>
3932 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3933 instead of strtoul to extract address from packet.
3934 (process_serial_event) <'z'>: Likewise.
3936 2013-02-18 Yao Qi <yao@codesourcery.com>
3938 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3940 2013-02-14 Pedro Alves <palves@redhat.com>
3944 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3945 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3947 2013-02-14 Pedro Alves <palves@redhat.com>
3949 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3951 2013-02-14 Pedro Alves <palves@redhat.com>
3953 * tracepoint.c (save_string): Delete.
3954 (add_tracepoint_action): Use savestring instead of save_string.
3956 2013-02-12 Pedro Alves <palves@redhat.com>
3958 * linux-xtensa-low.c: Ditto.
3959 * xtensa-xtregs.c: Ditto.
3961 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3963 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3966 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3968 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3969 aarch64_num_wp_regs and aarch64_num_bp_regs to
3970 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3972 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3974 * linux-aarch64-low.c (ps_get_thread_area): Replace
3975 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3977 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3978 Marcus Shawcroft <marcus.shawcroft@arm.com>
3979 Nigel Stephens <nigel.stephens@arm.com>
3980 Yufeng Zhang <yufeng.zhang@arm.com>
3982 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3983 (aarch64.c, aarch64-without-fpu.c): New targets.
3984 * configure.srv (aarch64*-*-linux*): New.
3985 * linux-aarch64-low.c: New file.
3987 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3989 * linux-low.c (handle_extended_wait, linux_create_inferior)
3990 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3991 (dequeue_one_deferred_signal, linux_resume_one_thread)
3992 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3993 (linux_tracefork_grandchild, linux_test_for_tracefork)
3994 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3995 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3996 where the argument is 0.
3998 2013-01-25 Yao Qi <yao@codesourcery.com>
4000 * event-loop.c: Include "queue.h".
4001 (gdb_event_p): New typedef.
4002 (struct gdb_event) <next_event>: Remove.
4003 (event_queue): Change to QUEUE(gdb_event_p).
4004 (async_queue_event): Remove.
4005 (gdb_event_xfree): New.
4006 (initialize_event_loop): New.
4007 (process_event): Use API from QUEUE.
4008 (wait_for_event): Likewise.
4009 * server.c (main): Call initialize_event_loop.
4010 * server.h (initialize_event_loop): Declare.
4012 2013-01-18 Yao Qi <yao@codesourcery.com>
4014 * ax.h (struct eval_agent_expr_context): New.
4015 (gdb_eval_agent_expr): Update declaration.
4016 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4017 TFRAME. Add new argument CTX.
4018 * server.h (struct eval_agent_expr_context): Declare.
4019 (agent_mem_read, agent_tsv_read): Update declaration.
4020 (agent_mem_read_string): Likewise.
4021 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4022 (add_traceframe_block): Add new argument TPOINT.
4023 Increase TPOINT->traceframe_usage.
4024 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4025 eval_tracepoint_agent_expr.
4026 (condition_true_at_tracepoint): Likewise.
4027 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4028 (agent_mem_read_string, agent_tsv_read): Likewise.
4030 2013-01-16 Yao Qi <yao@codesourcery.com>
4032 * linux-low.c (linux_resume_one_lwp): Don't check
4033 'lwp->bp_reinsert != 0'.
4035 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4036 Pedro Alves <palves@redhat.com>
4038 * lynx-low.c (ptrace_request_to_str): Define a temporary
4039 macro and use it to simplify this function's implementation.
4041 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4043 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4046 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4048 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4050 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4052 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4054 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4056 * lynx-low.c (lynx_resume): Use the resume_info parameter
4057 to determine the ptid for the lynx_ptrace call, unless
4058 it is equal to minus_one_ptid, in which case we use the
4059 ptid of the current_inferior.
4060 (lynx_wait_1): After having received a thread create/exit
4061 event, resume the inferior's execution using the signaling
4062 thread's ptid, rather than the old ptid.
4064 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4066 * lynx-low.c (lynx_resume): Delete variable ret.
4068 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4070 * gdbreplay.c (gdbreplay_version): Update copyright year.
4071 * server.c (gdbserver_version): Likewise.
4073 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4075 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4078 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4080 * lynx-low.c (ptrace_request_to_str): Add handling for
4083 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4085 * lynx-low.c (lynx_attach): Delete variable new_process.
4087 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4089 * lynx-low.c (lynx_create_inferior): Delete variable
4092 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4094 * lynx-low.c (ptrace_request_to_str): Do not handle
4095 PTRACE_GETTHREADLIST if this macro does not exist.
4097 2012-12-15 Yao Qi <yao@codesourcery.com>
4099 * Makefile.in (OBS): Add notif.o.
4100 * notif.c, notif.h: New.
4101 * server.c: Include "notif.h".
4102 (struct vstop_notif) <next>: Remove.
4104 (queue_stop_reply): Update.
4105 (push_event, send_next_stop_reply): Remove.
4106 (discard_queued_stop_replies): Update.
4107 (notif_stop): New variable.
4108 (handle_v_stopped): Remove.
4109 (handle_v_requests): Don't call handle_v_stopped. Call
4110 handle_ack_notif instead.
4111 (queue_stop_reply_callback): Call notif_event_enque instead
4112 of queue_stop_reply.
4113 (handle_status): Don't call send_next_stop_reply, call
4114 notif_write_event instead.
4115 (kill_inferior_callback): Likewise.
4116 (detach_or_kill_inferior_callback): Likewise.
4117 (main): Call initialize_notif.
4118 (process_serial_event): Call QUEUE_is_empty.
4119 (handle_target_event): Call notif_push instead of push event.
4120 * server.h (push_event): Remove declaration.
4122 2012-12-10 Tom Tromey <tromey@redhat.com>
4124 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4125 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4128 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4129 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4130 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4131 (amd64-linux-ipa.o, ax.o): Rewrite.
4132 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4133 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4134 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4135 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4136 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4137 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4138 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4139 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4140 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4141 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4142 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4143 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4144 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4145 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4146 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4147 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4148 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4149 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4150 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4151 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4152 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4153 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4154 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4155 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4156 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4157 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4158 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4159 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4160 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4161 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4162 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4163 (reg-tilegx.o): Remove.
4164 (all_object_files): New macro.
4165 Include .deps files.
4166 * aclocal.m4, configure: Rebuild.
4167 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4168 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4169 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4171 2012-12-05 Tom Tromey <tromey@redhat.com>
4174 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4176 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4178 * configure.ac: Check for linux/perf_event.h.
4179 * config.in: Regenerated.
4180 * configure: Regenerated.
4182 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4184 * hostio.c (handle_readlink): Decrease buffer size
4185 parameter passed to readlink by one byte.
4187 2012-11-26 Yao Qi <yao@codesourcery.com>
4189 * configure.ac (build_warnings): Append '-Wempty-body'.
4190 * configure: Regenerated.
4191 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4194 2012-11-15 Pierre Muller <muller@sourceware.org>
4196 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4197 * config.in: Regenerate.
4198 * configure: Regenerate.
4199 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4200 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4201 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4202 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4204 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4205 instead of <sys/wait.h> header.
4206 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4208 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4210 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4211 (various make rules): Remove -DGDBSERVER
4213 2012-11-09 Yao Qi <yao@codesourcery.com>
4215 * spu-low.c (current_ptid): Move it to ..
4216 * gdbthread.h: ... here. New.
4217 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4218 * server.c (myresume, process_serial_event): Likewise.
4219 * thread-db.c (thread_db_find_new_threads): Likewise.
4220 * tracepoint.c (run_inferior_command): Likewise.
4222 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4224 * server.c (handle_search_memory_1): Include access length in
4227 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4229 * linux-crisv32-low.c: Fix compile errors.
4231 2012-09-04 Yao Qi <yao@codesourcery.com>
4233 * tracepoint.c (cmd_qtsv): Adjust debug message.
4234 Don't check CUR_TPOINT.
4236 2012-08-28 Yao Qi <yao@codesourcery.com>
4238 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4239 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4240 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4241 Remove declarations of xmalloc, xreallloc, xstrdup and
4243 * Makefile.in (libiberty_h): New.
4244 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4245 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4247 2012-08-23 Yao Qi <yao@codesourcery.com>
4249 * server.h: Remove declaration of 'xsnprintf'.
4251 2012-08-22 Keith Seitz <keiths@redhat.com>
4253 * server.h: Include build-gnulib-gbserver/config.h.
4254 * gdbreplay.c: Likewise.
4256 2012-08-08 Doug Evans <dje@google.com>
4258 * Makefile.in (SFILES): Add gdb_vecs.c.
4259 (OBS): Add gdb_vecs.o.
4260 (gdb_vecs_h, host_defs_h): New variables.
4261 (thread-db.o): Add $(gdb_vecs_h) dependency.
4262 (gdb_vecs.o): New rule.
4263 * thread-db.c: #include "gdb_vecs.h".
4264 (thread_db_load_search): Use a vector to iterate over path elements.
4265 Handle text appearing after "$pdir".
4267 * configure.ac: Add check for strstr.
4268 * config.in: Regenerate.
4269 * configure: Regenerate.
4271 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4273 * hostio.c (handle_pread): If pread fails, fall back to attempting
4275 (handle_pwrite): Likewise for pwrite.
4277 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4279 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4280 between unsupported TYPE and unimplementable ADDR/LEN combination.
4281 (arm_insert_point): Act on new return value.
4283 2012-07-31 Pedro Alves <palves@redhat.com>
4285 * server.c (process_point_options): Only skip tokens if we find
4286 one that is unrecognized. Don't treat 'X' specially while
4287 skipping unrecognized tokens.
4289 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4291 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4292 to 4-byte-align HW breakpoint addresses for Thumb.
4294 2012-07-27 Yao Qi <yao@codesourcery.com>
4298 * server.h: Declare gdb_agent_about_to_close.
4299 * target.c (kill_inferior): Include "agent.h".
4300 New. Send command 'kill'.
4301 * target.h (kill_inferior): Removed macro.
4302 * tracepoint.c (gdb_agent_about_to_close): New.
4303 (gdb_agent_helper_thread): Handle command 'close'.
4304 Wait endlessly until the inferior stops.
4305 Install gdb_agent_remove_socket to atexit hook.
4306 (agent_socket_name): New static variable.
4307 (gdb_agent_socket_init): Replace local variable 'name' with
4308 'agent_socket_name'.
4309 (gdb_agent_remove_socket): New.
4311 2012-07-27 Yao Qi <yao@codesourcery.com>
4313 * server.c (process_point_options): Stop at 'X' when parsing.
4315 2012-07-19 Michael Eager <eager@eagercon.com>
4317 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4319 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4320 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4321 hardware breakpoint.
4323 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4325 * gdbserver/linux-low.c (initialize_low): Call
4326 linux_ptrace_init_warnings.
4328 2012-07-02 Doug Evans <dje@google.com>
4330 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4333 2012-07-02 Stan Shebs <stan@codesourcery.com>
4335 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4336 (ax.o): Add it to build rule.
4338 (OBS): Add format.o.
4339 (IPA_OBS): Add format.o.
4340 * server.c (handle_query): Claim support for breakpoint commands.
4341 (process_point_options): Add command case.
4342 (process_serial_event): Leave running if there are printfs in
4344 * mem-break.h (any_persistent_commands): Declare.
4345 (add_breakpoint_commands): Declare.
4346 (gdb_no_commands_at_breakpoint): Declare.
4347 (run_breakpoint_commands): Declare.
4348 * mem-break.c (struct point_command_list): New struct.
4349 (struct breakpoint): New field command_list.
4350 (any_persistent_commands): New function.
4351 (add_commands_to_breakpoint): New function.
4352 (add_breakpoint_commands): New function.
4353 (gdb_no_commands_at_breakpoint): New function.
4354 (run_breakpoint_commands): New function.
4355 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4357 * ax.c: Include format.h.
4358 (ax_printf): New function.
4359 (gdb_eval_agent_expr): Add printf opcode.
4361 2012-06-13 Yao Qi <yao@codesourcery.com>
4363 * server.c (start_inferior): Remove duplicated writes to fields
4364 'last_resume_kind' and 'last_status' of 'current_inferior'.
4366 2012-06-12 Yao Qi <yao@codesourcery.com>
4367 Pedro Alves <palves@redhat.com>
4369 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4371 * server.c (handle_v_cont): Extend comment.
4373 2012-06-11 Yao Qi <yao@codesourcery.com>
4375 * linux-low.c (linux_attach): Add 'static'.
4377 2012-06-06 Yao Qi <yao@codesourcery.com>
4379 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4381 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4383 Fix gcc -flto compilation warning.
4384 * server.c (main): Make variable multi_mode and attach volatile.
4386 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4388 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4389 if the platform doesn't know about it.
4391 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4393 * Makefile.in (SFILES): Add linux-tile-low.c.
4394 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4395 * configure.srv: Handle tilegx-*-linux*.
4396 * linux-tile-low.c: New file.
4398 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4400 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4402 2012-05-24 Pedro Alves <palves@redhat.com>
4406 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4408 2012-05-24 Pedro Alves <palves@redhat.com>
4412 Replace target_signal with gdb_signal throughout.
4414 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4416 * linux-low.c (linux_store_registers): Avoid the copying sequence
4417 when no data has been retrieved by ptrace.
4419 2012-05-22 Will Deacon <will.deacon@arm.com>
4421 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4422 Include asm/ptrace.h.
4423 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4426 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4428 * linux-low.c (linux_store_registers): Don't re-retrieve data
4429 with ptrace that has already been obtained from /proc. Always
4430 copy any data retrieved with ptrace to the buffer supplied.
4432 2012-05-11 Yao Qi <yao@codesourcery.com>
4433 Pedro Alves <palves@redhat.com>
4435 * linux-low.c (enum stopping_threads_kind): New.
4436 (stopping_threads): Change type to `enum stopping_threads_kind'.
4437 (handle_extended_wait): If stopping and suspending threads, leave
4438 the new_lwp suspended too.
4439 (linux_wait_for_event): Adjust.
4440 (stop_all_lwps): Set `stopping_threads' to
4441 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4442 whether we're suspending threads or just stopping them. Assert no
4445 2012-04-29 Yao Qi <yao@codesourcery.com>
4447 * server.h: Move some code to ...
4448 * gdbthread.h: ... here. New.
4449 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4450 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4451 (nto-low.o, win32-low.o): Likewise.
4452 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4453 * regcache.c, remote-utils.c, server.c: Likewise.
4454 * target.c, tracepoint.c, win32-low.c: Likewise.
4456 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4458 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4459 (PTRACE_ARG4_TYPE): Likewise.
4460 (PTRACE_XFER_TYPE): Likewise.
4461 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4462 ptrace to PTRACE_ARG3_TYPE.
4463 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4464 (PTRACE_ARG4_TYPE): Likewise.
4465 (PTRACE_XFER_TYPE): Likewise.
4466 (linux_detach_one_lwp): Cast fourth argument of
4467 ptrace to long then PTRACE_ARG4_TYPE.
4468 (regsets_fetch_inferior_registers): Cast third argument of
4469 ptrace to long then PTRACE_ARG3_TYPE.
4470 (regsets_store_inferior_registers): Likewise.
4472 2012-04-20 Pedro Alves <palves@redhat.com>
4474 * configure: Regenerate.
4476 2012-04-19 Pedro Alves <palves@redhat.com>
4478 * Makefile.in (GNULIB_BUILDDIR): New.
4479 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4480 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4481 (all, install-only, uninstall, clean-info, all-lib, clean): No
4482 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4483 (maintainer-clean realclean distclean): Use subdir_do.
4485 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4486 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4487 * acinclude.m4: Include acx_configure_dir.m4.
4488 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4489 calls. Call AC_PROG_RANLIB. Configure gnulib using
4492 (GNULIB_STDINT_H): Adjust.
4493 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4494 * gdbreplay.c: Include build-gnulib/config.h.
4495 * server.h: Likewise.
4496 * aclocal.m4: Regenerate.
4497 * config.in: Regenerate.
4498 * configure: Regenerate.
4500 2012-04-19 Pedro Alves <palves@redhat.com>
4502 * Makefile.in (LIBGNU, INCGNU): Adjust.
4503 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4504 (all, install-only, uninstall, clean-info, all-lib, clean)
4505 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4506 * configure.ac: Adjust AC_OUTPUT output.
4507 * aclocal.m4: Regenerate.
4508 * configure: Regenerate.
4510 2012-04-19 Pedro Alves <palves@redhat.com>
4512 * Makefile.in (generated_files): New.
4513 (server_h): Remove the explicit dependency on config.h, and depend
4514 on $generated_files.
4516 2012-04-19 Pedro Alves <palves@redhat.com>
4518 * Makefile.in (INCGNU): Add -Ignulib.
4520 2012-04-19 Pedro Alves <palves@redhat.com>
4522 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4523 (INCGNU): ... this, and spell out -I here.
4524 (GNULIB_LIB): Rename to ...
4526 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4528 2012-04-19 Pedro Alves <palves@redhat.com>
4530 * config.in: Regenerate.
4532 2012-04-19 Pedro Alves <palves@redhat.com>
4534 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4535 * server.h (memmem): Remove declaration.
4536 * config.in: Regenerate.
4537 * configure: Regenerate.
4539 2012-04-19 Yao Qi <yao@codesourcery.com>
4541 * Makefile.in (SFILES): Add common/vec.c.
4545 2012-04-19 Yao Qi <yao@codesourcery.com>
4547 * remote-utils.c (prepare_resume_reply): Replace with macro
4548 target_core_of_thread.
4549 * server.c (handle_qxfer_threads_proper): Likewise.
4550 * target.h (traget_core_of_thread): New macro.
4552 2012-04-18 Pedro Alves <palves@redhat.com>
4554 * aclocal.m4: Regenerate.
4555 * configure: Regenerate.
4557 2012-04-16 Yao Qi <yao@codesourcery.com>
4559 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4560 duplicated on address.
4562 2012-04-16 Yao Qi <yao@codesourcery.com>
4564 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4565 (struct tracepoint_action_ops) <send>: New field.
4566 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4567 (agent_expr_send, x_tracepoint_action_send): New.
4568 (l_tracepoint_action_send): New.
4569 (cmd_qtdp): Download and install tracepoint
4570 according to `use_agent'.
4571 (run_inferior_command): Add one more parameter `len'.
4573 (tracepoint_send_agent): New.
4574 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4576 2012-04-16 Yao Qi <yao@codesourcery.com>
4578 * tracepoint.c (download_tracepoints): Moved to ...
4579 (cmd_qtstart): ... here.
4581 2012-04-14 Yao Qi <yao@codesourcery.com>
4583 * tracepoint.c: Include inttypes.h.
4584 (struct collect_memory_action): Use sized types.
4585 (struct tracepoint): Likewise.
4586 (cmd_qtdp, stop_tracing): Update print specifiers.
4587 (cmd_qtp, response_tracepoint): Likewise.
4588 (collect_data_at_tracepoint): Likewise.
4589 (collect_data_at_step): Likewise.
4591 2012-04-14 Yao Qi <yao@codesourcery.com>
4593 Import gnulib module inttypes.
4594 * aclocal.m4, config.in, configure: Regenerated.
4596 2012-04-14 Yao Qi <yao@codesourcery.com>
4598 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4599 Makefile and config.status at last.
4601 2012-04-13 Yao Qi <yao@codesourcery.com>
4603 * tracepoint.c: Include stdint.h unconditionally.
4605 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4607 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4608 on BFD_HAVE_SYS_PROCFS_TYPE.
4609 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4610 * configure: Regenerate.
4611 * config.in: Likewise.
4613 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4615 * Makefile.in (clean): Also remove x32.c x32-linux.c
4616 x32-avx.c x32-avx-linux.c.
4617 (x32.o): New target.
4619 (x32-linux.o): Likewise.
4620 (x32-linux.c): Likewise.
4621 (x32-avx.o): Likewise.
4622 (x32-avx.c): Likewise.
4623 (x32-avx-linux.o): Likewise.
4624 (x32-avx-linux.c): Likewise.
4626 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4627 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4628 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4629 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4630 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4631 i386/x32-avx-linux.xml.
4633 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4634 (init_registers_x32_avx_linux): Likwise.
4635 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4636 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4638 2012-04-13 Pedro Alves <palves@redhat.com>
4640 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4641 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4642 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4643 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4646 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4648 * linux-x86-low.c (compat_x32_clock_t): New.
4649 (compat_x32_siginfo_t): Likewise.
4650 (compat_x32_siginfo_from_siginfo): Likewise.
4651 (siginfo_from_compat_x32_siginfo): Likewise.
4652 (linux_is_elf64): Likewise.
4653 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4654 and siginfo_from_compat_x32_siginfo for x32.
4655 (x86_arch_setup): Set linux_is_elf64.
4657 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4660 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4662 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4663 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4664 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4665 compatible with process.
4667 2012-04-12 Yao Qi <yao@codesourcery.com>
4669 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4670 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4671 (install-only, install-info, clean): Handle sub dir gnulib.
4672 (all-lib, am--refresh): New targets.
4673 (memmem.o): Remove target.
4674 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4675 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4676 (AC_REPLACE_FUNCS): Remove memmem.
4677 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4678 (AC_OUTPUT): Generate Makefile in gnulib/.
4679 * aclocal.m4, config.in, configure: Regenerated.
4681 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4683 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4685 2012-04-05 Pedro Alves <palves@redhat.com>
4687 -Werror=strict-aliasing
4689 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4692 2012-04-04 Pedro Alves <palves@redhat.com>
4694 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4695 (sparc_store_gregset_from_stack, sparc_store_gregset)
4696 (sparc_breakpoint_at): Fix formatting.
4698 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4700 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4702 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4703 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4704 * config.in: Regenerate.
4705 * configure: Likewise.
4707 2012-03-29 Pedro Alves <palves@redhat.com>
4709 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4710 Correct ptrace arguments.
4712 2012-03-28 Pedro Alves <palves@redhat.com>
4714 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4715 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4716 (IA64_FR1_REGNUM): New defines.
4717 (ia64_fetch_register): New.
4718 (the_low_target): Install it.
4719 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4721 * linux-low.c (linux_fetch_registers): Try the
4722 the_low_target.fetch_register hook first.
4724 * linux-arm-low.c (the_low_target): Adjust.
4725 * linux-bfin-low.c (the_low_target): Adjust.
4726 * linux-cris-low.c (the_low_target): Adjust.
4727 * linux-crisv32-low.c (the_low_target): Adjust.
4728 * linux-m32r-low.c (the_low_target): Adjust.
4729 * linux-m68k-low.c (the_low_target): Adjust.
4730 * linux-mips-low.c (the_low_target): Adjust.
4731 * linux-ppc-low.c (the_low_target): Adjust.
4732 * linux-s390-low.c (the_low_target): Adjust.
4733 * linux-sh-low.c (the_low_target): Adjust.
4734 * linux-sparc-low.c (the_low_target): Adjust.
4735 * linux-tic6x-low.c (the_low_target): Adjust.
4736 * linux-x86-low.c (the_low_target): Adjust.
4737 * linux-xtensa-low.c (the_low_target): Adjust.
4739 2012-03-26 Pedro Alves <palves@redhat.com>
4741 * server.c (handle_qxfer_libraries): Don't bail early if
4742 the_target->qxfer_libraries_svr4 is not NULL.
4744 2012-03-26 Pedro Alves <palves@redhat.com>
4746 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4748 2012-03-23 Pedro Alves <palves@redhat.com>
4750 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4751 "library-list-svr4" element's start tag when the the DSO list is
4754 2012-03-23 Pedro Alves <palves@redhat.com>
4756 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4757 a variable whose type size is the same as the inferior's pointer
4760 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4762 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4764 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4765 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4766 * linux-low.h: Include <signal.h>.
4767 (struct siginfo): Remove forward declaration.
4768 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4771 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4773 * .gitignore: Ignore more files.
4775 2012-03-19 Pedro Alves <palves@redhat.com>
4776 Jan Kratochvil <jan.kratochvil@redhat.com>
4778 * server.c (cont_thread, general_thread): Add describing comments.
4779 (start_inferior): Clear `cont_thread'.
4780 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4783 2012-03-15 Yao Qi <yao@codesourcery.com>
4785 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4787 (cmd_qtdp): ... here.
4789 2012-03-15 Yao Qi <yao@codesourcery.com>
4791 * tracepoint.c (struct tracepoint_action_ops): New.
4792 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4793 (m_tracepoint_action_download): New.
4794 (r_tracepoint_action_download): New.
4795 (x_tracepoint_action_download): New.
4796 (l_tracepoint_action_download): New.
4797 (add_tracepoint_action): Install `action->ops' according type.
4798 (download_tracepoint_1): Move code `download' function pointer
4799 of various tracepoint_action_ops.
4801 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4803 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4804 linux_ptrace_attach_warnings.
4806 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4808 * Makefile.in (linux-ptrace.o): New.
4809 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4810 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4811 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4812 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4813 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4815 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4817 2012-03-08 Yao Qi <yao@codesourcery.com>
4818 Pedro Alves <palves@redhat.com>
4820 Fix PR server/13392.
4821 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4823 * tracepoint.c (remove_tracepoint): New.
4824 (cmd_qtdp): Call remove_tracepoint when failed to install.
4826 2012-03-07 Pedro Alves <palves@redhat.com>
4828 * linux-low.c (get_detach_signal): New.
4829 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4830 Pass on pending signals to PTRACE_DETACH. Check the result of the
4832 * server.c (program_signals, program_signals_p): New.
4833 (handle_general_set): Handle QProgramSignals.
4834 * server.h (program_signals, program_signals_p): Declare.
4836 2012-03-05 Pedro Alves <palves@redhat.com>
4837 Jan Kratochvil <jan.kratochvil@redhat.com>
4839 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4842 2012-03-03 Yao Qi <yao@codesourcery.com>
4844 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4845 agent_look_up_symbols.
4847 2012-03-03 Yao Qi <yao@codesourcery.com>
4849 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4850 (linux-x86-low.o): Likewise.
4851 * server.h: Remove in_process_agent_loaded.
4852 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4856 2012-03-03 Yao Qi <yao@codesourcery.com>
4858 * tracepoint.c (gdb_agent_capability): New global.
4859 (in_process_agent_loaded_ust): Renamed to
4860 `in_process_agent_supports_ust'.
4862 (in_process_agent_supports_ust): Call agent_capability_check.
4863 (clear_installed_tracepoints): Assert that agent supports
4866 2012-03-03 Yao Qi <yao@codesourcery.com>
4868 * linux-low.c (linux_supports_agent): New.
4869 (linux_target_ops): Initialize field `supports_agent' with
4870 linux_supports_agent.
4871 * target.h (struct target_ops) <supports_agent>: New.
4872 (target_supports_agent): New macro.
4873 * server.c (handle_general_set): Handle packet 'QAgent'.
4874 (handle_query): Send `QAgent+'.
4875 * Makefile.in (server.o): Depends on agent.h.
4877 2012-03-03 Yao Qi <yao@codesourcery.com>
4879 * Makefile.in (OBS): Add agent.o.
4880 Add new rule for agent.o.
4881 Track dependence of tracepoint.c on agent.h.
4882 * tracepoint.c (run_inferior_command_1):
4883 (run_inferior_command): Call agent_run_command.
4884 (gdb_ust_connect_sync_socket): Deleted. Move it to
4886 (resume_thread, stop_thread): Likewise.
4887 (gdb_ust_socket_init): Renamed to ...
4888 (gdb_agent_socket_init): ... New.
4889 (gdb_ust_thread): Renamed to ...
4890 (gdb_agent_helper_thread): ... New.
4891 (gdb_ust_init): Move some code to ...
4892 (gdb_agent_init): ... here. New.
4893 [HAVE_UST]: Call gdb_ust_init.
4894 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4895 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4896 * config.in, configure: Regenerated.
4898 2012-03-02 Pedro Alves <palves@redhat.com>
4900 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4901 * linux-low.c (struct simple_pid_list): New.
4902 (stopped_pids): New a struct simple_pid_list pointer.
4903 (add_to_pid_list, pull_pid_from_list): New.
4904 (handle_extended_wait): Don't assume the first signal new children
4905 report is SIGSTOP. Adjust call to pull_pid_from_list.
4906 (linux_wait_for_lwp): Adjust.
4908 2012-03-02 Yao Qi <yao@codesourcery.com>
4910 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4913 2012-03-02 Yao Qi <yao@codesourcery.com>
4915 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4916 `stop_pc' and `tpoint'. Update caller.
4918 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4920 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4921 * linux-low.c (use_linux_regsets): New macro.
4922 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4923 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4924 (linux_register_in_regsets): New function.
4925 (usr_fetch_inferior_registers): Skip registers covered by
4927 (usr_store_inferior_registers): Likewise.
4928 (usr_fetch_inferior_registers): New macro.
4929 (usr_store_inferior_registers): Likewise.
4930 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4931 (linux_store_registers): Likewise.
4932 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4934 (init_registers_mips64_dsp_linux): Likewise.
4935 (init_registers_mips_linux): New macro.
4936 (init_registers_mips_dsp_linux): Likewise.
4937 (mips_dsp_num_regs): Likewise.
4938 (DSP_BASE, DSP_CONTROL): New fallback macros.
4939 (mips_base_regs): New macro.
4940 (mips_regmap): Use it. Fix the size.
4941 (mips_dsp_regmap): New variable.
4942 (mips_dsp_regset_bitmap): Likewise.
4943 (mips_arch_setup): New function.
4944 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4946 (mips_cannot_store_register): Likewise.
4947 (the_low_target): Update .arch_setup, .num_regs and .regmap
4948 initializers. Add .regset_bitmap initializer.
4949 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4951 * linux-bfin-low.c (the_low_target): Likewise.
4952 * linux-cris-low.c (the_low_target): Likewise.
4953 * linux-crisv32-low.c (the_low_target): Likewise.
4954 * linux-ia64-low.c (the_low_target): Likewise.
4955 * linux-m32r-low.c (the_low_target): Likewise.
4956 * linux-m68k-low.c (the_low_target): Likewise.
4957 * linux-ppc-low.c (the_low_target): Likewise.
4958 * linux-s390-low.c (the_low_target): Likewise.
4959 * linux-sh-low.c (the_low_target): Likewise.
4960 * linux-sparc-low.c (the_low_target): Likewise.
4961 * linux-tic6x-low.c (the_low_target): Likewise.
4962 * linux-x86-low.c (the_low_target): Likewise.
4963 * linux-xtensa-low.c (the_low_target): Likewise.
4964 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4965 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4966 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4968 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4969 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4971 2012-02-29 Yao Qi <yao@codesourcery.com>
4972 Pedro Alves <palves@redhat.com>
4974 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4975 `step_over_finished' is true.
4977 2012-02-27 Pedro Alves <palves@redhat.com>
4979 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4980 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4982 2012-02-27 Pedro Alves <palves@redhat.com>
4985 * linux-low.c (pid_is_stopped): New.
4986 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4988 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4990 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4993 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4995 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4997 2012-02-24 Luis Machado <lgustavo@codesourcery>
4999 * server.c (handle_query): Advertise support for target-side
5000 breakpoint condition evaluation.
5001 (process_point_options): New function.
5002 (process_serial_event): When inserting a breakpoint, check for
5003 a target-side condition that should be evaluated.
5005 * mem-break.c: Include regcache.h and ax.h.
5006 (point_cond_list_t): New data structure.
5007 (breakpoint) <cond_list>: New field.
5008 (find_gdb_breakpoint_at): Make non-static.
5009 (delete_gdb_breakpoint_at): Clear any target-side
5011 (clear_gdb_breakpoint_conditions): New function.
5012 (add_condition_to_breakpoint): Likewise.
5013 (add_breakpoint_condition): Likewise.
5014 (gdb_condition_true_at_breakpoint): Likewise.
5015 (gdb_breakpoint_here): Return result directly instead
5016 of going through a local variable.
5018 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5019 (clear_gdb_breakpoint_conditions): Likewise.
5020 (add_breakpoint_condition): Likewise.
5021 (gdb_condition_true_at_breakpoint): Likewise.
5023 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5024 (need_step_over_p): Take target-side breakpoint condition into
5027 2012-02-24 Luis Machado <lgustavo@codesourcery>
5029 * server.h: Include tracepoint.h.
5030 (agent_mem_read, agent_get_trace_state_variable_value,
5031 agent_set_trace_state_variable_value,
5032 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5033 get_set_tsv_func_addr): New prototypes.
5035 * ax.h: New include file.
5036 * ax.c: New source file.
5038 * tracepoint.c: Include ax.h.
5039 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5040 agent_expr, eval_result_type): Move to ax.h.
5041 (parse_agent_expr): Rename to ...
5042 (gdb_parse_agent_expr): ... this, make it non-static and move
5044 (unparse_agent_expr) Rename to ...
5045 (gdb_unparse_agent_expr): ... this, make it non-static and move
5047 (eval_agent_expr): Rename to ...
5048 (eval_tracepoint_agent_expr): ... this.
5049 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5050 forward declarations.
5051 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5052 (agent_get_trace_state_variable_value): New function.
5053 (agent_set_trace_state_variable_value): New function.
5054 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5055 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5056 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5057 (condition_true_at_tracepoint): Likewise.
5058 (parse_agent_expr): Rename to ...
5059 (gdb_parse_agent_expr): ... this and move to ax.c.
5060 (unparse_agent_expr): Rename to ...
5061 (gdb_unparse_agent_expr): ... this and move to ax.c.
5062 (gdb_agent_op_name): Move to ax.c.
5063 (eval_agent_expr): Rename to ...
5064 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5066 (eval_tracepoint_agent_expr): New function.
5067 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5069 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5071 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5072 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5073 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5074 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5075 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5076 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5077 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5078 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5079 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5080 (compile_bytecodes): Remove forward declaration.
5081 (is_goto_target): Move to ax.c.
5082 (compile_bytecodes): Move to ax.c and call
5083 agent_get_trace_state_variable_value (...) and
5084 agent_set_trace_state_variable_value (...).
5086 * Makefile.in: Update ax.c and IPA dependencies.
5088 2012-02-24 Pedro Alves <palves@redhat.com>
5090 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5091 (cmd_bigqtbuffer_circular): ... this. Only handle
5092 'QTBuffer:circular:'.
5093 (handle_tracepoint_general_set): Adjust.
5095 2012-02-16 Yao Qi <yao@codesourcery.com>
5097 * inferiors.c: Move code to ...
5098 * dll.c: .... here. New.
5099 * server.h: Declare clear_dlls.
5100 * Makefile.in (SFILES): Add dll.c.
5104 2012-02-11 Yao Qi <yao@codesourcery.com>
5106 * server.c: (handle_monitor_command): Add a new parameter
5108 (handle_query): Update caller.
5110 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5112 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5113 * configure, config.in: Regenerate.
5114 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5117 2012-02-02 Pedro Alves <palves@redhat.com>
5119 Try SIGKILL first, then PTRACE_KILL.
5120 * linux-low.c (linux_kill_one_lwp): New.
5121 (linux_kill_one_lwp): Rename to ...
5122 (kill_one_lwp_callback): ... this. Use the new
5125 2012-02-02 Pedro Alves <palves@redhat.com>
5127 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5130 2012-01-27 Pedro Alves <palves@redhat.com>
5132 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5133 (elf_64_file_p): Make static.
5134 (linux_pid_exe_is_elf_64_file): New.
5135 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5136 Delete declarations.
5137 (linux_pid_exe_is_elf_64_file): Declare.
5138 * linux-x86-low.c (x86_arch_setup): Use
5139 linux_pid_exe_is_elf_64_file.
5141 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5143 * linux-low.c (linux_wait_for_event_1): Rename to ...
5144 (linux_wait_for_event): ... here and merge it with former
5145 linux_wait_for_event - new variable wait_ptid, use it.
5146 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5148 2012-01-23 Pedro Alves <palves@redhat.com>
5150 * server.c (main): Avoid yet another case of infinite loop while
5151 detaching/killing after a longjmp.
5153 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5156 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5158 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5160 * hostio.c (handle_readlink): New function.
5161 (handle_vFile): Call it to handle "vFile:readlink" packets.
5163 2012-01-20 Pedro Alves <palves@redhat.com>
5164 Ulrich Weigand <ulrich.weigand@linaro.org>
5166 * server.c (handle_v_requests): Only support vAttach and vRun to
5167 start multiple processes when in extended protocol mode.
5169 2012-01-17 Pedro Alves <palves@redhat.com>
5171 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5172 memalign plus mprotect to allocate the scratch buffer.
5174 2012-01-13 Pedro Alves <palves@redhat.com>
5176 * server.c (attach_inferior): Clear `cont_thread'.
5178 2012-01-13 Pedro Alves <palves@redhat.com>
5180 * server.c (main): Avoid infinite loop while detaching/killing
5183 2012-01-09 Doug Evans <dje@google.com>
5185 * server.c (start_inferior): Set last_ptid in --wrapper case.
5187 2012-01-06 Yao Qi <yao@codesourcery.com>
5189 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5191 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5193 2012-01-04 Yao Qi <yao@codesourcery.com>
5195 * tracepoint.c (cmd_qtdp): Print debug message
5196 for static tracepoint.
5198 2012-01-04 Yao Qi <yao@codesourcery.com>
5200 * tracepoint.c (trace_vdebug): Differentiate debug message
5201 between gdbserver and IPA.
5203 2012-01-03 Yao Qi <yao@codesourcery.com>
5205 * tracepoint.c (tracepoint_was_hit): Don't collect for
5208 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5210 * terminal.h: Reformat copyright header.
5212 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5214 * server.c (gdbserver_version): Update copyright year.
5215 * gdbreplay.c (gdbreplay_version): Likewise.
5217 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5219 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5222 2011-12-18 Hui Zhu <teawater@gmail.com>
5223 * linux-low.c (linux_create_inferior): Save return value to ret.
5225 2011-12-18 Hui Zhu <teawater@gmail.com>
5227 * linux-low.c (linux_create_inferior): Save return value to ret.
5229 2011-12-16 Doug Evans <dje@google.com>
5231 * linux-low.c (linux_create_inferior): If stdio connection,
5232 redirect stdin from /dev/null, stdout to stderr.
5233 * remote-utils.c (remote_is_stdio): New static global.
5234 (remote_connection_is_stdio): New function.
5235 (remote_prepare): Handle stdio connection.
5236 (remote_open): Ditto.
5237 (remote_close): Don't close stdin for stdio connections.
5238 (read_prim,write_prim): New functions. Replace all calls to
5239 read/write to these.
5240 * server.c (main): Watch for "-" argument. Move call to
5241 remote_prepare before start_inferior.
5242 * server.h (STDIO_CONNECTION_NAME): New macro.
5243 (remote_connection_is_stdio): Declare.
5245 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5246 in debugging output.
5248 2011-12-15 Yao Qi <yao@codesourcery.com>
5250 * tracepoint.c: Include sys/syscall.h.
5251 (gdb_ust_thread): Remove preprocessor conditional.
5253 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5255 * linux-low.c (linux_detach_one_lwp): Call
5256 the_low_target.prepare_to_resume before detaching.
5258 2011-12-14 Yao Qi <yao@codesourcery.com>
5260 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5263 2011-12-14 Yao Qi <yao@codesourcery.com>
5265 * i386-low.c (i386_low_stopped_data_address): Initialize local
5268 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5272 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5273 DR_CONTROL unless necessary. Extend comments.
5274 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5275 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5277 2011-12-13 Yao Qi <yao@codesourcery.com>
5279 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5281 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5283 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5285 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5286 Print new debug message for such case.
5288 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5290 Fix overlapping memcpy.
5291 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5292 the read_inferior_memory transfer.
5293 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5294 write_inferior_memory transfer.
5295 (set_fast_tracepoint_jump): New variable buf. Use it for the
5296 read_inferior_memory and write_inferior_memory transfers.
5297 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5298 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5299 Use it for the write_inferior_memory transfer.
5300 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5303 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5305 * linux-low.c (fetch_register, store_register): Make code
5306 consistent, fix formatting.
5308 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5310 * linux-low.c (usr_store_inferior_registers): Factor out code
5311 to handle individual registers into...
5312 (store_register): ... this new function.
5314 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5316 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5317 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5318 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5319 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5320 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5321 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5322 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5323 (srv_xmlfiles): Add new XML files.
5325 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5327 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5328 (init_registers_s390_linux32v1): Add prototype.
5329 (init_registers_s390_linux32v2): Likewise.
5330 (init_registers_s390_linux64v1): Likewise.
5331 (init_registers_s390_linux64v2): Likewise.
5332 (init_registers_s390x_linux64v1): Likewise.
5333 (init_registers_s390x_linux64v2): Likewise.
5334 (s390_num_regs): Increment to 52.
5335 (s390_regmap): Add orig_r2 register.
5336 (s390_num_regs_3264): Increment to 68.
5337 (s390_regmap_3264): Add orig_r2 register.
5338 (s390_collect_ptrace_register): Handle orig_r2 register.
5339 (s390_supply_ptrace_register): Likewise.
5340 (s390_fill_last_break): New function.
5341 (s390_store_last_break): Likewise.
5342 (s390_fill_system_call): New function.
5343 (s390_store_system_call): Likewise.
5344 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5346 (s390_check_regset): New function.
5347 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5348 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5349 Update target_regsets for available register sets.
5351 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5352 Jan Kratochvil <jan.kratochvil@redhat.com>
5354 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5355 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5357 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5358 * linux-low.h (struct process_info_private): New member r_debug.
5359 * server.c (handle_qxfer_libraries): Call
5360 the_target->qxfer_libraries_svr4.
5361 (handle_qxfer_libraries_svr4): New function.
5362 (qxfer_packets): New entry "libraries-svr4".
5363 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5364 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5365 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5366 PACKET_qXfer_libraries_svr4.
5368 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5370 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5371 PSW address/mask between 8-byte and 16-byte formats.
5372 (s390_supply_ptrace_register): Likewise.
5373 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5374 basic addressing mode bit.
5376 2011-11-24 Stan Shebs <stan@codesourcery.com>
5378 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5380 2011-11-17 Stan Shebs <stan@codesourcery.com>
5382 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5383 (tracing_start_time): New global.
5384 (tracing_stop_time): New global.
5385 (tracing_user_name): New global.
5386 (tracing_notes): New global.
5387 (tracing_stop_note): New global.
5388 (cmd_qtstart): Set traceframe_usage, start_time.
5389 (stop_tracing): Set stop_time.
5390 (cmd_qtstatus): Report additional status.
5391 (cmd_qtp): New function.
5392 (handle_tracepoint_query): Call it.
5393 (cmd_qtnotes): New function.
5394 (handle_tracepoint_general_set): Call it.
5395 (get_timestamp): Rename from tsv_get_timestamp.
5397 2011-11-14 Stan Shebs <stan@codesourcery.com>
5398 Kwok Cheung Yeung <kcy@codesourcery.com>
5400 * linux-x86-low.c (small_jump_insn): New.
5401 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5402 trampoline and error message, build a trampoline and issue a small
5403 jump instruction to it.
5404 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5405 trampoline and error message.
5406 (x86_get_min_fast_tracepoint_insn_len): New.
5407 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5408 * linux-low.h (struct linux_target_ops): Add arguments to
5409 install_fast_tracepoint_jump_pad operation, add new operation.
5410 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5412 (linux_get_min_fast_tracepoint_insn_len): New function.
5413 (linux_target_op): Add new operation.
5414 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5415 (gdb_trampoline_buffer_end): Ditto.
5416 (gdb_trampoline_buffer_error): Ditto.
5417 (struct ipa_sym_addresses): Add fields for new IPA variables.
5418 (symbol_list): Add entries for new IPA variables.
5419 (struct tracepoint): Add fields to hold the address range of the
5420 trampoline used by the tracepoint.
5421 (trampoline_buffer_head): New static variable.
5422 (trampoline_buffer_tail): Ditto.
5423 (claim_trampoline_space): New function.
5424 (have_fast_tracepoint_trampoline_buffer): New function.
5425 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5427 (install_fast_tracepoint): Ditto, also add error buffer argument.
5428 (cmd_qtminftpilen): New function.
5429 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5430 (fast_tracepoint_from_trampoline_address): New function.
5431 (fast_tracepoint_collecting): Handle trampoline as part of jump
5433 (set_trampoline_buffer_space): New function.
5434 (initialize_tracepoint): Initialize new IPA variables.
5435 * target.h (struct target_ops): Add arguments to
5436 install_fast_tracepoint_jump_pad operation, add new
5437 get_min_fast_tracepoint_insn_len operation.
5438 (target_get_min_fast_tracepoint_insn_len): New.
5439 (install_fast_tracepoint_jump_pad): Add arguments.
5440 * server.h (IPA_BUFSIZ): Define.
5441 * linux-i386-ipa.c: Include extra header files.
5442 (initialize_fast_tracepoint_trampoline_buffer): New function.
5443 (initialize_low_tracepoint): Call it.
5444 * server.h (set_trampoline_buffer_space): Declare.
5445 (claim_trampoline_space): Ditto.
5446 (have_fast_tracepoint_trampoline_buffer): Ditto.
5448 2011-11-14 Yao Qi <yao@codesourcery.com>
5450 * server.c (handle_query): Handle InstallInTrace for qSupported.
5451 * tracepoint.c (add_tracepoint): Sort list.
5452 (install_tracepoint, download_tracepoint): New.
5453 (cmd_qtdp): Call them to install and download tracepoints.
5454 (sort_tracepoints): Removed.
5455 (cmd_qtstart): Update.
5457 2011-11-14 Yao Qi <yao@codesourcery.com>
5459 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5460 * mem-break.h: Declare.
5461 * tracepoint.c (cmd_qtstart): Move some code to ...
5462 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5464 (download_tracepoints): Move some code to ...
5465 (download_tracepoint_1): ... here. New.
5467 2011-11-08 Yao Qi <yao@codesourcery.com>
5469 * remote-utils.c (relocate_instruction): A comment fix.
5471 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5473 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5474 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5475 dr_status_mirror and dr_control_mirror from debug_reg_state.
5476 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5477 (i386_initial_stuff): Remove use of deleted globals.
5478 (i386_get_thread_context, i386_set_thread_context,
5479 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5480 from debug_reg_state.
5482 2011-11-05 Yao Qi <yao@codesourcery.com>
5484 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5485 address as TPOINT's.
5487 2011-11-02 Stan Shebs <stan@codesourcery.com>
5489 * tracepoint.c (agent_mem_read_string): New function.
5490 (eval_agent_expr): Call it for tracenz.
5491 * server.c (handle_query): Report support for tracenz.
5493 2011-11-02 Yao Qi <yao@codesourcery.com>
5495 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5497 2011-11-02 Yao Qi <yao@codesourcery.com>
5499 * target.h: Fix a typo in comment.
5501 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5503 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5504 clobber the breakpoints' shadows with fast tracepoint jumps.
5505 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5506 * target.c (write_inferior_memory): Also pass MYADDR down to
5509 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5511 * configure.ac: Check support for personality routine.
5512 * configure: Regenerate.
5513 * config.in: Likewise.
5514 * linux-low.c: Include <sys/personality.h>.
5515 Define ADDR_NO_RANDOMIZE if necessary.
5516 (linux_create_inferior): Disable address space randomization when
5517 forking inferior, if requested.
5518 (linux_supports_disable_randomization): New function.
5519 (linux_target_ops): Install it.
5520 * server.h (disable_randomization): Declare.
5521 * server.c (disable_randomization): New global variable.
5522 (handle_general_set): Handle QDisableRandomization.
5523 (handle_query): Likewise for qSupported.
5524 (main): Support --disable-randomization and --no-disable-randomization
5525 command line arguments.
5526 * target.h (struct target_ops): Add supports_disable_randomization.
5527 (target_supports_disable_randomization): New macro.
5529 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5531 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5533 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5534 [!PT_GETDSBT] (target_loadmap): New definition.
5535 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5536 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5537 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5538 and PT_GETDSBT to LINUX_LOADMAP.
5539 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5540 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5542 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5544 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5545 (arm_linux_hwbp_cap): New static variable.
5546 (arm_linux_get_hwbp_cap): Replace by ...
5547 (arm_linux_init_hwbp_cap): ... this new function.
5548 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5549 (arm_linux_get_hw_watchpoint_count): Likewise.
5550 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5551 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5552 (arm_prepare_to_resume): Use perror_with_name instead of error.
5554 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5556 * linux-arm-low.c: Include <signal.h>.
5557 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5558 (struct arm_linux_hwbp_cap): New data type.
5559 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5560 (struct arm_linux_hw_breakpoint): New data type.
5561 (MAX_BPTS, MAX_WPTS): Define.
5562 (struct arch_process_info, struct arch_lwp_info): New data types.
5563 (arm_linux_get_hwbp_cap): New function.
5564 (arm_linux_get_hw_breakpoint_count): Likewise.
5565 (arm_linux_get_hw_watchpoint_count): Likewise.
5566 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5567 (arm_hwbp_control_initialize): Likewise.
5568 (arm_hwbp_control_is_enabled): Likewise.
5569 (arm_hwbp_control_is_initialized): Likewise.
5570 (arm_hwbp_control_disable): Likewise.
5571 (arm_linux_hw_breakpoint_equal): Likewise.
5572 (arm_linux_hw_point_initialize): Likewise.
5573 (struct update_registers_data): New data structure.
5574 (update_registers_callback: New function.
5575 (arm_insert_point): Likewise.
5576 (arm_remove_point): Likewise.
5577 (arm_stopped_by_watchpoint): Likewise.
5578 (arm_stopped_data_address): Likewise.
5579 (arm_new_process): Likewise.
5580 (arm_new_thread): Likewise.
5581 (arm_prepare_to_resume): Likewise.
5582 (the_low_target): Register arm_insert_point, arm_remove_point,
5583 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5584 arm_new_thread, and arm_prepare_to_resume.
5586 2011-09-15 Stan Shebs <stan@codesourcery.com>
5588 * server.h (struct emit_ops): Add compare-goto fields.
5589 * tracepoint.c (gdb_agent_op_sizes): New table.
5590 (emit_eq_goto): New function.
5591 (emit_ne_goto): New function.
5592 (emit_lt_goto): New function.
5593 (emit_le_goto): New function.
5594 (emit_gt_goto): New function.
5595 (emit_ge_goto): New function.
5596 (is_goto_target): New function.
5597 (compile_bytecodes): Recognize special cases of compare-goto
5598 combinations and call specialized emitters for them.
5599 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5600 (amd64_emit_ne_goto): New function.
5601 (amd64_emit_lt_goto): New function.
5602 (amd64_emit_le_goto): New function.
5603 (amd64_emit_gt_goto): New function.
5604 (amd64_emit_ge_goto): New function.
5605 (amd64_emit_ops): Add the new functions.
5606 (i386_emit_eq_goto): New function.
5607 (i386_emit_ne_goto): New function.
5608 (i386_emit_lt_goto): New function.
5609 (i386_emit_le_goto): New function.
5610 (i386_emit_gt_goto): New function.
5611 (i386_emit_ge_goto): New function.
5612 (i386_emit_ops): Add the new functions.
5614 2011-09-08 Stan Shebs <stan@codesourcery.com>
5616 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5617 (i386_emit_epilogue): Restore %ebx.
5619 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5621 * server.c (step_thread): Remove definition.
5622 (process_serial_event): Don't handle Hs.
5623 * server.h (step_thread): Remove declaration.
5624 * target.c (set_desired_inferior): Remove use of step_thread.
5626 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5628 * linux-low.c: Include linux-procfs.h.
5629 (linux_attach_lwp_1): Update comments.
5630 (linux_attach): Scan for existing threads when attaching to a
5631 process that is the tgid.
5632 * Makefile.in: Update dependencies.
5634 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5636 * configure.srv: Add linux-procfs.o dependencies.
5638 2011-08-14 Yao Qi <yao@codesourcery.com>
5640 * target.h (struct target_ops): Fix indent.
5641 * win32-low.c (win32_target_ops): Fix comment.
5643 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5644 Yao Qi <yao@codesourcery.com>
5646 * Makefile.in (clean): Remove tic6x-*.c files.
5647 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5648 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5649 (tic6x-c64xp-linux.c): Likewise.
5650 * configure.srv: Add support for tic6x-*-uclinux.
5651 * linux-tic6x-low.c: New.
5652 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5654 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5655 Yao Qi <yao@codesourcery.com>
5657 * target.h (struct target_ops): Add read_loadmap.
5658 * linux-low.c (struct target_loadseg): New type.
5659 (struct target_loadmap): New type.
5660 (linux_read_loadmap): New function.
5661 (linux_target_ops): Add linux_read_loadmap.
5662 * server.c (handle_query): Support qXfer:fdpic:read packet.
5663 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5666 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5668 * win32-low.c: Include <stdint.h>.
5670 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5672 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5673 to the inferior here.
5674 (i386_remove_aligned_watchpoint): Ditto.
5675 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5676 fit part of the watchpoint in the debug registers.
5677 (i386_update_inferior_debug_regs): New.
5678 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5679 registers, and only update the inferior on success.
5680 (i386_low_remove_watchpoint): Ditto.
5682 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5684 * linux-low.c (compare_ints, unique, list_threads, show_process,
5685 linux_core_of_thread): Delete.
5686 (linux_target_ops): Change linux_core_of_thread to
5687 linux_common_core_of_thread.
5688 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5689 * utils.c (malloc_failure): Change type of argument.
5690 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5691 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5692 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5693 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5694 (IPA_OBJS): Add common-utils-ipa.o.
5695 (ptid_h, linux_osdata_h): New macros.
5696 (server_h): Add common/common-utils.h, common/xml-utils.h,
5697 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5699 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5700 ptid.o, buffer.o): New rules.
5701 (linux-low.o): Add common/linux-osdata.h as a dependency.
5702 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5703 * configure.ac: Add AC_HEADER_DIRENT check.
5704 * config.in: Regenerate.
5705 * configure: Regenerate.
5706 * remote-utils.c (xml_escape_text): Delete.
5707 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5708 buffer_xml_printf): Move to common/buffer.c.
5709 * server.c (main): Remove call to initialize_inferiors.
5710 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5711 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5712 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5713 internal_error, gdb_assert, gdb_assert_fail): Delete.
5714 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5715 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5717 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5718 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5719 initialize_inferiors): Delete.
5721 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5723 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5726 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5728 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5730 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5732 2011-05-26 Yao Qi <yao@codesourcery.com>
5734 * Makefile.in (thread-db.o): Track dependence to
5735 common/gdb_thread_db.h.
5736 * thread-db.c: include gdb_thread_db.h from right place.
5738 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5740 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5741 __FILE__ and __LINE__ to internal_error.
5743 2011-05-13 Doug Evans <dje@google.com>
5745 * thread-db.c (try_thread_db_load_from_sdir): New function.
5746 (try_thread_db_load_from_dir): New function.
5747 (thread_db_load_search): Handle $sdir, ignore $pdir.
5748 Remove trying of system directories if search of
5749 libthread-db-search-path fails, that is now done via $sdir.
5751 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5753 * server.c (handle_query): Add EnableDisableTracepoints to the list
5754 of supported features.
5755 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5757 (cmd_qtenable_disable): New.
5758 (cmd_qtstart): Install tracepoints even if disabled.
5759 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5760 receiving a QTEnable or QTDisable packet.
5761 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5762 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5764 (gdb_probe): Skip data collection if static tracepoint is disabled.
5766 2011-05-10 Doug Evans <dje@google.com>
5768 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5770 2011-05-04 Doug Evans <dje@google.com>
5772 * linux-low.c (linux_join): Skip process lookup.
5773 * spu-low.c (spu_join): Ditto.
5774 * server.c (join_inferiors_callback): Delete.
5775 (process_serial_event): For 'D' packet (detach) call join_inferior
5778 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5780 * README: Don't mention xscale*-*-linux*.
5781 * configure.srv (xscale*-*-linux*): Don't handle target.
5783 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5785 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5787 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5788 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5789 (i386_emit_void_call_2): Likewise.
5791 2011-04-26 Yao Qi <yao@codesourcery.com>
5793 * linux-low.c: Move common macros to linux-ptrace.h.
5794 Include linux-ptrace.h.
5795 * Makefile.in (linux_ptrace_h): New.
5796 (linux-low.o): Depends on linux-ptrace.h.
5798 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5800 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5801 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5802 (remote_prepare): New function with most of the TCP code from ...
5803 (remote_open): ... here. Detect PORT here unconditionally. Move also
5804 setting transport_is_reliable.
5805 * server.c (run_once): New variable.
5806 (gdbserver_usage): Document it.
5807 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5808 the first run if RUN_ONCE.
5809 * server.h (run_once, remote_prepare): New declarations.
5811 2011-04-19 Tom Tromey <tromey@redhat.com>
5813 * win32-low.c (handle_load_dll): Remove duplicate "the".
5815 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5817 Remove support for old Cygwin 1.5 versions.
5818 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5819 function to avoid warning.
5820 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5823 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5825 * gdbserver/server.h (Macro _): Define it if not available.
5827 2011-03-14 Michael Snyder <msnyder@vmware.com>
5829 * hostio.c (handle_close): Remove unnecessary null test.
5831 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5833 * Makefile.in (maintainer-clean realclean distclean): Remove
5834 "make ... subdir_do" command.
5836 2011-03-10 Michael Snyder <msnyder@vmware.com>
5838 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5840 * server.c (handle_v_run): Free alloced buffer on early return.
5842 2011-03-09 Yao Qi <yao@codesourcery.com>
5845 2011-03-04 Yao Qi <yao@codesourcery.com>
5847 * Makefile.in: Remove GNU make feature --directory.
5849 2011-03-05 Yao Qi <yao@codesourcery.com>
5851 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5852 (subdir_do): New make target. Copied from gdb/Makefile.
5853 (maintainer-clean, realclean, distclean, clean): Call corresponding
5854 make targets in common/Makefile.
5856 2011-02-11 Yao Qi <yao@codesourcery.com>
5858 * configure.ac: Call AC_PROG_RANLIB.
5859 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5860 * configure: Regenerate.
5862 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5864 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5866 2011-03-06 Yao Qi <yao@codesourcery.com>
5868 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5870 2011-03-05 Yao Qi <yao@codesourcery.com>
5872 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5873 (subdir_do): New make target. Copied from gdb/Makefile.
5874 (maintainer-clean, realclean, distclean, clean): Call corresponding
5875 make targets in common/Makefile.
5877 2011-03-04 Yao Qi <yao@codesourcery.com>
5879 * Makefile.in: Remove GNU make feature --directory.
5881 2011-03-04 Michael Snyder <msnyder@vmware.com>
5883 * server.c (queue_stop_reply): Call xmalloc not malloc.
5885 2011-03-02 Michael Snyder <msnyder@vmware.com>
5887 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5889 2011-02-28 Michael Snyder <msnyder@vmware.com>
5891 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5892 (cmd_qtframe): Ditto.
5893 (cmd_qtbuffer): Ditto.
5894 (cmd_bigqtbuffer): Ditto.
5896 * utils.c (decimal2str): Initialize 'width' to nine, then
5899 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5901 * hostio.c (require_data): Free *data, not data.
5903 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5905 * hostio.c (require_data): Use free, not xfree.
5907 2011-02-27 Michael Snyder <msnyder@vmware.com>
5909 * server.c (handle_query): Discard unused value.
5911 * hostio.c (require_data): Free malloc memory before returning
5914 2011-02-26 Michael Snyder <msnyder@vmware.com>
5916 * linux-low.c (list_threads): Call closedir for dirent.
5918 2011-02-27 Michael Snyder <msnyder@vmware.com>
5920 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5921 a case statement falls through.
5923 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5925 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5928 2011-02-26 Michael Snyder <msnyder@vmware.com>
5930 * utils.c (decimal2str): Eliminate dead code and dead param.
5931 (pulongest): Drop dead param from call to decimal2str.
5934 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5936 Revert the following patch (not approved yet):
5937 2011-02-21 Hui Zhu <teawater@gmail.com>
5938 * tracepoint.c (tp_printf): New function.
5939 (eval_agent_expr): Handle gdb_agent_op_printf.
5941 2011-02-21 Hui Zhu <teawater@gmail.com>
5943 * tracepoint.c (tp_printf): New function.
5944 (eval_agent_expr): Handle gdb_agent_op_printf.
5946 2011-02-18 Tom Tromey <tromey@redhat.com>
5948 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5949 (tracepoint.o): Likewise.
5950 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5951 (gdb_agent_op_names): Likewise.
5953 2011-02-18 Tom Tromey <tromey@redhat.com>
5955 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5956 gdb_agent_op_rot>: New constants.
5957 (gdb_agent_op_names): Add pick and roll.
5958 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5961 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5963 * aclocal.m4: Regenerated with aclocal-1.11.1.
5965 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5967 * server.c (handle_qxfer_traceframe_info): New.
5968 (qxfer_packets): Register "traceframe-info".
5969 (handle_query): Report support for qXfer:traceframe-info:read+.
5970 * tracepoint.c (match_blocktype): New.
5971 (traceframe_find_block_type): Rename to ...
5972 (traceframe_walk_blocks): ... this. Add callback filter argument,
5974 (traceframe_find_block_type): New, reimplemented on top of
5975 traceframe_walk_blocks.
5976 (build_traceframe_info_xml): New.
5977 (traceframe_read_info): New.
5978 * server.h (traceframe_read_info): Declare.
5980 2011-02-11 Yao Qi <yao@codesourcery.com>
5982 * configure.ac: Call AC_PROG_RANLIB.
5983 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5984 * configure: Regenerate.
5986 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5988 * server.c (gdb_read_memory): Change return semantics to allow
5990 (handle_search_memory_1): Adjust.
5991 (process_serial_event) <'m' packet>: Handle partial transfers.
5992 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5994 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5996 * regcache.c (init_register_cache): Initialize
5997 regcache->register_status.
5998 (free_register_cache): Release regcache->register_status.
5999 (regcache_cpy): Copy register_status.
6000 (registers_to_string): Print 'x's for unavailable registers.
6001 (supply_register): Mark the register's status valid or
6002 unavailable, depending on whether a buffer was passed in or not.
6003 (supply_register_zeroed): New.
6004 (supply_regblock): Mark the registers' status valid or
6005 unavailable, depending on whether a buffer was passed in or not.
6006 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6007 (struct regcache): New `register_status' field.
6008 (supply_register_zeroed): Declare.
6009 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6010 supply_register_zeroed, rather than passing a NULL buffer to
6012 * tracepoint.c (fetch_traceframe_registers): Update comment.
6014 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6016 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6019 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6021 * server.h (decode_xfer_write): Change prototype.
6022 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6023 and don't extract the annex here.
6024 * server.c (decode_xfer_read): Remove `annex' parameter,
6025 and don't extract the annex here.
6027 (struct qxfer): New.
6028 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6029 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6030 (handle_qxfer_statictrace): New functions, abstracted out from
6031 handle_query, and made to use the struct qxfer interface.
6032 (handle_threads_qxfer_proper): Rename to ...
6033 (handle_qxfer_threads_proper): ... this.
6034 (handle_threads_qxfer): Rename to ...
6035 (handle_qxfer_threads): ... this. Adjust.
6036 (qxfer_packets): New array.
6037 (handle_qxfer): New function.
6038 (handle_query): Use handle_qxfer.
6040 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6042 * gdbreplay.c: Shorten lines of >= 80 columns.
6043 * linux-low.c: Ditto.
6044 * linux-ppc-low.c: Ditto.
6045 * linux-s390-low.c: Ditto.
6046 * linux-sparc-low.c: Ditto.
6047 * linux-x86-low.c: Ditto.
6048 * linux-xtensa-low.c: Ditto.
6049 * mem-break.c: Ditto.
6051 * regcache.h: Ditto.
6052 * remote-utils.c: Ditto.
6055 * thread-db.c: Ditto.
6056 * tracepoint.c: Ditto.
6058 * win32-low.h: Ditto.
6060 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6062 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6065 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6067 * server.c (gdbserver_version): Update copyright year in version
6069 * gdbreplay.c (gdbreplay_version): Ditto.
6071 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6073 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6074 * linux-bfin-low.c: New file.
6075 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6076 PT_DATA_ADDR for BFIN targets.
6077 * Makefile.in (SFILES): Add linux-bfin-low.c.
6078 (clean): Remove reg-bfin.c.
6079 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6080 * README: Mention supported Blackfin targets.
6082 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6084 * .gitignore: New file.
6086 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6088 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6090 2010-10-22 Jie Zhang <jie@codesourcery.com>
6092 * Makefile.in: Add FLAGS_TO_PASS variable.
6093 (install): Remove dependency of install-only and recursively
6094 invoke make for install-only.
6096 2010-10-04 Doug Evans <dje@google.com>
6098 * Makefile.in (uninstall): Use $(DESTDIR).
6100 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6104 * linux-x86-low.c (compat_siginfo_from_siginfo)
6105 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6106 si_code is < 0. Check for si_code == SI_TIMER before checking for
6109 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6111 * lynx-i386-low.c: New file.
6112 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6114 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6116 * lynx-low.c (ptrace_request_to_str): Remove handling for
6117 request values that have been removed in LynxOS 5.x.
6119 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6121 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6124 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6126 * configure.ac: Add --enable-inprocess-agent option.
6127 * configure: Rebuilt.
6129 2010-09-06 Yao Qi <yao@codesourcery.com>
6131 * linux-low.c (linux_kill): Remove unused variable.
6132 (linux_stabilize_threads): Likewise.
6133 * server.c (start_inferior): Likewise.
6134 (queue_stop_reply_callback): Likewise.
6135 * tracepoint.c (do_action_at_tracepoint): Likewise.
6137 2010-09-06 Yao Qi <yao@codesourcery.com>
6139 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6142 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6144 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6146 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6148 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6151 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6153 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6154 gdbserver/lynx-ppc-low.c: New files.
6155 * Makefile.in (lynx_low_h): New variable.
6156 (lynx-low.o, lynx-ppc-low.o): New rules.
6157 * configure.ac: On LynxOS, link with -lnetinet.
6158 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6159 * configure: regenerate.
6161 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6163 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6164 * configure.ac: Add check for vasprintf and vsnprintf.
6165 * configure, config.in: Regenerate.
6166 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6168 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6170 * gdbreplay.c: Move include of alloca.h up, next to include of
6172 * server.h: Add include of malloc.h.
6173 * mem-break.c: Remove include of malloc.h.
6174 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6176 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6178 * Makefile.in (memmem.o): Build with -Wno-error.
6180 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6182 * utils.c (xsnprintf): Make non-static.
6183 * server.h: Add xsnprintf declaration.
6184 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6185 replace calls to snprintf by calls to xsnprintf throughout.
6187 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6189 * configure.ac: Add configure check for alloca.
6190 * configure, config.in: Regenerate.
6191 * server.h: Include alloca.h if it exists.
6192 * gdbreplay.c: Include alloca.h if it exists.
6194 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6196 * linux-low.c (__SIGRTMIN): Define if not already defined.
6197 (linux_create_inferior): Check for __ANDROID__ rather than
6199 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6200 are already deferred.
6201 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6202 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6203 stopped and already has a pending signal to report.
6204 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6205 a pending signal to report or is moving out of a jump pad.
6206 (linux_init_signals): Check for __ANDROID__ rather than
6209 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6211 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6212 debug_threads check. Avoid a linear search when not doing debug
6215 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6217 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6218 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6219 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6220 (process_event): Change local fd's type to gdb_fildes_t.
6221 (create_file_handler): Adjust prototype.
6222 (delete_file_handler): Adjust prototype.
6223 (handle_file_event): Adjust prototype. Use pfildes.
6224 (create_file_event): Adjsut prototype.
6225 * remote-utils.c (remote_desc, listen_desc): Change type to
6227 * server.h: New gdb_fildes_t typedef.
6228 [USE_WIN32API]: Include winsock2.h.
6229 (delete_file_handler, add_file_handler): Adjust prototypes.
6231 * utils.c (pfildes): New.
6233 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6235 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6236 * configure: Regenerate.
6238 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6240 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6241 (linux_done_accessing_memory): ... this.
6242 (linux_target_ops): Adjust.
6243 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6244 * nto-low.c (nto_target_ops): Adjust comment.
6245 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6246 * spu-low.c (spu_target_ops): Adjust comment.
6247 * target.h (target_ops): Rename unprepare_to_access_memory field
6248 to done_accessing_memory.
6249 (unprepare_to_access_memory): Rename to ...
6250 (done_accessing_memory): ... this.
6252 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6254 * linux-low.c (linux_prepare_to_access_memory): New.
6255 (linux_unprepare_to_access_memory): New.
6256 (linux_target_ops): Install them.
6257 * server.c (read_memory): Rename to ...
6258 (gdb_read_memory): ... this. Use
6259 prepare_to_access_memory/prepare_to_access_memory.
6260 (write_memory): Rename to ...
6261 (gdb_write_memory): ... this. Use
6262 prepare_to_access_memory/prepare_to_access_memory.
6263 (handle_search_memory_1): Adjust.
6264 (process_serial_event): Adjust.
6265 * target.h (struct target_ops): New fields
6266 prepare_to_access_memory and unprepare_to_access_memory.
6267 (prepare_to_access_memory, unprepare_to_access_memory): New.
6268 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6269 prepare_to_access_memory/prepare_to_access_memory.
6270 * nto-low.c (nto_target_ops): Adjust.
6271 * spu-low.c (spu_target_ops): Adjust.
6272 * win32-low.c (win32_target_ops): Adjust.
6274 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6276 * Makefile.in (WARN_CFLAGS): Get it from configure.
6277 (WERROR_CFLAGS): New.
6278 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6279 * configure.ac: Introduce --enable-werror, which adds -Werror to
6280 the compiler command line. Enabled by default. Disable with
6281 --disable-werror. Add -Wdeclaration-after-statement
6282 Wpointer-arith and -Wformat-nonliteral to warning flags.
6283 * configure: Regenerate.
6285 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6287 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6289 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6291 * gdbreplay.c (remote_error): New.
6293 (expect): Use gdbchar. Check for error reading from GDB.
6294 Clarify sync error output.
6295 (play): Check for errors writing to GDB.
6296 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6297 * remote-utils.c (getpkt): Check for errors writing to the remote
6300 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6302 * linux-low.c (linux_wait_1): Move non-debugging code out of
6303 `debug_threads' control.
6305 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6307 * linux-low.c (linux_wait_1): Don't set last_status here.
6308 * server.c (push_event, queue_stop_reply_callback): Assert we're
6309 not pushing a TARGET_WAITKIND_IGNORE event.
6310 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6311 (myresume, handle_target_event): Set the thread's last_resume_kind
6312 and last_status from the target returned status.
6314 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6318 * linux-x86-low.c (update_debug_registers_callback): New.
6319 (i386_dr_low_set_addr): Use it.
6320 (i386_dr_low_get_addr): New.
6321 (i386_dr_low_set_control): Use update_debug_registers_callback.
6322 (i386_dr_low_get_control): New.
6323 (i386_dr_low_get_status): Adjust.
6324 * linux-low.c (linux_stop_lwp): New.
6325 * linux-low.h (linux_stop_lwp): Declare.
6327 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6328 argument instead of a i386_debug_reg_state.
6329 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6330 a i386_debug_reg_state.
6331 (i386_insert_aligned_watchpoint): Adjust.
6332 (i386_remove_aligned_watchpoint): Adjust.
6333 (i386_low_stopped_data_address): Read the debug registers from the
6334 inferior instead of from the mirrors.
6335 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6336 (i386_dr_low_get_addr): Declare.
6337 (i386_dr_low_get_control): Declare.
6338 (i386_dr_low_get_status): Change prototype.
6340 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6341 (i386_dr_low_get_addr): New.
6342 (i386_dr_low_get_control): New.
6343 (i386_dr_low_get_status): Adjust prototype. Return
6345 (i386_initial_stuff): Clear dr_status_mirror and
6347 (i386_get_thread_context): Adjust.
6348 (i386_set_thread_context): Adjust.
6349 (i386_thread_added): Adjust.
6351 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6353 * linux-low.h (linux_thread_area): Delete declaration.
6355 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6357 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6358 after its termination.
6360 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6362 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6363 (gdb_wants_all_stopped): Delete.
6364 (linux_wait_1): Don't call them.
6365 * server.c (handle_v_cont): Tag all threads as want-stopped.
6366 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6367 stopped as "client-wants-stopped".
6369 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6371 * Makefile.in (signals_h): New.
6372 (server_h): Depend on it.
6373 (server.o): Don't depend on $(signals_def).
6374 (signals.o): Depend on $(signals_def).
6376 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6378 * Makefile.in (signals_def): New.
6379 (server_h): Append include/gdb/signals.h and signals_def.
6380 (server.o): Append signals_def.
6382 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6384 * server.c (handle_target_event): Use target_signal_to_host for
6385 resume_info.sig initialization.
6386 * target.h (struct thread_resume) <sig>: New comment.
6388 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6390 * server.c (handle_query): strcpy() the returned string from paddress()
6391 instead of sprintf().
6392 * utils.c (paddress): Return phex_nz().
6394 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6396 * server.c (handle_v_cont): Call mourn_inferior if process
6398 (myresume): Likewise.
6400 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6402 Static tracepoints, and integration with UST.
6404 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6405 * mem-break.c (uninsert_all_breakpoints)
6406 (reinsert_all_breakpoints): New.
6407 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6408 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6409 (gdb_agent_ust_loaded, helper_thread_id)
6410 (gdb_agent_helper_thread_id): New macros.
6411 (struct ipa_sym_addresses): Add addr_ust_loaded,
6412 addr_helper_thread_id, addr_cmd_buf.
6413 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6414 (in_process_agent_loaded_ust): New.
6415 (write_e_ust_not_loaded): New.
6416 (maybe_write_ipa_ust_not_loaded): New.
6417 (struct collect_static_trace_data_action): New.
6418 (enum tracepoint_type) <static_tracepoint>: New.
6419 (struct tracepoint) <handle>: Mention static tracepoints.
6420 (struct static_tracepoint_ctx): New.
6421 (CMD_BUF_SIZE): New.
6422 (add_tracepoint_action): Handle static tracepoint actions.
6423 (unprobe_marker_at): New.
6424 (clear_installed_tracepoints): Handle static tracepoints.
6425 (cmd_qtdp): Handle static tracepoints.
6426 (probe_marker_at): New.
6427 (cmd_qtstart): Handle static tracepoints.
6428 (response_tracepoint): Handle static tracepoints.
6429 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6430 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6431 (get_context_regcache): Handle static tracepoints.
6432 (do_action_at_tracepoint): Handle static tracepoint actions.
6433 (traceframe_find_block_type): Handle static trace data blocks.
6434 (traceframe_read_sdata): New.
6435 (download_tracepoints): Download static tracepoint actions.
6436 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6437 (GDB_PROBE_NAME): New.
6442 (ust_marker_to_static_tracepoint): New.
6444 (collect_ust_data_at_tracepoint): New.
6445 (gdb_ust_probe): New.
6446 (UNIX_PATH_MAX, SOCK_DIR): New.
6447 (gdb_ust_connect_sync_socket): New.
6448 (resume_thread, stop_thread): New.
6449 (run_inferior_command): New.
6450 (init_named_socket): New.
6451 (gdb_ust_socket_init): New.
6452 (cstr_to_hexstr): New.
6454 (first_marker, next_marker): New.
6455 (response_ust_marker): New.
6456 (cmd_qtfstm, cmd_qtsstm): New.
6457 (unprobe_marker_at, probe_marker_at): New.
6458 (cmd_qtstmat, gdb_ust_thread): New.
6459 (gdb_ust_init): New.
6460 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6461 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6463 (x86_64_st_collect_regmap): New.
6464 (X86_64_NUM_ST_COLLECT_GREGS): New.
6465 (AMD64_RIP_REGNUM): New.
6466 (supply_static_tracepoint_registers): New.
6467 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6469 (i386_st_collect_regmap): New.
6470 (i386_NUM_ST_COLLECT_GREGS): New.
6471 (supply_static_tracepoint_registers): New.
6472 * server.c (handle_query): Handle qXfer:statictrace:read.
6473 <qSupported>: Report support for StaticTracepoints, and
6474 qXfer:statictrace:read features.
6475 * server.h (traceframe_read_sdata)
6476 (supply_static_tracepoint_registers): Declare.
6477 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6478 (unpack_varlen_hex): Include in IPA build.
6479 * Makefile.in (ustlibs, ustinc): New.
6480 (IPA_OBJS): Add remote-utils-ipa.o.
6481 ($(IPA_LIB)): Link -ldl and -lpthread.
6483 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6484 * config.in, configure: Regenerate.
6486 2010-06-20 Ian Lance Taylor <iant@google.com>
6487 Pedro Alves <pedro@codesourcery.com>
6489 * linux-x86-low.c (always_true): Delete.
6490 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6491 trying to fool the compiler with always_true.
6493 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6495 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6496 conditions in gdbserver.
6498 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6500 * spu-low.c (spu_read_memory): Wrap around local store limit.
6501 (spu_write_memory): Likewise.
6503 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6505 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6506 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6508 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6510 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6511 uses with LONGEST uses.
6513 2010-06-14 Stan Shebs <stan@codesourcery.com>
6514 Pedro Alves <pedro@codesourcery.com>
6518 * linux-x86-low.c: Include limits.h.
6523 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6524 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6525 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6526 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6527 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6528 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6529 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6530 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6531 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6532 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6533 (amd64_emit_void_call_2): New.
6534 (amd64_emit_ops): New.
6535 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6536 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6537 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6538 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6539 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6540 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6541 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6542 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6543 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6544 (i386_emit_stack_adjust, i386_emit_int_call_1)
6545 (i386_emit_void_call_2): New.
6546 (i386_emit_ops): New.
6547 (x86_emit_ops): New.
6548 (the_low_target): Install x86_emit_ops.
6549 * server.h (struct emit_ops): New.
6550 (get_raw_reg_func_addr): Declare.
6551 (current_insn_ptr, emit_error): Declare.
6552 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6553 (set_trace_state_variable_value): New defines.
6554 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6555 addr_get_trace_state_variable_value and
6556 addr_set_trace_state_variable_value.
6557 (symbol_list): New fields for get_raw_reg,
6558 get_trace_state_variable_value and set_trace_state_variable_value.
6559 (condfn): New typedef.
6560 (struct tracepoint): New field `compiled_cond'.
6561 (do_action_at_tracepoint): Clear compiled_cond.
6562 (get_trace_state_variable_value, set_trace_state_variable_value):
6564 (condition_true_at_tracepoint): If there's a compiled condition,
6566 (current_insn_ptr, emit_error): New globals.
6567 (struct bytecode_address): New.
6568 (get_raw_reg_func_addr): New.
6569 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6570 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6571 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6572 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6573 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6574 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6575 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6576 (compile_tracepoint_condition, compile_bytecodes): New.
6577 * target.h (emit_ops): Forward declare.
6578 (struct target_ops): New field emit_ops.
6579 (target_emit_ops): New.
6580 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6581 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6582 * linux-low.c (linux_emit_ops): New.
6583 (linux_target_ops): Install it.
6584 * linux-low.h (struct linux_target_ops): New field emit_ops.
6586 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6588 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6589 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6591 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6592 Stan Shebs <stan@codesourcery.com>
6594 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6595 (all): Depend on $(extra_libraries).
6596 (install-only): Install the IPA.
6597 (IPA_OBJS, IPA_LIB): New.
6598 (clean): Remove the IPA lib.
6599 (IPAGENT_CFLAGS): New.
6600 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6601 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6602 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6603 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6604 * configure.ac: Check for atomic builtins support in the compiler.
6605 (IPA_DEPFILES, extra_libraries): Define.
6606 * configure.srv (ipa_obj): Add description.
6607 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6608 (i[34567]86-*-linux*): Set ipa_obj.
6609 (x86_64-*-linux*): Set ipa_obj.
6610 * linux-low.c (stabilizing_threads): New.
6611 (supports_fast_tracepoints): New.
6612 (linux_detach): Stabilize threads before detaching.
6613 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6614 the lwp is either not stabilizing, or is moving out of a jump pad.
6615 (linux_fast_tracepoint_collecting): New.
6616 (maybe_move_out_of_jump_pad): New.
6617 (enqueue_one_deferred_signal): New.
6618 (dequeue_one_deferred_signal): New.
6619 (linux_wait_for_event_1): If moving out of a jump pad, defer
6620 pending signals to later.
6621 (linux_stabilize_threads): New.
6622 (linux_wait_1): Check if threads need moving out of jump pads, and
6624 (stuck_in_jump_pad_callback): New.
6625 (move_out_of_jump_pad_callback): New.
6627 (linux_resume_one_lwp): Handle moving out of jump pads.
6628 (linux_set_resume_request): Dequeue deferred signals.
6629 (need_step_over_p): Also step over fast tracepoint jumps.
6630 (start_step_over): Also uninsert fast tracepoint jumps.
6631 (finish_step_over): Also reinsert fast tracepoint jumps.
6632 (linux_install_fast_tracepoint_jump): New.
6633 (linux_target_ops): Install linux_stabilize_threads and
6634 linux_install_fast_tracepoint_jump_pad.
6635 * linux-low.h (linux_target_ops) <get_thread_area,
6636 install_fast_tracepoint_jump_pad>: New fields.
6637 (struct lwp_info) <collecting_fast_tracepoint,
6638 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6639 (linux_get_thread_area): Declare.
6640 * linux-x86-low.c (jump_insn): New.
6641 (x86_get_thread_area): New.
6642 (append_insns): New.
6644 (amd64_install_fast_tracepoint_jump_pad): New.
6645 (i386_install_fast_tracepoint_jump_pad): New.
6646 (x86_install_fast_tracepoint_jump_pad): New.
6647 (the_low_target): Install x86_get_thread_area and
6648 x86_install_fast_tracepoint_jump_pad.
6649 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6650 (struct fast_tracepoint_jump): New.
6651 (fast_tracepoint_jump_insn): New.
6652 (fast_tracepoint_jump_shadow): New.
6653 (find_fast_tracepoint_jump_at): New.
6654 (fast_tracepoint_jump_here): New.
6655 (delete_fast_tracepoint_jump): New.
6656 (set_fast_tracepoint_jump): New.
6657 (uninsert_fast_tracepoint_jumps_at): New.
6658 (reinsert_fast_tracepoint_jumps_at): New.
6659 (set_breakpoint_at): Use write_inferior_memory.
6660 (uninsert_raw_breakpoint): Use write_inferior_memory.
6661 (check_mem_read): Mask out fast tracepoint jumps.
6662 (check_mem_write): Mask out fast tracepoint jumps.
6663 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6664 (set_fast_tracepoint_jump): Declare.
6665 (delete_fast_tracepoint_jump)
6666 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6667 (reinsert_fast_tracepoint_jumps_at): Declare.
6668 * regcache.c: Don't compile many functions when building the
6669 in-process agent library.
6670 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6671 the register buffer in the heap.
6672 (free_register_cache): If the register buffer isn't owned by the
6673 regcache, don't free it.
6674 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6675 pre-existing register caches.
6676 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6678 (convert_ascii_to_int): : Constify `from' parameter type.
6679 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6680 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6681 the needed buffer in-place.
6682 (relocate_instruction): New.
6683 * server.c (handle_query) <qSymbols>: If the target supports
6684 tracepoints, give it a chance of looking up symbols. Report
6685 support for fast tracepoints.
6686 (handle_status): Stabilize threads.
6687 (process_serial_event): Adjust.
6688 * server.h (struct fast_tracepoint_jump): Forward declare.
6689 (struct process_info) <fast_tracepoint_jumps>: New field.
6690 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6691 (decode_X_packet, decode_M_packet): Adjust.
6692 (relocate_instruction): Declare.
6693 (in_process_agent_loaded): Declare.
6694 (tracepoint_look_up_symbols): Declare.
6695 (struct fast_tpoint_collect_status): Declare.
6696 (fast_tracepoint_collecting): Declare.
6697 (force_unlock_trace_buffer): Declare.
6698 (handle_tracepoint_bkpts): Declare.
6699 (initialize_low_tracepoint)
6700 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6701 * target.h (struct target_ops) <stabilize_threads,
6702 install_fast_tracepoint_jump_pad>: New fields.
6703 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6704 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6705 [HAVE_STDINT_H]: Include stdint.h.
6706 (trace_debug_1): Rename to ...
6707 (trace_vdebug): ... this.
6708 (trace_debug): Rename to ...
6709 (trace_debug_1): ... this. Add `level' parameter.
6711 (ATTR_USED, ATTR_NOINLINE): New.
6712 (IP_AGENT_EXPORT): New.
6713 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6714 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6715 (about_to_request_buffer_space, trace_buffer_is_full)
6716 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6717 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6718 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6719 (traceframe_write_count, traceframes_created)
6720 (trace_state_variables)
6721 New renaming defines.
6722 (struct ipa_sym_addresses): New.
6723 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6725 (ipa_sym_addrs): New.
6726 (all_tracepoint_symbols_looked_up): New.
6727 (in_process_agent_loaded): New.
6728 (write_e_ipa_not_loaded): New.
6729 (maybe_write_ipa_not_loaded): New.
6730 (tracepoint_look_up_symbols): New.
6731 (debug_threads) [IN_PROCESS_AGENT]: New.
6732 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6733 (UNKNOWN_SIDE_EFFECTS): New.
6734 (stop_tracing): New.
6735 (flush_trace_buffer): New.
6736 (stop_tracing_bkpt): New.
6737 (flush_trace_buffer_bkpt): New.
6738 (read_inferior_integer): New.
6739 (read_inferior_uinteger): New.
6740 (read_inferior_data_pointer): New.
6741 (write_inferior_data_pointer): New.
6742 (write_inferior_integer): New.
6743 (write_inferior_uinteger): New.
6744 (struct collect_static_trace_data_action): Delete.
6745 (enum tracepoint_type): New.
6746 (struct tracepoint) <type>: New field `type'.
6747 <actions_str, step_actions, step_actions_str>: Only include in
6749 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6750 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6751 (tracepoints): Use IP_AGENT_EXPORT.
6752 (last_tracepoint): Don't include in the IPA.
6753 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6754 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6755 (alloced_trace_state_variables): New.
6756 (trace_state_variables): Use IP_AGENT_EXPORT.
6757 (traceframe_t): Delete unused variable.
6758 (circular_trace_buffer): Don't include in the IPA.
6759 (trace_buffer_start): Delete.
6760 (struct trace_buffer_control): New.
6761 (trace_buffer_free): Delete.
6762 (struct ipa_trace_buffer_control): New.
6763 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6764 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6766 (trace_buffer_ctrl): New.
6767 (TRACE_BUFFER_CTRL_CURR): New.
6768 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6769 Reimplement as macros.
6770 (trace_buffer_wrap): Delete.
6771 (traceframe_write_count, traceframe_read_count)
6772 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6773 (struct tracepoint_hit_ctx) <type>: New field.
6774 (struct fast_tracepoint_ctx): New.
6775 (memory_barrier): New.
6777 (record_tracepoint_error): Update atomically in the IPA.
6778 (clear_inferior_trace_buffer): New.
6779 (about_to_request_buffer_space): New.
6780 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6781 updating the same buffer.
6782 (add_tracepoint): Default the tracepoint's type to trap
6783 tracepoint, and orig_size to -1.
6784 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6786 (create_trace_state_variable): New parameter `gdb'. Handle it.
6787 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6788 (cmd_qtdp): Handle fast tracepoints.
6790 (max_jump_pad_size): New.
6791 (gdb_jump_pad_head): New.
6792 (get_jump_space_head): New.
6793 (claim_jump_space): New.
6794 (sort_tracepoints): New.
6795 (MAX_JUMP_SIZE): New.
6796 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6798 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6799 support. Upload fast traceframes, and delete internal IPA
6801 (stop_tracing_handler): New.
6802 (flush_trace_buffer_handler): New.
6803 (cmd_qtstop): Upload fast tracepoints.
6804 (response_tracepoint): Handle fast tracepoints.
6805 (tracepoint_finished_step): Upload fast traceframes. Set the
6806 tracepoint hit context's tracepoint type.
6807 (handle_tracepoint_bkpts): New.
6808 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6809 type. Add comment about fast tracepoints.
6810 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6811 non-existing action_str field.
6812 (get_context_regcache): Handle fast tracepoints.
6813 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6815 (fast_tracepoint_from_jump_pad_address): New.
6816 (fast_tracepoint_from_ipa_tpoint_address): New.
6817 (collecting_t): New.
6818 (force_unlock_trace_buffer): New.
6819 (fast_tracepoint_collecting): New.
6822 (write_inferior_data_ptr): New.
6823 (target_tp_heap): New.
6824 (target_malloc): New.
6825 (download_agent_expr): New.
6827 (download_tracepoints): New.
6828 (download_trace_state_variables): New.
6829 (upload_fast_traceframes): New.
6830 (IPA_FIRST_TRACEFRAME): New.
6831 (IPA_NEXT_TRACEFRAME_1): New.
6832 (IPA_NEXT_TRACEFRAME): New.
6833 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6834 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6835 (gdb_jump_pad_buffer_end): New.
6836 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6837 (initialize_tracepoint): Adjust.
6838 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6839 buffer. Initialize the low module.
6840 * utils.c (PREFIX, TOOLNAME): New.
6841 (malloc_failure): Use PREFIX.
6842 (error): In the IPA, an error causes an exit.
6843 (fatal, warning): Use PREFIX.
6844 (internal_error): Use TOOLNAME.
6845 (NUMCELLS): Increase to 10.
6846 * configure, config.in: Regenerate.
6848 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6850 * server.c (handle_query) <qSupported>: Do two passes over the
6851 qSupported string to avoid nesting strtok.
6853 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6855 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6857 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6859 * configure: Regenerate.
6860 * proc-service.list: New.
6862 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6864 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6867 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6869 * gdbreplay.c (remote_open): Check error return from socket() call by
6870 its equality to -1 not by it being negative.
6871 * remote-utils.c (remote_open): Likewise.
6873 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6875 * config.h: Regenerate.
6877 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6879 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6880 doesn't provide PTRACE_GET_THREAD_AREA.
6882 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6884 * linux-m68k-low.c: Include <asm/ptrace.h>
6885 (ps_get_thread_area): Implement.
6887 2010-05-03 Doug Evans <dje@google.com>
6889 * event-loop.c (struct callback_event): New struct.
6890 (callback_list): New global.
6891 (append_callback_event, delete_callback_event): New functions.
6892 (process_callback): New function.
6893 (start_event_loop): Call it.
6894 * remote-utils.c (NOT_SCHEDULED): Define.
6895 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6896 moved out of readchar.
6897 (readchar): Rewrite. Call reschedule before returning.
6898 (reset_readchar): New function.
6899 (remote_close): Call it.
6900 (process_remaining, reschedule): New functions.
6901 * server.h (callback_handler_func): New typedef.
6902 (append_callback_event, delete_callback_event): Declare.
6904 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6906 * proc-service.c (ps_pglobal_lookup): Use
6907 thread_db_look_up_one_symbol.
6908 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6909 parameter. Use it instead of all_symbols_looked_up.
6910 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6912 (all_symbols_looked_up): Don't declare.
6913 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6914 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6916 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6917 Set all_symbols_looked_up here.
6918 (thread_db_look_up_one_symbol): New.
6919 (thread_db_get_tls_address): Adjust.
6920 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6921 thread_db object on the heap, and tentatively set it in the
6923 (thread_db_init): Don't set all_symbols_looked_up here.
6924 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6926 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6928 * linux-low.c (linux_kill, linux_detach): Adjust.
6929 (status_pending_p_callback): Remove redundant statement. Check
6930 for !TARGET_WAITIKIND_IGNORE, instead of
6931 TARGET_WAITKIND_STOPPED.
6932 (handle_tracepoints): Make sure LWP is locked. Adjust.
6933 (linux_wait_for_event_1): Adjust.
6934 (linux_cancel_breakpoints): New.
6935 (unsuspend_one_lwp): New.
6936 (unsuspend_all_lwps): New.
6937 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6938 (send_sigstop_callback): Change return type to int, add new
6939 `except' parameter and handle it.
6940 (suspend_and_send_sigstop_callback): New.
6941 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6942 pass them down. If SUSPEND, also increment the lwp's suspend
6944 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6945 (need_step_over_p): Don't consider suspended LWPs.
6946 (start_step_over): Adjust.
6947 (proceed_one_lwp): Change return type to int, add new `except'
6948 parameter and handle it.
6949 (unsuspend_and_proceed_one_lwp): New.
6950 (proceed_all_lwps): Use find_inferior instead of
6952 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6953 also decrement the suspend count of LWPs. Pass `except' down,
6954 instead of hacking its suspend count.
6955 (linux_pause_all): Add `freeze' parameter. Adjust.
6956 (linux_unpause_all): New.
6957 (linux_target_ops): Install linux_unpause_all.
6958 * server.c (handle_status): Adjust.
6959 * target.h (struct target_ops): New fields `unpause_all' and
6960 `cancel_breakpoints'. Add new parameter to `pause_all'.
6961 (pause_all): Add new `freeze' parameter.
6963 (cancel_breakpoints): New.
6964 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6966 (cmd_qtstart): Pause threads.
6967 (stop_tracing): Pause threads, and cancel breakpoints.
6968 * win32-low.c (win32_target_ops): Adjust.
6970 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6972 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6973 the inferior right away from here...
6974 (linux_wait_1): ... to here, and adjust to check the thread's
6975 last_resume_kind instead of the lwp's step or stop_expected flags.
6977 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6979 * README: Use consistent `GDB' and `GDBserver' spellings.
6981 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6983 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6984 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6985 (linux_detach_one_lwp): Assume the lwp is stopped.
6986 (any_thread_of): Delete.
6987 (linux_detach): Stop all lwps here. Don't blindly delete all
6989 (delete_lwp_callback): New.
6990 (linux_mourn): Delete all lwps of the process that is gone.
6991 (linux_wait_1): Don't delete the last lwp of the process here.
6992 * mem-break.h (mark_breakpoints_out): Declare.
6993 * mem-break.c (mark_breakpoints_out): New.
6994 (free_all_breakpoints): Use it.
6995 * server.c (handle_target_event): If the process is gone, mark
6997 * thread-db.c (struct thread_db) <create_bp>: New field.
6998 (thread_db_enable_reporting): Fix prototype. Store a thread event
6999 breakpoint reference in the thread_db struct.
7000 (thread_db_load_search): Clear the thread_db object.
7001 (try_thread_db_load_1): Ditto.
7002 (switch_to_process): New.
7003 (disable_thread_event_reporting): Use it.
7004 (remove_thread_event_breakpoints): New.
7005 (thread_db_detach, thread_db_mourn): Use it.
7007 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7009 * linux-low.c (linux_enable_event_reporting): New.
7010 (linux_wait_for_event_1, handle_extended_wait): Use it.
7012 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7014 * linux-low.c (linux_kill_one_lwp, linux_kill)
7015 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7016 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7017 SIGSTOP even if the LWP is stopped.
7018 (send_sigstop_callback): New.
7019 (stop_all_lwps): Use send_sigstop_callback instead.
7020 (linux_resume_one_thread): Adjust.
7021 (proceed_one_lwp): Still proceed an LWP that the client has
7022 requested to stop, if we haven't reported it as stopped yet. Make
7023 sure that LWPs the client want stopped, have a pending SIGSTOP.
7025 2010-04-26 Doug Evans <dje@google.com>
7027 * server.c (handle_general_set): Make static.
7029 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7030 Print received char after testing for error/eof instead of before.
7031 (input_interrupt): Tweak comment.
7033 2010-04-23 Doug Evans <dje@google.com>
7035 * server.c (start_inferior): Print inferior argv if --debug.
7037 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7039 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7040 * nto-x86-low.c: Include server.h
7042 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7044 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7045 be consistent with other sources of this directory.
7046 (init_registers_amd64): Correct name of source file of this function
7049 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7051 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7054 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7056 * win32-i386-low.c: Add 64-bit support.
7057 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7058 (init_registers_amd64): Declare.
7059 (mappings): Add 64-bit version of array.
7060 (init_windows_x86): New function.
7061 (the_low_target): Change init_arch field to init_windows_x86.
7063 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7065 * win32-low.c: Adapt to support also 64-bit architecture.
7066 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7067 (get_image_name): Use SIZE_T type for local variable `done'.
7068 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7069 (toolhelp_get_dll_name): Idem.
7070 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7071 Use uintptr_t typecast to avoid warning.
7072 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7073 (handle_exception): Use phex_nz to avoid warning.
7074 (win32_wait): Remove unused local variable `process'.
7076 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7078 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7081 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7083 * configure.ac: Use `ws2_32' library for srv_mingw.
7084 * configure: Regenerate.
7085 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7086 * remote-utils.c: Likewise.
7088 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7090 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7091 if __x86_64__ is defined.
7093 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7095 * configure: Regenerate.
7097 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7099 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7100 * target.h (target_ops): New get_tib_address field.
7101 * win32-low.h (win32_thread_info): Add thread_local_base field.
7102 * win32-low.c (child_add_thread): Add tlb argument.
7103 Set thread_local_base field to TLB.
7104 (get_child_debug_event): Adapt to child_add_thread change.
7105 (win32_get_tib_address): New function.
7106 (win32_target_ops): Set get_tib_address field to
7107 win32_get_tib_address.
7108 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7110 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7112 * linux-low.c (linux_mourn): Also remove the process.
7113 * server.c (handle_target_event): Don't remove the process here.
7114 * nto-low.c (nto_mourn): New.
7115 (nto_target_ops): Install it.
7116 * spu-low.c (spu_mourn): New.
7117 (spu_target_ops): Install it.
7118 * win32-low.c (win32_mourn): New.
7119 (win32_target_ops): Install it.
7121 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7123 * server.h (buffer_xml_printf): Remove redundant `;'.
7125 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7127 * regcache.c (set_register_cache): Invalidate regcaches before
7128 changing the register cache layout.
7129 (regcache_invalidate_one): Allow a NULL regcache.
7130 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7131 regcaches before changing the register cache layout or the target
7134 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7136 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7137 variable warning on Linux/x86-64.
7139 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7141 GDBserver disconnected tracing support.
7143 * linux-low.c (linux_remove_process): Delete.
7144 (add_lwp): Don't set last_resume_kind here.
7145 (linux_kill): Use `mourn'.
7146 (linux_detach): Use `thread_db_detach', and `mourn'.
7148 (linux_attach_lwp_1): Adjust comment.
7149 (linux_attach): last_resume_kind moved the thread_info; adjust.
7150 (status_pending_p_callback): Adjust.
7151 (linux_wait_for_event_1): Adjust.
7152 (count_events_callback, select_singlestep_lwp_callback)
7153 (select_event_lwp_callback, cancel_breakpoints_callback)
7154 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7155 (proceed_one_lwp): Adjust.
7156 (linux_async): Add debug output.
7157 (linux_thread_stopped): New.
7158 (linux_pause_all): New.
7159 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7161 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7162 (thread_db_free): Delete declaration.
7163 (thread_db_detach, thread_db_mourn): Declare.
7164 * thread-db.c (thread_db_init): Use thread_db_mourn.
7165 (thread_db_free): Delete, split in two.
7166 (disable_thread_event_reporting): New.
7167 (thread_db_detach): New.
7168 (thread_db_mourn): New.
7170 * server.h (struct thread_info) <last_resume_kind>: New field.
7171 <attached>: Add comment.
7172 <gdb_detached>: New field.
7173 (handler_func): Change return type to int.
7174 (handle_serial_event, handle_target_event): Ditto.
7175 (gdb_connected): Declare.
7177 (disconnected_tracing): Declare.
7178 (stop_tracing): Declare.
7180 * server.c (handle_query) <qSupported>: Report support for
7181 disconnected tracing.
7182 (queue_stop_reply_callback): Account for running threads.
7183 (gdb_wants_thread_stopped): New.
7184 (gdb_wants_all_threads_stopped): New.
7185 (gdb_reattached_process): New.
7186 (handle_status): Clear the `gdb_detached' flag of all processes.
7187 In all-stop, stop all threads.
7188 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7189 (process_serial_event): If the remote connection breaks, or if an
7190 exit was forced with "monitor exit", force an event loop exit.
7191 Handle disconnected tracing on detach.
7192 (handle_serial_event): Adjust.
7193 (handle_target_event): If GDB isn't connected, forward events back
7194 to the inferior, unless the last process exited, in which case,
7195 exit gdbserver. Adjust interface.
7197 * remote-utils.c (remote_open): Don't block in accept. Instead
7198 register an event loop source on the listen socket file
7199 descriptor. Refactor bits into ...
7200 (listen_desc): ... this new global.
7201 (gdb_connected): ... this new function.
7202 (enable_async_notification): ... this new function.
7203 (handle_accept_event): ... this new function.
7204 (remote_close): Clear remote_desc.
7206 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7208 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7210 (mourn_inferior): Define.
7211 (target_process_qsupported): Avoid the dangling else problem.
7212 (thread_stopped): Define.
7213 (pause_all): Define.
7214 (target_waitstatus_to_string): Declare.
7215 * target.c (target_waitstatus_to_string): New.
7217 * tracepoint.c (tracing): Make extern.
7218 (disconnected_tracing): New.
7219 (stop_tracing): Make extern. Handle tracing stops due to GDB
7221 (cmd_qtdisconnected): New.
7222 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7223 (handle_tracepoint_general_set): Handle QTDisconnected.
7225 * event-loop.c (event_handler_func): Change return type to int.
7226 (process_event): Bail out if the event handler wants the event
7228 (handle_file_event): Ditto.
7229 (start_event_loop): Bail out if the event handler wants the event
7232 * nto-low.c (nto_target_ops): Adjust.
7233 * spu-low.c (spu_wait): Don't remove the process here.
7234 (spu_target_ops): Adjust.
7235 * win32-low.c (win32_wait): Don't remove the process here.
7236 (win32_target_ops): Adjust.
7238 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7240 * regcache.c (realloc_register_cache): Invalidate inferior's
7241 regcache before recreating it.
7243 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7245 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7247 2010-04-09 Stan Shebs <stan@codesourcery.com>
7248 Pedro Alves <pedro@codesourcery.com>
7250 * server.h (LONGEST): New.
7251 (struct thread_info) <while_stepping>: New field.
7252 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7254 (initialize_tracepoint, handle_tracepoint_general_set)
7255 (handle_tracepoint_query, tracepoint_finished_step)
7256 (tracepoint_was_hit, release_while_stepping_state_list):
7257 (current_traceframe): Declare.
7258 * server.c (handle_general_set): Handle tracepoint packets.
7260 (write_memory): New.
7261 (handle_search_memory_1): Use read_memory.
7262 (handle_query): Report support for conditional tracepoints, trace
7263 state variables, and tracepoint sources. Handle tracepoint
7265 (main): Initialize the tracepoints module.
7266 (process_serial_event): Handle traceframe reads/writes.
7268 * linux-low.c (handle_tracepoints): New.
7269 (linux_wait_1): Call it.
7270 (linux_resume_one_lwp): Handle while-stepping.
7271 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7272 (linux_target_ops): Install them.
7273 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7275 * linux-x86-low.c (x86_supports_tracepoints): New.
7276 (the_low_target). Install it.
7278 * mem-break.h (delete_breakpoint): Declare.
7279 * mem-break.c (delete_breakpoint): Make external.
7281 * target.h (struct target_ops): Add `supports_tracepoints',
7282 `read_pc', and `write_pc' fields.
7283 (target_supports_tracepoints): Define.
7284 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7287 * regcache.h (struct regcache) <registers_owned>: New field.
7288 (init_register_cache, regcache_cpy): Declare.
7289 (regcache_read_pc, regcache_write_pc): Declare.
7290 (register_cache_size): Declare.
7291 (supply_regblock): Declare.
7292 * regcache.c (init_register_cache): New.
7293 (new_register_cache): Use it.
7294 (regcache_cpy): New.
7295 (register_cache_size): New.
7296 (supply_regblock): New.
7297 (regcache_read_pc, regcache_write_pc): New.
7299 * tracepoint.c: New.
7301 * Makefile.in (OBS): Add tracepoint.o.
7302 (tracepoint.o): New rule.
7304 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7306 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7308 (i386-mmx.c): Likewise.
7309 (i386-mmx-linux.o): Likewise.
7310 (i386-mmx-linux.c): Likewise.
7312 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7313 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7314 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7315 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7317 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7318 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7319 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7321 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7323 * Makefile.in (clean): Updated.
7325 (i386-avx.c): Likewise.
7326 (i386-avx-linux.o): Likewise.
7327 (i386-avx-linux.c): Likewise.
7328 (amd64-avx.o): Likewise.
7329 (amd64-avx.c): Likewise.
7330 (amd64-avx-linux.o): Likewise.
7331 (amd64-avx-linux.c): Likewise.
7333 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7334 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7335 (srv_amd64_regobj): Add amd64-avx.o.
7336 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7337 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7338 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7339 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7340 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7341 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7342 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7344 * i387-fp.c: Include "i386-xstate.h".
7346 (i387_cache_to_xsave): Likewise.
7347 (i387_xsave_to_cache): Likewise.
7348 (x86_xcr0): Likewise.
7350 * i387-fp.h (i387_cache_to_xsave): Likewise.
7351 (i387_xsave_to_cache): Likewise.
7352 (x86_xcr0): Likewise.
7354 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7355 * linux-crisv32-low.c (target_regsets): Likewise.
7356 * linux-m68k-low.c (target_regsets): Likewise.
7357 * linux-mips-low.c (target_regsets): Likewise.
7358 * linux-ppc-low.c (target_regsets): Likewise.
7359 * linux-s390-low.c (target_regsets): Likewise.
7360 * linux-sh-low.c (target_regsets): Likewise.
7361 * linux-sparc-low.c (target_regsets): Likewise.
7362 * linux-xtensa-low.c (target_regsets): Likewise.
7364 * linux-low.c: Include <sys/uio.h>.
7365 (regsets_fetch_inferior_registers): Support nt_type.
7366 (regsets_store_inferior_registers): Likewise.
7367 (linux_process_qsupported): New.
7368 (linux_target_ops): Add linux_process_qsupported.
7370 * linux-low.h (regset_info): Add nt_type.
7371 (linux_target_ops): Add process_qsupported.
7373 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7375 (init_registers_i386_avx_linux): New.
7376 (init_registers_amd64_avx_linux): Likewise.
7377 (xmltarget_i386_linux_no_xml): Likewise.
7378 (xmltarget_amd64_linux_no_xml): Likewise.
7379 (PTRACE_GETREGSET): Likewise.
7380 (PTRACE_SETREGSET): Likewise.
7381 (x86_fill_xstateregset): Likewise.
7382 (x86_store_xstateregset): Likewise.
7383 (use_xml): Likewise.
7384 (x86_linux_update_xmltarget): Likewise.
7385 (x86_linux_process_qsupported): Likewise.
7386 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7387 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7388 init_registers_i386_linux here. Call
7389 x86_linux_update_xmltarget.
7390 (the_low_target): Add x86_linux_process_qsupported.
7392 * server.c (handle_query): Call target_process_qsupported.
7394 * target.h (target_ops): Add process_qsupported.
7395 (target_process_qsupported): New.
7397 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7399 * inferiors.c (add_thread): Set last_status kind to
7400 TARGET_WAITKIND_IGNORE.
7401 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7402 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7403 (linux_wait_1): Move `thread' local definition to block that uses
7404 it. Don't NULL initialize `event_child'.
7405 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7406 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7407 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7409 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7411 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7412 an extended waitstatus, or by a watchpoint.
7413 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7414 thread was stepping or has been stopped by a watchpoint.
7416 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7418 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7419 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7420 of another, then delete the previous, and validate all
7422 (validate_inserted_breakpoint): New.
7423 (delete_disabled_breakpoints): New.
7424 (validate_breakpoints): New.
7425 (check_mem_read): Validate breakpoints before trusting their
7426 shadow. Delete disabled breakpoints.
7427 (check_mem_write): Validate breakpoints before trusting they
7428 should be inserted. Delete disabled breakpoints.
7429 * mem-break.h (validate_breakpoints):
7430 * server.c (handle_query): Validate breakpoints when we see a
7433 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7435 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7436 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7437 if we could tell there's a GDB breakpoint at stop_pc.
7438 (need_step_over_p): Don't do a step over if we find a GDB
7439 breakpoint at the resume PC.
7441 * mem-break.c (struct raw_breakpoint): New.
7442 (enum bkpt_type): New type `gdb_breakpoint'.
7443 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7444 fields. New field `raw'.
7445 (find_raw_breakpoint_at): New.
7446 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7448 (set_breakpoint_at): Adjust.
7449 (delete_raw_breakpoint): New.
7450 (release_breakpoint): New.
7451 (delete_breakpoint): Rename to...
7452 (delete_breakpoint_1): ... this. Add proc parameter. Use
7453 release_breakpoint. Return ENOENT.
7454 (delete_breakpoint): Reimplement.
7455 (find_breakpoint_at): Delete.
7456 (find_gdb_breakpoint_at): New.
7457 (delete_breakpoint_at): Delete.
7458 (set_gdb_breakpoint_at): New.
7459 (delete_gdb_breakpoint_at): New.
7460 (gdb_breakpoint_here): New.
7461 (set_reinsert_breakpoint): Use release_breakpoint.
7462 (uninsert_breakpoint): Rename to ...
7463 (uninsert_raw_breakpoint): ... this.
7464 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7465 (reinsert_raw_breakpoint): Change parameter type to
7467 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7469 (check_breakpoints): Adjust. Use release_breakpoint.
7470 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7471 (breakpoint_inserted_here): Ditto.
7472 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7473 Don't trust the breakpoint's shadow if it is not inserted.
7474 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7475 (delete_all_breakpoints): Adjust.
7476 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7477 use delete_breakpoint_1.
7479 * mem-break.h (breakpoints_supported): Delete declaration.
7480 (set_gdb_breakpoint_at): Declare.
7481 (gdb_breakpoint_here): Declare.
7482 (delete_breakpoint_at): Delete.
7483 (delete_gdb_breakpoint_at): Declare.
7485 * server.h (struct raw_breakpoint): Forward declare.
7486 (struct process_info): New field `raw_breakpoints'.
7488 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7491 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7493 * linux-low.c (status_pending_p_callback): Fix comment.
7494 (linux_wait_for_event_1): Move most of the internal breakpoint
7495 handling from here...
7496 (linux_wait_1): ... to here.
7497 (count_events_callback): New.
7498 (select_singlestep_lwp_callback): New.
7499 (select_event_lwp_callback): New.
7500 (cancel_breakpoints_callback): New.
7501 (select_event_lwp): New.
7502 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7503 priority to all LWPs that have had events that should be reported
7504 to the client. Cancel breakpoints when about to reporting the
7505 event to the client, not while stopping lwps. No longer cancel
7506 finished single-steps here.
7507 (cancel_finished_single_step): Delete.
7508 (cancel_finished_single_steps): Delete.
7510 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7512 * mem-break.c (enum bkpt_type): New.
7513 (struct breakpoint): New field `type'.
7514 (set_breakpoint_at): Change return type to struct breakpoint
7515 pointer. Set type to `other_breakpoint' by default.
7516 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7517 in the breakpoint list.
7518 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7519 (reinsert_breakpoint): Rename to ...
7520 (reinsert_raw_breakpoint): ... this.
7521 (reinsert_breakpoints_at): Adjust.
7522 * mem-break.h (struct breakpoint): Declare.
7523 (set_breakpoint_at): Change return type to struct breakpoint
7526 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7528 * server.c (handle_query): Assign, not compare.
7530 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7532 Teach linux gdbserver to step-over-breakpoints.
7534 * linux-low.c (can_hardware_single_step): New.
7535 (supports_breakpoints): New.
7536 (handle_extended_wait): If stopping threads, read the stop pc of
7539 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7540 low target doesn't support retrieving the PC.
7541 (add_lwp): Set last_resume_kind to resume_continue.
7542 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7543 (linux_attach): Don't clear stop_expected. Set the lwp's
7544 last_resume_kind to resume_stop.
7545 (linux_detach_one_lwp): Don't check for removed breakpoints.
7546 (check_removed_breakpoint): Delete.
7547 (status_pending_p): Rename to ...
7548 (status_pending_p_callback): ... this. Don't check for removed
7549 breakpoints. Don't consider threads that are stopped from GDB's
7551 (linux_wait_for_lwp): Always read the stop_pc here.
7552 (cancel_breakpoint): New.
7553 (step_over_bkpt): New global.
7554 (linux_wait_for_event_1): Implement stepping over breakpoints.
7555 (gdb_wants_lwp_stopped): New.
7556 (gdb_wants_all_stopped): New.
7557 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7558 single-step traps here. Store the thread's last reported target
7560 (send_sigstop): Don't clear stop_expected. Always set it,
7562 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7563 (cancel_finished_single_step): New.
7564 (cancel_finished_single_steps): New.
7565 (wait_for_sigstop): Don't cancel finished single-step traps here.
7566 (linux_resume_one_lwp): Don't check for removed breakpoints.
7567 Don't set `step' on non-hardware step archs.
7568 (linux_set_resume_request): Ignore resume_stop requests if already
7569 stopping or stopped. Set the lwp's last_resume_kind.
7570 (resume_status_pending_p): Don't check for removed breakpoints.
7571 (need_step_over_p): New.
7572 (start_step_over): New.
7573 (finish_step_over): New.
7574 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7575 requests. Clear the thread's last reported target waitstatus.
7576 Don't use the `suspended' flag. Don't consider pending breakpoints.
7577 (linux_resume): Start a step-over if necessary.
7578 (proceed_one_lwp): New.
7579 (proceed_all_lwps): New.
7580 (unstop_all_lwps): New.
7581 * linux-low.h (struct lwp_info): Rewrite comment for the
7582 `suspended' flag. Add the `stop_pc' field. Delete the
7583 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7584 Add `'last_resume_kind' and `need_step_over' fields.
7585 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7586 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7587 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7588 (set_raw_breakpoint_at): New.
7589 (set_breakpoint_at): Rewrite to use it.
7590 (reinsert_breakpoint_handler): Delete.
7591 (set_reinsert_breakpoint): New.
7592 (reinsert_breakpoint_by_bp): Delete.
7593 (delete_reinsert_breakpoints): New.
7594 (uninsert_breakpoint): Rewrite.
7595 (uninsert_breakpoints_at): New.
7596 (reinsert_breakpoint): Rewrite.
7597 (reinsert_breakpoints_at): New.
7598 (check_breakpoints): Rewrite.
7599 (breakpoint_here): New.
7600 (breakpoint_inserted_here): New.
7601 (check_mem_read): Adjust.
7602 * mem-break.h (breakpoints_supported, breakpoint_here)
7603 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7604 (reinsert_breakpoint_by_bp): Delete declaration.
7605 (delete_reinsert_breakpoints): Declare.
7606 (reinsert_breakpoint): Delete declaration.
7607 (reinsert_breakpoints_at): Declare.
7608 (uninsert_breakpoint): Delete declaration.
7609 (uninsert_breakpoints_at): Declare.
7610 (check_breakpoints): Adjust prototype.
7611 * server.h: Adjust include order.
7612 (struct thread_info): Declare here. Add a `last_status' field.
7614 2010-03-23 Michael Snyder <msnyder@vmware.com>
7616 * server.c (crc32): New function.
7617 (handle_query): Add handling for 'qCRC:' request.
7619 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7621 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7622 lwp had been stopped by a watchpoint.
7624 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7626 * server.h (internal_error): Declare.
7627 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7628 * utils.c (internal_error): New function.
7630 2010-03-15 Andreas Schwab <schwab@redhat.com>
7632 * configure.srv: Fix typo setting srv_regobj.
7634 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7636 * linux-low.c (fetch_register): Avoid passing a non string literal
7638 (usr_store_inferior_registers): Ditto.
7640 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7642 * linux-low.c (linux_write_memory): Bail out early if peeking
7645 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7647 * linux-low.h (struct lwp_info): New fields
7648 `stopped_by_watchpoint' and `stopped_data_address'.
7649 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7650 here, and cache them in the lwp object.
7651 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7653 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7655 (linux_stopped_by_watchpoint): Rewrite.
7656 (linux_stopped_data_address): Rewrite.
7658 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7660 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7661 switching the current inferior, not before.
7663 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7665 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7666 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7667 i386-linux.c and amd64-linux.c.
7668 (reg-i386.o): Removed.
7669 (reg-i386.c): Likewise.
7670 (reg-i386-linux.o): Likewise.
7671 (reg-i386-linux.c): Likewise.
7672 (reg-x86-64.o): Likewise.
7673 (reg-x86-64.c): Likewise.
7674 (reg-x86-64-linux.o): Likewise.
7675 (reg-x86-64-linux.c): Likewise.
7678 (i386-linux.o): Likewise.
7679 (i386-linux.c): Likewise.
7680 (amd64.o): Likewise.
7681 (amd64.c): Likewise.
7682 (amd64-linux.o): Likewise.
7683 (amd64-linux.c): Likewise.
7685 * configure.srv (srv_i386_regobj): New.
7686 (srv_i386_linux_regobj): Likewise.
7687 (srv_amd64_regobj): Likewise.
7688 (srv_amd64_linux_regobj): Likewise.
7689 (srv_i386_32bit_xmlfiles): Likewise.
7690 (srv_i386_64bit_xmlfiles): Likewise.
7691 (srv_i386_xmlfiles): Likewise.
7692 (srv_amd64_xmlfiles): Likewise.
7693 (srv_i386_linux_xmlfiles): Likewise.
7694 (srv_amd64_linux_xmlfiles): Likewise.
7695 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7696 srv_xmlfiles to $srv_i386_xmlfiles.
7697 (i[34567]86-*-mingw32ce*): Likewise.
7698 (i[34567]86-*-mingw*): Likewise.
7699 (i[34567]86-*-nto*): Likewise.
7700 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7701 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7702 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7703 (x86_64-*-linux*): Likewise.
7705 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7706 (init_registers_amd64_linux): New.
7707 (x86_arch_setup): Replace init_registers_x86_64_linux with
7708 init_registers_amd64_linux.
7710 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7712 * configure.ac: Check for libdl. If it is not available link against
7713 static libthread_db.
7714 * configure: Regenerate.
7716 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7720 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7721 handing a read watchpoint.
7722 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7724 2010-02-12 Doug Evans <dje@google.com>
7726 * linux-low.c (linux_supports_tracefork_flag): Document.
7727 (linux_look_up_symbols): Add comment.
7729 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7731 * regcache.c (supply_register): Clear regcache if buf is NULL.
7733 2010-02-02 Nicolas Roche <roche@sourceware.org>
7734 Joel Brobecker <brobecker@adacore.com>
7736 * inferiors.c (find_inferior): Add function documentation.
7737 (unloaded_dll): Handle the case where the unloaded dll has not
7738 been previously registered in the dll list.
7740 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7742 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7743 (thumb2_breakpoint): New.
7744 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7746 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7748 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7749 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7752 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7754 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7756 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7758 * linux-s390-low.c (s390_collect_ptrace_register)
7759 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7761 2010-01-21 Doug Evans <dje@google.com>
7763 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7764 (PTRACE_ARG4_TYPE): New macro.
7765 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7766 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7767 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7768 (usr_store_inferior_registers): Ditto.
7769 (linux_read_memory, linux_write_memory): Ditto.
7770 (linux_test_for_tracefork): Ditto.
7772 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7773 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7775 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7777 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7780 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7782 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7783 prototype to take a regcache. Adjust.
7785 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7787 * regcache.h (struct thread_info): Forward declare.
7788 (struct regcache): New.
7789 (new_register_cache): Adjust prototype.
7790 (get_thread_regcache): Declare.
7791 (free_register_cache): Adjust prototype.
7792 (registers_to_string, registers_from_string): Ditto.
7793 (supply_register, supply_register_by_name, collect_register)
7794 (collect_register_as_string, collect_register_by_name): Ditto.
7795 * regcache.c (struct inferior_regcache_data): Delete.
7796 (get_regcache): Rename to ...
7797 (get_thread_regcache): ... this. Adjust. Switch inferior before
7799 (regcache_invalidate_one): Adjust.
7800 (regcache_invalidate): Fix prototype.
7801 (new_register_cache): Return the new register cache.
7802 (free_register_cache): Change prototype.
7803 (realloc_register_cache): Adjust.
7804 (registers_to_string): Change prototype to take a regcache. Adjust.
7805 (registers_from_string): Ditto.
7806 (register_data): Ditto.
7807 (supply_register): Ditto.
7808 (supply_register_by_name): Ditto.
7809 (collect_register): Ditto.
7810 (collect_register_as_string): Ditto.
7811 (collect_register_by_name): Ditto.
7812 * server.c (process_serial_event): Adjust.
7813 * linux-low.h (regset_fill_func, regset_store_func): Change
7815 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7817 * linux-low.c (get_stop_pc): Adjust.
7818 (check_removed_breakpoint): Adjust.
7819 (linux_wait_for_event): Adjust.
7820 (linux_resume_one_lwp): Adjust.
7821 (fetch_register): Add regcache parameter. Adjust.
7822 (usr_store_inferior_registers): Ditto.
7823 (regsets_fetch_inferior_registers): Ditto.
7824 (regsets_store_inferior_registers): Ditto.
7825 (linux_fetch_registers, linux_store_registers): Ditto.
7826 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7828 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7830 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7831 prototype to take a regcache.
7832 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7833 * remote-utils.c (convert_ascii_to_int, outreg)
7834 (prepare_resume_reply): Change prototype to take a regcache.
7836 * target.h (struct target_ops) <fetch_registers, store_registers>:
7837 Change prototype to take a regcache.
7838 (fetch_inferior_registers, store_inferior_registers): Change
7839 prototype to take a regcache. Adjust.
7840 * proc-service.c (ps_lgetregs): Adjust.
7841 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7842 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7843 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7844 take a regcache. Adjust.
7845 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7846 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7847 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7848 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7849 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7850 (cris_cannot_fetch_register):
7851 (cris_breakpoint_at): Change prototype to take a regcache.
7853 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7854 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7855 to take a regcache. Adjust.
7856 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7858 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7859 take a regcache. Adjust.
7860 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7861 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7862 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7863 * linux-mips-low.c (mips_get_pc):
7864 (mips_set_pc): Change prototype to take a regcache. Adjust.
7865 (mips_reinsert_addr): Adjust.
7866 (mips_collect_register): Change prototype to take a regcache.
7868 (mips_supply_register):
7869 (mips_collect_register_32bit, mips_supply_register_32bit)
7870 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7871 (mips_store_fpregset): Ditto.
7872 * linux-ppc-low.c (ppc_supply_ptrace_register)
7873 (ppc_supply_ptrace_register): Ditto.
7874 (parse_spufs_run): Adjust.
7875 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7876 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7877 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7878 take a regcache. Adjust.
7879 * linux-s390-low.c (s390_collect_ptrace_register)
7880 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7881 (s390_set_pc): Change prototype to take a regcache. Adjust.
7882 (s390_arch_setup): Adjust.
7883 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7884 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7885 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7886 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7887 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7889 (sparc_breakpoint_at): Adjust.
7890 * linux-xtensa-low.c (xtensa_fill_gregset):
7891 (xtensa_store_gregset):
7892 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7893 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7894 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7895 prototype to take a regcache. Adjust.
7896 * win32-arm-low.c (arm_fetch_inferior_register)
7897 (arm_store_inferior_register): Change prototype to take a
7899 * win32-i386-low.c (i386_fetch_inferior_register)
7900 (i386_store_inferior_register): Change prototype to take a
7902 * win32-low.c (child_fetch_inferior_registers)
7903 (child_store_inferior_registers): Change prototype to take a
7905 (win32_wait): Adjust.
7906 (win32_fetch_inferior_registers): Change prototype to take a
7908 (win32_store_inferior_registers): Adjust.
7909 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7910 store_inferior_register>: Change prototype to take a regcache.
7912 2010-01-20 Doug Evans <dje@google.com>
7914 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7916 (linux_wait_for_event1, linux_init_signals): Ditto.
7917 (W_STOPCODE): Provide definition if missing.
7919 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7921 * linux-low.c (linux_core_of_thread): New.
7922 (compare_ints, show_process, list_threads): New.
7923 (linux_qxfer_osdata): Report threads and cores.
7924 (linux_target_op): Register linux_core_of_thread.
7925 * remote-utils.c (prepare_resume_reply): Report the core.
7926 (buffer_xml_printf): Support %d specifier.
7927 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7929 (handle_query): Handle qXfer:threads. Announce availability
7931 * target.h (struct target_ops): New field core_of_thread.
7933 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7935 * Makefile.in (clean): Remove new generated files.
7936 (reg-s390.o, reg-s390.c): Remove rules.
7937 (reg-s390x.o, reg-s390x.c): Likewise.
7938 (s390-linux32.o, s390-linux32.c): Add rules.
7939 (s390-linux64.o, s390-linux64.c): Likewise.
7940 (s390x-linux64.o, s390x-linux64.c): Likewise.
7941 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7942 * linux-s390-low.c: Include <elf.h>.
7943 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7944 (init_registers_s390): Remove prototype.
7945 (init_registers_s390x): Likewise.
7946 (init_registers_s390_linux32): Add prototype.
7947 (init_registers_s390_linux64): Likewise.
7948 (init_registers_s390x_linux64): Likewise.
7949 (s390_num_regs_3264): New define.
7950 (s390_regmap_3264): New global variable.
7951 (s390_cannot_fetch_register): Remove obsolete check.
7952 (s390_cannot_store_register): Likewise.
7953 (s390_collect_ptrace_register): Handle upper/lower register halves.
7954 (s390_supply_ptrace_register): Likewise.
7955 (s390_fill_gregset): Update to register number changes.
7956 (s390_get_hwcap): New routine.
7957 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7958 Install appropriate regmap and register set.
7960 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7962 * server.c (gdbserver_version): Update copyright year to 2010.
7963 * gdbreplay.c (gdbreplay_version): Likewise.
7965 2009-12-28 Doug Evans <dje@google.com>
7967 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7968 elf/external.h. Include <elf.h> instead but only if necessary.
7970 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7972 * linux-low.c (linux_remove_process): Remove `detaching'
7973 parameter. Don't release/detach from thread_db here.
7974 (linux_kill): Release/detach from thread_db here, ...
7975 (linux_detach): ... and here, before actually detaching.
7976 (linux_wait_1): ... and here, when a process exits.
7977 * thread-db.c (any_thread_of): New.
7978 (thread_db_free): Switch the current inferior to a thread of the
7981 2009-12-21 Doug Evans <dje@google.com>
7983 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7985 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7986 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7987 warning ifndef __NR_tkill. Move setting of errno there too.
7988 Delete unnecessary resetting of errno after syscall.
7989 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7991 * configure.ac: Check for dladdr.
7992 * config.in: Regenerate.
7993 * configure: Regenerate.
7994 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7995 (try_thread_db_load): Update.
7997 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7999 2009-12-18 Doug Evans <dje@google.com>
8001 * event-loop.c: Include unistd.h if it exists.
8003 * linux-low.c (my_waitpid): Move definition away from being in
8004 between linux_tracefork_child/linux_test_for_tracefork.
8006 * gdb_proc_service.h (psaddr_t): Fix type.
8007 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8008 signature to match glibc.
8010 2009-12-16 Doug Evans <dje@google.com>
8012 * linux-low.c (linux_read_memory): Fix argument to read.
8014 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8016 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8017 events, don't leave current_inferior pointing at null.
8019 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8021 * win32-low.c (LOG): Delete.
8022 (OUTMSG): Output to stderr.
8023 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8024 on compile time LOG macro.
8025 (win32_wait): Fix debug output.
8027 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8029 * win32-low.c (win32_add_one_solib): If the dll name is
8030 "ntdll.dll", prepend the system directory to the dll path.
8032 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8034 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8036 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8037 Vladimir Prus <vladimir@codesourcery.com>
8039 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8040 * configure.ac: Check for __mcoldfire__ and set
8041 gdb_cv_m68k_is_coldfire.
8042 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8043 reg-cf.o and reg-m68k.o.
8044 * configure: Regenerated.
8046 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8048 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8049 Pass it to thread_db_free.
8050 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8051 proper `detaching' argument to linux_remove_process.
8052 * linux-low.h (thread_db_free): Add `detaching' parameter.
8053 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8055 (thread_db_free): Add `detaching' parameter. Only
8056 call td_ta_clear_event if detaching from process.
8058 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8060 * thread-db.c (thread_db_free): Fix typo.
8062 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8065 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8067 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8069 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8070 with an i686 compiler.
8071 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8073 * configure: Rebuilt.
8075 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8079 * server.c (handle_search_memory_1): Correct read_addr initialization
8080 in loop for searching subsequent chunks.
8082 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8084 * configure.ac: New --with-libthread-db option.
8085 * thread-db.c: Allow direct dependence on libthread_db.
8086 (thread_db_free): Adjust.
8087 * config.in: Regenerate.
8088 * configure: Likewise.
8090 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8093 * thread-db.c (attach_thread): New function.
8094 (maybe_attach_thread): Return success/failure.
8095 (find_new_threads_callback): Adjust.
8096 (thread_db_find_new_threads): Loop until no new threads.
8098 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8100 * proc-service.c (ps_lgetregs): Formatting.
8102 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8104 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8105 * configure.ac: Adjust.
8106 * linux-low.h (struct process_info_private): Move members to struct
8108 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8109 * linux-low.c (linux_remove_process): Adjust.
8110 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8111 * server.c (handle_query): Move code ...
8112 (handle_monitor_command): ... here. New function.
8113 * target.h (struct target_ops): New member.
8114 * thread-db.c (struct thread_db): New.
8115 (libthread_db_search_path): New variable.
8116 (thread_db_create_event, thread_db_enable_reporting)
8117 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8118 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8119 (try_thread_db_load_1, dladdr_to_soname): New functions.
8120 (try_thread_db_load, thread_db_load_search): New functions.
8121 (thread_db_init): Search for libthread_db.
8122 (thread_db_free): New function.
8123 (thread_db_handle_monitor_command): Likewise.
8124 * config.in: Regenerate.
8125 * configure: Regenerate.
8127 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8129 * spu-low.c (spu_kill): Wait for inferior to terminate.
8130 Call clear_inferiors.
8131 (spu_detach): Call clear_inferiors.
8133 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8135 * aclocal.m4: Regenerate.
8136 * config.in: Likewise.
8137 * configure: Likewise.
8139 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8141 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8142 (parse_spufs_run): New function.
8143 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8144 (ppc_breakpoint_at): Handle SPU breakpoints.
8146 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8148 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8149 (SPUFS_MAGIC): Define.
8150 (spu_enumerate_spu_ids): New function.
8151 (linux_qxfer_spu): New function.
8152 (linux_target_ops): Install linux_qxfer_spu.
8154 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8156 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8157 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8158 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8159 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8160 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8161 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8162 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8163 (init_registers_powerpc_cell32l): Add prototype.
8164 (init_registers_powerpc_cell64l): Likewise.
8165 (ppc_arch_setup): Detect Cell/B.E. architecture.
8167 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8169 * Makefile.in (datarootdir): New variable.
8171 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8173 * linux-low.c (linux_write_memory): Update debugging output.
8174 * Makefile.in (clean): Add new descriptions.
8175 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8176 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8177 * configure.srv: Add new files for arm*-*-linux*.
8178 * linux-arm-low.c: Add new declarations.
8179 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8180 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8181 (HWCAP_VFPv3D16): New.
8182 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8183 instead of __IWMMXT__.
8184 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8185 (arm_arch_setup): New.
8186 (target_regsets): Remove #ifdef. Add VFP regset.
8187 (the_low_target): Use arm_arch_setup.
8189 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8191 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8192 the main thread again.
8194 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8196 Adding Neutrino gdbserver.
8197 * configure: Regenerated.
8198 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8199 * configure.srv (i[34567]86-*-nto*): New target.
8200 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8201 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8202 (nto_comctrl) [__QNX__]: New function.
8203 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8205 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8207 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8210 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8211 Pedro Alves <pedro@codesourcery.com>
8213 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8214 don't support CONTEXT_EXTENDED_REGISTERS.
8215 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8216 (the_low_target): Install them.
8217 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8218 failing with ERROR_PIPE_NOT_CONNECTED.
8220 2009-06-30 Doug Evans <dje@google.com>
8221 Pierre Muller <muller@ics.u-strasbg.fr>
8223 Add h/w watchpoint support to x86-linux, win32-i386.
8224 * Makefile.in (SFILES): Add i386-low.c
8225 (i386_low_h): Define.
8226 (i386-low.o): Add dependencies.
8227 (linux-x86-low.o): Add i386-low.h dependency.
8228 (win32-i386-low.o): Ditto.
8229 * i386-low.c: New file.
8230 * i386-low.h: New file.
8231 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8232 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8233 * linux-low.c (linux_add_process): Initialize arch_private.
8234 (linux_remove_process): Free arch_private.
8235 (add_lwp): Initialize arch_private.
8236 (delete_lwp): Free arch_private.
8237 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8239 * linux-low.h (process_info_private): New member arch_private.
8240 (lwp_info): New member arch_private.
8241 (linux_target_ops): New members new_process, new_thread,
8243 (ptid_of): New macro.
8244 * linux-x86-low.c: Include stddef.h, i386-low.h.
8245 (arch_process_info): New struct.
8246 (arch_lwp_info): New struct.
8247 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8248 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8249 (i386_dr_low_get_status): New function.
8250 (x86_insert_point, x86_remove_point): New functions.
8251 (x86_stopped_by_watchpoint): New function.
8252 (x86_stopped_data_address): New function.
8253 (x86_linux_new_process, x86_linux_new_thread): New functions.
8254 (x86_linux_prepare_to_resume): New function.
8255 (the_low_target): Add entries for insert_point, remove_point,
8256 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8258 * server.c (debug_hw_points): New global.
8259 (monitor_show_help): Document set debug-hw-points.
8260 (handle_query): Process "set debug-hw-points".
8261 * server.h (debug_hw_points): Declare.
8262 (paddress): Declare.
8263 * utils.c (NUMCELLS, CELLSIZE): New macros.
8264 (get_sell, xsnprintf, paddress): New functions.
8265 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8266 remove_point, stopped_by_watchpoint, stopped_data_address.
8267 * win32-i386-low.c: Include i386-low.h.
8268 (debug_reg_state): Replaces dr.
8269 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8270 (i386_dr_low_get_status): New function.
8271 (i386_insert_point, i386_remove_point): New functions.
8272 (i386_stopped_by_watchpoint): New function.
8273 (i386_stopped_data_address): New function.
8274 (i386_initial_stuff): Update.
8275 (get_thread_context,set_thread_context,i386_thread_added): Update.
8276 (the_low_target): Add entries for insert_point,
8277 remove_point, stopped_by_watchpoint, stopped_data_address.
8278 * win32-low.c (win32_insert_watchpoint): New function.
8279 (win32_remove_watchpoint): New function.
8280 (win32_stopped_by_watchpoint): New function.
8281 (win32_stopped_data_address): New function.
8282 (win32_target_ops): Add entries for insert_watchpoint,
8283 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8284 * win32-low.h (win32_target_ops): New members insert_point,
8285 remove_point, stopped_by_watchpoint, stopped_data_address.
8287 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8289 * server.c (process_serial_event): Re-return unsupported, not
8290 error, if the type isn't recognized. Re-allow supporting only
8291 insert or remove packets. Also call require_running for
8292 breakpoints. Add missing break statement to default case. Tidy.
8293 * target.h (struct target_ops): Rename insert_watchpoint to
8294 insert_point, and remove_watchpoint to remove_point.
8296 * linux-low.h (struct linux_target_ops): Likewise.
8297 * linux-low.c (linux_insert_watchpoint): Rename to ...
8298 (linux_insert_point): ... this. Adjust.
8299 (linux_remove_watchpoint): Rename to ...
8300 (linux_remove_point): ... this. Adjust.
8301 (linux_target_ops): Adjust.
8302 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8303 (cris_insert_point): ... this.
8304 (cris_remove_watchpoint): Rename to ...
8305 (cris_remove_point): ... this.
8306 (the_low_target): Adjust.
8308 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8310 * server.c (handle_v_kill): Pass signal_pid to
8311 kill_inferior if multi_process is zero.
8313 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8315 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8316 * target.h (target_ops): Comment for *_watchpoint to make it clear
8317 the functions can get types '0' and '1'.
8319 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8321 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8322 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8323 * regcache.c (get_regcache): Likewise.
8324 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8325 * win32-low.c (child_fetch_inferior_registers): Remove check for
8328 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8329 Pedro Alves <pedro@codesourcery.com>
8331 * target.h (struct target_ops) <supports_multi_process>: New
8333 (target_supports_multi_process): New.
8334 * server.c (handle_query): Even if GDB reports support, only
8335 enable multi-process if the target also supports it. Report
8336 multi-process support only if the target backend supports it.
8337 * linux-low.c (linux_supports_multi_process): New function.
8338 (linux_target_ops): Install it as target_supports_multi_process
8341 2009-05-24 Doug Evans <dje@google.com>
8343 Global renaming of find_thread_pid to find_thread_ptid.
8344 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8345 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8346 All callers updated.
8348 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8349 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8352 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8353 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8354 (linux_resume_one_lwp): Ditto.
8356 2009-05-23 Doug Evans <dje@google.com>
8358 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8359 from struct inferior_list_entry * to struct lwp_info *.
8360 All callers updated.
8362 2009-05-13 Doug Evans <dje@google.com>
8364 * linux-x86-low.c: Don't include assert.h.
8365 (x86_siginfo_fixup): Use fatal, not assert.
8366 (x86_arch_setup): Fix comment.
8368 2009-05-12 Doug Evans <dje@google.com>
8370 Biarch support for i386/amd64 gdbserver.
8371 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8372 Add linux-x86-low.c.
8373 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8374 (linux-x86-low.o): Add.
8375 * linux-x86-64-low.c: Delete.
8376 * linux-i386-low.c: Delete.
8377 * linux-x86-low.c: New file.
8378 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8380 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8382 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8383 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8384 (linux_child_pid_to_exec_file): New function.
8385 (elf_64_header_p, elf_64_file_p): New functions.
8386 (siginfo_fixup): New function.
8387 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8388 give target a chance to convert layout.
8389 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8390 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8392 2009-05-07 Doug Evans <dje@google.com>
8394 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8395 (regsets_store_inferior_registers): Ditto.
8397 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8401 * linux-low.c (must_set_ptrace_flags): Delete.
8402 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8404 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8405 `lwp->must_set_ptrace_flags' instead.
8406 (linux_wait_for_event_1): Set ptrace options here.
8407 (linux_wait_1): ... not here.
8409 2009-04-30 Doug Evans <dje@google.com>
8411 * inferiors.c (started_inferior_callback): New function.
8412 (attached_inferior_callback): New function.
8413 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8414 * server.c (print_started_pid, print_attached_pid): New functions.
8415 (detach_or_kill_for_exit): New function.
8416 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8417 * server.h (have_started_inferiors_p): Declare.
8418 (have_attached_inferiors_p): Declare.
8420 * inferiors.c (remove_process): Fix memory leak, free process.
8421 * linux-low.c (linux_remove_process): New function.
8422 (linux_kill): Call it instead of remove_process.
8423 (linux_detach, linux_wait_1): Ditto.
8425 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8427 * configure.srv: Add x86 Windows CE target.
8429 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8431 * inferiors.c (get_thread_process): Make global.
8432 * server.h (get_thread_process): Add prototype.
8433 * thread-db.c (find_one_thread): Use get_thread_process
8434 instead of current_process.
8435 (thread_db_get_tls_address): Do not crash if called when
8436 thread layer is not yet initialized.
8438 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8440 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8441 * spu-low.c (current_tid): Rename to ...
8442 (current_ptid): ... this.
8443 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8444 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8445 ptid_get_lwp (current_ptid) instead of current_tid.
8446 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8447 instead of current_tid. Use find_process_pid to verify pid
8448 argument is valid. Pass proper argument to remove_process.
8449 (spu_thread_alive): Compare current_ptid instead of current_tid.
8450 (spu_resume): Likewise.
8452 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8454 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8457 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8459 Implement the multiprocess extensions, and add linux multiprocess
8462 * server.h (ULONGEST): Declare.
8463 (struct ptid, ptid_t): New.
8464 (minus_one_ptid, null_ptid): Declare.
8465 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8466 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8467 (struct inferior_list_entry): Change `id' type from unsigned from
8469 (struct sym_cache, struct breakpoint, struct
8470 process_info_private): Forward declare.
8471 (struct process_info): Declare.
8472 (current_process): Declare.
8473 (all_processes): Declare.
8474 (initialize_inferiors): Declare.
8475 (add_thread): Adjust to use ptid_t.
8476 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8477 (add_process, remove_process, find_thread_pid): Declare.
8478 (find_inferior_id): Adjust to use ptid_t.
8479 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8480 (multi_process): Declare.
8481 (push_event): Adjust to use ptid_t.
8482 (read_ptid, write_ptid): Declare.
8483 (prepare_resume_reply): Adjust to use ptid_t.
8484 (clear_symbol_cache): Declare.
8485 * inferiors.c (all_processes): New.
8486 (null_ptid, minus_one_ptid): New.
8487 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8488 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8489 (add_thread): Change unsigned long to ptid. Remove gdb_id
8491 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8492 (gdb_id_to_thread): Rename to ...
8493 (find_thread_pid): ... this. Change unsigned long to ptid.
8494 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8495 (loaded_dll, pull_pid_from_list): Adjust.
8496 (add_process, remove_process, find_process_pid)
8497 (get_thread_process, current_process, initialize_inferiors): New.
8498 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8499 (struct target_waitstatus) <related_pid>: Ditto.
8500 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8502 (struct target_ops) <join>: Add `pid' argument.
8503 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8504 (struct target_ops) <wait>: Add `ptid' field. Change return type
8506 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8507 (mywait): Add `ptid' argument. Change return type to ptid_t.
8508 (target_pid_to_str): Declare.
8509 * target.c (set_desired_inferior): Adjust to use ptids.
8510 (mywait): Add new `ptid' argument. Adjust.
8511 (target_pid_to_str): New.
8512 * mem-break.h (free_all_breakpoints): Declare.
8513 * mem-break.c (breakpoints): Delelete.
8514 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8515 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8516 to use per-process breakpoint list.
8517 (free_all_breakpoints): New.
8518 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8519 (symbol_cache, all_symbols_looked_up): Delete.
8521 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8523 (prepare_resume_reply): Change ptid argument's type from unsigned
8524 long to ptid_t. Adjust. Implement W;process and X;process.
8525 (free_sym_cache, clear_symbol_cache): New.
8526 (look_up_one_symbol): Adjust to per-process symbol cache. *
8527 * server.c (cont_thread, general_thread, step_thread): Change type
8530 (multi_process): New.
8531 (last_ptid): Change type to ptid_t.
8532 (struct vstop_notif) <ptid>: Change type to ptid_t.
8533 (queue_stop_reply, push_event): Change `ptid' argument's type to
8535 (discard_queued_stop_replies): Add `pid' argument.
8536 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8537 changes. Don't reference the `attached' global.
8538 (attach_inferior): Adjust to mywait interface changes.
8539 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8540 features. Handle and report "multiprocess+". Handle
8542 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8544 (handle_v_kill): New.
8545 (handle_v_stopped): Adjust to use target_pid_to_str.
8546 (handle_v_requests): Allow multiple attaches and runs when
8547 multiprocess extensions are in effect. Handle "vKill".
8548 (myresume): Adjust to use ptids.
8549 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8550 (handle_status): Adjust to discard_queued_stop_replies interface
8552 (first_thread_of, kill_inferior_callback)
8553 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8554 (main): Call initialize_inferiors. Adjust to use ptids, killing
8555 and detaching from all inferiors. Handle multiprocess packet
8557 * linux-low.h: Include gdb_proc_service.h.
8558 (struct process_info_private): New.
8559 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8560 <lwpid_of>: Use ptid_get_lwp.
8561 (get_lwp_thread): Adjust.
8562 (struct lwp_info): Add `dead' member.
8563 (find_lwp_pid): Declare.
8564 * linux-low.c (thread_db_active): Delete.
8565 (new_inferior): Adjust comment.
8566 (inferior_pid): Delete.
8567 (linux_add_process): New.
8568 (handle_extended_wait): Adjust.
8569 (add_lwp): Change unsigned long to ptid.
8570 (linux_create_inferior): Add process to processes table. Adjust
8571 to use ptids. Don't set new_inferior here.
8572 (linux_attach_lwp): Rename to ...
8573 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8574 it. Adjust to use ptids.
8575 (linux_attach_lwp): New.
8576 (linux_attach): Add process to processes table. Don't set
8578 (struct counter): New.
8579 (second_thread_of_pid_p, last_thread_of_process_p): New.
8580 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8582 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8583 processes. Remove process from process table.
8584 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8585 to multiple processes.
8586 (any_thread_of): New.
8587 (linux_detach): Add `pid' argument, and handle it. Remove process
8588 from processes table.
8589 (linux_join): Add `pid' argument. Handle it.
8590 (linux_thread_alive): Change unsighed long argument to ptid_t.
8591 Consider dead lwps as not being alive.
8592 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8593 threads we're not interested in.
8594 (same_lwp, find_lwp_pid): New.
8595 (linux_wait_for_lwp): Change `pid' argument's type from int to
8597 (linux_wait_for_event): Rename to ...
8598 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8599 from int to ptid_t. Adjust.
8600 (linux_wait_for_event): New.
8601 (linux_wait_1): Add `ptid' argument. Change return type to
8602 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8603 that exit from the process table.
8604 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8606 (mark_lwp_dead): New.
8607 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8608 stopping all threads, mark its main lwp as dead.
8609 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8611 (fetch_register, usr_store_inferior_registers)
8612 (regsets_fetch_inferior_registers)
8613 (regsets_store_inferior_registers, linux_read_memory)
8614 (linux_write_memory): Inline `inferior_pid'.
8615 (linux_look_up_symbols): Adjust to use per-process
8617 (linux_request_interrupt): Adjust to use ptids.
8618 (linux_read_auxv): Inline `inferior_pid'.
8619 (initialize_low): Don't reference thread_db_active.
8620 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8621 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8622 (ps_getpid): Return the pid of the current inferior.
8623 * thread-db.c (proc_handle, thread_agent): Delete.
8624 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8626 (find_one_thread): Change argument type to ptid_t. Adjust to
8628 (maybe_attach_thread): Adjust to per-process data and ptids.
8629 (thread_db_find_new_threads): Ditto.
8630 (thread_db_init): Ditto.
8631 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8632 processes table. Adjust to use ptids.
8633 (spu_kill, spu_detach): Adjust interface. Remove process from
8635 (spu_join, spu_thread_alive): Adjust interface.
8636 (spu_wait): Adjust interface. Remove process from processes
8637 table. Adjust to use ptids.
8638 * win32-low.c (current_inferior_tid): Delete.
8639 (current_inferior_ptid): New.
8640 (debug_event_ptid): New.
8641 (thread_rec): Take a ptid. Adjust.
8642 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8643 (child_delete_thread): Ditto.
8644 (do_initial_child_stuff): Add `attached' argument. Add process to
8646 (child_fetch_inferior_registers, child_store_inferior_registers):
8648 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8649 (win32_attach): Pass 1 to do_initial_child_stuff.
8650 (win32_kill): Adjust interface. Remove process from processes
8652 (win32_detach): Ditto.
8653 (win32_join): Adjust interface.
8654 (win32_thread_alive): Take a ptid.
8655 (win32_resume): Adjust to use ptids.
8656 (get_child_debug_event): Ditto.
8657 (win32_wait): Adjust interface. Remove exiting process from
8660 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8662 Non-stop mode support.
8664 * server.h (non_stop): Declare.
8665 (gdb_client_data, handler_func): Declare.
8666 (delete_file_handler, add_file_handler, start_event_loop):
8668 (handle_serial_event, handle_target_event, push_event)
8669 (putpkt_notif): Declare.
8670 * target.h (enum resume_kind): New.
8671 (struct thread_resume): Replace `step' field by `kind' field.
8672 (TARGET_WNOHANG): Define.
8673 (struct target_ops) <wait>: Add `options' argument.
8674 <supports_non_stop, async, start_non_stop>: New fields.
8675 (target_supports_non_stop, target_async): New.
8676 (start_non_stop): Declare.
8677 (mywait): Add `options' argument.
8678 * target.c (mywait): Add `options' argument. Print child exit
8680 (start_non_stop): New.
8681 * server.c (non_stop, own_buf, mem_buf): New globals.
8682 (struct vstop_notif): New.
8683 (notif_queue): New global.
8684 (queue_stop_reply, push_event, discard_queued_stop_replies)
8685 (send_next_stop_reply): New.
8686 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8688 (attach_inferior): In non-stop mode, don't wait for the target
8690 (handle_general_set): Handle QNonStop.
8691 (handle_query): When handling qC, return the current general
8692 thread, instead of the first thread of the list.
8693 (handle_query): If the backend supports non-stop mode, include
8694 QNonStop+ in the qSupported query response.
8695 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8697 (handle_v_attach, handle_v_run): Handle non-stop mode.
8698 (handle_v_stopped): New.
8699 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8700 (myresume): Adjust to use resume_kind. Handle non-stop.
8701 (queue_stop_reply_callback): New.
8702 (handle_status): Handle non-stop mode.
8703 (main): Clear non_stop flag on reconnection. Use the event-loop.
8704 Refactor serial protocol handling from here ...
8705 (process_serial_event): ... to this new function. When GDB
8706 selects any thread, select one here. In non-stop mode, wait until
8707 GDB acks all pending events before exiting.
8708 (handle_serial_event, handle_target_event): New.
8709 * remote-utils.c (remote_open): Install remote_desc in the event
8711 (remote_close): Remove remote_desc from the event loop.
8712 (putpkt_binary): Rename to...
8713 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8714 (putpkt_binary): New as wrapper around putpkt_binary_1.
8715 (putpkt_notif): New.
8716 (prepare_resume_reply): In non-stop mode, don't change the
8718 * event-loop.c: New.
8719 * Makefile.in (OBJ): Add event-loop.o.
8720 (event-loop.o): New rule.
8722 * linux-low.h (pid_of): Moved here.
8724 (get_lwp_thread): Use lwpid_of.
8725 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8726 * linux-low.c (pid_of): Delete.
8727 (inferior_pid): Use lwpid_of.
8728 (linux_event_pipe): New.
8729 (target_is_async_p): New.
8731 (handle_extended_wait): Use lwpid_of.
8732 (add_lwp): Don't set lwpid field.
8733 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8734 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8735 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8736 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8737 first. Adjust to linux_wait_for_event interface changes. Use
8739 (linux_detach): Don't delete the main lwp here.
8740 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8741 (status_pending_p): Don't consider explicitly suspended lwps.
8742 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8743 pointer. Add OPTIONS argument. Change return type to int. Use
8744 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8745 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8746 pointer. Add status pointer argument. Return a pid instead of a
8747 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8748 changes. In non-stop mode, don't switch to a random thread.
8749 (linux_wait): Rename to...
8750 (linux_wait_1): ... this. Add target_options argument, and handle
8751 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8752 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8753 clean exit and signal exit code. Don't stop all threads in
8754 non-stop mode. In all-stop mode, only stop all threads when
8755 reporting a stop to GDB. Handle explicit thread stop requests.
8756 (async_file_flush, async_file_mark): New.
8758 (send_sigstop): Use lwpid_of.
8759 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8760 interface changes. In non-stop mode, don't switch to a random
8762 (linux_resume_one_lwp): Use lwpid_of.
8763 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8764 (linux_resume_one_thread): ... this. Handle resume_stop. In
8765 non-stop mode, don't look for pending flag in all threads.
8766 (resume_status_pending_p): Don't consider explicitly suspended
8768 (my_waitpid): Reimplement. Emulate __WALL.
8769 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8771 (sigchld_handler, linux_supports_non_stop, linux_async)
8772 (linux_start_non_stop): New.
8773 (linux_target_ops): Register linux_supports_non_stop, linux_async
8774 and linux_start_non_stop.
8775 (initialize_low): Install SIGCHLD handler.
8776 * thread-db.c (thread_db_create_event, find_one_thread)
8777 (thread_db_get_tls_address): Use lwpid_of.
8778 * win32-low.c (win32_detach): Adjust to use resume_kind.
8779 (win32_wait): Add `options' argument.
8780 * spu-low.c (spu_resume): Adjust to use resume_kind.
8781 (spu_wait): Add `options' argument.
8783 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8785 Decouple target code from remote protocol.
8787 * target.h (enum target_waitkind): New.
8788 (struct target_waitstatus): New.
8789 (struct target_ops) <wait>: Return an unsigned long. Take a
8790 target_waitstatus pointer instead of a char pointer.
8792 * target.c (mywait): Change prototype to return an unsigned long.
8793 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8794 * server.h (thread_from_wait, old_thread_from_wait): Delete
8796 (prepare_resume_reply): Change prototype to take a
8798 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8799 (last_status, last_ptid): New.
8800 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8801 pid instead of a signal.
8802 (attach_inferior): Remove "status" and "signal" parameters.
8804 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8806 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8807 (handle_v_requests, myresume): Remove "status" and "signal"
8809 (handle_status): New.
8810 (main): Delete local `status'. Adjust.
8811 * remote-utils.c: Include target.h.
8812 (prepare_resume_reply): Change prototype to take a
8813 target_waitstatus. Adjust.
8815 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8817 * spu-low.c (spu_wait): Adjust.
8818 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8820 (win32_wait): Adjust.
8822 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8824 * target.h (struct thread_resume): Delete leave_stopped member.
8825 (struct target_ops): Add a `n' argument to the `resume' callback.
8826 * server.c (start_inferior): Adjust.
8827 (handle_v_cont, myresume): Adjust.
8828 * linux-low.c (check_removed_breakpoint): Adjust to resume
8829 interface change, and to removed leave_stopped field.
8830 (resume_ptr): Delete.
8831 (struct thread_resume_array): New.
8832 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8833 resume interface change.
8834 (linux_continue_one_thread, linux_queue_one_thread)
8835 (resume_status_pending_p): Check if the resume field is NULL
8836 instead of checking the leave_stopped member.
8837 (linux_resume): Adjust to the target resume interface change.
8838 * spu-low.c (spu_resume): Adjust to the target resume interface
8840 * win32-low.c (win32_detach, win32_resume): Ditto.
8842 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8844 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8846 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8848 (linux_continue_one_thread): Only preserve the stepping flag if
8849 there's a pending breakpoint.
8851 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8853 * server.c (main): After the inferior having exited, call
8854 remote_close before exiting gdbserver.
8856 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8858 Fix size of FPSCR in Power 7 processors.
8859 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8860 (PPC_FEATURE_HAS_DFP): New #define.
8861 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8864 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8866 * server.c (handle_query) Whitespace and formatting.
8868 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8870 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8871 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8872 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8873 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8874 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8875 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8876 Makefile.in, configure.ac: Fix whitespace throughout.
8877 * configure: Regenerate.
8879 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8881 * inferiors.c (find_inferior): Make it safe for the callback
8882 function to delete the currently iterated inferior.
8884 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8886 * Makefile.in (linuw_low_h): Move higher.
8887 (thread-db.o): Depend on $(linux_low_h).
8889 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8891 Rename "process" to "lwp" throughout.
8893 * linux-low.c (all_processes): Rename to...
8894 (all_lwps): ... this.
8895 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8896 (add_process): Rename to ...
8897 (add_lwp): ... this. Adjust.
8898 (linux_create_inferior): Adjust.
8899 (linux_attach_lwp): Adjust.
8900 (linux_attach): Adjust.
8901 (linux_kill_one_process): Rename to ...
8902 (linux_kill_one_lwp): ... this. Adjust.
8903 (linux_kill): Adjust.
8904 (linux_detach_one_process): Rename to ...
8905 (linux_detach_one_lwp): ... this. Adjust.
8906 (linux_detach): Adjust.
8907 (check_removed_breakpoint): Adjust.
8908 (status_pending_p): Adjust.
8909 (linux_wait_for_process): Rename to ...
8910 (linux_wait_for_lwp): ... this. Adjust.
8911 (linux_wait_for_event): Adjust.
8912 (send_sigstop): Adjust.
8913 (wait_for_sigstop): Adjust.
8914 (stop_all_processes): Rename to ...
8915 (stop_all_lwps): ... this.
8916 (linux_resume_one_process): Rename to ...
8917 (linux_resume_one_lwp): ... this. Adjust.
8918 (linux_set_resume_request, linux_continue_one_thread)
8919 (linux_queue_one_thread, resume_status_pending_p)
8920 (usr_store_inferior_registers, regsets_store_inferior_registers)
8921 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8923 * linux-low.h (get_process): Rename to ...
8924 (get_lwp): ... this. Adjust.
8925 (get_thread_process): Rename to ...
8926 (get_thread_lwp): ... this. Adjust.
8927 (get_process_thread): Rename to ...
8928 (get_lwp_thread): ... this. Adjust.
8929 (struct process_info): Rename to ...
8930 (struct lwp_info): ... this.
8931 (all_processes): Rename to ...
8932 (all_lwps): ... this.
8933 * proc-service.c (ps_lgetregs): Adjust.
8934 * thread-db.c (thread_db_create_event, find_one_thread)
8935 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8937 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8939 * server.c (handle_query): Handle "qAttached".
8941 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8943 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8944 GPLv3, update license URL.
8946 2009-03-01 Doug Evans <dje@google.com>
8948 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8949 (server_h): Add gdb_signals.h.
8950 (signals.o): Update.
8951 * server.h (target_signal_from_host,target_signal_to_host_p)
8952 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8954 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8956 * remote-utils.c (getpkt): Also generate remote-debug
8957 information if noack_mode is set.
8959 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8961 * server.c (handle_query): Report qXfer:siginfo:read and
8962 qXfer:siginfo:write as supported and handle them.
8963 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8964 * linux-low.c (linux_xfer_siginfo): New.
8965 (linux_target_ops): Set it.
8967 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8969 * server.c (gdbserver_usage): Mention --remote-debug.
8970 (main): Accept '--remote-debug' switch.
8972 2009-01-18 Doug Evans <dje@google.com>
8974 * regcache.c (new_register_cache): No need to check result of xcalloc.
8975 * server.c (handle_search_memory): Back out calls to xmalloc,
8976 result is checked and error is returned to user upon failure.
8977 (handle_query): Ditto. Add more checks for result of malloc.
8978 (handle_v_cont): Check result of malloc, report error back to
8980 (handle_v_run): Ditto. Call freeargv.
8981 * server.h (freeargv): Declare.
8982 * utils.c (freeargv): New fn.
8984 2009-01-15 Doug Evans <dje@google.com>
8986 * gdbreplay.c (perror_with_name): Make arg const char *.
8987 * server.h (target_signal_to_name): Make return type const char *.
8988 * thread-db.c (thread_db_err_str): Make return type const char *.
8989 * utils.c (perror_with_name): Make arg const char *.
8991 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8993 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8994 when handling a EXIT_PROCESS_DEBUG_EVENT.
8996 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8998 * gdbreplay.c (gdbreplay_version): Update copyright year.
8999 * server.c (gdbserver_version): Likewise.
9001 2009-01-05 Doug Evans <dje@google.com>
9003 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9004 (handle_extended_wait): Improve comment.
9006 2008-12-13 Doug Evans <dje@google.com>
9008 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9009 * server.h (ATTR_MALLOC): New macro.
9010 (xmalloc,xcalloc,xstrdup): Declare.
9011 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9012 * inferiors.c: Ditto.
9013 * linux-low.c: Ditto.
9014 * mem-break.c: Ditto.
9015 * regcache.c: Ditto.
9016 * remote-utils.c: Ditto.
9019 * win32-low.c: Ditto.
9021 2008-12-12 Doug Evans <dje@google.com>
9023 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9024 in debugging printf.
9026 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9028 2008-12-09 Doug Evans <dje@google.com>
9030 * linux-low.h (struct process_info): Delete member tid, unused.
9031 * thread-db.c (find_one_thread): Update.
9032 (maybe_attach_thread): Update.
9034 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9036 * target.h (struct target_ops): Add qxfer_osdata member.
9037 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9039 (linux_qxfer_osdata): New functions.
9040 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9042 * server.c (handle_query): Handle "qXfer:osdata:read:".
9043 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9044 (buffer_xml_printf): New functions.
9045 * server.h (struct buffer): New.
9046 (buffer_grow_str, buffer_grow_str0): New macros.
9047 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9048 (buffer_xml_printf): Declare.
9050 2008-11-24 Doug Evans <dje@google.com>
9052 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9054 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9056 * server.c (handle_v_run): Always use the supplied argument list.
9058 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9060 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9061 (xtensa_regmap_table): Add entry for scompare1.
9063 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9065 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9066 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9067 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9068 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9069 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9070 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9071 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9072 XML target descriptions.
9073 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9074 when inferior is running on an ISA 2.05 or later processor. Add
9075 special case to return offset for full 64-bit slot of FPSCR when
9078 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9080 * Makefile.in (SFILES, clean): Added sparc64 files.
9081 (reg-sparc64.o, reg-sparc64.c): New.
9082 * configure.srv (sparc*-*-linux*): New configuration.
9083 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9084 syscall arguments for SPARC.
9085 (regsets_store_inferior_registers): Likewise.
9086 * linux-sparc-low.c: New file.
9088 2008-10-21 Doug Evans <dje@google.com>
9090 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9091 (READLINE_DIR,READLINE_DEP): Delete.
9092 (INTERNAL_CFLAGS): Update.
9093 (LINTFLAGS): Update.
9095 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9097 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9098 whole argv from the last run, not just argv[0].
9100 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9102 * regcache.c (new_register_cache): Return NULL if the register
9103 cache size isn't known yet.
9104 (free_register_cache): Avoid dereferencing a NULL regcache.
9106 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9108 * configure.srv: Merge MIPS and MIPS64.
9110 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9112 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9114 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9116 * Makefile.in: Add required vsx dependencies.
9118 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9119 Declare init_registers_powerpc_vsx32l.
9120 Declare init_registers_powerpc_vsx64l.
9121 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9122 (ppc_arch_setup): Check for VSX in hwcap.
9123 (ppc_fill_vsxregset): New function.
9124 (ppc_store_vsxregset): New function.
9125 Add new VSX entry in regset_info target_regsets.
9127 * configure.srv: Add new VSX dependencies.
9129 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9131 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9132 (remote_open): Set or clear transport_is_reliable.
9133 (putpkt_binary): Don't expect acks in noack mode.
9134 (getpkt): Don't send ack/nac in noack mode.
9135 * server.c (handle_general_set): Handle QStartNoAckMode.
9136 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9138 (main): Reset noack_mode on every connection.
9139 * server.h (noack_mode): Declare.
9141 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9143 * Makefile.in (GDBREPLAY_OBS): New variable.
9144 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9146 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9147 Daniel Jacobowitz <dan@codesourcery.com>
9149 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9150 (usr_store_inferior_registers): Likewise.
9151 (regsets_store_inferior_registers): Likewise.
9153 2008-07-31 Rolf Jansen <rj@surtec.com>
9154 Pedro Alves <pedro@codesourcery.com>
9156 * configure.ac: Check for memmem declaration.
9157 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9158 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9159 (disable_packet_qfThreadInfo): Unconditionally compile.
9160 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9161 * configure, config.in: Regenerate.
9163 2008-07-28 Doug Kwan <dougkwan@google.com>
9165 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9166 (linux_write_memory): Remove declaration of errno.
9168 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9170 * linux-low.c (handle_extended_wait): Do not use "status"
9171 variable uninitialized.
9173 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9175 * server.c (handle_v_attach): Inhibit reporting dll changes.
9177 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9179 * remote-utils.c (prepare_resume_reply): If requested, don't
9180 output "thread:TID" in the T stop reply.
9182 * server.c (disable_packet_vCont, disable_packet_Tthread)
9183 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9184 (handle_query): If requested, disable support for qC, qfThreadInfo
9186 (handle_v_requests): If requested, disable support for vCont.
9187 (gdbserver_show_disableable): New.
9188 (main): Handle --disable-packet and --disable-packet=LIST.
9190 * server.h (disable_packet_vCont, disable_packet_Tthread)
9191 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9193 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9195 * server.c (gdbserver_usage): Mention --version.
9197 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9199 * Makefile.in (gdbreplay.o): New rule.
9201 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9203 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9204 message, not gdbserver.
9206 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9207 Nathan Sidwell <nathan@codesourcery.com>
9208 Joseph Myers <joseph@codesourcery.com>
9210 * acinclude.m4: Include ../../config/acx.m4.
9211 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9212 * configure, config.in: Regenerate.
9213 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9214 * server.c (gdbserver_version): Print PKGVERSION.
9215 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9216 (main): Adjust gdbserver_usage calls.
9217 * gdbreplay.c (version, host_name): Add declarations.
9218 (gdbreplay_version, gdbreplay_usage): New.
9219 (main): Accept --version and --help options.
9221 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9223 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9224 (arm_breakpoint_at): Handle Thumb.
9225 (the_low_target): Add comment.
9227 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9229 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9231 2008-05-09 Doug Evans <dje@google.com>
9233 * server.h (decode_search_memory_packet): Declare.
9234 * remote-utils.c (decode_search_memory_packet): New fn.
9235 * server.c (handle_search_memory_1): New fn.
9236 (handle_search_memory): New fn.
9237 (handle_query): Process qSearch:memory packets.
9239 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9241 * regcache.c (registers_length): Remove.
9242 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9243 full register packet.
9244 * regcache.h (registers_length): Remove prototype.
9245 * server.h (PBUFSIZ): Define to 16384.
9247 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9249 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9250 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9251 powerpc-64l.o, and powerpc-altivec64l.o.
9252 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9253 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9254 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9255 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9256 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9259 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9260 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9261 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9262 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9263 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9264 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9265 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9266 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9267 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9268 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9271 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9272 (init_registers_powerpc_32l): ... this new prototype.
9273 (init_registers_powerpc_32): Remove, replace by ...
9274 (init_registers_powerpc_altivec32l): ... this new prototype.
9275 (init_registers_powerpc_e500): Remove, replace by ...
9276 (init_registers_powerpc_e500l): ... this new prototype.
9277 (init_registers_ppc64): Remove, replace by ...
9278 (init_registers_powerpc_64l): ... this new prototype.
9279 (init_registers_powerpc_64): Remove, replace by ...
9280 (init_registers_powerpc_altivec64l): ... this new prototype.
9281 (ppc_num_regs): Set to 73.
9282 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9283 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9284 (ppc_cannot_store_register): Handle orig_r3 and trap.
9285 (ppc_arch_setup): Update init_registers_... calls.
9286 (ppc_fill_gregset): Handle orig_r3 and trap.
9288 * inferiors.c (clear_inferiors): Reset current_inferior.
9290 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9292 * acinclude.m4: Add override.m4.
9293 * configure: Regenerate.
9295 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9297 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9298 initial call to init_register_ppc64.
9300 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9302 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9303 single powerpc*-*-linux* case.
9304 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9306 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9308 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9309 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9311 * linux-ppc-low.c: Include <elf.h>.
9312 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9313 (ppc_hwcap): New global variable.
9314 (ppc_regmap): Remove __SPE__ #ifdef sections.
9315 (ppc_regmap_e500): New global variable.
9316 (ppc_cannot_store_register): Update __SPE__ special case.
9317 (ppc_get_hwcap): New function.
9318 (ppc_arch_setup): Use it to determine whether inferior supports
9319 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9320 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9321 Do not access registers if target does not support AltiVec.
9322 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9323 Do not access registers if target does not support SPE.
9324 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9326 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9328 * linux-low.c (disabled_regsets, num_regsets): New.
9329 (use_regsets_p): Delete.
9330 (linux_wait_for_process): Clear disabled_regsets.
9331 (regsets_fetch_inferior_registers): Check and set it.
9332 (regsets_store_inferior_registers): Likewise.
9333 (linux_fetch_registers, linux_store_registers): Do not use
9335 (initialize_low): Allocate disabled_regsets.
9337 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9339 * Makefile.in (LIBOBJS): New.
9341 (memmem.o): New rule.
9342 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9343 * configure: Regenerated.
9345 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9347 * server.c (handle_query): Never return "unsupported" for
9348 qXfer:features:read queries.
9350 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9352 * server.c (get_features_xml): Fix inverted condition.
9353 (handle_query): Always support qXfer:feature:read.
9355 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9357 * server.c (wrapper_argv): New.
9358 (start_inferior): Handle wrapper_argv. If set, expect an extra
9360 (gdbserver_usage): Document --wrapper.
9361 (main): Parse --wrapper.
9363 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9365 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9366 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9367 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9368 (ppc_set_pc): Likewise.
9369 (ppc_arch_setup): New function.
9370 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9371 of collect_register.
9372 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9374 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9376 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9377 instead of linux-ppc64-low.o.
9378 * linux-ppc64-low.c: Remove file.
9379 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9380 (linux-ppc64-low.o): Remove rule.
9382 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9383 (init_registers_powerpc_64): Likewise.
9384 (ppc_regmap): Conditionally define depending on __powerpc64__.
9385 (ppc_cannot_store_register): Do not special-case "fpscr" when
9386 compiled on __powerpc64__.
9387 (ppc_collect_ptrace_register): New function.
9388 (ppc_supply_ptrace_register): New function.
9389 (ppc_breakpoint): Change type to "unsigned int".
9390 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9391 (the_low_target): Conditionally provide initializers for the
9392 arch_setup member depending on __powerpc64__. Install
9393 collect_ptrace_register and supply_ptrace_register members.
9395 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9397 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9398 * server.c (gdbserver_xmltarget): Define.
9399 (get_features_xml): Use it to replace "target.xml" and arch_string.
9401 * configure.srv: Remove srv_xmltarget. Add XML files that were
9402 mentioned there to srv_xmlfiles instead. Remove conditional tests
9403 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9404 srv_xmlfiles and srv_regobj to include all possible choices.
9405 * configure.ac (srv_xmltarget): Remove.
9406 (srv_xmlfiles): Do not add "target.xml".
9407 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9408 checks for supplementary target information.
9409 * configure: Regenerate.
9410 * Makefile.in (XML_TARGET): Remove.
9411 (target.xml): Remove rule.
9412 (clean): Do not clean up target.xml.
9413 (.PRECIOUS): Do not mention target.xml.
9415 * target.h (struct target_ops): Remove arch_string member.
9416 * linux-low.c (linux_arch_string): Remove.
9417 (linux_target_ops): Remove arch_string initializer.
9418 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9419 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9420 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9421 * spu-low.c (spu_arch_string): Remove.
9422 (spu_target_ops): Remove arch_string initializer.
9423 * win32-low.c (win32_arch_string): Remove.
9424 (win32_target_ops): Remove arch_string initializer.
9425 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9426 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9427 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9429 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9431 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9432 by collect_ptrace_register and supply_ptrace_register hooks.
9433 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9434 instead of checking for the_low_target.left_pad_xfer.
9435 (usr_store_inferior_registers): Use collect_ptrace_register callback
9436 instead of checking for the_low_target.left_pad_xfer.
9438 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9439 (s390_supply_ptrace_register): Likewise.
9440 (s390_fill_gregset): Call s390_collect_ptrace_register.
9441 (the_low_target): Update.
9443 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9444 (ppc_supply_ptrace_register): Likewise.
9445 (the_low_target): Update.
9447 * linux-i386-low.c (the_low_target): Update.
9448 * linux-x86-64-low.c (the_low_target): Update.
9450 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9452 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9453 reg-s390.o and reg-s390x.o.
9455 * linux-low.c (new_inferior): New global variable.
9456 (linux_create_inferior, linux_attach): Set it.
9457 (linux_wait_for_process): Call the_low_target.arch_setup after the
9458 target has stopped for the first time.
9459 (initialize_low): Do not call the_low_target.arch_setup.
9461 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9462 (s390_set_pc): Likewise.
9463 (s390_arch_setup): New function.
9464 (the_low_target): Use s390_arch_setup as arch_setup routine.
9466 * regcache.c (realloc_register_cache): New function.
9467 (set_register_cache): Call it for each existing regcache.
9469 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9471 * server.h (init_registers): Remove prototype.
9473 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9474 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9475 instead of init_registers ().
9476 * linux-arm-low.c (init_registers_arm): Add prototype.
9477 (init_registers_arm_with_iwmmxt): Likewise.
9478 (the_low_target): Add initializer for arch_setup field.
9479 * linux-cris-low.c (init_registers_cris): Add prototype.
9480 (the_low_target): Add initializer for arch_setup field.
9481 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9482 (the_low_target): Add initializer for arch_setup field.
9483 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9484 (the_low_target): Add initializer for arch_setup field.
9485 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9486 (the_low_target): Add initializer for arch_setup field.
9487 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9488 (the_low_target): Add initializer for arch_setup field.
9489 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9490 (the_low_target): Add initializer for arch_setup field.
9491 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9492 (init_registers_mips64_linux): Likewise.
9493 (the_low_target): Add initializer for arch_setup field.
9494 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9495 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9496 (the_low_target): Add initializer for arch_setup field.
9497 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9498 (init_registers_powerpc_64): Likewise.
9499 (the_low_target): Add initializer for arch_setup field.
9500 * linux-s390-low.c (init_registers_s390): Add prototype.
9501 (init_registers_s390x): Likewise.
9502 (the_low_target): Add initializer for arch_setup field.
9503 * linux-sh-low.c (init_registers_sh): Add prototype.
9504 (the_low_target): Add initializer for arch_setup field.
9505 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9506 (the_low_target): Add initializer for arch_setup field.
9507 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9508 (the_low_target): Add initializer for arch_setup field.
9510 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9511 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9512 instead of init_registers ().
9513 * win32-arm-low.c (init_registers_arm): Add prototype.
9514 (the_low_target): Add initializer for arch_setup field.
9515 * win32-i386-low.c (init_registers_i386): Add prototype.
9516 (the_low_target): Add initializer for arch_setup field.
9518 * spu-low.c (init_registers_spu): Add prototype.
9519 (initialize_low): Call initialie_registers_spu () instead of
9520 initialize_registers ().
9522 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9524 * server.c (handle_v_requests): When handling the vRun and vAttach
9525 packets, if already debugging a process, don't kill it. Return an
9528 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9530 * server.c (handle_query): Correct length check.
9532 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9534 * win32-low.c (do_initial_child_stuff): Add process handle
9535 parameter. Set current_process_handle and current_process_id from the
9536 parameters. Clear globals.
9537 (win32_create_inferior): Don't set current_process_handle and
9538 current_process_id here. Instead pass them on the call to
9539 do_initial_child_stuff.
9540 (win32_attach): Likewise.
9541 (win32_clear_inferiors): New.
9542 (win32_kill): Don't close the current process handle or the
9543 current thread handle here. Instead call win32_clear_inferiors.
9544 (win32_detach): Don't open a new handle to the process. Call
9545 win32_clear_inferiors.
9546 (win32_join): Don't rely on current_process_handle; open a new
9547 handle using the process id.
9548 (win32_wait): Call win32_clear_inferiors when the inferior process
9551 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9553 * server.c (monitor_show_help): Add "exit".
9555 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9557 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9558 (clean): Add reg-xtensa.c.
9559 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9560 * configure.srv (xtensa*-*-linux*) New target.
9561 * linux-xtensa-low.c: New.
9562 * xtensa-xtregs.c: New.
9564 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9566 * hostio.c: Don't include errno.h.
9567 (errno_to_fileio_errno): Move to hostio-errno.
9568 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9569 error number outputting to the target->hostio_last_error callback.
9570 (hostio_packet_error): Use FILEIO_EINVAL directly.
9571 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9572 calls to hostio_error.
9573 * hostio-errno.c: New.
9574 * server.h (hostio_last_error_from_errno): Declare.
9575 * target.h (target_ops): Add hostio_last_error member.
9576 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9577 as hostio_last_error handler.
9578 * spu-low.c (spu_target_ops): Likewise.
9579 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9580 (wince_hostio_last_error): New functions.
9581 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9582 as hostio_last_error handler.
9583 (win32_target_ops) [!_WIN32_WCE]: Register
9584 hostio_last_error_from_errno as hostio_last_error handler.
9585 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9586 (hostio-errno.o): New rule.
9587 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9588 * configure.srv (srv_hostio_err_objs): New variable. Default to
9590 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9591 * configure: Regenerate.
9593 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9595 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9596 (linux_kill, linux_detach): Clean up the process list.
9597 * remote-utils.c (remote_open): Improve port number parsing.
9598 (putpkt_binary, input_interrupt): Only send interrupts if the target
9600 * server.c (extended_protocol): Make static.
9601 (attached): Define earlier.
9602 (exit_requested, response_needed, program_argv): New variables.
9603 (target_running): New.
9604 (start_inferior): Clear attached here.
9605 (attach_inferior): Set attached here.
9606 (require_running): Define.
9607 (handle_query): Use require_running and target_running. Implement
9609 (handle_v_attach, handle_v_run): New.
9610 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9611 (gdbserver_usage): Update.
9612 (main): Redo argument parsing. Handle --debug and --multi. Handle
9613 --attach along with other options or after the port. Save
9614 program_argv. Support no initial program. Resynchronize
9615 communication with GDB after an error. Handle "monitor exit".
9616 Use require_running and target_running. Always allow the extended
9617 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9618 restart in extended mode.
9619 * README: Refer to the GDB manual. Update --attach usage.
9621 2007-12-20 Andreas Schwab <schwab@suse.de>
9623 * linux-low.c (STACK_SIZE): Define.
9624 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9625 (linux_test_for_tracefork): Likewise.
9627 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9629 * linux-low.c (linux_wait_for_event): Update messages. Do not
9630 reinsert auto-delete breakpoints.
9631 * mem-break.c (struct breakpoint): Change return type of handler to
9633 (set_breakpoint_at): Update handler type.
9634 (reinsert_breakpoint_handler): Return 1 instead of calling
9636 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9638 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9639 * mem-break.h (set_breakpoint_at): Update handler type.
9640 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9641 * win32-low.c (auto_delete_breakpoint): New.
9642 (get_child_debug_event): Use it.
9644 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9646 * configure.ac: Check for pread and pwrite.
9647 * hostio.c (handle_pread): Fall back to lseek and read.
9648 (handle_pwrite): Fall back to lseek and write.
9649 * config.in, configure: Regenerated.
9651 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9653 * server.c (myresume): Add own_buf argument.
9654 (main): Update calls.
9656 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9658 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9659 * remote-utils.c (remote_open): Do not call disable_async_io.
9660 (block_async_io): Delete.
9661 (unblock_async_io): Make static.
9662 (initialize_async_io): New.
9663 * server.c (handle_v_cont): Handle async I/O here.
9664 (myresume): Likewise. Move other common resume tasks here...
9665 (main): ... from here. Call initialize_async_io. Disable async
9666 I/O before the main loop.
9667 * server.h (initialize_async_io): Declare.
9668 (block_async_io, unblock_async_io): Delete prototypes.
9669 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9671 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9673 * remote-utils.c (readchar): Allow binary data in received messages.
9675 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9677 * win32-low.c (attaching): New global.
9678 (win32_create_inferior): Clear the `attaching' global.
9679 (win32_attach): Set the `attaching' global.
9680 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9681 attaching. Only set a breakpoint at the entry point if not
9684 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9686 * server.c (main): Don't report dll events on the initial
9687 connection on attaches.
9689 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9691 * server.c (main): Relax numerical bases supported for the pid of
9692 the --attach command line argument.
9694 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9696 * win32-low.c (win32_attach): Call OpenProcess before
9697 DebugActiveProcess, not after. Add last error output to error
9700 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9702 * win32-low.c (win32_get_thread_context)
9703 (win32_set_thread_context): New functions.
9704 (thread_rec): Use win32_get_thread_context.
9705 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9706 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9709 2007-12-03 Leo Zayas
9710 Pedro Alves <pedro_alves@portugalmail.pt>
9712 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9714 (child_add_thread): Minor cleanup.
9715 (child_continue): Resume artificially suspended threads before
9716 calling ContinueDebugEvent.
9717 (suspend_one_thread): New.
9718 (fake_breakpoint_event): New.
9719 (get_child_debug_event): Change return type to int. Check here if
9720 gdb sent an interrupt request. If a soft interrupt was requested,
9721 fake a breakpoint event. Return 0 if there is no event to handle,
9723 (win32_wait): Don't check here if gdb sent an interrupt request.
9724 Ensure there is a valid event to handle.
9725 (win32_request_interrupt): Add soft interruption method as last
9728 2007-12-03 Leo Zayas
9729 Pedro Alves <pedro_alves@portugalmail.pt>
9731 * win32-low.h (win32_thread_info): Add descriptions to the
9732 structure members. Replace `suspend_count' counter by a
9734 * win32-low.c (thread_rec): Update condition of when to get the
9735 context from the inferior. Rely on ContextFlags being set if it
9736 has already been retrieved. Only suspend the inferior thread if
9737 we haven't already. Warn if that fails.
9738 (continue_one_thread): s/suspend_count/suspended/. Only call
9739 ResumeThread once. Warn if that fails.
9741 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9743 * win32-low.c (win32_wait): Don't read from the inferior when it
9746 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9748 * Makefile.in (win32_low_h): New variable.
9749 (win32-low.o): Add dependency on $(win32_low_h).
9750 (win32-arm-low.o, win32-i386-low.o): New rules.
9752 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9754 * hostio.c: Correct copyright year.
9756 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9758 * Makefile.in (OBS): Add hostio.o.
9759 (hostio.o): New rule.
9760 * server.h (handle_vFile): Declare.
9761 * hostio.c: New file.
9762 * server.c (handle_v_requests): Take packet_len and new_packet_len
9763 for binary packets. Call handle_vFile.
9764 (main): Update call to handle_v_requests.
9766 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9768 * linux-low.c: Include <sched.h>.
9770 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9772 * linux-low.c (linux_tracefork_grandchild): New.
9773 (linux_tracefork_child): Use clone.
9774 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9776 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9778 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9780 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9782 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9784 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9786 * inferiors.c (change_inferior_id): Delete.
9787 (add_pid_to_list, pull_pid_from_list): New.
9788 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9789 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9790 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9791 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9792 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9793 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9794 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9795 (using_threads): Always set to 1.
9796 (handle_extended_wait): New.
9797 (add_process): Do not set TID.
9798 (linux_create_inferior): Set must_set_ptrace_flags.
9799 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9800 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9801 (linux_thread_alive): Rename TID argument to LWPID.
9802 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9803 (linux_wait_for_event): Do not use TID or check using_threads. Update
9804 call to dead_thread_notify. Call handle_extended_wait.
9805 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9806 (send_sigstop): Delete sigstop_sent.
9807 (wait_for_sigstop): Avoid TID.
9808 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9809 (linux_test_for_tracefork): New.
9810 (linux_lookup_signals): Use thread_db_active and
9811 linux_supports_tracefork_flag.
9812 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9813 * linux-low.h (get_process_thread): Avoid TID.
9814 (struct process_ifo): Move thread_known and tid to the end. Remove
9816 (linux_attach_lwp, thread_db_init): Update prototypes.
9817 * server.h (change_inferior_id): Delete prototype.
9818 (add_pid_to_list, pull_pid_from_list): New prototypes.
9819 * thread-db.c (thread_db_use_events): New.
9820 (find_first_thread): Rename to...
9821 (find_one_thread): ...this. Update callers and messages. Do not
9822 call fatal. Check thread_db_use_events. Do not call
9823 change_inferior_id or new_thread_notify.
9824 (maybe_attach_thread): Update. Do not call new_thread_notify.
9825 (thread_db_init): Set thread_db_use_events. Check use_events.
9826 * utils.c (fatal, warning): Correct message prefix.
9828 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9830 * Makefile.in (clean): Remove new files.
9831 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9832 (powerpc-64.o, powerpc-64.c): New rules.
9833 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9834 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9836 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9838 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9839 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9840 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9841 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9842 (target_regsets): Add AltiVec and SPE register sets.
9843 * configure.ac: Check for AltiVec and SPE.
9844 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9845 (ppc_fill_vrregset, ppc_store_vrregset): New.
9846 (target_regsets): Add AltiVec register set.
9847 * configure: Regenerated.
9849 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9851 * linux-low.c (O_LARGEFILE): Define.
9852 (linux_read_memory): Use /proc/PID/mem.
9853 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9854 * configure, config.in: Regenerated.
9856 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9858 * linux-low.c (linux_wait_for_event): Do not pass signals while
9861 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9863 * win32-low.c (create_process): New.
9864 (win32_create_inferior): Use create_process instead of
9865 CreateProcess. If create_process failed retry appending an ".exe"
9866 suffix. Store the GetLastError result immediatelly after
9867 create_process calls and use it on the call to error.
9869 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9871 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9873 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9875 * configure.ac: Switch license to GPLv3.
9877 2007-08-01 Michael Snyder <msnyder@access-company.com>
9879 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9881 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9883 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9885 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9886 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9887 CloseToolhelp32Snapshot.
9888 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9889 CloseToolhelp32Snapshot.
9891 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9893 * server.c (main): Check for inferior exit before main loop.
9895 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9897 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9898 instead of on tmp_desc.
9900 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9901 Daniel Jacobowitz <dan@codesourcery.com>
9903 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9904 (add_thread): Minor cleanups.
9905 (clear_inferiors): Move lower in the file. Clear the DLL
9907 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9908 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9909 (xml_escape_text): New.
9910 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9912 (handle_v_cont): Report errors.
9913 (gdbserver_version): Update.
9914 (main): Correct size of own_buf. Do not report initial DLL events.
9915 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9916 (unloaded_dll, xml_escape_text): New.
9917 * win32-low.c (enum target_waitkind): Update comments.
9918 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9919 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9920 (win32_EnumProcessModules, win32_GetModuleInformation)
9921 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9922 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9923 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9924 (win32_Module32First, win32_Module32Next, load_toolhelp)
9925 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9926 (get_child_debug_event): Handle DLL events.
9927 (win32_wait): Likewise.
9929 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9931 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9932 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9934 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9936 * win32-low.c (handle_output_debug_string): Ignore event if not
9939 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9941 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9943 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9945 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9947 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9949 * inferiors.c (change_inferior_id): Add comment.
9950 * linux-low.c (check_removed_breakpoint): Add an early
9951 prototype. Improve debug output.
9952 (linux_attach): Doc update.
9953 (linux_detach_one_process, linux_detach): Clean up before releasing
9955 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9956 * linux-low.h (struct process_info): Doc improvement.
9957 * mem-break.c (delete_all_breakpoints): New.
9958 * mem-break.h (delete_all_breakpoints): New prototype.
9959 * thread-db.c (find_first_thread): New.
9960 (thread_db_create_event): Call it instead of
9961 thread_db_find_new_threads. Clean up unused variables.
9962 (maybe_attach_thread): Remove first thread handling.
9963 (thread_db_find_new_threads): Use find_first_thread.
9964 (thread_db_get_tls_address): Likewise.
9966 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9968 * thread-db.c (thread_db_find_new_threads): Add prototype.
9969 (thread_db_create_event): Check for the main thread before adding
9971 (maybe_attach_thread): Only enable event reporting if TID == 0.
9972 (thread_db_get_tls_address): Check for new threads.
9974 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9976 * linux-low.c (linux_create_inferior): Try execv before execvp.
9977 * spu-low.c (spu_create_inferior): Likewise.
9979 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9981 * linux-low.c (linux_create_inferior): Change execv to execvp.
9982 * spu-low.c (spu_create_inferior): Likewies.
9984 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9986 * Makefile.in (clean): Clean new files instead of deleted ones.
9987 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9988 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9990 * configure.srv: Specify XML files and new regformats for MIPS and
9992 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9993 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9994 an entry for the restart register.
9995 (mips_cannot_fetch_register, mips_cannot_store_register)
9996 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9997 register names to match the XML descriptions.
9998 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9999 restart register instead of $0.
10001 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10002 Markus Deuling <deuling@de.ibm.com>
10004 * remote-utils.c (decode_xfer_write): New function.
10005 * server.h (decode_xfer_write): Add prototype.
10006 * server.c (handle_query): Add PACKET_LEN argument. Support
10007 qXfer:spu:read and qXfer:spu:write packets.
10008 (main): Pass packet_len to handle_query.
10009 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10010 * target.h (target_ops): Add qxfer_spu.
10012 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10014 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10015 accessing non-seekable spufs files.
10017 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10019 * server.c (handle_query): Add reply for qC packet.
10021 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10022 Leo Zayas <lerele@champenstudios@com>
10024 * server.h (check_remote_input_interrupt_request): New function.
10025 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10026 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10027 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10028 (check_remote_input_interrupt_request): New function.
10029 * server.h (check_remote_input_interrupt_request): Declare.
10030 * win32-low.c (winapi_DebugBreakProcess,
10031 winapi_GenerateConsoleCtrlEvent): New typedefs.
10032 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10034 (win32_wait): Check for remote interrupt request
10035 with check_remote_input_interrupt_request.
10036 (win32_request_interrupt): New function.
10037 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10039 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10041 * win32-low.c (debug_registers_changed,
10042 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10043 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10044 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10045 (thread_rec): Get context using the low target.
10046 (child_add_thread): Call thread_added on the low target,
10047 which does the same thing.
10049 (do_initial_child_stuff): Remove debug registers references.
10050 Set context using the low target. Resume threads after
10051 setting the contexts.
10052 (child_continue): Remove dead variable. Remove debug
10053 registers references.
10054 (child_fetch_inferior_registers): Go through the low target.
10055 (do_child_store_inferior_registers): Remove.
10056 (child_store_inferior_registers): Go through the low target.
10057 (win32_resume): Remove debug registers references.
10058 Set context using the low target.
10059 (handle_exception): Change return type to void. Don't record
10060 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10061 first chance exception.
10062 (get_child_debug_event): Change return type to void. Remove
10063 goto loop. Always return after waiting for debug event.
10064 (win32_wait): Convert to switch statement. Handle spurious
10067 * win32-i386-low.c (debug_registers_changed,
10068 debug_registers_used): New.
10069 (initial_stuff): Rename to ...
10070 (i386_initial_stuff): ... this. Clear debug registers
10072 (store_debug_registers): Delete.
10073 (i386_get_thread_context): New.
10074 (load_debug_registers): Delete.
10075 (i386_set_thread_context): New.
10076 (i386_thread_added): New.
10077 (single_step): Rename to ...
10078 (i386_single_step): ... this.
10079 (do_fetch_inferior_registers): Rename to ...
10080 (i386_fetch_inferior_register): ... this.
10081 (i386_store_inferior_register): New.
10082 (the_low_target): Adapt to new interface.
10084 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10085 (arm_get_thread_context): New.
10086 (arm_set_thread_context): New.
10088 (do_fetch_inferior_registers): Rename to ...
10089 (arm_fetch_inferior_register): ... this.
10090 (arm_store_inferior_register): New.
10091 (arm_wince_breakpoint): Reimplement as unsigned long.
10092 (arm_wince_breakpoint_len): Define.
10093 (the_low_target): Adapt to new interface.
10095 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10096 load_debug_registers. Add get_thread_context, set_thread_context,
10097 thread_added and store_inferior_register. Rename
10098 fetch_inferior_registers to fetch_inferior_register.
10099 (regptr): Remove declaration.
10101 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10103 * linux-low.c (linux_detach): Change return type to int. Return 0.
10104 * spu-low.c (spu_detach): Likewise.
10106 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10108 * target.h (target_ops): Change return type of detach to int.
10110 (join_inferior): New.
10111 * server.c (main): Don't skip detach support on mingw32.
10112 If the inferior doesn't support detaching return error.
10113 Call join_inferior instead of using waitpid.
10114 * linux-low.c (linux_join): New.
10115 (linux_target_op): Add linux_join.
10116 * spu-low.c (spu_join): New.
10117 (spu_target_ops): Add spu_join.
10118 * win32-low.c (win32_detach): Adapt to new interface.
10119 Reopen current_process_handle before detaching. Issue a child
10120 resume before detaching.
10122 (win32_target_op): Add win32_join.
10124 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10126 * win32-low.c (win32-attach): Fix return value.
10127 * target.h (target_ops): Describe ATTACH return values.
10129 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10131 * win32-low.c (GETPROCADDRESS): Define.
10132 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10133 (winapi_DebugSetProcessKillOnExit): Likewise.
10134 (win32_create_inferior): Force usage of ansi CreateProcessA.
10135 (win32_attach): Use GETPROCADDRESS.
10136 (win32_detach): Likewise.
10138 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10140 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10142 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10144 * win32-low.c: Commit leftover changes from 2007-03-29.
10146 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10148 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10149 fields short instead of int. Add explicit padding.
10150 (i387_cache_to_fsave): Remove unnecessary casts.
10151 (i387_fsave_to_cache): Doc fix.
10152 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10154 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10156 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10157 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10159 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10161 * configure.srv (arm*-*-mingw32ce*): Move near the other
10164 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10166 * configure.ac: Add errno checking.
10167 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10168 sys/file.h and malloc.h.
10169 (AC_CHECK_DECLS): Add perror.
10170 (srv_mingwce): Handle.
10171 * configure.srv (i[34567]86-*-cygwin*): Add
10172 win32-i386-low.o to srv_tgtobj.
10173 (i[34567]86-*-mingw*): Likewise.
10174 (arm*-*-mingw32ce*): Add case.
10175 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10176 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10177 [__MINGW32CE__] (strerror): New function.
10178 [__MINGW32CE__] (errno): Define to GetLastError.
10179 [__MINGW32CE__] (COUNTOF): New macro.
10180 (remote_open): Remove extra close call.
10181 * mem-break.c (delete_breakpoint_at): New function.
10182 * mem-break.h (delete_breakpoint_at): Declare.
10183 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10184 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10185 [USE_WIN32API] (read, write): Add char* casts.
10186 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10187 * server.h: Include wincecompat.h on Windows CE.
10188 [HAVE_ERRNO_H]: Check.
10189 (perror): Declare if not declared.
10190 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10191 (perror_with_name): Remove errno declaration.
10192 * wincecompat.h: New.
10193 * wincecompat.c: New.
10194 * win32-low.h: New.
10195 * win32-arm-low.c: New.
10196 * win32-i386-low.c: New.
10197 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10198 (OUTMSG2): Make it safe.
10200 (COUNTOF): New macro.
10201 (NUM_REGS): Get it from the low target.
10202 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10203 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10204 (thread_rec): Let low target handle debug registers.
10205 (child_add_thread): Likewise.
10206 (child_init_thread_list): Likewise.
10207 (continue_one_thread): Likewise.
10209 (do_child_fetch_inferior_registers): Move to ...
10210 * win32-i386-low.c: ... here, and rename to ...
10211 (do_fetch_inferior_registers): ... this.
10212 * win32-low.c (child_fetch_inferior_registers):
10213 Go through the low target.
10214 (do_child_store_inferior_registers): Use regptr.
10215 (strwinerror): New function.
10216 (win32_create_inferior): Handle Windows CE.
10217 Use strwinerror instead of strerror on Windows error
10218 codes. Add program to the error output.
10219 Don't close the main thread handle on Windows CE.
10220 (win32_attach): Use coredll.dll on Windows CE.
10221 (win32_kill): Close current process and current
10223 (win32_detach): Use coredll.dll on Windows CE.
10224 (win32_resume): Let low target handle debug registers, and
10226 (handle_exception): Add/Remove initial breakpoint. Avoid
10227 non-existant WSTOPSIG on Windows CE.
10228 (win32_read_inferior_memory): Cast to remove warning.
10229 (win32_arch_string): Go through the low target.
10230 (initialize_low): Call set_breakpoint_data with the low
10231 target's breakpoint.
10232 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10233 FOP_REGNUM, mappings): Move to ...
10234 * win32-i386-low.c: ... here.
10235 * win32-low.c (win32_thread_info): Move to ...
10236 * win32-low.h: ... here.
10237 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10238 win32-arm-low.c and wincecompat.c.
10239 (all:): Add $EXEEXT.
10240 (install-only:): Likewise.
10241 (gdbserver:): Likewise.
10242 (gdbreplay:): Likewise.
10243 * config.in: Regenerate.
10244 * configure: Regenerate.
10246 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10248 * win32-low.c: Rename typedef thread_info to
10249 win32_thread_info throughout.
10251 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10253 * win32-i386-low.c: Rename to ...
10254 * win32-low.c: ... this.
10255 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10256 * Makefile.in: Likewise.
10258 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10260 * remote-utils.c (monitor_output): Constify msg parameter.
10261 * server.h (monitor_output): Likewise.
10262 * win32-i386-low.c (handle_output_debug_string): New.
10263 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10264 handle_output_debug_string.
10265 (get_child_debug_event): Likewise.
10267 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10269 * server.c (main): Correct strtoul check.
10271 2007-03-27 Jon Ringle <jon@ringle.org>
10273 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10275 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10277 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10279 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10281 * terminal.h: Check HAVE_SGTTY_H.
10283 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10285 * remote-utils.c (remote_open): Print out the assigned port number.
10287 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10289 * remote-utils.c (monitor_output): New function.
10290 * server.c (debug_threads): Define here.
10291 (monitor_show_help): New function.
10292 (handle_query): Handle qRcmd.
10293 (main): Do not handle 'd' packet.
10294 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10295 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10298 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10300 * Makefile.in (EXEEXT): New.
10301 (clean): Use $(EXEEXT).
10303 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10305 * target.h (target_ops): Rename send_signal to request_interrupt,
10306 and remove enum target_signal parameter.
10307 * linux-low.c (linux_request_interrupt): Rename from
10308 linux_send_signal, and always send SIGINT.
10309 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10310 and always send SIGINT.
10311 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10313 (input_interrupt): Likewise.
10315 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10317 * server.c (get_features_xml): Check if target implemented
10319 * win32-i386-low.c (win32_arch_string): New.
10320 (win32_target_ops): Add win32_arch_string as arch_string member.
10322 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10324 * spu-low.c (spu_arch_string): New.
10325 (spu_target_ops): Add spu_arch_string.
10327 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10329 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10330 * configure.ac: Do not check for terminal.h.
10331 * configure, config.in: Regenerated.
10333 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10335 * Makefile.in (OBS): Add $(XML_BUILTIN).
10336 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10338 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10339 (arm-with-iwmmxt.c): New.
10340 * config.in, configure: Regenerate.
10341 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10342 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10343 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10344 (arm*-*-linux*): Add iWMMXt and regset support.
10345 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10346 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10347 (arm_store_wmmxregset, target_regsets): New.
10348 * server.c (get_features_xml): Take annex argument. Check builtin
10350 (handle_query): Handle multiple annexes.
10352 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10354 * remote-utils.c [USE_WIN32API] (read, write): Define.
10355 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10358 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10360 * linux-i386-low.c (the_low_target): Set arch_string.
10361 * linux-x86-64-low.c (the_low_target): Likewise.
10362 * linux-low.c (linux_arch_string): New.
10363 (linux_target_ops): Add it.
10364 * linux-low.h (struct linux_target_ops): Add arch_string.
10365 * server.c (write_qxfer_response): Use const void * for DATA.
10366 (get_features_xml): New.
10367 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10368 * target.h (struct target_ops): Add arch_string method.
10370 2007-01-03 Denis Pilat <denis.pilat@st.com>
10371 Daniel Jacobowitz <dan@codesourcery.com>
10373 * linux-low.c (linux_kill): Handle being called with no threads.
10374 * win32-i386-low.c (win32_kill): Likewise.
10375 (get_child_debug_event): Clear current_process_handle.
10377 2006-12-30 Denis PILAT <denis.pilat@st.com>
10378 Daniel Jacobowitz <dan@codesourcery.com>
10380 * remote-utils.c (remote_open): Check the type of specified
10381 serial port devices before opening them.
10382 * server.c (main): Kill the inferior if an error occurs during
10383 the first remote_open.
10385 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10387 * README: Update supported targets.
10389 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10391 * Makefile.in (clean): Remove reg-mips64.c.
10392 (reg-mips64.c, reg-mips64.o): New rules.
10393 * configure.srv: Handle mips64. Include regset support for mips.
10394 * linux-mips-low.c (union mips_register): New.
10395 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10396 (mips_breakpoint, mips_breakpoint_at): Use int.
10397 (mips_collect_register, mips_supply_register)
10398 (mips_collect_register_32bit, mips_supply_register_32bit)
10399 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10400 (mips_store_fpregset, target_regsets): New.
10401 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10403 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10405 * configure.srv: Add target "spu*-*-*".
10406 * Makefile.in (clean): Remove reg-spu.c.
10407 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10408 * spu-low.c: New file.
10410 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10412 * configure.ac: Correct td_thr_tls_get_addr test.
10413 * configure: Regenerated.
10415 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10417 * linux-low.c (linux_wait_for_event): Reformat. Use the
10418 pass_signals array.
10419 * remote-utils.c (decode_address_to_semicolon): New.
10420 * server.c (pass_signals, handle_general_set): New.
10421 (handle_query): Mention QPassSignals for qSupported.
10422 (main): Call handle_general_set.
10423 * server.h (pass_signals, decode_address_to_semicolon): New.
10425 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10427 * server.c (handle_query): Correct error handling for read_auxv.
10429 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10431 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10432 and srv_linux_thread_db to yes.
10433 * linux-s390-low.c (s390_fill_gregset): New function.
10434 (target_regsets): Define data structure.
10436 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10438 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10439 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10440 * config.in, configure: Regenerated.
10441 * inferiors.c (gdb_id_to_thread): New function.
10442 (gdb_id_to_thread_id): Use it.
10443 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10444 * linux-low.h (struct process_info): Add th member.
10445 (thread_db_get_tls_address): New prototype.
10446 * remote-utils.c (decode_address): Make non-static.
10447 * server.c (handle_query): Handle qGetTLSAddr.
10448 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10449 * target.h (struct target_ops): Add get_tls_address.
10450 * thread-db.c (maybe_attach_thread): Save the thread handle.
10451 (thread_db_get_tls_address): New.
10453 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10455 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10456 (linux_resume_one_process): Take a siginfo_t *. Update all
10457 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10458 (struct pending_signals): Add a siginfo_t.
10459 (linux_wait_for_process): Always set last_status.
10460 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10461 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10462 * linux-low.h (struct process_info): Add last_status.
10464 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10466 * remote-utils.c (try_rle): New function.
10467 (putpkt_binary): Use it.
10469 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10471 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10472 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10473 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10474 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10475 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10478 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10480 * server.c (terminal_fd): New variable.
10481 (old_foreground_pgrp): Likewise.
10482 (restore_old_foreground_pgrp): New function.
10483 (start_inferior): Record the terminal file descriptor in terminal_fd
10484 and its original foreground group in old_foreground_pgrp. Register
10485 restore_old_foreground_pgrp with atexit().
10487 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10489 * server.c (handle_query): Correct qPart to qXfer.
10491 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10493 * configure.ac: Check for more headers which are missing on
10494 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10495 * configure.srv: Add Cygwin and mingw32.
10496 * remote-utils.c: Don't include headers unconditionally which
10497 are missing on mingw32. Include <winsock.h> for mingw32.
10498 (remote_open): Adjust for mingw32 support. Flush
10499 standard error after writing to it.
10500 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10501 (unblock_async_io, enable_async_io, disable_async_io)
10502 (readchar, getpkt): Update for Winsock support.
10503 (prepare_resume_reply): Expect a protocol signal number.
10504 * server.c: Disable <sys/wait.h> on mingw32.
10505 (start_inferior): Adjust for mingw32 support. Flush
10506 standard error after writing to it.
10507 (attach_inferior): Likewise. Use protocol signal
10509 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10511 * win32-i386-low.c: New file.
10512 * Makefile.in (XM_CLIBS): Set.
10513 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10514 (win32-i386-low.o): New dependency rule.
10515 * linux-low.c (linux_wait): Use target signal numbers.
10516 * target.h (struct target_ops): Doc fix.
10517 * server.h (target_signal_to_name): New prototype.
10518 * gdbreplay.c: Don't include headers unconditionally which
10519 are missing on mingw32. Include <winsock.h> for mingw32.
10520 (remote_close, remote_open): Adjust for Winsock support.
10521 * configure, config.in: Regenerated.
10523 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10525 * server.c (decode_xfer_read, write_qxfer_response): New.
10526 (handle_query): Take a packet length argument. Handle
10527 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10528 the qSupported response.
10529 (main): Update call to handle_query.
10531 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10533 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10534 (putpkt_binary): Renamed from putpkt and adjusted for binary
10536 (putpkt): New wrapper for putpkt_binary.
10537 (readchar): Don't mask off the high bit.
10538 (decode_X_packet): New function.
10539 * server.c (main): Call putpkt_binary if a handler sets the packet
10540 length. Save the length of the incoming packet. Handle 'X'.
10541 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10543 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10545 * server.c (handle_query): Handle qSupported.
10547 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10549 * remote-utils.c (all_symbols_looked_up): New variable.
10550 (look_up_one_symbol): Check it.
10551 * server.h (look_up_one_symbol): New declaration.
10552 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10554 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10556 * Makefile.in (linux-arm-low.o): Update dependencies.
10557 * linux-arm-low.c: Include "gdb_proc_service.h".
10558 (PTRACE_GET_THREAD_AREA): Define.
10559 (ps_get_thread_area): New function.
10561 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10563 * configure.srv (m68k*-*-uclinux*): New target.
10564 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10565 (linux_resume_one_process): Remove extraneous cast.
10566 (linux_read_offsets): New.
10567 (linux_target_op): Add linux_read_offsets on mmuless systems.
10568 * server.c (handle_query): Add qOffsets logic.
10569 * target.h (struct target_ops): Add read_offsets.
10571 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10573 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10574 (PTRACE_GET_THREAD_AREA): Define.
10575 (ps_get_thread_area): New function.
10576 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10577 (linux-x86-64-low.o): Update.
10579 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10581 * configure.ac: Remove checks for prfpregset_t.
10582 * gdb_proc_service.h: New file.
10583 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10584 new "gdb_proc_service.h".
10585 * proc-service.c: Likewise.
10586 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10587 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10588 * Makefile.in (gdb_proc_service_h): Updated.
10589 * configure, config.in: Regenerated.
10591 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10593 * remote-utils.c (prepare_resume_reply): Move declaration
10594 of gdb_id_from_wait to the top of the block.
10596 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10598 * linux-low.c (regsets_store_inferior_registers): Read the regset
10599 from the target before filling it.
10601 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10603 * server.c (attach_inferior): Return SIGTRAP for a successful
10606 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10608 * Makefile.in (OBS): Add version.o.
10609 (STAGESTUFF): Delete.
10610 (version.o): Add dependencies.
10611 (version.c): Replace rule.
10612 (clean): Remove version.c.
10613 * server.c (gdbserver_version): New.
10614 (gdbserver_usage): Use printf.
10615 (main): Handle --version and --help.
10616 * server.h (version, host_name): Add declarations.
10618 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10630 * linux-x86-64-low.c:
10632 * linux-s390-low.c:
10633 * linux-ppc64-low.c:
10635 * linux-mips-low.c:
10636 * linux-m68k-low.c:
10637 * linux-m32r-low.c:
10640 * linux-ia64-low.c:
10641 * linux-i386-low.c:
10642 * linux-crisv32-low.c:
10654 * gdbserver.1: Add (C) after Copyright. Update the FSF
10657 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10659 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10660 (arm_breakpoint_at): Recognize both breakpoints.
10661 (the_low_target): Use the correct breakpoint instruction.
10663 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10665 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10666 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10667 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10668 (the_low_target): Update.
10670 2005-10-25 Andreas Schwab <schwab@suse.de>
10672 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10674 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10675 (ia64_num_regs): Reduce to 462.
10677 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10679 * acinclude.m4: Correct quoting.
10680 * aclocal.m4: Regenerated.
10682 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10683 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10684 (thread_db_init): Call thread_db_err_str.
10685 * configure.ac: Check for TD_VERSION.
10686 * config.in, configure: Regenerated.
10688 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10690 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10692 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10694 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10695 is not available. Define HAVE_PTRACE_GETREGS if it is.
10696 * config.in, configure: Regenerated.
10697 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10698 * linux-i386-low.c, linux-m68k-low.c: Update to use
10699 HAVE_PTRACE_GETREGS.
10700 * linux-low.c (regsets_fetch_inferior_registers)
10701 (regsets_store_inferior_registers): Only return 0 if we processed
10703 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10704 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10706 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10708 * inferiors.c (struct thread_info): Add gdb_id.
10709 (add_thread): Add gdb_id argument.
10710 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10711 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10712 calls to add_thread.
10713 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10714 * server.c (handle_query): Use thread_to_gdb_id.
10715 (handle_v_cont, main): Use gdb_id_to_thread_id.
10716 * server.h (add_thread): Update prototype.
10717 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10720 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10722 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10723 left-padded registers.
10724 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10725 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10727 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10729 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10730 * configure: Regenerate.
10731 * config.in: Regenerate.
10732 * server.h (NEED_DECLARATION_STRERROR):
10733 Replace with !HAVE_DECL_STRERROR.
10735 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10737 * linux-low.c (linux_wait, linux_send_signal): Don't test
10738 an unsigned long variable for > 0 if it could be MAX_ULONG.
10739 * server.c (myresume): Likewise.
10740 * target.c (set_desired_inferior): Likewise.
10742 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10744 * configure.ac: Simplify and improve check for socklen_t.
10745 * configure, config.in: Regenerate.
10747 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10749 * acconfig.h: Remove.
10750 * configure.ac: Add a test for socklen_t. Use three-argument
10751 AC_DEFINE throughout.
10752 * config.in: Regenerated using autoheader 2.59.
10753 * configure: Regenerated.
10755 * gdbreplay.c (socklen_t): Provide a default.
10756 (remote_open): Use socklen_t.
10757 * remote-utils.c (socklen_t): Provide a default.
10758 (remote_open): Use socklen_t.
10759 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10762 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10764 * linux-low.c (linux_read_memory, linux_write_memory)
10765 (linux_read_auxv): Likewise.
10766 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10767 (check_mem_write): Likewise.
10768 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10770 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10771 (registers_from_string, register_data): Likewise.
10772 * server.c (handle_query, main): Likewise.
10773 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10774 (decode_M_packet): Likewise.
10775 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10776 * target.h (struct target_ops): Update read_memory, write_memory,
10778 (read_inferior_memory, write_inferior_memory): Update.
10779 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10780 to unsigned char *.
10781 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10782 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10783 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10784 linux-s390-low.c, linux-sh-low.c: Update for changes in
10785 read_inferior_memory and the_low_target->breakpoint.
10787 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10789 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10790 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10791 * configure.srv: Add powerpc64-*-linux*.
10792 * linux-ppc64-low.c: New file.
10794 2005-05-23 Orjan Friberg <orjanf@axis.com>
10796 * linux-cris-low.c: New file with support for CRIS.
10797 * linux-crisv32-low.c: Ditto for CRISv32.
10798 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10799 (clean): Add reg-cris.c and reg-crisv32.c.
10800 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10801 reg-crisv32.o, and reg-crisv32.c to make rules.
10802 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10803 recognized targets.
10805 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10807 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10808 of sizeof (PTRACE_XFER_TYPE).
10809 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10811 2005-05-12 Orjan Friberg <orjanf@axis.com>
10813 * target.h (struct target_ops): Add insert_watchpoint,
10814 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10815 pointers for hardware watchpoint support.
10816 * linux-low.h (struct linux_target_ops): Ditto.
10817 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10818 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10819 to linux_target_ops.
10820 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10822 * server.c (main): Recognize 'Z' and 'z' packets.
10824 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10826 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10827 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10828 (the_low_target): Add new members.
10830 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10832 * proc-service.c (ps_lgetregs): Search all_processes instead of
10835 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10837 * server.c (start_inferior): Change return type to int.
10838 (attach_inferior): Change sigptr to int *.
10839 (handle_v_cont, handle_v_requests): Change signal to int *.
10840 (main): Change signal to int.
10842 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10844 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10845 * configure.srv: Add m32r*-*-linux*.
10846 * linux-m32r-low.c: New file.
10848 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10850 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10852 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10854 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10855 Take unsigned long arguments for PIDs.
10856 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10857 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10858 (wait_for_sigstop, linux_resume_one_process)
10859 (regsets_fetch_inferior_registers, linux_send_signal)
10860 (linux_read_auxv): Likewise. Update the types of variables holding
10861 PIDs. Update format string specifiers.
10862 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10863 * remote-utils.c (prepare_resume_reply): Likewise.
10864 * server.c (cont_thread, general_thread, step_thread)
10865 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10867 (handle_query): Update format specifiers.
10868 (handle_v_cont, main): Use strtoul for thread IDs.
10869 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10870 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10871 (general_thread, step_thread, thread_from_wait)
10872 (old_thread_from_wait): Update.
10873 * target.h (struct thread_resume): Use unsigned long for THREAD.
10874 (struct target_ops): Use unsigned long for arguments to attach and
10877 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10879 * acinclude.m4: Include bfd/bfd.m4 directly.
10880 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10881 <agriffis@toolchain.org>.
10882 * aclocal.m4, configure: Regenerated.
10884 2005-01-07 Andrew Cagney <cagney@gnu.org>
10886 * configure.ac: Rename configure.in, require autoconf 2.59.
10887 * configure: Re-generate.
10889 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10891 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10892 LIBS when finished.
10893 * aclocal.m4: Regenerated.
10894 * configure: Regenerated.
10896 2004-11-21 Andreas Schwab <schwab@suse.de>
10898 * linux-m68k-low.c (m68k_num_gregs): Define.
10899 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10900 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10901 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10902 (m68k_breakpoint_at): New. Add to the_low_target.
10904 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10905 srv_linux_thread_db to yes.
10907 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10909 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10910 (ARCH_SET_FS): Likewise.
10911 (ARCH_GET_FS): Likewise.
10912 (ARCH_GET_GS): Likewise.
10914 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10916 * linux-i386-low.c (ps_get_thread_area): New.
10917 * linux-x86-64-low.c (ps_get_thread_area): New.
10918 * linux-low.c: Include <sys/syscall.h>.
10919 (linux_kill_one_process): Don't kill the first thread here.
10920 (linux_kill): Kill the first thread here.
10921 (kill_lwp): New function.
10922 (send_sigstop, linux_send_signal): Use it.
10923 * proc-service.c: Clean up #ifdefs.
10924 (fpregset_info): Delete.
10925 (ps_lgetregs): Update and enable implementation.
10926 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10928 * remote-utils.c (struct sym_cache, symbol_cache): New.
10929 (input_interrupt): Print a clearer message.
10930 (async_io_enabled): New variable.
10931 (enable_async_io, disable_async_io): Use it. Update comments.
10932 (look_up_one_symbol): Use the symbol cache.
10933 * thread-db.c (thread_db_look_up_symbols): New function.
10934 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10936 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10938 * configure.in: Test for -rdynamic.
10939 * configure: Regenerated.
10940 * Makefile (INTERNAL_LDFLAGS): New.
10941 (gdbserver, gdbreplay): Use it.
10943 2004-09-02 Andrew Cagney <cagney@gnu.org>
10945 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10947 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10949 * linux-low.c (linux_wait): Clear all_processes list also.
10951 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10953 * linux-low.c: Include <errno.h>. Remove extern declaration of
10956 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10958 * gdbreplay.c, server.h, utils.c: Update copyright years.
10960 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10962 * server.c (main): Print child status or termination signal from
10963 variable 'signal', not 'sig'.
10965 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10967 * linux-low.c (linux_read_memory): Change return type to
10968 int. Check for and return error from ptrace().
10969 * target.c (read_inferior_memory): Change return type to int. Pass
10970 back return status from the_target->read_memory().
10971 * target.h (struct target_ops): Adapt *read_memory() prototype.
10973 (read_inferior_memory): Adapt prototype.
10974 * server.c (main): Return an error packet if
10975 read_inferior_memory() returns an error.
10977 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10979 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10980 Unify with other clean targets.
10982 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10984 * server.c (handle_v_cont): Call set_desired_inferior.
10986 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10988 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10990 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10992 * linux-low.c (linux_wait): Unblock async I/O.
10993 (linux_resume): Block and enable async I/O.
10994 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10995 * server.h (block_async_io, unblock_async_io): Add prototypes.
10997 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10999 * remote-utils.c (remote_open): Print a status notice after
11000 opening a TCP port.
11001 * server.c (attach_inferior): Print a status notice after
11004 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11006 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11008 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11010 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11012 * server.c, target.h: Update copyright years.
11014 2004-02-25 Roland McGrath <roland@redhat.com>
11016 * target.h (struct target_ops): New member `read_auxv'.
11017 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11018 * linux-low.c (linux_read_auxv): New function.
11019 (linux_target_ops): Initialize `read_auxv' member to that.
11021 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11023 Committed by Jim Blandy <jimb@redhat.com>.
11025 * linux-s390-low.c (s390_num_regs): Update.
11026 (s390_regmap): Remove control registers. Use __s390x__ predefine
11027 instead of GPR_SIZE to distiguish s390 and s390x targets.
11029 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11031 * linux-low.c: Update copyright year.
11032 (check_removed_breakpoint): Clear pending_is_breakpoint.
11033 (linux_set_resume_request, linux_queue_one_thread)
11034 (resume_status_pending_p): New functions.
11035 (linux_continue_one_thread): Use process->resume.
11036 (linux_resume): Only resume threads if there are no pending events.
11037 * linux-low.h (struct process_info): Add resume request
11040 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11042 * regcache.c (new_register_cache): Clear the allocated register
11043 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11045 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11047 * linux-low.c (linux_resume): Take a struct thread_resume *
11049 (linux_wait): Update call.
11050 (resume_ptr): New static variable.
11051 (linux_continue_one_thread): Renamed from
11052 linux_continue_one_process. Use resume_ptr.
11053 (linux_resume): Use linux_continue_one_thread.
11054 * server.c (handle_v_cont, handle_v_requests): New functions.
11055 (myresume): New function.
11056 (main): Handle 'v' case.
11057 * target.h (struct thread_resume): New type.
11058 (struct target_ops): Change argument of "resume" to struct
11060 (myresume): Delete macro.
11062 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11064 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11065 (uninstall): Support DESTDIR.
11067 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11069 * configure.srv: Add xscale*linux copy of arm*linux entry.
11071 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11073 * linux-arm-low.c (arm_reinsert_addr): New function.
11074 (the_low_target): Add arm_reinsert_addr.
11076 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11078 * mem-break.c: Remove whitespace at end of file.
11080 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11082 * configure.in: Check whether we need to prototype strerror.
11083 * server.h: Optionally prototype strerror.
11084 * gdbreplay.c (perror_with_name): Use strerror.
11085 * linux-low.c (linux_attach_lwp): Use strerror.
11086 * utils.c (perror_with_name): Use strerror.
11087 * config.in, configure: Regenerated.
11089 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11091 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11092 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11094 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11096 * Makefile.in (SFILES): Update.
11097 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11098 low-sun3.c: Remove files.
11100 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11102 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11103 (linux_detach_one_process, linux_detach): New functions.
11104 (linux_target_ops): Add linux_detach.
11105 * server.c (main): Handle 'D' packet.
11106 * target.h (struct target_ops): Add "detach" member.
11107 (detach_inferior): Define.
11109 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11111 From Kelley Cook <kelleycook@wideopenwest.com>:
11112 * configure.srv: Accept i[34567]86 variants.
11114 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11116 * linux-low.c (linux_wait_for_event): Correct comment typos.
11117 (linux_resume_one_process): Call check_removed_breakpoint.
11118 (linux_send_signal): New function.
11119 (linux_target_ops): Add linux_send_signal.
11120 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11122 * target.h (struct target_ops): Add send_signal.
11124 2003-05-29 Jim Blandy <jimb@redhat.com>
11126 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11127 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11128 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11129 away part of the register's value.
11131 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11133 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11134 (linux_wait_for_event, linux_init_signals): Likewise.
11136 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11138 * configure.in: Check for stdlib.h.
11139 * configure: Regenerated.
11140 * config.in: Regenerated.
11142 2003-01-04 Andreas Schwab <schwab@suse.de>
11144 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11146 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11148 * Makefile.in: Remove obsolete code.
11150 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11152 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11153 defined(PT_FPR0_HI).
11155 2002-11-17 Stuart Hughes <seh@zee2.com>
11157 * linux-arm-low.c (arm_num_regs): Increase.
11158 (arm_regmap): Include status register.
11160 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11162 * linux-low.c (register_addr): Remove incorrect -1 check.
11164 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11166 * linux-low.c (linux_create_inferior): Call setpgid. Return
11168 (unstopped_p, linux_signal_pid): Remove.
11169 (linux_target_ops): Remove linux_signal_pid.
11170 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11171 global instead of target method.
11172 * target.h (struct target_ops): Remove signal_pid. Update comment
11173 for create_inferior.
11174 * server.c (signal_pid): New variable.
11175 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11176 gdbserver. Set the child to be the foreground process group.
11177 (attach_inferior): Set signal_pid.
11179 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11181 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11183 2002-08-20 Jim Blandy <jimb@redhat.com>
11185 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11188 2002-08-01 Andrew Cagney <cagney@redhat.com>
11190 * Makefile.in: Make chill references obsolete.
11192 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11194 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11195 * configure: Regenerate.
11196 * config.in: Regenerate.
11198 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11200 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11201 (perror_with_name, remote_close, remote_open, expect, play): Static.
11203 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11205 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11206 byte offsets instead of an array of indexes.
11207 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11209 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11211 * regcache.c: Add comment.
11213 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11215 * thread-db.c: New file.
11216 * proc-service.c: New file.
11217 * acinclude.m4: New file.
11218 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11219 proc-service.o, and thread-db.o.
11220 (linux-low.o): Add USE_THREAD_DB.
11221 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11222 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11223 * aclocal.m4: Regenerated.
11224 * config.in: Regenerated.
11225 * configure: Regenerated.
11226 * configure.in: Check for proc_service.h, sys/procfs.h,
11227 thread_db.h, and linux/elf.h headrs.
11228 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11229 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11230 Check for -lthread_db and thread support.
11231 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11232 PowerPC, and SuperH.
11233 * i387-fp.c: Constify arguments.
11234 * i387-fp.h: Likewise.
11235 * inferiors.c: (struct thread_info): Renamed from
11236 `struct inferior_info'. Remove PID member. Use generic inferior
11237 list header. All uses updated.
11238 (inferiors, signal_pid): Removed.
11239 (all_threads): New variable.
11240 (get_thread): Define.
11241 (add_inferior_to_list): New function.
11242 (for_each_inferior): New function.
11243 (change_inferior_id): New function.
11244 (add_inferior): Removed.
11245 (remove_inferior): New function.
11246 (add_thread): New function.
11247 (free_one_thread): New function.
11248 (remove_thread): New function.
11249 (clear_inferiors): Use for_each_inferior and free_one_thread.
11250 (find_inferior): New function.
11251 (find_inferior_id): New function.
11252 (inferior_target_data): Update argument type.
11253 (set_inferior_target_data): Likewise.
11254 (inferior_regcache_data): Likewise.
11255 (set_inferior_regcache_data): Likewise.
11256 * linux-low.c (linux_bp_reinsert): Remove.
11257 (all_processes, stopping_threads, using_thrads)
11258 (struct pending_signals, debug_threads, pid_of): New.
11259 (inferior_pid): Replace with macro.
11260 (struct inferior_linux_data): Remove.
11261 (get_stop_pc, add_process): New functions.
11262 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11263 Use add_process and add_thread.
11264 (linux_attach_lwp): New function, based on old linux_attach. Use
11265 add_process and add_thread. Set stop_expected for new threads.
11266 (linux_attach): New function.
11267 (linux_kill_one_process): New function.
11268 (linux_kill): Kill all LWPs.
11269 (linux_thread_alive): Use find_inferior_id.
11270 (check_removed_breakpoints, status_pending_p): New functions.
11271 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11272 Update. Use WNOHANG. Wait for cloned processes also. Update process
11273 struct for the found process.
11274 (linux_wait_for_event): New function.
11275 (linux_wait): Use it. Support LWPs.
11276 (send_sigstop, wait_for_sigstop, stop_all_processes)
11277 (linux_resume_one_process, linux_continue_one_process): New functions.
11278 (linux_resume): Support LWPs.
11279 (REGISTER_RAW_SIZE): Remove.
11280 (fetch_register): Use register_size instead. Call supply_register.
11281 (usr_store_inferior_registers): Likewise. Call collect_register.
11282 Fix recursive case.
11283 (regsets_fetch_inferior_registers): Improve error message.
11284 (regsets_store_inferior_registers): Add debugging.
11285 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11286 (unstopped_p, linux_signal_pid): New functions.
11287 (linux_target_ops): Add linux_signal_pid.
11288 (linux_init_signals): New function.
11289 (initialize_low): Call it. Initialize using_threads.
11290 * regcache.c (inferior_regcache_data): Add valid
11292 (get_regcache): Fetch registers lazily. Add fetch argument
11293 and update all callers.
11294 (regcache_invalidate_one, regcache_invalidate): New
11296 (new_register_cache): Renamed from create_register_cache.
11297 Return the new regcache.
11298 (free_register_cache): Change argument to a void *.
11299 (registers_to_string, registers_from_string): Call get_regcache
11300 with fetch flag set.
11301 (register_data): Make static. Pass fetch flag to get_regcache.
11302 (supply_register): Call get_regcache with fetch flag clear.
11303 (collect_register): Call get_regcache with fetch flag set.
11304 (collect_register_as_string): New function.
11305 * regcache.h: Update.
11306 * remote-utils.c (putpkt): Flush after debug output and use
11308 Handle input interrupts while waiting for an ACK.
11309 (input_interrupt): Use signal_pid method.
11310 (getpkt): Flush after debug output and use stderr.
11311 (outreg): Use collect_register_as_string.
11312 (new_thread_notify, dead_thread_notify): New functions.
11313 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11314 and general_thread.
11315 (look_up_one_symbol): Flush after debug output.
11316 * server.c (step_thread, server_waiting): New variables.
11317 (start_inferior): Don't use signal_pid. Update call to mywait.
11318 (attach_inferior): Update call to mywait.
11319 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11320 (main): Don't fetch/store registers explicitly. Use
11321 set_desired_inferior. Support proposed ``Hs'' packet. Update
11323 * server.h: Update.
11324 (struct inferior_list, struct_inferior_list_entry): New.
11325 * target.c (set_desired_inferior): New.
11326 (write_inferior_memory): Constify.
11327 (mywait): New function.
11328 * target.h: Update.
11329 (struct target_ops): New signal_pid method.
11330 (mywait): Removed macro, added prototype.
11332 * linux-low.h (regset_func): Removed.
11333 (regset_fill_func, regset_store_func): New.
11334 (enum regset_type): New.
11335 (struct regset_info): Add type field. Use new operation types.
11336 (struct linux_target_ops): stop_pc renamed to get_pc.
11337 Add decr_pc_after_break and breakpoint_at.
11338 (get_process, get_thread_proess, get_process_thread)
11339 (strut process_info, all_processes, linux_attach_lwp)
11340 (thread_db_init): New.
11342 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11343 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11344 (the_low_target): Add new members.
11345 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11346 (i386_store_fpxregset): Constify.
11347 (target_regsets): Add new kind identifier.
11348 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11349 (i386_set_pc): Add debugging.
11350 (i386_breakpoint_at): New function.
11351 (the_low_target): Add new members.
11352 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11353 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11354 (mips_breakpoint_at): New.
11355 (the_low_target): Add new members.
11356 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11357 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11358 (the_low_target): Add new members.
11359 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11360 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11361 (the_low_target): Add new members.
11362 * linux-x86-64-low.c (target_regsets): Add new kind
11365 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11367 From Martin Pool <mbp@samba.org>:
11368 * server.c (gdbserver_usage): New function.
11371 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11373 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11374 stop_at -> stop_pc.
11376 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11378 * Makefile.in: Remove obsolete code.
11380 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11382 * linux-low.c (regsets_fetch_inferior_registers),
11383 (regsets_store_inferior_registers): Removed cast to int from
11385 * regcache.h: Added declaration of struct inferior_info.
11387 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11389 * inferiors.c (struct inferior_info): Add regcache_data.
11390 (add_inferior): Call create_register_cache.
11391 (clear_inferiors): Call free_register_cache.
11392 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11393 * regcache.c (struct inferior_regcache_data): New.
11394 (registers): Remove.
11395 (get_regcache): New function.
11396 (create_register_cache, free_register_cache): New functions.
11397 (set_register_cache): Don't initialize the register cache here.
11398 (registers_to_string, registers_from_string, register_data): Call
11400 * regcache.h: Add prototypes.
11401 * server.h: Likewise.
11403 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11405 * mem-break.c: New file.
11406 * mem-break.h: New file.
11407 * Makefile.in: Add mem-break.o rule; update server.h
11409 * inferiors.c (struct inferior_info): Add target_data
11411 (clear_inferiors): Free target_data member if set.
11412 (inferior_target_data, set_inferior_target_data): New functions.
11413 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11414 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11415 * linux-low.c (linux_bp_reinsert): New variable.
11416 (struct inferior_linux_data): New.
11417 (linux_create_inferior): Use set_inferior_target_data.
11418 (linux_attach): Likewise. Call add_inferior.
11419 (linux_wait_for_one_inferior): New function.
11420 (linux_wait): Call it.
11421 (linux_write_memory): Add const.
11422 (initialize_low): Call set_breakpoint_data.
11423 * linux-low.h (struct linux_target_ops): Add breakpoint
11425 * server.c (attach_inferior): Remove extra add_inferior
11427 * server.h: Include mem-break.h. Update inferior.c
11429 * target.c (read_inferior_memory)
11430 (write_inferior_memory): New functions.
11431 * target.h (read_inferior_memory)
11432 (write_inferior_memory): Change macros to prototypes.
11433 (struct target_ops): Update comments. Add const to write_memory
11436 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11438 * linux-low.c (usr_store_inferior_registers): Support
11439 registers which are allowed to fail to store.
11440 * linux-low.h (linux_target_ops): Likewise.
11441 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11442 (ppc_cannot_store_register): FPSCR may not be storable.
11444 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11446 * server.h: Include <string.h> if HAVE_STRING_H.
11447 * ChangeLog: Correct paths in last ChangeLog entry.
11449 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11451 * linux-low.h: Remove obsolete prototypes.
11452 (struct linux_target_ops): New.
11453 (extern the_low_target): New.
11454 * linux-low.c (num_regs, regmap): Remove declarations.
11455 (register_addr): Use the_low_target explicitly.
11456 (fetch_register): Likewise.
11457 (usr_fetch_inferior_registers): Likewise.
11458 (usr_store_inferior_registers): Likewise.
11459 * linux-arm-low.c (num_regs): Remove.
11460 (arm_num_regs): Define.
11461 (arm_regmap): Renamed from regmap, made static.
11462 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11464 (arm_cannot_store_register): Renamed from cannot_store_register,
11466 (the_low_target): New.
11467 * linux-i386-low.c (num_regs): Remove.
11468 (i386_num_regs): Define.
11469 (i386_regmap): Renamed from regmap, made static.
11470 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11472 (i386_cannot_store_register): Renamed from cannot_store_register,
11474 (the_low_target): New.
11475 * linux-ia64-low.c (num_regs): Remove.
11476 (ia64_num_regs): Define.
11477 (ia64_regmap): Renamed from regmap, made static.
11478 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11480 (ia64_cannot_store_register): Renamed from cannot_store_register,
11482 (the_low_target): New.
11483 * linux-m68k-low.c (num_regs): Remove.
11484 (m68k_num_regs): Define.
11485 (m68k_regmap): Renamed from regmap, made static.
11486 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11488 (m68k_cannot_store_register): Renamed from cannot_store_register,
11490 (the_low_target): New.
11491 * linux-mips-low.c (num_regs): Remove.
11492 (mips_num_regs): Define.
11493 (mips_regmap): Renamed from regmap, made static.
11494 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11496 (mips_cannot_store_register): Renamed from cannot_store_register,
11498 (the_low_target): New.
11499 * linux-ppc-low.c (num_regs): Remove.
11500 (ppc_num_regs): Define.
11501 (ppc_regmap): Renamed from regmap, made static.
11502 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11504 (ppc_cannot_store_register): Renamed from cannot_store_register,
11506 (the_low_target): New.
11507 * linux-s390-low.c (num_regs): Remove.
11508 (s390_num_regs): Define.
11509 (s390_regmap): Renamed from regmap, made static.
11510 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11512 (s390_cannot_store_register): Renamed from cannot_store_register,
11514 (the_low_target): New.
11515 * linux-sh-low.c (num_regs): Remove.
11516 (sh_num_regs): Define.
11517 (sh_regmap): Renamed from regmap, made static.
11518 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11520 (sh_cannot_store_register): Renamed from cannot_store_register,
11522 (the_low_target): New.
11523 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11524 (the_low_target): New.
11526 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11528 * Makefile.in: Add stamp-h target.
11529 * configure.in: Create stamp-h.
11530 * configure: Regenerated.
11532 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11534 * inferiors.c: New file.
11535 * target.c: New file.
11536 * target.h: New file.
11537 * Makefile.in: Add target.o and inferiors.o. Update
11539 * linux-low.c (inferior_pid): New static variable,
11540 moved from server.c.
11541 (linux_create_inferior): Renamed from create_inferior.
11542 Call add_inferior. Return 0 on success instead of a PID.
11543 (linux_attach): Renamed from myattach.
11544 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11545 (linux_thread_alive): Renamed from mythread_alive.
11546 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11548 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11549 (regsets_store_inferior_registers): Correct error message.
11550 Add missing ``return 0''.
11551 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11552 (linux_store_registers): Renamed from store_inferior_registers.
11553 (linux_read_memory): Renamed from read_inferior_memory.
11554 (linux_write_memory): Renamed from write_inferior_memory.
11555 (linux_target_ops): New structure.
11556 (initialize_low): Call set_target_ops ().
11557 * remote-utils.c (unhexify): New function.
11558 (hexify): New function.
11559 (input_interrupt): Send signals to ``signal_pid''.
11560 * server.c (inferior_pid): Remove.
11561 (start_inferior): Update create_inferior call.
11562 (attach_inferior): Call add_inferior.
11563 (handle_query): New function.
11564 (main): Call handle_query for `q' packets.
11565 * server.h: Include "target.h". Remove obsolete prototypes.
11566 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11568 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11570 * Makefile.in: Add WARN_CFLAGS. Update configury
11572 * configure.in: Check for <string.h>
11573 * configure: Regenerate.
11574 * config.in: Regenerate.
11575 * gdbreplay.c: Include needed system headers.
11576 (remote_open): Remove strchr prototype.
11577 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11578 * regcache.c (supply_register): Change buf argument to const void *.
11579 (supply_register_by_name): Likewise.
11580 (collect_register): Change buf argument to void *.
11581 (collect_register_by_name): Likewise.
11582 * regcache.h: Add missing prototypes.
11583 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11584 * server.c (handle_query): New function.
11585 (attached): New static variable, moved out of main.
11586 (main): Quiet longjmp clobber warnings.
11587 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11588 * utils.c (error): Remove NORETURN.