1 2015-07-17 Yao Qi <yao.qi@linaro.org>
3 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8 (AARCH64_HWP_ALIGNMENT): Likewise.
9 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
12 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
13 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
14 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
15 (struct aarch64_debug_reg_state): Likewise.
16 (struct arch_lwp_info): Likewise.
17 (aarch64_align_watchpoint): Likewise.
18 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
19 (aarch64_watchpoint_length): Likewise.
20 (aarch64_point_encode_ctrl_reg): Likewise
21 (aarch64_point_is_aligned): Likewise.
22 (aarch64_align_watchpoint): Likewise.
23 (aarch64_linux_set_debug_regs):
24 (aarch64_dr_state_insert_one_point): Likewise.
25 (aarch64_dr_state_remove_one_point): Likewise.
26 (aarch64_handle_breakpoint): Likewise.
27 (aarch64_handle_aligned_watchpoint): Likewise.
28 (aarch64_handle_unaligned_watchpoint): Likewise.
29 (aarch64_handle_watchpoint): Likewise.
31 2015-07-17 Yao Qi <yao.qi@linaro.org>
33 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
34 and don't aarch64_get_debug_reg_state. All callers update.
35 (aarch64_handle_aligned_watchpoint): Likewise.
36 (aarch64_handle_unaligned_watchpoint): Likewise.
37 (aarch64_handle_watchpoint): Likewise.
38 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
39 (aarch64_remove_point): Likewise.
41 2015-07-17 Yao Qi <yao.qi@linaro.org>
43 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
45 (aarch64_handle_unaligned_watchpoint): Likewise.
47 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
49 Revert the previous 3 commits:
50 Move gdb_regex* to common/
51 Move linux_find_memory_regions_full & co.
52 gdbserver build-id attribute generator
54 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
55 Jan Kratochvil <jan.kratochvil@redhat.com>
57 gdbserver build-id attribute generator.
58 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
59 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
60 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
62 (get_dynamic): Use find_pdhr to traverse program headers.
63 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
64 (compare_mapping_entry_range, struct find_memory_region_callback_data)
65 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
66 (get_hex_build_id): New.
67 (linux_qxfer_libraries_svr4): Add optional build-id attribute
68 to reply XML document.
70 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
71 Jan Kratochvil <jan.kratochvil@redhat.com>
73 * target.c: Include target/target-utils.h and fcntl.h.
74 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
75 (target_fileio_read_stralloc): New functions.
77 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
79 * Makefile.in (OBS): Add gdb_regex.o.
84 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
85 Jan Kratochvil <jan.kratochvil@redhat.com>
87 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
88 * Makefile.in (OBS): Add target-utils.o.
89 (linux-maps.o, target-utils.o): New.
90 * configure.srv (srv_linux_obj): Add linux-maps.o.
92 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
94 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
96 (the_low_target): Install it.
98 2015-07-14 Pedro Alves <palves@redhat.com>
100 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
101 Instead, ignore ECHILD, and throw an error for other errnos.
103 2015-07-10 Pedro Alves <palves@redhat.com>
105 * event-loop.c (struct callback_event) <data>: Change type to
106 gdb_client_data instance instead of gdb_client_data pointer.
107 (append_callback_event): Adjust.
109 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
111 * linux-aarch64-low.c: Add comments for each linux_target_ops
112 method. Remove comments already covered in target_ops and
113 linux_target_ops definitions.
114 (the_low_target): Add comments for each unimplemented method.
116 2015-07-09 Yao Qi <yao.qi@linaro.org>
118 * linux-aarch64-low.c (aarch64_regmap): Remove.
119 (aarch64_usrregs_info): Remove.
120 (regs_info): Set field usrregs to NULL.
122 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
124 * linux-low.c: Include "rsp-low.h"
125 (linux_low_encode_pt_config, linux_low_encode_raw): New.
126 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
127 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
128 (handle_btrace_enable_pt): New.
129 (handle_btrace_general_set): Support "pt".
130 (handle_btrace_conf_general_set): Support "pt:size".
132 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
134 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
137 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
139 * linux-aarch64-low.c: Remove comment about endianness.
140 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
141 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
144 2015-06-24 Gary Benson <gbenson@redhat.com>
146 * linux-i386-ipa.c (stdint.h): Do not include.
147 * lynx-i386-low.c (stdint.h): Likewise.
148 * lynx-ppc-low.c (stdint.h): Likewise.
149 * mem-break.c (stdint.h): Likewise.
150 * thread-db.c (stdint.h): Likewise.
151 * tracepoint.c (stdint.h): Likewise.
152 * win32-low.c (stdint.h): Likewise.
154 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
156 * server.c (write_qxfer_response): Update call to
157 remote_escape_output.
159 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
160 Jan Kratochvil <jan.kratochvil@redhat.com>
162 Merge multiple hex conversions.
163 * gdbreplay.c (tohex): Rename to 'fromhex'.
164 (logchar): Use fromhex.
166 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
168 * server.c (handle_qxfer_libraries): Set `version' attribute for
171 2015-06-10 Gary Benson <gbenson@redhat.com>
173 * target.h (struct target_ops) <multifs_open>: New field.
174 <multifs_unlink>: Likewise.
175 <multifs_readlink>: Likewise.
176 * linux-low.c (nat/linux-namespaces.h): New include.
177 (linux_target_ops): Initialize the_target->multifs_open,
178 the_target->multifs_unlink and the_target->multifs_readlink.
179 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
180 * hostio.c (hostio_fs_pid): New static variable.
181 (hostio_handle_new_gdb_connection): New function.
182 (handle_setfs): Likewise.
183 (handle_open): Use the_target->multifs_open as appropriate.
184 (handle_unlink): Use the_target->multifs_unlink as appropriate.
185 (handle_readlink): Use the_target->multifs_readlink as
187 (handle_vFile): Handle vFile:setfs packets.
188 * server.c (handle_query): Call hostio_handle_new_gdb_connection
189 after target_handle_new_gdb_connection.
191 2015-06-10 Gary Benson <gbenson@redhat.com>
193 * configure.ac (AC_CHECK_FUNCS): Add setns.
194 * config.in: Regenerate.
195 * configure: Likewise.
196 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
197 (linux-namespaces.o): New rule.
198 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
200 2015-06-09 Gary Benson <gbenson@redhat.com>
202 * hostio.c (handle_open): Process mode argument with
205 2015-06-01 Yao Qi <yao.qi@linaro.org>
207 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
208 * linux-x86-low.c: Likewise.
210 2015-05-28 Don Breazeal <donb@codesourcery.com>
212 * linux-low.c (handle_extended_wait): Initialize
213 thread_info.last_resume_kind for new fork children.
215 2015-05-15 Pedro Alves <palves@redhat.com>
217 * target.h (target_handle_new_gdb_connection): Rewrite using if
220 2015-05-14 Joel Brobecker <brobecker@adacore.com>
222 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
223 * configure, config.in: Regenerate.
224 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
227 2015-05-12 Don Breazeal <donb@codesourcery.com>
229 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
230 PTRACE_EVENT_VFORK_DONE.
231 (linux_low_ptrace_options, extended_event_reported): Add vfork
233 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
234 and "vforkdone" for RSP 'T' Stop Reply Packet.
235 * server.h (report_vfork_events): Declare
238 2015-05-12 Don Breazeal <donb@codesourcery.com>
240 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
241 (the_low_target) <new_fork>: Initialize new member.
242 * linux-arm-low.c (arm_new_fork): New function.
243 (the_low_target) <new_fork>: Initialize new member.
244 * linux-low.c (handle_extended_wait): Call new target function
246 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
247 * linux-mips-low.c (mips_add_watchpoint): New function
248 extracted from mips_insert_point.
249 (the_low_target) <new_fork>: Initialize new member.
250 (mips_linux_new_fork): New function.
251 (mips_insert_point): Call mips_add_watchpoint.
252 * linux-x86-low.c (x86_linux_new_fork): New function.
253 (the_low_target) <new_fork>: Initialize new member.
255 2015-05-12 Don Breazeal <donb@codesourcery.com>
257 * linux-low.c (handle_extended_wait): Implement return value,
258 rename argument 'event_child' to 'event_lwp', handle
259 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
260 (linux_low_ptrace_options): New function.
261 (linux_low_filter_event): Call linux_low_ptrace_options,
262 use different argument fo linux_enable_event_reporting,
263 use return value from handle_extended_wait.
264 (extended_event_reported): New function.
265 (linux_wait_1): Call extended_event_reported and set
266 status to report fork events.
267 (linux_write_memory): Add pid to debug message.
268 (reset_lwp_ptrace_options_callback): New function.
269 (linux_handle_new_gdb_connection): New function.
270 (linux_target_ops): Initialize new structure member.
271 * linux-low.h (struct lwp_info) <waitstatus>: New member.
272 * lynx-low.c: Initialize new structure member.
273 * remote-utils.c (prepare_resume_reply): Implement stop reason
274 "fork" for "T" stop message.
275 * server.c (handle_query): Call handle_new_gdb_connection.
276 * server.h (report_fork_events): Declare global flag.
277 * target.h (struct target_ops) <handle_new_gdb_connection>:
279 (target_handle_new_gdb_connection): New macro.
280 * win32-low.c: Initialize new structure member.
282 2015-05-12 Don Breazeal <donb@codesourcery.com>
284 * mem-break.c (APPEND_TO_LIST): Define macro.
285 (clone_agent_expr): New function.
286 (clone_one_breakpoint): New function.
287 (clone_all_breakpoints): New function.
288 * mem-break.h: Declare new functions.
290 2015-05-12 Don Breazeal <donb@codesourcery.com>
292 * linux-low.c (linux_supports_fork_events): New function.
293 (linux_supports_vfork_events): New function.
294 (linux_target_ops): Initialize new structure members.
295 (initialize_low): Call linux_check_ptrace_features.
296 * lynx-low.c (lynx_target_ops): Initialize new structure
298 * server.c (report_fork_events, report_vfork_events):
300 (handle_query): Add new features to qSupported packet and
302 (captured_main): Initialize new global variables.
303 * target.h (struct target_ops) <supports_fork_events>:
305 <supports_vfork_events>: New member.
306 (target_supports_fork_events): New macro.
307 (target_supports_vfork_events): New macro.
308 * win32-low.c (win32_target_ops): Initialize new structure
311 2015-05-12 Gary Benson <gbenson@redhat.com>
313 * server.c (handle_qxfer_exec_file): Use current process
316 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
318 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
319 Remove HAVE_PTRACE_GETREGS conditionals.
320 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
321 instead of PTRACE_GETREGS and PTRACE_SETREGS.
323 2015-05-08 Yao Qi <yao.qi@linaro.org>
325 * linux-low.c (linux_supports_conditional_breakpoints): New
327 (linux_target_ops): Install new target method.
328 * lynx-low.c (lynx_target_ops): Install NULL hook for
329 supports_conditional_breakpoints.
330 * nto-low.c (nto_target_ops): Likewise.
331 * spu-low.c (spu_target_ops): Likewise.
332 * win32-low.c (win32_target_ops): Likewise.
333 * server.c (handle_query): Check
334 target_supports_conditional_breakpoints.
335 * target.h (struct target_ops) <supports_conditional_breakpoints>:
337 (target_supports_conditional_breakpoints): New macro.
339 2015-05-06 Pedro Alves <palves@redhat.com>
342 * server.c (start_inferior): If the process exits, mourn it.
344 2015-04-21 Gary Benson <gbenson@redhat.com>
346 * hostio.c (fileio_open_flags_to_host): Factored out to
347 fileio_to_host_openflags in common/fileio.c. Single use
350 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
352 * linux-xtensa-low.c (xtensa_fill_gregset)
353 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
356 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
358 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
359 (regs_info): Replace usrregs pointer with NULL.
361 2015-04-17 Gary Benson <gbenson@redhat.com>
363 * target.h (struct target_ops) <pid_to_exec_file>: New field.
364 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
365 * server.c (handle_qxfer_exec_file): New function.
366 (qxfer_packets): Add exec-file entry.
367 (handle_query): Report qXfer:exec-file:read as supported packet.
369 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
371 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
373 2015-04-09 Gary Benson <gbenson@redhat.com>
375 * hostio-errno.c (errno_to_fileio_error): Remove function.
376 Update caller to use remote_fileio_to_fio_error.
378 2015-04-09 Yao Qi <yao.qi@linaro.org>
380 * linux-low.c (linux_insert_point): Call
381 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
382 (linux_remove_point): Call remove_memory_breakpoint if type is
384 * linux-x86-low.c (x86_insert_point): Don't call
385 insert_memory_breakpoint.
386 (x86_remove_point): Don't call remove_memory_breakpoint.
388 2015-04-01 Pedro Alves <palves@redhat.com>
389 Cleber Rosa <crosa@redhat.com>
391 * server.c (gdbserver_usage): Reorganize and extend the usage
394 2015-03-24 Pedro Alves <palves@redhat.com>
396 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
397 output. Also dump TRAP_TRACE.
398 (linux_low_filter_event): In debug output, distinguish a
399 resume_stop SIGSTOP from a delayed SIGSTOP.
401 2015-03-24 Gary Benson <gbenson@redhat.com>
403 * linux-x86-low.c (x86_linux_new_thread): Moved to
405 (x86_linux_prepare_to_resume): Likewise.
407 2015-03-24 Gary Benson <gbenson@redhat.com>
409 * Makefile.in (x86-linux-dregs.o): New rule.
410 * configure.srv: Add x86-linux-dregs.o to relevant targets.
411 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
412 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
413 (x86_linux_dr_get): Likewise.
414 (x86_linux_dr_set): Likewise.
415 (update_debug_registers_callback): Likewise.
416 (x86_linux_dr_set_addr): Likewise.
417 (x86_linux_dr_get_addr): Likewise.
418 (x86_linux_dr_set_control): Likewise.
419 (x86_linux_dr_get_control): Likewise.
420 (x86_linux_dr_get_status): Likewise.
421 (x86_linux_update_debug_registers): Likewise.
423 2015-03-24 Gary Benson <gbenson@redhat.com>
425 * linux-x86-low.c (x86_linux_update_debug_registers):
426 New function, factored out from...
427 (x86_linux_prepare_to_resume): ...this.
429 2015-03-24 Gary Benson <gbenson@redhat.com>
431 * linux-x86-low.c (x86_linux_dr_get): Update comments.
432 (x86_linux_dr_set): Likewise.
433 (update_debug_registers_callback): Likewise.
434 (x86_linux_dr_set_addr): Likewise.
435 (x86_linux_dr_get_addr): Likewise.
436 (x86_linux_dr_set_control): Likewise.
437 (x86_linux_dr_get_control): Likewise.
438 (x86_linux_dr_get_status): Likewise.
439 (x86_linux_prepare_to_resume): Likewise.
441 2015-03-24 Gary Benson <gbenson@redhat.com>
443 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
444 Use perror_with_name. Pass string through gettext.
445 (x86_linux_dr_set): Likewise.
447 2015-03-24 Gary Benson <gbenson@redhat.com>
449 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
450 (x86_linux_dr_set_addr): ...this.
451 (x86_dr_low_get_addr): Rename to...
452 (x86_linux_dr_get_addr): ...this.
453 (x86_dr_low_set_control): Rename to...
454 (x86_linux_dr_set_control): ...this.
455 (x86_dr_low_get_control): Rename to...
456 (x86_linux_dr_get_control): ...this.
457 (x86_dr_low_get_status): Rename to...
458 (x86_linux_dr_get_status): ...this.
459 (x86_dr_low): Update with new function names.
461 2015-03-24 Gary Benson <gbenson@redhat.com>
463 * Makefile.in (x86-linux.o): New rule.
464 * configure.srv: Add x86-linux.o to relevant targets.
465 * linux-low.c (lwp_set_arch_private_info): New function.
466 (lwp_arch_private_info): Likewise.
467 * linux-x86-low.c: Include nat/x86-linux.h.
468 (arch_lwp_info): Removed structure.
469 (update_debug_registers_callback):
470 Use lwp_set_debug_registers_changed.
471 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
472 and lwp_set_debug_registers_changed.
473 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
475 2015-03-24 Gary Benson <gbenson@redhat.com>
477 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
478 * linux-arm-low.c (arm_new_thread): Likewise.
479 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
480 * linux-mips-low.c (mips_linux_new_thread): Likewise.
481 * linux-x86-low.c (x86_linux_new_thread): Likewise.
482 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
484 2015-03-24 Gary Benson <gbenson@redhat.com>
486 * linux-low.c (ptid_of_lwp): New function.
487 (lwp_is_stopped): Likewise.
488 (lwp_stop_reason): Likewise.
489 * linux-x86-low.c (update_debug_registers_callback):
491 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
494 2015-03-24 Gary Benson <gbenson@redhat.com>
496 * linux-low.h (linux_stop_lwp): Remove declaration.
498 2015-03-24 Gary Benson <gbenson@redhat.com>
500 * linux-low.h: Include nat/linux-nat.h.
501 * linux-low.c (iterate_over_lwps_args): New structure.
502 (iterate_over_lwps_filter): New function.
503 (iterate_over_lwps): Likewise.
504 * linux-x86-low.c (update_debug_registers_callback):
505 Update signature to what iterate_over_lwps expects.
506 Remove PID check that iterate_over_lwps now performs.
507 (x86_dr_low_set_addr): Use iterate_over_lwps.
508 (x86_dr_low_set_control): Likewise.
510 2015-03-24 Gary Benson <gbenson@redhat.com>
512 * linux-x86-low.c (x86_debug_reg_state): New function.
513 (x86_linux_prepare_to_resume): Use the above.
515 2015-03-24 Gary Benson <gbenson@redhat.com>
517 * linux-low.c (current_lwp_ptid): New function.
518 * linux-x86-low.c: Include nat/linux-nat.h.
519 (x86_dr_low_get_addr): Use current_lwp_ptid.
520 (x86_dr_low_get_control): Likewise.
521 (x86_dr_low_get_status): Likewise.
523 2015-03-20 Pedro Alves <palves@redhat.com>
525 * tracepoint.c (cmd_qtstatus): Make "str" const.
527 2015-03-20 Pedro Alves <palves@redhat.com>
529 * server.c (handle_general_set): Make "req_str" const.
531 2015-03-19 Pedro Alves <palves@redhat.com>
533 * linux-low.c (linux_resume_one_lwp): Rename to ...
534 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
535 instead call perror_with_name.
536 (check_ptrace_stopped_lwp_gone): New function.
537 (linux_resume_one_lwp): Reimplement as wrapper around
538 linux_resume_one_lwp_throw that swallows errors if the LWP is
541 2015-03-19 Pedro Alves <palves@redhat.com>
543 * linux-low.c (count_events_callback, select_event_lwp_callback):
544 No longer check whether the thread has resume_stop as last resume
547 2015-03-19 Pedro Alves <palves@redhat.com>
549 * linux-low.c (count_events_callback, select_event_lwp_callback):
550 Use the lwp's status_pending_p field, not the thread's.
552 2015-03-19 Pedro Alves <palves@redhat.com>
554 * linux-low.c (select_event_lwp_callback): Update comments to
555 no longer mention SIGTRAP.
557 2015-03-18 Gary Benson <gbenson@redhat.com>
559 * server.c (handle_query): Do not report vFile:fstat as supported.
561 2015-03-11 Gary Benson <gbenson@redhat.com>
563 * hostio.c (sys/types.h): New include.
564 (sys/stat.h): Likewise.
565 (common-remote-fileio.h): Likewise.
566 (handle_fstat): New function.
567 (handle_vFile): Handle vFile:fstat packets.
569 2015-03-11 Gary Benson <gbenson@redhat.com>
571 * configure.ac (AC_CHECK_MEMBERS): Add checks for
572 struct stat.st_blocks and struct stat.st_blksize.
573 * configure: Regenerate.
574 * config.in: Likewise.
575 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
576 (OBS): Add common-remote-fileio.o.
577 (common-remote-fileio.o): New rule.
579 2015-03-09 Pedro Alves <palves@redhat.com>
581 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
582 'struct sockaddr' pointer in 'accept' call.
584 2015-03-09 Pedro Alves <palves@redhat.com>
587 2015-03-07 Pedro Alves <palves@redhat.com>
588 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
589 or <winsock2.h> here. Instead include "gdb_socket.h".
590 (remote_open): Use union gdb_sockaddr_u.
591 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
592 or <winsock2.h> here. Instead include "gdb_socket.h".
593 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
594 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
596 (init_named_socket, gdb_agent_helper_thread): Use union
599 2015-03-07 Pedro Alves <palves@redhat.com>
601 * configure.ac (build_warnings): Move
602 -Wdeclaration-after-statement to the C-specific set.
603 * configure: Regenerate.
605 2015-03-07 Pedro Alves <palves@redhat.com>
607 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
608 or <winsock2.h> here. Instead include "gdb_socket.h".
609 (remote_open): Use union gdb_sockaddr_u.
610 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
611 or <winsock2.h> here. Instead include "gdb_socket.h".
612 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
613 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
615 (init_named_socket, gdb_agent_helper_thread): Use union
618 2015-03-07 Pedro Alves <palves@redhat.com>
620 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
623 2015-03-06 Yao Qi <yao.qi@linaro.org>
625 * linux-aarch64-low.c (aarch64_insert_point): Use
626 show_debug_regs as a boolean.
627 (aarch64_remove_point): Likewise.
629 2015-03-05 Pedro Alves <palves@redhat.com>
631 * lynx-low.c (lynx_target_ops): Install NULL hooks for
632 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
633 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
634 * nto-low.c (nto_target_ops): Likewise.
635 * spu-low.c (spu_target_ops): Likewise.
636 * win32-low.c (win32_target_ops): Likewise.
638 2015-03-04 Pedro Alves <palves@redhat.com>
640 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
641 Decide whether a breakpoint triggered based on the SIGTRAP's
643 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
644 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
645 (linux_low_filter_event): Check for breakpoints before checking
647 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
649 (linux_stopped_by_sw_breakpoint)
650 (linux_supports_stopped_by_sw_breakpoint)
651 (linux_stopped_by_hw_breakpoint)
652 (linux_supports_stopped_by_hw_breakpoint): New functions.
653 (linux_target_ops): Install new target methods.
655 2015-03-04 Pedro Alves <palves@redhat.com>
657 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
658 * server.c (swbreak_feature, hwbreak_feature): New globals.
659 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
660 (captured_main): Clear swbreak_feature and hwbreak_feature.
661 * server.h (swbreak_feature, hwbreak_feature): Declare.
662 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
663 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
664 supports_stopped_by_hw_breakpoint>: New fields.
665 (target_supports_stopped_by_sw_breakpoint)
666 (target_stopped_by_sw_breakpoint)
667 (target_supports_stopped_by_hw_breakpoint)
668 (target_stopped_by_hw_breakpoint): Declare.
670 2015-03-04 Pedro Alves <palves@redhat.com>
672 enum lwp_stop_reason -> enum target_stop_reason
673 * linux-low.c (check_stopped_by_breakpoint): Adjust.
674 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
675 (linux_wait_1, stuck_in_jump_pad_callback)
676 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
677 (linux_stopped_by_watchpoint):
678 * linux-low.h (enum lwp_stop_reason): Delete.
679 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
680 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
682 2015-03-04 Yao Qi <yao.qi@linaro.org>
684 * Makefile.in (SFILES): Add linux-aarch64-low.c.
686 2015-03-03 Gary Benson <gbenson@redhat.com>
688 * hostio.c (handle_vFile): Fix prefix lengths.
690 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
692 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
695 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
697 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
698 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
699 (clean): Add "rm -f" for above C files.
700 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
701 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
702 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
703 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
704 * linux-s390-low.c (HWCAP_S390_VX): New macro.
705 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
706 (init_registers_s390x_vx_linux64)
707 (init_registers_s390x_tevx_linux64)
708 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
709 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
711 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
712 (s390_store_vxrs_high): New functions.
713 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
715 (s390_arch_setup): Add logic for selecting one of the new target
716 descriptions. Activate the new vector regsets if applicable.
717 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
718 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
719 and init_registers_s390x_tevx_linux64.
721 2015-03-01 Pedro Alves <palves@redhat.com>
723 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
726 2015-02-27 Pedro Alves <palves@redhat.com>
728 * linux-x86-low.c (u_debugreg_offset): New function.
729 (x86_linux_dr_get, x86_linux_dr_set): Use it.
731 2015-02-27 Pedro Alves <palves@redhat.com>
733 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
734 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
735 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
736 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
737 (ps_lsetfpregs, ps_getpid)
738 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
739 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
740 (ps_lsetxregs, ps_plog): Declare.
742 2015-02-27 Pedro Alves <palves@redhat.com>
744 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
745 IP_AGENT_EXPORT_FUNC.
746 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
747 IP_AGENT_EXPORT_FUNC.
748 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
749 (IP_AGENT_EXPORT): Delete.
750 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
751 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
752 (gdb_trampoline_buffer_error, collecting, gdb_collect)
753 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
754 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
755 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
756 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
757 (traceframe_read_count, traceframe_write_count)
758 (traceframes_created, trace_state_variables, get_raw_reg)
759 (get_trace_state_variable_value, set_trace_state_variable_value)
760 (ust_loaded, helper_thread_id, cmd_buf): Use
761 IPA_SYM_EXPORTED_NAME.
762 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
763 (tracepoints) Use IP_AGENT_EXPORT_VAR.
764 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
765 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
766 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
767 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
768 EXTERN_C_PUSH/EXTERN_C_POP.
769 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
770 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
771 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
772 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
773 (traceframe_write_count, traceframe_read_count)
774 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
775 (about_to_request_buffer_space, get_trace_state_variable_value)
776 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
777 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
778 EXTERN_C_PUSH/EXTERN_C_POP.
779 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
780 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
781 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
782 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
783 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
784 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
785 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
786 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
788 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
789 (IP_AGENT_EXPORT_VAR_DECL): Define.
791 (gdb_agent_get_raw_reg): Declare.
793 2015-02-27 Tom Tromey <tromey@redhat.com>
794 Pedro Alves <palves@redhat.com>
796 Rename symbols whose names are reserved C++ keywords throughout.
798 2015-02-27 Pedro Alves <palves@redhat.com>
800 * Makefile.in (COMPILER): New, get it from autoconf.
801 (CXX): Get from autoconf instead.
802 (COMPILE.pre): Use COMPILER.
803 (CC-LD): Rename to ...
804 (CC_LD): ... this. Use COMPILER.
805 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
806 (CXX_FOR_TARGET): Default to g++ instead of gcc.
807 * acinclude.m4: Include build-with-cxx.m4.
808 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
809 Disable -Werror by default if building in C++ mode.
810 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
811 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
812 the C++ compiler. Save/restore CXXFLAGS too.
813 * configure: Regenerate.
815 2015-02-27 Pedro Alves <palves@redhat.com>
817 * acinclude.m4: Include libiberty.m4.
818 * configure.ac: Call libiberty_INIT.
819 * config.in, configure: Regenerate.
821 2015-02-26 Pedro Alves <palves@redhat.com>
823 * linux-low.c (linux_wait_1): When incrementing the PC past a
824 program breakpoint always use the_low_target.breakpoint_len as
825 increment, rather than the maximum between that and
826 the_low_target.decr_pc_after_break.
828 2015-02-23 Pedro Alves <palves@redhat.com>
830 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
831 thread was doing a step-over; always adjust the PC if
832 we stepped over a permanent breakpoint.
833 (linux_wait_1): If we stepped over breakpoint that was on top of a
834 permanent breakpoint, manually advance the PC past it.
836 2015-02-23 Pedro Alves <palves@redhat.com>
838 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
840 (x86_fill_gregset, x86_store_gregset): Use it when handling
843 2015-02-20 Pedro Alves <palves@redhat.com>
845 * thread-db.c: Include "nat/linux-procfs.h".
846 (thread_db_init): Skip listing new threads if the kernel supports
847 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
849 2015-02-20 Pedro Alves <palves@redhat.com>
851 * linux-low.c (status_pending_p_callback): Use ptid_match.
853 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
856 * linux-low.c (wstatus_maybe_breakpoint): Remove.
857 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
858 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
860 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
863 * tracepoint.c (cmd_qtinit): Add check for current_thread.
865 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
867 * linux-low.c (linux_low_btrace_conf): Print size.
868 * server.c (handle_btrace_conf_general_set): New.
869 (hanle_general_set): Call handle_btrace_conf_general_set.
870 (handle_query): Report Qbtrace-conf:bts:size as supported.
872 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
874 * linux-low.c (linux_low_enable_btrace): Update parameters.
875 (linux_low_btrace_conf): New.
876 (linux_target_ops)<to_btrace_conf>: Initialize.
877 * server.c (current_btrace_conf): New.
878 (handle_btrace_enable): Rename to ...
879 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
880 to target_enable_btrace. Update comment. Update users.
881 (handle_qxfer_btrace_conf): New.
882 (qxfer_packets): Add btrace-conf entry.
883 (handle_query): Report qXfer:btrace-conf:read as supported packet.
884 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
885 (target_ops)<read_btrace_conf>: New.
886 (target_enable_btrace): Update parameters.
887 (target_read_btrace_conf): New.
889 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
891 * server.c (handle_btrace_general_set): Remove call to
892 target_supports_btrace.
893 (supported_btrace_packets): New.
894 (handle_query): Call supported_btrace_packets.
895 * target.h: include btrace-common.h.
896 (btrace_target_info): Removed.
897 (supports_btrace, target_supports_btrace): Update parameters.
899 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
901 * Makefile.in (SFILES): Add common/btrace-common.c.
902 (OBS): Add common/btrace-common.o.
903 (btrace-common.o): Add build rules.
904 * linux-low: Include btrace-common.h.
905 (linux_low_read_btrace): Use struct btrace_data. Call
906 btrace_data_init and btrace_data_fini.
908 2015-02-06 Pedro Alves <palves@redhat.com>
910 * thread-db.c (find_new_threads_callback): Add debug output.
912 2015-02-04 Pedro Alves <palves@redhat.com>
914 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
915 (resume_stopped_resumed_lwps): New function.
916 (linux_wait_for_event_filtered): Use it.
918 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
920 * Makefile.in (SFILES): Add linux-personality.c.
921 (linux-personality.o): New rule.
922 * configure.srv (srv_linux_obj): Add linux-personality.o to the
923 list of objects to be built.
924 * linux-low.c: Include nat/linux-personality.h.
925 (linux_create_inferior): Remove code to disable address space
926 randomization (moved to ../nat/linux-personality.c). Create
927 cleanup to disable address space randomization.
929 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
931 * Makefile.in (posix-strerror.o): New rule.
932 (mingw-strerror.o): Likewise.
933 * configure: Regenerated.
934 * configure.ac: Source file ../common/common.host. Initialize new
935 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
937 2015-01-14 Yao Qi <yao@codesourcery.com>
939 * Makefile.in (SFILES): Add nat/ppc-linux.c.
940 (ppc-linux.o): New rule.
941 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
942 * configure.ac: AC_CHECK_FUNCS(getauxval).
943 * config.in: Re-generated.
944 * configure: Re-generated.
945 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
946 ppc64_64bit_inferior_p
948 2015-01-14 Yao Qi <yao@codesourcery.com>
950 * linux-ppc-low.c: Include "nat/ppc-linux.h".
951 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
952 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
953 (PT_ORIG_R3, PT_TRAP): Likewise.
954 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
955 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
956 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
958 2015-01-10 Joel Brobecker <brobecker@adacore.com>
960 * i387-fp.c (i387_cache_to_xsave): In look over
961 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
962 zmmh_low_space field by use of zmmh_high_space.
964 2015-01-09 Pedro Alves <palves@redhat.com>
966 * linux-low.c (step_over_bkpt): Move higher up in the file.
967 (handle_extended_wait): Don't store the stop_pc here.
968 (get_stop_pc): Adjust comments and rename to ...
969 (check_stopped_by_breakpoint): ... this. Record whether the LWP
970 stopped for a software breakpoint or hardware breakpoint.
971 (thread_still_has_status_pending_p): New function.
972 (status_pending_p_callback): Use
973 thread_still_has_status_pending_p. If the event is no longer
974 interesting, resume the LWP.
975 (handle_tracepoints): Add assert.
976 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
977 (wstatus_maybe_breakpoint): New function.
978 (cancel_breakpoint): Delete function.
979 (check_stopped_by_watchpoint): New function, factored out from
980 linux_low_filter_event.
981 (lp_status_maybe_breakpoint): Delete function.
982 (linux_low_filter_event): Remove filter_ptid argument.
983 Leave thread group exits pending here. Store the LWP's stop PC.
984 Always leave events pending.
985 (linux_wait_for_event_filtered): Pull all events out of the
986 kernel, and leave them all pending.
987 (count_events_callback, select_event_lwp_callback): Consider all
989 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
990 (select_event_lwp): Only give preference to the stepping LWP in
991 all-stop mode. Adjust comments.
992 (ignore_event): New function.
993 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
994 references to cancel_breakpoints. Adjust to renames. Also give
995 equal priority to all LWPs that have had events in non-stop mode.
996 If reporting a software breakpoint event, unadjust the LWP's PC.
997 (linux_wait): If linux_wait_1 returned an ignored event, retry.
998 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1000 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1001 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1002 (linux_stopped_by_watchpoint): Adjust.
1003 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1004 * linux-low.h (enum lwp_stop_reason): New.
1005 (struct lwp_info) <stop_pc>: Adjust comment.
1006 <stopped_by_watchpoint>: Delete field.
1007 <stop_reason>: New field.
1008 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1009 * mem-break.c (software_breakpoint_inserted_here)
1010 (hardware_breakpoint_inserted_here): New function.
1011 * mem-break.h (software_breakpoint_inserted_here)
1012 (hardware_breakpoint_inserted_here): Declare.
1013 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1014 (cancel_breakpoints): Delete.
1015 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1016 (upload_fast_traceframes): Remove references to
1019 2015-01-09 Pedro Alves <palves@redhat.com>
1021 * thread-db.c (find_new_threads_callback): Ignore thread if the
1022 kernel thread ID is -1.
1024 2015-01-09 Pedro Alves <palves@redhat.com>
1026 * linux-low.c (linux_attach_fail_reason_string): Move to
1027 nat/linux-ptrace.c, and rename.
1028 (linux_attach_lwp): Update comment.
1029 (attach_proc_task_lwp_callback): New function.
1030 (linux_attach): Adjust to rename and use
1031 linux_proc_attach_tgid_threads.
1032 (linux_attach_fail_reason_string): Delete declaration.
1034 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1036 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1037 * server.c (gdbserver_version): Likewise.
1039 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1041 * remote-utils.c: Include ctype.h.
1042 (input_interrupt): Explicitly handle the case when the char
1043 received is the NUL byte. Improve the printing of non-ASCII
1046 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1048 * linux-low.c (linux_low_filter_event): Update call to
1049 linux_enable_event_reporting following the addition of
1050 a new parameter to that function.
1052 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1055 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1056 (AARCH64_FPCR_REGNO): Likewise.
1057 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1058 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1059 (aarch64_store_fpregset): Likewise.
1061 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1063 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1064 Remove FIXME comment about assumption about N.
1066 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1068 * configure.ac: If large-file support is disabled in GDBserver,
1069 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1070 * configure: Regenerate.
1072 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1074 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1075 warning upon ENODATA from ptrace.
1076 * linux-s390-low.c (s390_store_tdb): New.
1077 (s390_regsets): Add regset for NT_S390_TDB.
1079 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1081 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1082 without a fill_function.
1083 * linux-s390-low.c (s390_fill_last_break): Remove.
1084 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1085 (s390_arch_setup): Use regset's size instead of fill_function for
1088 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1090 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1091 the regset's store function when ptrace returned an error.
1092 * regcache.c (get_thread_regcache): Invalidate register cache
1093 before fetching inferior's registers.
1095 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1097 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1098 while-loop as for-loop.
1099 (regsets_store_inferior_registers): Likewise.
1101 2014-11-28 Yao Qi <yao@codesourcery.com>
1103 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1104 * config.in, configure: Re-generate.
1105 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1108 2014-11-21 Yao Qi <yao@codesourcery.com>
1110 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1111 (AC_CHECK_HEADERS): Remove malloc.h.
1112 * configure: Re-generated.
1113 * config.in: Re-generated.
1114 * server.h: Don't include alloca.h and malloc.h.
1115 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1116 Don't include malloc.h.
1118 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1120 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1121 corresponding ERRNO check in same block.
1123 2014-11-12 Pedro Alves <palves@redhat.com>
1125 * server.c (cont_thread): Update comment.
1126 (start_inferior, attach_inferior): No longer clear cont_thread.
1127 (handle_v_cont): No longer set cont_thread.
1128 (captured_main): Clear cont_thread each time a GDB connects.
1130 2014-11-12 Pedro Alves <palves@redhat.com>
1132 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1133 thread, and don't resume all threads if the Hc thread has exited.
1135 2014-11-12 Pedro Alves <palves@redhat.com>
1137 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1138 the process group instead of to a specific LWP.
1140 2014-10-15 Pedro Alves <palves@redhat.com>
1143 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1145 (arm_set_thread_context): Delete.
1146 (the_low_target): Adjust.
1147 * win32-i386-low.c (debug_registers_changed)
1148 (debug_registers_used): Delete.
1149 (update_debug_registers_callback): New function.
1150 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1151 needing to update their debug registers.
1152 (win32_get_current_dr): New function.
1153 (x86_dr_low_get_addr, x86_dr_low_get_control)
1154 (x86_dr_low_get_status): Fetch the debug register from the thread
1156 (i386_initial_stuff): Adjust.
1157 (i386_get_thread_context): Remove current_event parameter. Don't
1158 clear debug_registers_changed nor copy DR values to
1160 (i386_set_thread_context): Delete.
1161 (i386_prepare_to_resume): New function.
1162 (i386_thread_added): Mark the thread as needing to update irs
1164 (the_low_target): Remove i386_set_thread_context and install
1165 i386_prepare_to_resume.
1166 * win32-low.c (win32_get_thread_context): Adjust.
1167 (win32_set_thread_context): Use SetThreadContext
1169 (win32_prepare_to_resume): New function.
1170 (win32_require_context): New function, factored out from ...
1171 (thread_rec): ... this.
1172 (continue_one_thread): Call win32_prepare_to_resume on each thread
1173 we're about to continue.
1174 (win32_resume): Call win32_prepare_to_resume on the event thread.
1175 * win32-low.h (struct win32_thread_info)
1176 <debug_registers_changed>: New field.
1177 (struct win32_target_ops): Change prototype of set_thread_context,
1178 delete set_thread_context and add prepare_to_resume.
1179 (win32_require_context): New declaration.
1181 2014-10-08 Gary Benson <gbenson@redhat.com>
1183 * server.h: Do not include common-exceptions.h.
1185 2014-10-08 Gary Benson <gbenson@redhat.com>
1187 * server.h: Do not include cleanups.h.
1189 2014-09-30 James Hogan <james.hogan@imgtec.com>
1191 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1194 2014-09-23 Yao Qi <yao@codesourcery.com>
1196 * linux-low.c (lp_status_maybe_breakpoint): New function.
1197 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1198 (count_events_callback): Likewise.
1199 (select_event_lwp_callback): Likewise.
1200 (cancel_breakpoints_callback): Likewise.
1202 2014-09-19 Don Breazeal <donb@codesourcery.com>
1204 * linux-low.c (handle_extended_wait): Call
1205 linux_ptrace_get_extended_event.
1206 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1207 linux_is_extended_waitstatus.
1209 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1211 * Makefile.in (CPPFLAGS): Define.
1212 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1213 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1215 2014-09-16 Gary Benson <gbenson@redhat.com>
1217 * inferiors.h (current_inferior): Renamed as...
1218 (current_thread): New variable. All uses updated.
1219 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1220 (maybe_move_out_of_jump_pad): Likewise.
1221 (cancel_breakpoint): Likewise.
1222 (linux_low_filter_event): Likewise.
1223 (wait_for_sigstop): Likewise.
1224 (linux_resume_one_lwp): Likewise.
1225 (need_step_over_p): Likewise.
1226 (start_step_over): Likewise.
1227 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1228 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1229 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1230 and save_inferior as saved_thread.
1231 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1233 (regcache_invalidate_thread): Likewise.
1234 * remote-utils.c (prepare_resume_reply): Likewise.
1235 * thread-db.c (thread_db_get_tls_address): Likewise.
1236 (disable_thread_event_reporting): Likewise.
1237 (remove_thread_event_breakpoints): Likewise.
1238 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1240 * target.h (set_desired_inferior): Renamed as...
1241 (set_desired_thread): New declaration. All uses updated.
1242 * server.c (myresume): Updated comment to reference thread instead
1244 (handle_serial_event): Likewise.
1245 (handle_target_event): Likewise.
1247 2014-09-12 Tom Tromey <tromey@redhat.com>
1248 Gary Benson <gbenson@redhat.com>
1250 * regcache.h: Include common-regcache.h.
1251 (regcache_read_pc): Don't declare.
1252 * regcache.c (get_thread_regcache_for_ptid): New function.
1254 2014-09-11 Tom Tromey <tromey@redhat.com>
1255 Gary Benson <gbenson@redhat.com>
1257 * symbol.c: New file.
1258 * Makefile.in (SFILES): Add symbol.c.
1259 (OBS): Add symbol.o.
1261 2014-09-11 Gary Benson <gbenson@redhat.com>
1263 * target.c (target_stop_ptid, target_continue_ptid): New
1266 2014-09-11 Tom Tromey <tromey@redhat.com>
1267 Gary Benson <gbenson@redhat.com>
1269 * target.h: Include target/target.h.
1270 * target.c (target_read_memory, target_read_uint32)
1271 (target_write_memory): New functions.
1273 2014-09-11 Gary Benson <gbenson@redhat.com>
1275 * server.h (debug_hw_points): Don't declare.
1276 * server.c (debug_hw_points): Don't define. Replace all uses
1277 with show_debug_regs.
1278 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1279 all uses with show_debug_regs.
1281 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1283 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1284 endianness into account.
1285 (ppc_supply_ptrace_register): Likewise.
1287 2014-09-03 James Hogan <james.hogan@imgtec.com>
1289 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1290 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1292 2014-09-03 Gary Benson <gbenson@redhat.com>
1294 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1295 ALL_DEBUG_ADDRESS_REGISTERS.
1297 2014-09-02 Gary Benson <gbenson@redhat.com>
1299 * i386-low.h: Renamed as...
1300 * x86-low.h: New file. All type, function and variable name
1301 prefixes changed from "i386_" to "x86_". All references updated.
1302 * i386-low.c: Renamed as...
1303 * x86-low.c: New file. All type, function and variable name
1304 prefixes changed from "i386_" to "x86_". All references updated.
1306 2014-09-02 Gary Benson <gbenson@redhat.com>
1308 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1309 (x86_linux_new_thread): Likewise.
1311 2014-08-29 Gary Benson <gbenson@redhat.com>
1313 * server.h (setjmp.h): Do not include.
1314 (toplevel): Do not declare.
1315 (common-exceptions.h): Include.
1316 (cleanups.h): Likewise.
1317 * server.c (toplevel): Do not define.
1318 (exit_code): New static global.
1319 (detach_or_kill_for_exit_cleanup): New function.
1320 (main): New function. Original main renamed to...
1321 (captured_main): New function.
1322 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1324 2014-08-29 Gary Benson <gbenson@redhat.com>
1326 * Makefile.in (SFILES): Add common/common-exceptions.c.
1327 (OBS): Add common-exceptions.o.
1328 (common-exceptions.o): New rule.
1329 * utils.c (prepare_to_throw_exception): New function.
1331 2014-08-29 Gary Benson <gbenson@redhat.com>
1333 * config.in: Regenerate.
1334 * configure: Likewise.
1336 2014-08-29 Gary Benson <gbenson@redhat.com>
1338 * Makefile.in (SFILES): Add common/cleanups.c.
1340 (cleanups.o): New rule.
1342 2014-08-29 Gary Benson <gbenson@redhat.com>
1344 * utils.c (internal_vwarning): New function.
1346 2014-08-28 Gary Benson <gbenson@redhat.com>
1348 * utils.h (fatal): Remove declaration.
1349 * utils.c (fatal): Remove function.
1351 2014-08-28 Gary Benson <gbenson@redhat.com>
1353 * tracepoint.c (gdb_agent_init): Replace fatal with
1355 (initialize_tracepoint): Likewise.
1357 2014-08-28 Gary Benson <gbenson@redhat.com>
1359 * remote-utils.c (remote_prepare): Replace fatal with error.
1361 2014-08-28 Gary Benson <gbenson@redhat.com>
1363 * linux-low.c (linux_async): Replace fatal with warning.
1365 (linux_start_non_stop): Return -1 if linux_async failed.
1367 2014-08-28 Gary Benson <gbenson@redhat.com>
1369 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1371 (i386_dr_low_get_addr): Remove vague comment.
1372 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1375 2014-08-28 Gary Benson <gbenson@redhat.com>
1377 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1378 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1380 (linux_resume_one_lwp): Likewise.
1381 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1383 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1384 with internal_error.
1385 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1386 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1387 (find_register_by_name): Replace fatal with internal_error.
1388 (find_regno): Likewise.
1389 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1390 * thread-db.c (thread_db_create_event): Likewise.
1391 (thread_db_load_search): Likewise.
1392 (try_thread_db_load_1): Likewise.
1393 * tracepoint.c (get_jump_space_head): Replace fatal with
1395 (claim_trampoline_space): Likewise.
1396 (have_fast_tracepoint_trampoline_buffer): Likewise.
1397 (cmd_qtstart): Likewise.
1398 (stop_tracing): Likewise.
1399 (fast_tracepoint_collecting): Likewise.
1400 (target_malloc): Likewise.
1401 (download_tracepoint): Likewise.
1402 (download_trace_state_variables): Replace check with gdb_assert.
1403 (upload_fast_traceframes): Replace fatal with internal_error.
1405 2014-08-19 Tom Tromey <tromey@redhat.com>
1406 Gary Benson <gbenson@redhat.com>
1408 * Makefile.in (SFILES): Add common/common-debug.c.
1409 (OBS): Add common-debug.o.
1410 (common-debug.o): New rule.
1411 * debug.h (debug_printf): Don't declare.
1412 * debug.c (debug_printf): Renamed and rewritten as...
1413 (debug_vprintf): New function.
1415 2014-08-19 Gary Benson <gbenson@redhat.com>
1417 * utils.h: Do not include print-utils.h.
1419 2014-08-19 Tom Tromey <tromey@redhat.com>
1420 Gary Benson <gbenson@redhat.com>
1422 * server.h: Add static assertion.
1423 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1425 2014-08-19 Tom Tromey <tromey@redhat.com>
1426 Gary Benson <gbenson@redhat.com>
1428 * Makefile.in (SFILES): Add common/errors.c.
1429 (OBS): Add errors.o.
1430 (IPA_OBS): Add errors-ipa.o.
1431 (errors.o): New rule.
1432 (errors-ipa.o): Likewise.
1433 * utils.h (perror_with_name, error, warning): Don't declare.
1434 * utils.c (warning): Renamed and rewritten as...
1435 (vwarning): New function.
1436 (error): Renamed and rewritten as...
1437 (verror): New function.
1438 (internal_error): Renamed and rewritten as...
1439 (internal_verror): New function.
1441 2014-08-07 Gary Benson <gbenson@redhat.com>
1443 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1444 * configure: Regenerate.
1445 * config.in: Likewise.
1446 * server.h: Do not include errno.h.
1447 * event-loop.c: Likewise.
1448 * hostio-errno.c: Likewise.
1449 * linux-low.c: Likewise.
1450 * remote-utils.c: Likewise.
1451 * spu-low.c: Likewise.
1452 * utils.c: Likewise.
1453 * gdbreplay.c: Unconditionally include errno.h.
1455 2014-08-07 Gary Benson <gbenson@redhat.com>
1457 * server.h: Do not include string.h.
1458 * event-loop.c: Likewise.
1459 * linux-low.c: Likewise.
1460 * regcache.c: Likewise.
1461 * remote-utils.c: Likewise.
1462 * spu-low.c: Likewise.
1463 * utils.c: Likewise.
1465 2014-08-07 Gary Benson <gbenson@redhat.com>
1467 * server.h: Do not include gdb_assert.h.
1469 2014-08-07 Gary Benson <gbenson@redhat.com>
1471 * server.h: Do not include common-utils.h.
1473 2014-08-07 Gary Benson <gbenson@redhat.com>
1475 * server.h: Do not include ptid.h.
1476 * notif.h: Likewise.
1478 2014-08-07 Gary Benson <gbenson@redhat.com>
1480 * server.h: Do not include gdb_locale.h.
1482 2014-08-07 Gary Benson <gbenson@redhat.com>
1484 * server.h: Do not include gdb/signals.h.
1485 * win32-low.c: Likewise.
1487 2014-08-07 Gary Benson <gbenson@redhat.com>
1489 * server.h: Do not include pathmax.h.
1491 2014-08-07 Gary Benson <gbenson@redhat.com>
1493 * server.h: Do not include libiberty.h.
1494 * linux-bfin-low.c: Likewise.
1496 2014-08-07 Gary Benson <gbenson@redhat.com>
1498 * server.h: Do not include ansidecl.h.
1500 2014-08-07 Gary Benson <gbenson@redhat.com>
1502 * linux-x86-low.c: Do not include stddef.h.
1503 * lynx-ppc-low.c: Likewise.
1504 * tracepoint.c: Likewise.
1506 2014-08-07 Gary Benson <gbenson@redhat.com>
1508 * server.h: Do not include stdarg.h.
1509 * nto-low.c: Likewise.
1511 2014-08-07 Gary Benson <gbenson@redhat.com>
1513 * server.h: Do not include stdlib.h.
1514 * inferiors.c: Likewise.
1515 * linux-low.c: Likewise.
1516 * regcache.c: Likewise.
1517 * spu-low.c: Likewise.
1518 * tracepoint.c: Likewise.
1519 * utils.c: Likewise.
1521 2014-08-07 Gary Benson <gbenson@redhat.com>
1523 * server.h: Do not include stdio.h.
1524 * linux-low.c: Likewise.
1525 * remote-utils.c: Likewise.
1526 * spu-low.c: Likewise.
1527 * utils.c: Likewise.
1528 * wincecompat.c: Likewise.
1530 2014-08-06 Gary Benson <gbenson@redhat.com>
1532 * regcache.c (init_register_cache): Move conditionals inside if.
1534 2014-08-06 Gary Benson <gbenson@redhat.com>
1536 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1538 2014-07-31 Gary Benson <gbenson@redhat.com>
1540 * ax.h: Do not include server.h.
1541 * gdbthread.h: Likewise.
1542 * lynx-low.h: Likewise.
1543 * notif.h: Likewise.
1545 2014-07-30 Gary Benson <gbenson@redhat.com>
1547 * server.h: Include common-defs.h.
1548 Do not include config.h or build-gnulib-gdbserver/config.h.
1550 2014-07-30 Gary Benson <gbenson@redhat.com>
1552 * hostio-errno.c: Move server.h to top of includes list.
1553 * inferiors.c: Likewise.
1554 * linux-x86-low.c: Likewise.
1555 * notif.c: Include server.h.
1557 2014-07-24 Tom Tromey <tromey@redhat.com>
1558 Gary Benson <gbenson@redhat.com>
1560 * server.h (CORE_ADDR): Now unsigned.
1562 2014-07-16 Pedro Alves <palves@redhat.com>
1564 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1566 2014-07-15 Pedro Alves <palves@redhat.com>
1568 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1571 2014-07-11 Pedro Alves <palves@redhat.com>
1573 * linux-low.c (kill_wait_lwp): New function, based on
1574 kill_one_lwp_callback, but use my_waitpid directly.
1575 (kill_one_lwp_callback, linux_kill): Use it.
1577 2014-06-23 Pedro Alves <palves@redhat.com>
1579 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1580 before setting DR0..DR3.
1582 2014-06-20 Gary Benson <gbenson@redhat.com>
1584 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1585 * configure: Regenerated.
1586 * config.in: Likewise.
1588 2014-06-20 Gary Benson <gbenson@redhat.com>
1590 * Makefile.in (SFILES): Update locations for files moved
1592 (object file files): Reordered.
1594 2014-06-20 Gary Benson <gbenson@redhat.com>
1596 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1597 (i386_dr_low_set_addr): Likewise.
1598 (i386_dr_low_get_addr): Likewise.
1599 (i386_dr_low_can_set_control): Likewise.
1600 (i386_dr_low_set_control): Likewise.
1601 (i386_dr_low_get_control): Likewise.
1602 (i386_dr_low_get_status): Likewise.
1603 (i386_get_debug_register_length): Likewise.
1604 * linux-x86-low.c (i386_dr_low_set_addr):
1605 Changed signature. Made static.
1606 (i386_dr_low_get_addr): Likewise.
1607 (i386_dr_low_set_control): Likewise.
1608 (i386_dr_low_get_control): Likewise.
1609 (i386_dr_low_get_status): Likewise.
1610 (i386_dr_low): New global variable.
1611 * win32-i386-low.c (i386_dr_low_set_addr):
1612 Changed signature. Made static.
1613 (i386_dr_low_get_addr): Likewise.
1614 (i386_dr_low_set_control): Likewise.
1615 (i386_dr_low_get_control): Likewise.
1616 (i386_dr_low_get_status): Likewise.
1617 (i386_dr_low): New global variable.
1619 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1621 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1622 * Makefile.in (AR, AR_FLAGS): Define.
1623 * configure: Regenerate.
1625 2014-06-19 Gary Benson <gbenson@redhat.com>
1627 * Makefile.in (i386-dregs.o): New rule.
1628 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1629 * i386-low.c (target.h): Remove include.
1630 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1631 (DR_CONTROL_SHIFT): Likewise.
1632 (DR_CONTROL_SIZE): Likewise.
1633 (DR_RW_EXECUTE): Likewise.
1634 (DR_RW_WRITE): Likewise.
1635 (DR_RW_READ): Likewise.
1636 (DR_RW_IORW): Likewise.
1637 (DR_LEN_1): Likewise.
1638 (DR_LEN_2): Likewise.
1639 (DR_LEN_4): Likewise.
1640 (DR_LEN_8): Likewise.
1641 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1642 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1643 (DR_ENABLE_SIZE): Likewise.
1644 (DR_LOCAL_SLOWDOWN): Likewise.
1645 (DR_GLOBAL_SLOWDOWN): Likewise.
1646 (DR_CONTROL_RESERVED): Likewise.
1647 (I386_DR_CONTROL_MASK): Likewise.
1648 (I386_DR_VACANT): Likewise.
1649 (I386_DR_LOCAL_ENABLE): Likewise.
1650 (I386_DR_GLOBAL_ENABLE): Likewise.
1651 (I386_DR_DISABLE): Likewise.
1652 (I386_DR_SET_RW_LEN): Likewise.
1653 (I386_DR_GET_RW_LEN): Likewise.
1654 (I386_DR_WATCH_HIT): Likewise.
1655 (i386_wp_op_t): Likewise.
1656 (i386_show_dr): Likewise.
1657 (i386_length_and_rw_bits): Likewise.
1658 (i386_insert_aligned_watchpoint): Likewise.
1659 (i386_remove_aligned_watchpoint): Likewise.
1660 (i386_handle_nonaligned_watchpoint): Likewise.
1661 i386_update_inferior_debug_regs(): Likewise.
1662 (i386_dr_insert_watchpoint): Likewise.
1663 (i386_dr_remove_watchpoint): Likewise.
1664 (i386_dr_region_ok_for_watchpoint): Likewise.
1665 (i386_dr_stopped_data_address): Likewise.
1666 (i386_dr_stopped_by_watchpoint): Likewise.
1668 2014-06-19 Gary Benson <gbenson@redhat.com>
1670 * i386-low.c (i386_dr_show): Renamed to
1671 i386_show_dr and made static. All uses updated.
1672 (i386_dr_length_and_rw_bits): Renamed to
1673 i386_length_and_rw_bits and made static.
1675 (i386_dr_insert_aligned_watchpoint): Renamed to
1676 i386_insert_aligned_watchpoint and made static.
1678 (i386_dr_remove_aligned_watchpoint): Renamed to
1679 i386_remove_aligned_watchpoint and made static.
1681 (i386_dr_update_inferior_debug_regs): Renamed to
1682 i386_update_inferior_debug_regs and made static.
1685 2014-06-18 Gary Benson <gbenson@redhat.com>
1687 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1688 (i386_dr_low_can_set_control): Likewise.
1689 (i386_get_debug_register_length): Likewise.
1690 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1691 (i386_dr_low_can_set_control): Likewise.
1692 (i386_get_debug_register_length): Likewise.
1694 2014-06-17 Gary Benson <gbenson@redhat.com>
1696 * i386-low.h (i386-dregs.h): New include.
1697 (DR_FIRSTADDR): Now in i386-dregs.h.
1698 (DR_LASTADDR): Likewise.
1699 (DR_NADDR): Likewise.
1700 (DR_STATUS): Likewise.
1701 (DR_CONTROL): Likewise.
1702 (i386_debug_reg_state): Likewise.
1703 (i386_dr_insert_watchpoint): Likewise.
1704 (i386_dr_remove_watchpoint): Likewise.
1705 (i386_dr_region_ok_for_watchpoint): Likewise.
1706 (i386_dr_stopped_data_address): Likewise.
1707 (i386_dr_stopped_by_watchpoint): Likewise.
1708 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1710 2014-06-18 Gary Benson <gbenson@redhat.com>
1712 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1713 i386_dr_insert_watchpoint.
1714 (i386_low_remove_watchpoint): Renamed to
1715 i386_dr_remove_watchpoint.
1716 (i386_low_region_ok_for_watchpoint): Renamed to
1717 i386_dr_region_ok_for_watchpoint.
1718 (i386_low_stopped_data_address): Renamed to
1719 i386_dr_stopped_data_address.
1720 (i386_low_stopped_by_watchpoint): Renamed to
1721 i386_dr_stopped_by_watchpoint.
1722 * i386-low.c (i386_show_dr): Renamed to
1723 i386_dr_show and made nonstatic. All uses updated.
1724 (i386_length_and_rw_bits): Renamed to
1725 i386_dr_length_and_rw_bits and made nonstatic.
1727 (i386_insert_aligned_watchpoint): Renamed to
1728 i386_dr_insert_aligned_watchpoint and made nonstatic.
1730 (i386_remove_aligned_watchpoint): Renamed to
1731 i386_dr_remove_aligned_watchpoint and made nonstatic.
1733 (i386_update_inferior_debug_regs): Renamed to
1734 i386_dr_update_inferior_debug_regs and made nonstatic.
1736 (i386_low_insert_watchpoint): Renamed to
1737 i386_dr_insert_watchpoint. All uses updated.
1738 (i386_low_remove_watchpoint): Renamed to
1739 i386_dr_remove_watchpoint. All uses updated.
1740 (i386_low_region_ok_for_watchpoint): Renamed to
1741 i386_dr_region_ok_for_watchpoint. All uses updated.
1742 (i386_low_stopped_data_address): Renamed to
1743 i386_dr_stopped_data_address. All uses updated.
1744 (i386_low_stopped_by_watchpoint): Renamed to
1745 i386_dr_stopped_by_watchpoint. All uses updated.
1747 2014-06-18 Gary Benson <gbenson@redhat.com>
1749 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1750 (i386_dr_low_can_set_control): Likewise.
1751 (i386_insert_aligned_watchpoint): New check.
1753 2014-06-18 Gary Benson <gbenson@redhat.com>
1755 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1758 2014-06-18 Gary Benson <gbenson@redhat.com>
1760 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1761 instead of fatal and error.
1762 (i386_handle_nonaligned_watchpoint): Likewise.
1764 2014-06-18 Gary Benson <gbenson@redhat.com>
1766 * i386-low.c (i386_get_debug_register_length): New macro.
1767 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1768 (i386_show_dr): Use debug_printf instead of fprintf. Use
1769 phex to format values.
1771 2014-06-18 Gary Benson <gbenson@redhat.com>
1773 * i386-low.h: Comment changes.
1774 * i386-low.c: Likewise.
1776 2014-06-18 Gary Benson <gbenson@redhat.com>
1778 * i386-low.c: Whitespace changes.
1780 2014-06-12 Tom Tromey <tromey@redhat.com>
1782 * utils.c (freeargv): Remove.
1784 2014-06-12 Tom Tromey <tromey@redhat.com>
1786 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1787 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1788 (parse_debug_format_options): Likewise.
1789 (gdbserver_usage): Likewise.
1790 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1791 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1792 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1794 ($(LIBGNU)): Depend on libiberty.
1795 (all-lib): Recurse into all subdirs.
1796 (install-only): Invoke "install" target in subdirs.
1797 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1799 * configure: Rebuild.
1800 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1801 for vasprintf, vsnprintf, or gettimeofday.
1802 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1805 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1807 * development.sh: Delete.
1808 * Makefile.in (config.status): Adjust dependency on development.sh.
1809 * configure.ac: Adjust development.sh source call.
1810 * configure: Regenerate.
1812 2014-06-02 Pedro Alves <palves@redhat.com>
1814 * ax.c (gdb_free_agent_expr): New function.
1815 * ax.h (gdb_free_agent_expr): New declaration.
1816 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1818 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1820 (clear_breakpoint_conditions_and_commands): New function.
1821 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1822 (clear_breakpoint_conditions_and_commands): New declaration.
1824 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1826 * linux-aarch64-low.c (asm/ptrace.h): Include.
1828 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1830 Fix TLS access for -static -pthread.
1831 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1832 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1833 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1835 2014-05-20 Pedro Alves <palves@redhat.com>
1837 * linux-aarch64-low.c (aarch64_insert_point)
1838 (aarch64_remove_point): No longer check whether the type is
1839 supported here. Adjust to new interface.
1840 (the_low_target): Install aarch64_supports_z_point_type as
1841 supports_z_point_type method.
1842 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1843 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1844 instead of a Z packet char. Adjust.
1845 (arm_supports_z_point_type): New function.
1846 (arm_insert_point, arm_remove_point): Adjust to new interface.
1847 (the_low_target): Install arm_supports_z_point_type.
1848 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1849 (cris_insert_point, cris_remove_point): Adjust to new interface.
1850 Don't check whether the type is supported here.
1851 (the_low_target): Install cris_supports_z_point_type.
1852 * linux-low.c (linux_supports_z_point_type): New function.
1853 (linux_insert_point, linux_remove_point): Adjust to new interface.
1854 * linux-low.h (struct linux_target_ops) <insert_point,
1855 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1856 raw_breakpoint pointer parameter.
1857 <supports_z_point_type>: New method.
1858 * linux-mips-low.c (mips_supports_z_point_type): New function.
1859 (mips_insert_point, mips_remove_point): Adjust to new interface.
1860 Use mips_supports_z_point_type.
1861 (the_low_target): Install mips_supports_z_point_type.
1862 * linux-ppc-low.c (the_low_target): Install NULL as
1863 supports_z_point_type method.
1864 * linux-s390-low.c (the_low_target): Install NULL as
1865 supports_z_point_type method.
1866 * linux-sparc-low.c (the_low_target): Install NULL as
1867 supports_z_point_type method.
1868 * linux-x86-low.c (x86_supports_z_point_type): New function.
1869 (x86_insert_point): Adjust to new insert_point interface. Use
1870 insert_memory_breakpoint. Adjust to new
1871 i386_low_insert_watchpoint interface.
1872 (x86_remove_point): Adjust to remove_point interface. Use
1873 remove_memory_breakpoint. Adjust to new
1874 i386_low_remove_watchpoint interface.
1875 (the_low_target): Install x86_supports_z_point_type.
1876 * lynx-low.c (lynx_target_ops): Install NULL as
1877 supports_z_point_type callback.
1878 * nto-low.c (nto_supports_z_point_type): New.
1879 (nto_insert_point, nto_remove_point): Adjust to new interface.
1880 (nto_target_ops): Install nto_supports_z_point_type.
1881 * mem-break.c: Adjust intro comment.
1882 (struct raw_breakpoint) <raw_type, size>: New fields.
1883 <inserted>: Update comment.
1884 <shlib_disabled>: Delete field.
1885 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1886 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1887 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1888 (raw_bkpt_type_to_target_hw_bp_type): New function.
1889 (find_enabled_raw_code_breakpoint_at): New function.
1890 (find_raw_breakpoint_at): New type and size parameters. Use them.
1891 (insert_memory_breakpoint): New function, based off
1892 set_raw_breakpoint_at.
1893 (remove_memory_breakpoint): New function.
1894 (set_raw_breakpoint_at): Reimplement.
1895 (set_breakpoint): New, based on set_breakpoint_at.
1896 (set_breakpoint_at): Reimplement.
1897 (delete_raw_breakpoint): Go through the_target->remove_point
1898 instead of assuming memory breakpoints.
1899 (find_gdb_breakpoint_at): Delete.
1900 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1901 (find_gdb_breakpoint): New function.
1902 (set_gdb_breakpoint_at): Delete.
1903 (z_type_supported): New function.
1904 (set_gdb_breakpoint_1): New function, loosely based off
1905 set_gdb_breakpoint_at.
1906 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1907 (delete_gdb_breakpoint_at): Delete.
1908 (delete_gdb_breakpoint_1): New function, loosely based off
1909 delete_gdb_breakpoint_at.
1910 (delete_gdb_breakpoint): New function.
1911 (clear_gdb_breakpoint_conditions): Rename to ...
1912 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1914 (add_condition_to_breakpoint): Make static.
1915 (add_breakpoint_condition): Take a struct breakpoint pointer
1916 instead of an address. Adjust.
1917 (gdb_condition_true_at_breakpoint): Rename to ...
1918 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1920 (gdb_condition_true_at_breakpoint): Reimplement.
1921 (add_breakpoint_commands): Take a struct breakpoint pointer
1922 instead of an address. Adjust.
1923 (gdb_no_commands_at_breakpoint): Rename to ...
1924 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1925 parameter. Return true if no breakpoint was found. Change debug
1927 (gdb_no_commands_at_breakpoint): Reimplement.
1928 (run_breakpoint_commands): Rename to ...
1929 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1930 and change return type to boolean.
1931 (run_breakpoint_commands): New function.
1932 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1933 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1934 breakpoint. Go through the_target->remove_point instead of
1935 assuming memory breakpoint.
1936 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1937 software and hardware breakpoints.
1938 (reinsert_raw_breakpoint): Go through the_target->insert_point
1939 instead of assuming memory breakpoint.
1940 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1941 software and hardware breakpoints.
1942 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1943 Check both software and hardware breakpoints.
1944 (validate_inserted_breakpoint): Assert the breakpoint is a
1945 software breakpoint. Set the inserted flag to -1 instead of
1946 setting shlib_disabled.
1947 (delete_disabled_breakpoints): Adjust.
1948 (validate_breakpoints): Only validate software breakpoints.
1949 Adjust to inserted flag change.
1950 (check_mem_read, check_mem_write): Skip breakpoint types other
1951 than software breakpoints. Adjust to inserted flag change.
1952 * mem-break.h (enum raw_bkpt_type): New enum.
1953 (raw_breakpoint, struct process_info): Forward declare.
1954 (Z_packet_to_target_hw_bp_type): Delete declaration.
1955 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1956 (set_gdb_breakpoint, delete_gdb_breakpoint)
1957 (clear_breakpoint_conditions): New declarations.
1958 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1959 (breakpoint_inserted_here): Update comment.
1960 (add_breakpoint_condition, add_breakpoint_commands): Replace
1961 address parameter with a breakpoint pointer parameter.
1962 (gdb_breakpoint_here): Update comment.
1963 (delete_gdb_breakpoint_at): Delete.
1964 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1965 * server.c (process_point_options): Take a struct breakpoint
1966 pointer instead of an address. Adjust.
1967 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1968 delete_gdb_breakpoint.
1969 * spu-low.c (spu_target_ops): Install NULL as
1970 supports_z_point_type method.
1971 * target.h: Include mem-break.h.
1972 (struct target_ops) <prepare_to_access_memory>: Update comment.
1973 <supports_z_point_type>: New field.
1974 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1975 instead of a char. Also take a raw breakpoint pointer.
1976 * win32-arm-low.c (the_low_target): Install NULL as
1977 supports_z_point_type.
1978 * win32-i386-low.c (i386_supports_z_point_type): New function.
1979 (i386_insert_point, i386_remove_point): Adjust to new interface.
1980 (the_low_target): Install i386_supports_z_point_type.
1981 * win32-low.c (win32_supports_z_point_type): New function.
1982 (win32_insert_point, win32_remove_point): Adjust to new interface.
1983 (win32_target_ops): Install win32_supports_z_point_type.
1984 * win32-low.h (struct win32_target_ops):
1985 <supports_z_point_type>: New method.
1986 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1987 instead of a char. Also take a raw breakpoint pointer.
1989 2014-05-20 Pedro Alves <palves@redhat.com>
1991 * mem-break.h: Include break-common.h.
1992 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1993 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1994 (Z_packet_to_target_hw_bp_type): New declaration.
1995 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1996 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1997 (Z_PACKET_ACCESS_WP): Delete macros.
1998 (Z_packet_to_hw_type): Delete function.
1999 * i386-low.h: Don't include break-common.h here.
2000 (Z_packet_to_hw_type): Delete declaration.
2001 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2002 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2003 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2004 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2005 * linux-aarch64-low.c: Don't include break-common.h here.
2006 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2007 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2008 (Z_packet_to_target_hw_bp_type): Delete function.
2009 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2011 (mips_insert_point, mips_remove_point): Use
2012 Z_packet_to_target_hw_bp_type.
2014 2014-05-20 Pedro Alves <palves@redhat.com>
2016 * linux-aarch64-low.c: Include break-common.h.
2017 (enum target_point_type): Delete.
2018 (Z_packet_to_point_type): Rename to ...
2019 (Z_packet_to_target_hw_bp_type): ... this, and return a
2020 target_hw_bp_type instead.
2021 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2022 instead of an enum target_point_type.
2023 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2025 (aarch64_dr_state_insert_one_point)
2026 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2027 (aarch64_handle_aligned_watchpoint)
2028 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2029 Take an enum target_hw_bp_type instead of an enum
2031 (aarch64_supports_z_point_type): New function.
2032 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2033 use Z_packet_to_target_hw_bp_type.
2035 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2037 * configure.ac: Only use -Werror by default when DEVELOPMENT
2039 * configure: Regenerate.
2041 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2043 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2044 * linux-x86-low.c (X86_64_USER_REGS): New.
2045 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2047 2014-04-28 Yao Qi <yao@codesourcery.com>
2049 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2052 2014-04-25 Pedro Alves <palves@redhat.com>
2055 * linux-low.c (linux_attach_fail_reason_string): New function.
2056 (linux_attach_lwp): Delete.
2057 (linux_attach_lwp_1): Rename to ...
2058 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2059 argument. Remove "initial" parameter. Return int instead of
2060 void. Don't error or warn here.
2061 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2062 failure to attach to the tgid. Call warning when failing to
2064 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2065 argument. Remove "initial" parameter. Return int instead of
2066 void. Don't error or warn here.
2067 (linux_attach_fail_reason_string): New declaration.
2068 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2069 interface change. Use linux_attach_fail_reason_string.
2071 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2072 Walfred Tedeschi <walfred.tedeschi@intel.com>
2074 * Makefile.in: Added rules to handle new files
2075 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2076 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2077 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2078 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2079 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2080 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2082 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2083 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2084 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2085 i386/x32-avx512.xml.
2086 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2087 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2088 i386/x32-avx512-linux.xml.
2089 * i387-fp.c (num_avx512_k_registers): New constant for number
2091 (num_avx512_zmmh_low_registers): New constant for number of
2092 lower ZMM registers (0-15).
2093 (num_avx512_zmmh_high_registers): New constant for number of
2094 higher ZMM registers (16-31).
2095 (num_avx512_ymmh_registers): New contant for number of higher
2096 YMM registers (ymm16-31 added by avx521 on x86_64).
2097 (num_avx512_xmm_registers): New constant for number of higher
2098 XMM registers (xmm16-31 added by AVX512 on x86_64).
2099 (struct i387_xsave): Add space for AVX512 registers.
2100 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2101 Add code to handle AVX512 registers.
2102 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2103 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2104 prototypei from generated file.
2105 (tdesc_amd64_avx512_linux): Likewise.
2106 (init_registers_x32_avx512_linux): Likewise.
2107 (tdesc_x32_avx512_linux): Likewise.
2108 (init_registers_i386_avx512_linux): Likewise.
2109 (tdesc_i386_avx512_linux): Likewise.
2110 (x86_64_regmap): Add AVX512 registers.
2111 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2113 (initialize_low_arch): Add code to initialize AVX512 registers.
2115 2014-04-23 Pedro Alves <palves@redhat.com>
2117 * mem-break.c (find_gdb_breakpoint_at): Make static.
2118 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2120 2014-04-23 Pedro Alves <palves@redhat.com>
2122 * i386-low.c: Don't include break-common.h here.
2123 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2124 prototype to take target_hw_bp_type as argument instead of a Z
2126 * i386-low.h: Include break-common.h here.
2127 (Z_packet_to_hw_type): Declare.
2128 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2130 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2131 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2132 (x86_remove_point): Convert the packet number to a
2133 target_hw_bp_type before calling i386_low_remove_watchpoint.
2134 * win32-i386-low.c (i386_insert_point): Convert the packet number
2135 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2136 (i386_remove_point): Convert the packet number to a
2137 target_hw_bp_type before calling i386_low_remove_watchpoint.
2139 2014-04-23 Pedro Alves <palves@redhat.com>
2141 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2143 2014-04-10 Pedro Alves <palves@redhat.com>
2145 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2146 Check if the condition or command is NULL before checking if the
2147 breakpoint is known. On success, return true.
2148 * mem-break.h (add_breakpoint_condition): Document return.
2149 (add_breakpoint_commands): Add describing comment.
2150 * server.c (skip_to_semicolon): New function.
2151 (process_point_options): Use it.
2153 2014-04-09 Pedro Alves <palves@redhat.com>
2155 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2158 2014-02-27 Pedro Alves <palves@redhat.com>
2161 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2163 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2165 (last_thread_of_process_p): Take a PID argument instead of a
2167 (linux_wait_for_lwp): Delete.
2168 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2170 (linux_low_filter_event): New function, party factored out from
2171 linux_wait_for_event.
2172 (linux_wait_for_event): Rename to ...
2173 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2174 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2175 sigsuspend. Check for zombie leaders.
2176 (linux_wait_for_event): Reimplement as wrapper around
2177 linux_wait_for_event_filtered.
2178 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2179 a normal or signal exit is seen, it's the whole process exiting.
2180 (wait_for_sigstop): No longer a for_each_inferior callback.
2181 Rewrite on top of linux_wait_for_event_filtered.
2182 (stop_all_lwps): Call wait_for_sigstop directly.
2183 * server.c (resume, handle_target_event): Handle
2184 TARGET_WAITKIND_NO_RESUMED.
2186 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2188 * win32-low.c (psapi_get_dll_name,
2189 * win32_CreateToolhelp32Snapshot): Delete.
2190 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2191 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2193 (handle_load_dll): Add function description.
2194 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2196 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2198 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2200 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2201 base address when calling win32_add_one_solib.
2202 (handle_load_dll): Delete local variable load_addr.
2203 Remove 0x1000 offset applied to DLL base address when calling
2204 win32_add_one_solib.
2205 (handle_unload_dll): Add comment.
2207 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2209 * win32-low.c (win32_add_all_dlls): Renames
2210 win32_ensure_ntdll_loaded. Rewrite function documentation.
2211 Adjust implementation to always load all DLLs.
2212 Add 0x1000 offset to DLL base address when calling
2213 win32_add_one_solib.
2214 (child_initialization_done): New static global.
2215 (do_initial_child_stuff): Set child_initialization_done to
2216 zero during child initialization, and 1 after. Replace call
2217 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2219 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2220 (handle_unload_dll): Add function documentation.
2221 (get_child_debug_event): Ignore load and unload DLL events
2222 during child initialization.
2224 2014-02-20 Doug Evans <dje@google.com>
2226 Remove global all_lwps.
2227 * inferiors.h (ptid_of): Move here from linux-low.h.
2228 (pid_of, lwpid_of): Ditto.
2229 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2230 parameter is a struct thread_info * now.
2231 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2232 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2233 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2235 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2236 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2237 * linux-arm-low.c (update_registers_callback): Update, "entry"
2238 parameter is a struct thread_info * now.
2239 Fetch lwpid from current_inferior directly.
2240 (arm_insert_point): Pass &all_threads to find_inferior instead of
2242 (arm_remove_point): Ditto.
2243 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2244 (arm_prepare_to_resume): Fetch pid from thread.
2245 (arm_read_description): Fetch lwpid from current_inferior directly.
2246 * linux-low.c (all_lwps): Delete.
2247 (delete_lwp): Delete call to remove_inferior.
2248 (handle_extended_wait): Fetch lwpid from thread.
2249 (add_lwp): Don't set lwp->entry.id. Remove call to
2250 add_inferior_to_list.
2251 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2252 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2253 (kill_one_lwp_callback): Ditto.
2254 (linux_kill): Don't dereference NULL pointer.
2255 Fetch ptid,lwpid from thread.
2256 (get_detach_signal): Fetch ptid from thread.
2257 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2258 Simplify call to regcache_invalidate_thread.
2259 (delete_lwp_callback): Update, "entry" parameter is a
2260 struct thread_info * now. Fetch pid from thread.
2261 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2262 (status_pending_p_callback): Update, "entry" parameter is a
2263 struct thread_info * now. Fetch ptid from thread.
2264 (find_lwp_pid): Update, "entry" parameter is a
2265 struct thread_info * now.
2266 (linux_wait_for_lwp): Fetch pid from thread.
2267 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2268 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2269 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2270 (dequeue_one_deferred_signal): Ditto.
2271 (cancel_breakpoint): Fetch ptid from current_inferior.
2272 (linux_wait_for_event): Pass &all_threads to find_inferior,
2273 not &all_lwps. Fetch ptid, lwpid from thread.
2274 (count_events_callback): Update, "entry" parameter is a
2275 struct thread_info * now.
2276 (select_singlestep_lwp_callback): Ditto.
2277 (select_event_lwp_callback): Ditto.
2278 (cancel_breakpoints_callback): Ditto.
2279 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2281 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2282 (unsuspend_one_lwp): Update, "entry" parameter is a
2283 struct thread_info * now.
2284 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2286 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2287 Fetch lwpid from thread, not lwp.
2288 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2289 Pass &all_threads to find_inferior, not &all_lwps.
2290 (send_sigstop): Fetch lwpid from thread, not lwp.
2291 (send_sigstop_callback): Update, "entry" parameter is a
2292 struct thread_info * now.
2293 (suspend_and_send_sigstop_callback): Ditto.
2294 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2295 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2296 struct thread_info * now.
2297 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2299 (lwp_running): Update, "entry" parameter is a
2300 struct thread_info * now.
2301 (stop_all_lwps): Fetch ptid from thread.
2302 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2303 (linux_resume_one_lwp): Fetch lwpid from thread.
2304 (linux_set_resume_request): Update, "entry" parameter is a
2305 struct thread_info * now. Fetch pid, lwpid from thread.
2306 (resume_status_pending_p): Update, "entry" parameter is a
2307 struct thread_info * now.
2308 (need_step_over_p): Ditto. Fetch lwpid from thread.
2309 (start_step_over): Fetch lwpid from thread.
2310 (linux_resume_one_thread): Update, "entry" parameter is a
2311 struct thread_info * now. Fetch lwpid from thread.
2312 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2313 (proceed_one_lwp): Update, "entry" parameter is a
2314 struct thread_info * now. Fetch lwpid from thread.
2315 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2316 struct thread_info * now.
2317 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2318 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2319 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2321 (regsets_store_inferior_registers): Ditto.
2322 (fetch_register, store_register): Ditto.
2323 (linux_read_memory, linux_write_memory): Ditto.
2324 (linux_request_interrupt): Ditto.
2325 (linux_read_auxv): Ditto.
2326 (linux_xfer_siginfo): Ditto.
2327 (linux_qxfer_spu): Ditto.
2328 (linux_qxfer_libraries_svr4): Ditto.
2329 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2330 moved to inferiors.h.
2332 (get_thread_lwp): Update.
2333 (struct lwp_info): Delete member "entry". Simplify comment for
2336 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2337 current_inferior directly.
2338 (update_watch_registers_callback): Update, "entry" parameter is a
2339 struct thread_info * now. Fetch pid from thread.
2340 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2341 (mips_insert_point): Fetch lwpid from current_inferior.
2342 Pass &all_threads to find_inferior, not &all_lwps.
2343 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2344 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2346 (mips_stopped_data_address): Ditto.
2347 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2349 * linux-tile-low.c (tile_arch_setup): Ditto.
2350 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2351 (update_debug_registers_callback): Update, "entry" parameter is a
2352 struct thread_info * now. Fetch pid from thread.
2353 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2354 Pass &all_threads to find_inferior, not &all_lwps.
2355 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2356 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2357 Pass &all_threads to find_inferior, not &all_lwps.
2358 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2359 (i386_dr_low_get_status): Ditto.
2360 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2361 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2362 (x86_linux_read_description): Ditto.
2363 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2365 2014-02-20 Doug Evans <dje@google.com>
2367 * inferiors.c (get_first_inferior): Fix buglet.
2369 2014-02-19 Doug Evans <dje@google.com>
2371 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2372 * inferiors.c (add_thread): Change result type to struct thread_info *.
2373 All callers updated.
2374 (add_lwp): Call add_thread here instead of in callers.
2375 All callers updated.
2376 * linux-low.h (get_lwp_thread): Rewrite.
2377 (struct lwp_info): New member "thread".
2379 2014-02-19 Doug Evans <dje@google.com>
2381 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2382 All callers updated.
2384 2014-02-19 Doug Evans <dje@google.com>
2386 * inferiors.c (add_thread): Fix whitespace.
2388 2014-02-19 Doug Evans <dje@google.com>
2390 * dll.c (clear_dlls): Replace accessing list implemention details
2392 * gdbthread.h (get_first_thread): Declare.
2393 * inferiors.c (for_each_inferior_with_data): New function.
2394 (get_first_thread): New function.
2395 (find_thread_ptid): Simplify.
2396 (get_first_inferior): New function.
2397 (clear_list): Delete.
2398 (one_inferior_p): New function.
2399 (clear_inferior_list): New function.
2400 (clear_inferiors): Update.
2401 * inferiors.h (for_each_inferior_with_data): Declare.
2402 (clear_inferior_list): Declare.
2403 (one_inferior_p): Declare.
2404 (get_first_inferior): Declare.
2405 * linux-low.c (linux_wait_for_event): Replace accessing list
2406 implemention details with API function.
2407 * server.c (target_running): Ditto.
2408 (accumulate_file_name_length): New function.
2409 (emit_dll_description): New function.
2410 (handle_qxfer_libraries): Replace accessing list implemention
2411 details with API function.
2412 (handle_qxfer_threads_worker): New function.
2413 (handle_qxfer_threads_proper): Replace accessing list implemention
2414 details with API function.
2415 (handle_query): Ditto.
2416 (visit_actioned_threads_callback_ftype): New typedef.
2417 (visit_actioned_threads_data): New struct.
2418 (visit_actioned_threads): Rewrite to be find_inferior callback.
2419 (resume): Call find_inferior.
2420 (handle_status): Replace accessing list implemention
2421 details with API function.
2422 (process_serial_event): Replace accessing list implemention details
2424 * target.c (set_desired_inferior): Replace accessing list implemention
2425 details with API function.
2426 * tracepoint.c (same_process_p): New function.
2427 (gdb_agent_about_to_close): Replace accessing list implemention
2428 details with API function.
2429 * win32-low.c (child_delete_thread): Replace accessing list
2430 implemention details with API function.
2431 (match_dll_by_basename): New function.
2432 (dll_is_loaded_by_basename): New function.
2433 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2434 details call to dll_is_loaded_by_basename.
2436 2014-02-19 Doug Evans <dje@google.com>
2438 * dll.h (struct dll_info): Add comment.
2439 * gdbthread.h (struct thread_info): Add comment.
2440 (current_ptid): Simplify.
2441 * inferiors.c (add_process): Update.
2442 (remove_process): Update.
2443 * inferiors.h (struct process_info): Rename member "head" to "entry".
2444 * linux-low.c (delete_lwp): Update.
2446 (last_thread_of_process_p): Update.
2447 (kill_one_lwp_callback, linux_kill): Update.
2448 (status_pending_p_callback): Update.
2449 (wait_for_sigstop): Update. Simplify read of ptid.
2450 (start_step_over): Update.
2451 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2452 (get_lwp_thread): Update.
2453 (struct lwp_info): Rename member "head" to "entry".
2454 * regcache.h (inferior_list_entry): Delete.
2455 * server.c (kill_inferior_callback): Update.
2456 (detach_or_kill_inferior_callback): Update.
2457 (print_started_pid): Update.
2458 (print_attached_pid): Update.
2459 (process_serial_event): Simplify read of ptid.
2460 * thread-db.c (thread_db_create_event): Update.
2461 (thread_db_get_tls_address): Update.
2462 * win32-low.c (current_inferior_ptid): Simplify.
2464 2014-02-19 Tom Tromey <tromey@redhat.com>
2466 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2468 (target_supports_btrace): Update.
2470 2014-02-14 Yao Qi <yao@codesourcery.com>
2472 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2473 (rsp-low-ipa.o): New target.
2475 2014-02-12 Tom Tromey <tromey@redhat.com>
2477 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2478 convert_ascii_to_int.
2479 * regcache.c (registers_to_string): Likewise.
2480 * remote-utils.c (decode_M_packet): Likewise.
2481 * server.c (process_serial_event): Likewise.
2483 2014-02-12 Tom Tromey <tromey@redhat.com>
2485 * server.c (handle_query, handle_v_run): Use hex2bin, not
2487 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2489 2014-02-12 Tom Tromey <tromey@redhat.com>
2491 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2492 convert_int_to_ascii.
2493 * regcache.c (registers_to_string, collect_register_as_string):
2495 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2497 * server.c (process_serial_event): Likewise.
2498 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2499 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2501 2014-02-12 Tom Tromey <tromey@redhat.com>
2503 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2504 bin2hex, not hexify.
2505 * tracepoint.c (cmd_qtstatus): Likewise.
2507 2014-02-12 Tom Tromey <tromey@redhat.com>
2509 * remote-utils.c (monitor_output): Pass explicit length to
2512 2014-02-12 Tom Tromey <tromey@redhat.com>
2514 * tracepoint.c: Include rsp-low.h.
2515 * server.c: Include rsp-low.h.
2516 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2517 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2519 * remote-utils.c: Include rsp-low.h.
2520 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2521 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2522 (convert_int_to_ascii, convert_ascii_to_int): Move to
2524 * regcache.c: Include rsp-low.h.
2525 * ax.c: Include rsp-low.h.
2526 * Makefile.in (SFILES): Add common/rsp-low.c.
2527 (OBS): Add rsp-low.o.
2528 (rsp-low.o): New target.
2530 2014-02-12 Tom Tromey <tromey@redhat.com>
2532 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2533 Include print-utils.h.
2534 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2535 (plongest, thirty_two, phex_nz): Remove.
2536 * Makefile.in (SFILES): Add common/print-utils.c.
2537 (OBS): Add print-utils.o.
2538 (print-utils-ipa.o): New target.
2539 (print-utils.o): New target.
2540 (IPA_OBJS): Add print-utils-ipa.o.
2542 2014-02-06 Tom Tromey <tromey@redhat.com>
2544 * Makefile.in (SFILES): Fix indentation.
2546 2014-02-05 Doug Evans <dje@google.com>
2548 * linux-low.c (linux_wait_for_event): Improve comment.
2549 (linux_wait_1): Keep current_inferior in sync with event_child.
2551 2014-01-22 Doug Evans <dje@google.com>
2553 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2555 2014-01-22 Doug Evans <dje@google.com>
2557 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2558 * configure: Regenerate.
2559 * config.in: Regenerate.
2560 * Makefile.in (SFILES): Add debug.c.
2562 * debug.c: New file.
2563 * debug.h: New file.
2564 * linux-aarch64-low.c (*): Update all debugging printfs to use
2565 debug_printf instead of fprintf.
2566 * linux-arm-low.c (*): Ditto.
2567 * linux-cris-low.c (*): Ditto.
2568 * linux-crisv32-low.c (*): Ditto.
2569 * linux-m32r-low.c (*): Ditto.
2570 * linux-sparc-low.c (*): Ditto.
2571 * linux-x86.c (*): Ditto.
2572 * linux-low.c (*): Ditto.
2573 (linux_wait_1): Add calls to debug_enter, debug_exit.
2574 (linux_wait): Remove redundant debugging printf.
2575 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2576 (linux_resume, unstop_all_lwps): Ditto.
2577 * mem-break.c (*): Update all debugging printfs to use
2578 debug_printf instead of fprintf.
2579 * remote-utils.c (*): Ditto.
2580 * thread-db.c (*): Ditto.
2581 * server.c #include <ctype.h>, "gdb_vecs.h".
2582 (debug_threads): Moved to debug.c.
2583 (*): Update all debugging printfs to use debug_printf instead of
2585 (start_inferior): Replace call to fflush with call to debug_flush.
2586 (monitor_show_help): Mention set debug-format.
2587 (parse_debug_format_options): New function.
2588 (handle_monitor_command): Handle "monitor set debug-format".
2589 (gdbserver_usage): Mention --debug-format.
2590 (main): Parse --debug-format.
2591 * server.h (debug_threads): Declaration moved to debug.h.
2593 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2594 trace_debug_1 that uses debug_printf.
2595 (tracepoint_look_up_symbols): Update all debugging printfs to use
2596 debug_printf instead of fprintf.
2598 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2600 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2603 2014-01-17 Pedro Alves <palves@redhat.com>
2606 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2607 defined after including gdb_proc_service.h.
2609 2014-01-16 Doug Evans <dje@google.com>
2611 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2612 (match_dll): Use it.
2614 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2616 * target.h (target_ops) <read_btrace>: Change parameters and
2617 return type to allow error reporting.
2618 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2619 trace reading errors on.
2620 * linux-low.c (linux_low_read_btrace): Pass trace reading
2622 (linux_low_disable_btrace): New.
2624 2014-01-15 Doug Evans <dje@google.com>
2626 * inferiors.c (thread_id_to_gdb_id): Delete.
2627 * inferiors.h (thread_id_to_gdb_id): Delete.
2629 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2631 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2632 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2635 2014-01-08 Pedro Alves <palves@redhat.com>
2637 * server.c (handle_status): Don't discard previous queued stop
2638 replies or thread's pending status here.
2639 (main) <disconnection>: Do it here instead.
2641 2014-01-08 Pedro Alves <palves@redhat.com>
2643 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2644 * server.c (visit_actioned_threads, handle_pending_status): New
2646 (handle_v_cont): Factor out parts to ...
2647 (resume): ... this new function. If in all-stop, and a thread
2648 being resumed has a pending status, report it without actually
2650 (myresume): Adjust to use the new 'resume' function.
2651 (clear_pending_status_callback, set_pending_status_callback)
2652 (find_status_pending_thread_callback): New functions.
2653 (handle_status): Handle the case of multiple threads having
2654 interesting statuses to report. Report threads' real last signal
2655 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2656 with an interesting thread to report the status for, instead of
2657 always reporting the status of the first thread.
2659 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2661 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2662 * gdbreplay.c (gdbreplay_version): Likewise.
2664 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2666 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2667 iov.iov_len with the real length in use.
2669 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2671 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2672 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2673 for all targets that use win32-low.c.
2674 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2675 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2677 2013-12-13 Pedro Alves <palves@redhat.com>
2679 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2680 if equal to TARGET_WAITKIND_LOADED.
2681 * win32-low.c (cached_status): New static global.
2682 (win32_wait): Add declaration.
2683 (do_initial_child_stuff): Flush all initial pending debug events
2684 up to the initial breakpoint.
2685 (win32_wait): If CACHED_STATUS was set, return that instead
2686 of doing a real wait. Remove the code resuming the execution
2687 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2688 during the initial phase. Also remove the code changing
2689 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2690 TARGET_WAITKIND_STOPPED.
2692 2013-12-11 Yao Qi <yao@codesourcery.com>
2694 * notif.c (handle_notif_ack): Return 0 if no notification
2697 2013-11-20 Doug Evans <dje@google.com>
2699 * linux-low.c (linux_set_resume_request): Fix comment.
2701 2013-11-20 Doug Evans <dje@google.com>
2703 * linux-low.c (resume_status_pending_p): Tweak comment.
2705 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2707 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2708 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2709 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2710 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2711 (srv_amd64_regobj): Add amd64-mpx.o.
2712 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2713 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2714 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2715 * i387-fp.c (num_pl_bnd_register) Added constant.
2716 (num_pl_bnd_cfg_registers) Added constant.
2717 (struct i387_xsave) Added reserved area and MPX fields.
2718 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2719 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2721 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2722 (init_registers_amd64_mpx_linux): Declare new function.
2723 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2724 (x86_64_regmap): Add MPX registers.
2725 (x86_linux_read_description): Add MPX case.
2726 (initialize_low_arch): Initialize MPX targets.
2728 2013-11-18 Tom Tromey <tromey@redhat.com>
2730 * configure: Rebuild.
2731 * configure.ac: Don't check for stdlib.h.
2732 * gdbreplay.c: Unconditionally include stdlib.h.
2734 2013-11-18 Tom Tromey <tromey@redhat.com>
2736 * config.in: Rebuild.
2737 * configure: Rebuild.
2738 * configure.ac: Don't use AC_HEADER_DIRENT.
2740 2013-11-18 Tom Tromey <tromey@redhat.com>
2742 * server.h: Don't check HAVE_STRING_H.
2743 * gdbreplay.c: Don't check HAVE_STRING_H.
2744 * configure: Rebuild.
2746 2013-11-18 Tom Tromey <tromey@redhat.com>
2748 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2751 2013-11-08 Tom Tromey <tromey@redhat.com>
2753 * configure, config.in: Rebuild.
2754 * configure.ac: Remove unused configury.
2756 2013-11-08 Tom Tromey <tromey@redhat.com>
2758 * acinclude.m4: Include common.m4, codeset.m4.
2759 * configure, config.in: Rebuild.
2760 * configure.ac: Use GDB_AC_COMMON.
2762 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2764 * linux-s390-low.c (HWCAP_S390_TE): New define.
2765 (s390_arch_setup): Consider the TE field in the HWCAP for
2766 determining 'have_regset_tdb'.
2768 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2771 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2774 2013-10-02 Pedro Alves <palves@redhat.com>
2776 * server.c (process_serial_event): Don't output "GDBserver
2777 exiting" if GDB is connected through stdio.
2778 * target.c (mywait): Likewise, be silent if GDB is connected
2781 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2783 * lynx-low.c (lynx_add_threads_after_attach): New function.
2784 (lynx_attach): Remove call to add_thread. Add call to
2785 lynx_add_threads_after_attach instead.
2787 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2789 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2790 * config.in, configure: Regenerated.
2792 2013-09-18 Yao Qi <yao@codesourcery.com>
2795 * server.c (start_inferior): Clear 'resume_info'.
2797 2013-09-16 Jiong Wang <jiwang@tilera.com>
2799 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2802 2013-09-16 Jiong Wang <jiwang@tilera.com>
2804 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2805 linux-tile-low.o to srv_tgtobj.
2807 2013-09-16 Will Newton <will.newton@linaro.org>
2809 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2812 2013-09-06 Pedro Alves <palves@redhat.com>
2814 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2815 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2816 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2817 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2818 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2819 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2821 2013-09-06 Pedro Alves <palves@redhat.com>
2823 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2824 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2826 2013-09-06 Pedro Alves <palves@redhat.com>
2828 * linux-amd64-ipa.c: Include tracepoint.h.
2829 * linux-i386-ipa.c: Include tracepoint.h.
2831 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2833 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2834 (ps_get_thread_area): New function.
2836 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2838 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2839 (initialize_low_arch): Call init_registers_crisv32 rather than
2840 init_register_crisv32.
2842 2013-09-05 Pedro Alves <palves@redhat.com>
2844 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2846 * hostio.h: ... this new file.
2847 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2848 win32-low.c: Include hostio.h.
2850 2013-09-05 Pedro Alves <palves@redhat.com>
2852 * server.h (gdb_client_data, handler_func, callback_handler_func)
2853 (delete_file_handler, add_file_handler, append_callback_event)
2854 (delete_callback_event, start_event_loop, initialize_event_loop):
2855 Move to event-loop.h and include it.
2856 * event-loop.h: New file.
2858 2013-09-05 Pedro Alves <palves@redhat.com>
2860 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2861 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2862 (loaded_dll, unloaded_dll): Move to ...
2863 * dll.h: ... this new file.
2864 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2866 2013-09-05 Pedro Alves <palves@redhat.com>
2868 * server.h (current_process, get_thread_process, all_processes)
2869 (add_inferior_to_list, for_each_inferior, current_inferior)
2870 (remove_inferior, add_process, remove_process, find_process_pid)
2871 (have_started_inferiors_p, have_attached_inferiors_p)
2872 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2873 (clear_inferiors, find_inferior, find_inferior_id)
2874 (inferior_target_data, set_inferior_target_data)
2875 (inferior_regcache_data, set_inferior_regcache_data): Move to
2876 inferiors.h, and include it.
2877 * inferiors.h: New file.
2879 2013-09-05 Pedro Alves <palves@redhat.com>
2881 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2885 2013-09-05 Pedro Alves <palves@redhat.com>
2887 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2889 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2890 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2891 (handle_tracepoint_general_set, handle_tracepoint_query)
2892 (tracepoint_finished_step, tracepoint_was_hit)
2893 (release_while_stepping_state_list, current_traceframe)
2894 (in_readonly_region, traceframe_read_mem)
2895 (fetch_traceframe_registers, traceframe_read_sdata)
2896 (traceframe_read_info, struct fast_tpoint_collect_status)
2897 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2898 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2899 (supply_fast_tracepoint_registers)
2900 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2901 (ipa_tdesc, claim_trampoline_space)
2902 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2903 (agent_mem_read, agent_get_trace_state_variable_value)
2904 (agent_set_trace_state_variable_value, agent_tsv_read)
2905 (agent_mem_read_string, get_raw_reg_func_addr)
2906 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2907 * tracepoint.h: ... this new file.
2909 2013-09-05 Pedro Alves <palves@redhat.com>
2911 * server.h (perror_with_name, error, fatal, warning, paddress)
2912 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2914 * utils.h: New file.
2916 2013-09-05 Pedro Alves <palves@redhat.com>
2918 * server.h (remote_debug, noack_mode, transport_is_reliable)
2919 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2920 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2921 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2922 (write_enn, initialize_async_io, enable_async_io)
2923 (disable_async_io, check_remote_input_interrupt_request)
2924 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2925 (dead_thread_notify, prepare_resume_reply)
2926 (decode_address_to_semicolon, decode_address, decode_m_packet)
2927 (decode_M_packet, decode_X_packet, decode_xfer_write)
2928 (decode_search_memory_packet, unhexify, hexify)
2929 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2930 (look_up_one_symbol, relocate_instruction)
2931 (monitor_output): Move to remote-utils.h, and include it.
2932 * remote-utils.h: New file.
2934 2013-09-05 Pedro Alves <palves@redhat.com>
2936 * server.h (_): Delete.
2938 2013-09-02 Pedro Alves <palves@redhat.com>
2940 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2941 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2943 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2945 2013-09-02 Pierre Muller <muller@sourceware.org>
2947 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2948 or WriteProcessMemory complete successfully and handle
2949 ERROR_PARTIAL_COPY error.
2951 2013-09-02 Pedro Alves <palves@redhat.com>
2953 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2954 error instead of EIO.
2956 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2959 * linux-low.c: Include filestuff.h.
2960 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2961 * lynx-low.c: Include filestuff.h.
2962 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2963 * server.c: Include filestuff.h.
2964 (main): Call notice_open_fds.
2965 * spu-low.c: Include filestuff.h.
2966 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2968 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2970 * Makefile.in: Explain why ../target and ../nat are not
2971 listed as include file search paths.
2972 (linux-waitpid.o): New object file rule.
2973 * configure.srv (srv_native_linux_obj): New variable.
2974 Replace all occurrences of linux native object files with
2975 $srv_native_linux_obj.
2976 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2977 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2978 (linux_enable_event_reporting): Remove declaration.
2979 (my_waitpid): Moved to common/linux-waitpid.c.
2980 (linux_wait_for_event): Pass ptid when calling
2981 linux_enable_event_reporting.
2982 (linux_supports_tracefork_flag): Remove.
2983 (linux_enable_event_reporting): Likewise.
2984 (linux_tracefork_grandchild): Remove.
2985 (STACK_SIZE): Moved to common/linux-ptrace.c.
2986 (linux_tracefork_child): Remove.
2987 (linux_test_for_tracefork): Remove.
2988 (linux_look_up_symbols): Call linux_supports_traceclone.
2989 (initialize_low): Remove call to linux_test_for_tracefork.
2990 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2991 common/linux-ptrace.h.
2992 (PTRACE_TYPE_ARG4): Likewise.
2993 Include linux-ptrace.h.
2995 2013-08-21 Pedro Alves <palves@redhat.com>
2997 * config.in: Renegerate.
2999 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3001 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3002 (SFILES): Remove $(srcdir)/common/target-common.c and
3003 add $(srcdir)/target/waitstatus.c.
3004 (OBS): Remove target-common.o and add waitstatus.o.
3005 (server_h): Remove $(srcdir)/../common/target-common.h and
3006 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3007 and $(srcdir)/../target/waitstatus.h.
3008 (target-common.o): Remove.
3009 (waitstatus.o): New target object file.
3010 * target.h: Do not include target-common.h and
3011 include target/resume.h, target/wait.h and
3012 target/waitstatus.h.
3014 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3016 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3017 to PTRACE_TYPE_ARG3.
3018 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3019 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3021 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3022 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3024 2013-07-27 Jie Zhang <jie@codesourcery.com>
3025 Daniel Jacobowitz <dan@codesourcery.com>
3026 Yao Qi <yao@codesourcery.com>
3028 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3029 (mips-linux-watch.o): New rule.
3030 (mips_linux_watch_h): New variable.
3031 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3033 * linux-mips-low.c: Include mips-linux-watch.h.
3034 (struct arch_process_info, struct arch_lwp_info): New.
3035 (update_watch_registers_callback): New function.
3036 (mips_linux_new_process, mips_linux_new_thread) New functions.
3037 (mips_linux_prepare_to_resume, mips_insert_point): New
3039 (mips_remove_point, mips_stopped_by_watchpoint): New
3041 (rsp_bp_type_to_target_hw_bp_type): New function.
3042 (mips_stopped_data_address): New function.
3043 (the_low_target): Add watchpoint support functions.
3045 2013-07-27 Yao Qi <yao@codesourcery.com>
3047 * i386-low.c: Include break-common.h.
3048 (enum target_hw_bp_type): Remove.
3050 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3052 * Makefile.in (SFILES): /common/target-common.c.
3053 (OBS): Add target-common.o.
3054 (server_h): Add $(srcdir)/../common/target-common.h.
3055 (target-common.o): New target.
3056 * server.c (queue_stop_reply_callback): Free
3057 status string after use.
3058 * target.c (target_waitstatus_to_string): Remove.
3059 * target.h: Include target-common.h.
3060 (resume_kind): Likewise.
3061 (target_waitkind): Likewise.
3062 (target_waitstatus): Likewise.
3063 (TARGET_WNOHANG): Likewise.
3065 2013-07-04 Yao Qi <yao@codesourcery.com>
3067 * Makefile.in (host_alias): Use @host_noncanonical@.
3068 (target_alias): Use @target_noncanonical@.
3069 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3070 ACX_NONCANONICAL_HOST.
3071 * configure: Regenerated.
3074 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3076 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3077 * configure: Rebuild.
3078 * Makefile.in (version_host, version_target): Get from configure.
3079 (version.c): Use $(version_host) and $(version_target).
3081 2013-07-03 Pedro Alves <palves@redhat.com>
3083 * Makefile.in (config.status): Depend on development.sh.
3084 * acinclude.m4: Include libmcheck.m4.
3085 * configure: Regenerate.
3087 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3089 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3090 attribute inside the parentheses.
3091 (winapi_DebugSetProcessKillOnExit): Ditto.
3092 (winapi_DebugBreakProcess): Ditto.
3093 (winapi_GenerateConsoleCtrlEvent): Ditto.
3095 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3097 * notif.h (notif_event): Add a dummy member to avoid compiler
3100 2013-07-01 Pedro Alves <palves@redhat.com>
3102 * hostio.c (HOSTIO_PATH_MAX): Define.
3103 (require_filename, handle_open, handle_unlink, handle_readlink):
3106 2013-07-01 Pedro Alves <palves@redhat.com>
3108 * server.h: Include "pathmax.h".
3109 * linux-low.c: Don't include sys/param.h.
3110 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3112 * win32-low.c: Don't include sys/param.h.
3113 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3115 2013-07-01 Pedro Alves <palves@redhat.com>
3117 * event-loop.c: Don't check HAVE_UNISTD_H before including
3119 * gdbreplay.c: Likewise.
3120 * remote-utils.c: Likewise.
3121 * server.c: Likewise.
3122 * configure.ac: Don't check for unistd.h.
3123 * configure: Regenerate.
3125 2013-06-28 Tom Tromey <tromey@redhat.com>
3127 * Makefile.in (version.c): Use version.in, not
3130 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3132 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3133 * configure: Rebuild.
3134 * Makefile.in (version_host, version_target): Get from configure.
3135 (version.c): Use $(version_host) and $(version_target).
3137 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3139 Fix trace-status to output user name without trailing colon.
3140 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3142 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3144 Fix trace-status to output proper start-time and stop-time.
3145 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3146 output start time and stop time in hex as gdb expects.
3148 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3150 * tracepoint.c (build_traceframe_info_xml): Output trace state
3151 variables present in the trace buffer.
3153 2013-06-24 Tom Tromey <tromey@redhat.com>
3155 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3157 (version.o): Remove.
3158 * gdbreplay.c: Include version.h.
3159 (version, host_name): Don't declare.
3160 * server.h: Include version.h.
3161 (version, host_name): Don't declare.
3163 2013-06-12 Pedro Alves <palves@redhat.com>
3165 * linux-x86-low.c (linux_is_elf64): Delete global.
3166 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3167 with local linux_pid_exe_is_elf_64_file use.
3169 2013-06-11 Pedro Alves <palves@redhat.com>
3171 * linux-low.c (regset_disabled, disable_regset): New functions.
3172 (regsets_fetch_inferior_registers)
3173 (regsets_store_inferior_registers): Use them.
3174 (initialize_regsets_info); Don't allocate the disabled_regsets
3176 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3179 2013-06-11 Pedro Alves <palves@redhat.com>
3181 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3184 2013-06-11 Pedro Alves <palves@redhat.com>
3186 * linux-x86-low.c (initialize_low_arch): Call
3187 init_registers_x32_avx_linux.
3189 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3191 Fix compatibility with Android Bionic.
3192 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3195 2013-06-07 Pedro Alves <palves@redhat.com>
3198 * Makefile.in (OBS): Add tdesc.o.
3199 (IPA_OBJS): Add tdesc-ipa.o.
3200 (tdesc-ipa.o): New rule.
3201 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3203 * linux-low.c (new_inferior): Delete.
3204 (disabled_regsets, num_regsets): Delete.
3205 (linux_add_process): Adjust to set the new per-process
3207 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3208 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3209 was a stop. When calling arch_setup, switch the current inferior
3210 to the thread that got an event.
3211 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3212 (regsets_fetch_inferior_registers)
3213 (regsets_store_inferior_registers): New regsets_info parameter.
3215 (linux_register_in_regsets): New regs_info parameter. Adjust to
3217 (register_addr, fetch_register, store_register): New usrregs_info
3218 parameter. Adjust to use it.
3219 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3220 parameter regs_info. Adjust to use it.
3221 (linux_fetch_registers): Get the current inferior's regs_info, and
3223 (linux_store_registers): Ditto.
3224 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3225 (initialize_low): Don't initialize the target_regsets here. Call
3226 initialize_low_arch.
3227 * linux-low.h (target_regsets): Delete declaration.
3228 (struct regsets_info): New.
3229 (struct usrregs_info): New.
3230 (struct regs_info): New.
3231 (struct process_info_private) <new_inferior>: New field.
3232 (struct linux_target_ops): Delete the num_regs, regmap, and
3233 regset_bitmap fields. New field regs_info.
3234 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3235 * i387-fp.c (num_xmm_registers): Delete.
3236 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3237 calls to new interface.
3238 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3239 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3240 Infer the number of xmm registers from the regcache's target
3242 * i387-fp.h (num_xmm_registers): Delete.
3243 * inferiors.c (add_thread): Don't install the thread's regcache
3245 * proc-service.c (gregset_info): Fetch the current inferior's
3246 regs_info. Adjust to use it.
3247 * regcache.c: Include tdesc.h.
3248 (register_bytes, reg_defs, num_registers)
3249 (gdbserver_expedite_regs): Delete.
3250 (get_thread_regcache): If the thread doesn't have a regcache yet,
3251 create one, instead of aborting gdbserver.
3252 (regcache_invalidate_one): Rename to ...
3253 (regcache_invalidate_thread): ... this.
3254 (regcache_invalidate_one): New.
3255 (regcache_invalidate): Only invalidate registers of the current
3257 (init_register_cache): Add target_desc parameter, and use it.
3258 (new_register_cache): Ditto. Assert the target description has a
3259 non zero registers_size.
3260 (regcache_cpy): Add assertions. Adjust.
3261 (realloc_register_cache, set_register_cache): Delete.
3262 (registers_to_string, registers_from_string): Adjust.
3263 (find_register_by_name, find_regno, find_register_by_number)
3264 (register_cache_size): Add target_desc parameter, and use it.
3265 (free_register_cache_thread, free_register_cache_thread_one)
3266 (regcache_release, register_cache_size): New.
3267 (register_size): Add target_desc parameter, and use it.
3268 (register_data, supply_register, supply_register_zeroed)
3269 (supply_regblock, supply_register_by_name, collect_register)
3270 (collect_register_as_string, collect_register_by_name): Adjust.
3271 * regcache.h (struct target_desc): Forward declare.
3272 (struct regcache) <tdesc>: New field.
3273 (init_register_cache, new_register_cache): Add target_desc
3275 (regcache_invalidate_thread): Declare.
3276 (regcache_invalidate_one): Delete declaration.
3277 (regcache_release): Declare.
3278 (find_register_by_number, register_cache_size, register_size)
3279 (find_regno): Add target_desc parameter.
3280 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3282 * remote-utils.c: Include tdesc.h.
3283 (outreg, prepare_resume_reply): Adjust.
3284 * server.c: Include tdesc.h.
3285 (gdbserver_xmltarget): Delete declaration.
3286 (get_features_xml, process_serial_event): Adjust.
3287 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3289 (struct process_info) <tdesc>: New field.
3290 (ipa_tdesc): Declare.
3291 * tdesc.c: New file.
3292 * tdesc.h: New file.
3293 * tracepoint.c: Include tdesc.h.
3294 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3295 (get_context_regcache): Adjust to pass ipa_tdesc down.
3296 (do_action_at_tracepoint): Adjust to get the register cache size
3297 from the context regcache's description.
3298 (traceframe_walk_blocks): Adjust to get the register cache size
3299 from the current trace frame's description.
3300 (traceframe_get_pc): Adjust to get current trace frame's
3301 description and pass it down.
3302 (gdb_collect): Adjust to get the register cache size from the
3304 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3305 (gdbserver_xmltarget): Delete.
3306 (initialize_low_tracepoint): Set the ipa's target description.
3307 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3308 (initialize_low_tracepoint): Set the ipa's target description.
3309 * linux-x86-low.c: Include tdesc.h.
3310 [__x86_64__] (is_64bit_tdesc): New.
3311 (ps_get_thread_area, x86_get_thread_area): Use it.
3312 (i386_cannot_store_register): Rename to ...
3313 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3314 (i386_cannot_fetch_register): Rename to ...
3315 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3316 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3318 (target_regsets): Rename to ...
3319 (x86_regsets): ... this.
3320 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3322 (x86_siginfo_fixup): Use is_64bit_tdesc.
3323 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3324 (tdesc_x32_avx_linux, tdesc_x32_linux)
3325 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3327 (x86_linux_update_xmltarget): Delete.
3328 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3329 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3330 (AMD64_LINUX_USER64_CS): New.
3331 (x86_linux_read_description): New, based on
3332 x86_linux_update_xmltarget.
3333 (same_process_callback): New.
3334 (x86_arch_setup_process_callback): New.
3335 (x86_linux_update_xmltarget): New.
3336 (x86_regsets_info): New.
3337 (amd64_linux_regs_info): New.
3338 (i386_linux_usrregs_info): New.
3339 (i386_linux_regs_info): New.
3340 (x86_linux_regs_info): New.
3341 (x86_arch_setup): Reimplement.
3342 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3343 (x86_emit_ops): Ditto.
3344 (the_low_target): Adjust. Install x86_linux_regs_info,
3345 x86_cannot_fetch_register, and x86_cannot_store_register.
3346 (initialize_low_arch): New.
3347 * linux-ia64-low.c (tdesc_ia64): Declare.
3348 (ia64_fetch_register): Adjust.
3349 (ia64_usrregs_info, regs_info): New globals.
3350 (ia64_regs_info): New function.
3351 (the_low_target): Adjust.
3352 (initialize_low_arch): New function.
3353 * linux-sparc-low.c (tdesc_sparc64): Declare.
3354 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3356 (sparc_arch_setup): New function.
3357 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3358 (the_low_target): Adjust.
3359 (initialize_low_arch): New function.
3360 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3361 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3362 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3363 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3364 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3365 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3366 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3367 (tdesc_powerpc_isa205_vsx64l): Declare.
3368 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3369 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3370 (ppc_set_pc, ppc_get_hwcap): Adjust.
3371 (ppc_usrregs_info): Forward declare.
3372 (!__powerpc64__) ppc_regmap_adjusted: New global.
3373 (ppc_arch_setup): Adjust to the current process'es target
3375 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3376 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3377 (ppc_store_evrregset): Adjust.
3378 (target_regsets): Rename to ...
3379 (ppc_regsets): ... this, and make static.
3380 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3381 (ppc_regs_info): New function.
3382 (the_low_target): Adjust.
3383 (initialize_low_arch): New function.
3384 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3385 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3386 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3387 (tdesc_s390x_linux64v2): Declare.
3388 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3389 (s390_fill_gregset, s390_store_last_break): Adjust.
3390 (target_regsets): Rename to ...
3391 (s390_regsets): ... this, and make static.
3392 (s390_get_pc, s390_set_pc): Adjust.
3393 (s390_get_hwcap): New target_desc parameter, and use it.
3394 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3395 (s390_arch_setup): Adjust to set the current process'es target
3396 description. Don't adjust the regmap.
3397 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3398 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3399 (regs_info_3264): New globals.
3400 (s390_regs_info): New function.
3401 (the_low_target): Adjust.
3402 (initialize_low_arch): New function.
3403 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3404 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3405 [__mips64] (init_registers_mips_linux)
3406 (init_registers_mips_dsp_linux): Delete defines.
3407 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3408 (have_dsp): New global.
3409 (mips_read_description): New, based on mips_arch_setup.
3410 (mips_arch_setup): Reimplement.
3411 (get_usrregs_info): New function.
3412 (mips_cannot_fetch_register, mips_cannot_store_register)
3413 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3414 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3415 (target_regsets): Rename to ...
3416 (mips_regsets): ... this, and make static.
3417 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3418 (dsp_regs_info, regs_info): New globals.
3419 (mips_regs_info): New function.
3420 (the_low_target): Adjust.
3421 (initialize_low_arch): New function.
3422 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3423 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3425 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3426 (arm_read_description): New, with bits factored from
3428 (arm_arch_setup): Reimplement.
3429 (target_regsets): Rename to ...
3430 (arm_regsets): ... this, and make static.
3431 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3432 (arm_regs_info): New function.
3433 (the_low_target): Adjust.
3434 (initialize_low_arch): New function.
3435 * linux-m68k-low.c (tdesc_m68k): Declare.
3436 (target_regsets): Rename to ...
3437 (m68k_regsets): ... this, and make static.
3438 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3439 (m68k_regs_info): New function.
3440 (m68k_arch_setup): New function.
3441 (the_low_target): Adjust.
3442 (initialize_low_arch): New function.
3443 * linux-sh-low.c (tdesc_sharch): Declare.
3444 (target_regsets): Rename to ...
3445 (sh_regsets): ... this, and make static.
3446 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3447 (sh_regs_info, sh_arch_setup): New functions.
3448 (the_low_target): Adjust.
3449 (initialize_low_arch): New function.
3450 * linux-bfin-low.c (tdesc_bfin): Declare.
3451 (bfin_arch_setup): New function.
3452 (bfin_usrregs_info, regs_info): New globals.
3453 (bfin_regs_info): New function.
3454 (the_low_target): Adjust.
3455 (initialize_low_arch): New function.
3456 * linux-cris-low.c (tdesc_cris): Declare.
3457 (cris_arch_setup): New function.
3458 (cris_usrregs_info, regs_info): New globals.
3459 (cris_regs_info): New function.
3460 (the_low_target): Adjust.
3461 (initialize_low_arch): New function.
3462 * linux-cris-low.c (tdesc_crisv32): Declare.
3463 (cris_arch_setup): New function.
3464 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3465 (cris_regs_info): New function.
3466 (the_low_target): Adjust.
3467 (initialize_low_arch): New function.
3468 * linux-m32r-low.c (tdesc_m32r): Declare.
3469 (m32r_arch_setup): New function.
3470 (m32r_usrregs_info, regs_info): New globals.
3471 (m32r_regs_info): Adjust.
3472 (initialize_low_arch): New function.
3473 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3474 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3475 (tic6x_usrregs_info): Forward declare.
3476 (tic6x_read_description): New function, based on ...
3477 (tic6x_arch_setup): ... this. Reimplement.
3478 (target_regsets): Rename to ...
3479 (tic6x_regsets): ... this, and make static.
3480 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3481 (tic6x_regs_info): New function.
3482 (the_low_target): Adjust.
3483 (initialize_low_arch): New function.
3484 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3485 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3486 (target_regsets): Rename to ...
3487 (xtensa_regsets): ... this, and make static.
3488 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3490 (xtensa_arch_setup, xtensa_regs_info): New functions.
3491 (the_low_target): Adjust.
3492 (initialize_low_arch): New function.
3493 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3494 (nios2_arch_setup): Set the current process'es tdesc.
3495 (target_regsets): Rename to ...
3496 (nios2_regsets): ... this.
3497 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3498 (nios2_regs_info): New function.
3499 (the_low_target): Adjust.
3500 (initialize_low_arch): New function.
3501 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3502 (aarch64_arch_setup): Set the current process'es tdesc.
3503 (target_regsets): Rename to ...
3504 (aarch64_regsets): ... this.
3505 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3506 (aarch64_regs_info): New function.
3507 (the_low_target): Adjust.
3508 (initialize_low_arch): New function.
3509 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3511 (target_regsets): Rename to ...
3512 (tile_regsets): ... this.
3513 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3514 (tile_regs_info): New function.
3515 (tile_arch_setup): Set the current process'es tdesc.
3516 (the_low_target): Adjust.
3517 (initialize_low_arch): New function.
3518 * spu-low.c (tdesc_spu): Declare.
3519 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3520 * win32-arm-low.c (tdesc_arm): Declare.
3521 (arm_arch_setup): New function.
3522 (the_low_target): Install arm_arch_setup instead of
3524 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3525 (init_windows_x86): Rename to ...
3526 (i386_arch_setup): ... this. Set `win32_tdesc'.
3527 (the_low_target): Adjust.
3528 * win32-low.c (win32_tdesc): New global.
3529 (child_add_thread): Don't create the thread cache here.
3530 (do_initial_child_stuff): Set the new process'es tdesc.
3531 * win32-low.h (struct target_desc): Forward declare.
3532 (win32_tdesc): Declare.
3533 * lynx-i386-low.c (tdesc_i386): Declare global.
3534 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3535 * lynx-low.c (lynx_tdesc): New global.
3536 (lynx_add_process): Set the new process'es tdesc.
3537 * lynx-low.h (struct target_desc): Forward declare.
3538 (lynx_tdesc): Declare global.
3539 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3540 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3541 * nto-low.c (nto_tdesc): New global.
3542 (do_attach): Set the new process'es tdesc.
3543 * nto-low.h (struct target_desc): Forward declare.
3544 (nto_tdesc): Declare.
3545 * nto-x86-low.c (tdesc_i386): Declare.
3546 (nto_x86_arch_setup): Set `nto_tdesc'.
3548 2013-06-04 Gary Benson <gbenson@redhat.com>
3550 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3551 to qSupported response when appropriate.
3552 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3553 with nonzero-length annex.
3554 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3555 arguments supplied in annex.
3557 2013-05-31 Doug Evans <dje@google.com>
3560 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3561 64 bits in 64-cross-32 environment.
3563 2013-05-28 Pedro Alves <palves@redhat.com>
3565 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3566 (aarch64-without-fpu.c): Delete rule.
3567 * configure.srv (aarch64*-*-linux*): Remove references to
3568 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3569 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3572 2013-05-24 Pedro Alves <palves@redhat.com>
3574 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3575 instead of strchr/decode_address. Error if the range isn't split
3576 with a ','. Don't assume there's be a ':' in the action.
3578 2013-05-23 Yao Qi <yao@codesourcery.com>
3579 Pedro Alves <palves@redhat.com>
3581 * linux-low.c (lwp_in_step_range): New function.
3582 (linux_wait_1): If the thread was range stepping and stopped
3583 outside the stepping range, report the stop to GDB. Otherwise,
3584 continue stepping. Add range stepping debug output.
3585 (linux_set_resume_request): Copy the step range from the resume
3587 (linux_supports_range_stepping): New.
3588 (linux_target_ops) <supports_range_stepping>: Set to
3589 linux_supports_range_stepping.
3590 * linux-low.h (struct linux_target_ops)
3591 <supports_range_stepping>: New field.
3592 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3593 * linux-x86-low.c (x86_supports_range_stepping): New.
3594 (the_low_target) <supports_range_stepping>: Set to
3595 x86_supports_range_stepping.
3596 * server.c (handle_v_cont): Handle 'r' action.
3597 (handle_v_requests): Append ";r" if the target supports range
3599 * target.h (struct thread_resume) <step_range_start,
3600 step_range_end>: New fields.
3601 (struct target_ops) <supports_range_stepping>:
3603 (target_supports_range_stepping): New macro.
3605 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3607 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3608 confusion in comment.
3610 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3612 * lynx-low.c (struct process_info_private): New type.
3613 (lynx_add_process): New function.
3614 (lynx_create_inferior, lynx_attach): Replace calls to
3615 add_process by calls to lynx_add_process.
3616 (lynx_resume): If PTID is null, then try using
3617 current_process()->private->last_wait_event_ptid.
3619 (lynx_clear_inferiors): Delete. The contents of that function
3620 has been inlined in lynx_mourn;
3621 (lynx_wait_1): Save the ptid in the process's private data.
3622 (lynx_mourn): Free the process' private data. Replace call
3623 to lynx_clear_inferiors by call to clear_inferiors.
3625 2013-05-17 Yao Qi <yao@codesourcery.com>
3627 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3630 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3632 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3633 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3634 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3635 PT_TEXT_END_ADDR guards. Update comments.
3636 (linux_target_op) <read_offsets>: Conditionally define to
3637 linux_read_offsets if the target is UCLIBC and if it defines
3638 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3640 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3641 Andrew Jenner <andrew@codesourcery.com>
3643 * Makefile.in (SFILES): Add linux-nios2-low.c.
3644 (clean): Add action to delete nios2-linux.c.
3645 (nios2-linux.c): New rule.
3646 * configure.srv: Add nios2*-*-linux*.
3647 * linux-nios2-low.c: New.
3649 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3651 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3653 2013-04-25 Hui Zhu <hui@codesourcery.com>
3656 * ax.c (ax_printf): Add fflush.
3658 2013-04-22 Tom Tromey <tromey@redhat.com>
3660 * Makefile.in (SFILES): Add filestuff.c.
3661 (OBS): Add filestuff.o.
3662 (filestuff.o): New target.
3663 * config.in, configure: Rebuild.
3664 * configure.ac: Check for fdwalk, pipe2.
3666 2013-04-17 Pedro Alves <palves@redhat.com>
3668 * configure.ac (USE_THREAD_DB): Delete variable.
3669 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3670 Don't AC_SUBST USE_THREAD_DB.
3671 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3672 * config.in, configure: Regenerate.
3674 2013-04-16 Pedro Alves <palves@redhat.com>
3676 * linux-low.h (struct lwp_info) <thread_known>: Move under
3677 the USE_THREAD_DB #ifdef.
3679 2013-04-16 Pedro Alves <palves@redhat.com>
3681 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3682 (linux-low.o): Delete rule.
3683 * linux-low.h: Always include "gdb_thread_db.h" instead of
3684 conditionally including thread_db.h.
3685 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3688 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3690 * Makefile.in (install-only): Fix make install regression.
3692 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3694 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3695 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3697 * gdbserver.1: Remove.
3699 2013-03-22 Pedro Alves <palves@redhat.com>
3701 * linux-low.c (handle_extended_wait): Don't call
3702 linux_enable_event_reporting.
3704 2013-03-15 Tony Theodore <tonyt@logyst.com>
3707 * Makefile.in (SHELL): Use @SHELL@.
3709 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3711 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3714 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3716 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3717 Remove extraneous NULL element.
3719 2013-03-13 Yao Qi <yao@codesourcery.com>
3721 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3722 'V' block in trace frame.
3724 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3726 * target.h (struct target_ops): Add btrace ops.
3727 (target_supports_btrace): New macro.
3728 (target_enable_btrace): New macro.
3729 (target_disable_btrace): New macro.
3730 (target_read_btrace): New macro.
3731 * gdbthread.h (struct thread_info): Add btrace field.
3732 * server.c: Include btrace-common.h.
3733 (handle_btrace_general_set): New function.
3734 (handle_btrace_enable): New function.
3735 (handle_btrace_disable): New function.
3736 (handle_general_set): Call handle_btrace_general_set.
3737 (handle_qxfer_btrace): New function.
3738 (struct qxfer qxfer_packets[]): Add btrace entry.
3739 * inferiors.c (remove_thread): Disable btrace.
3740 * linux-low: Include linux-btrace.h.
3741 (linux_low_enable_btrace): New function.
3742 (linux_low_read_btrace): New function.
3743 (linux_target_ops): Add btrace ops.
3744 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3745 Add srv_linux_btrace=yes.
3746 (x86_64-*-linux*): Add linux-btrace.o.
3747 Add srv_linux_btrace=yes.
3748 * configure.ac: Define HAVE_LINUX_BTRACE.
3749 * config.in: Regenerated.
3750 * configure: Regenerated.
3752 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3754 * server.c (handle_qxfer): Preserve error message if -3 is
3756 (qxfer): Document the -3 return value.
3758 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3760 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3761 (linux_btrace_h): New variable.
3762 (linux-btrace.o): New rule.
3764 2013-03-08 Stan Shebs <stan@codesourcery.com>
3765 Hafiz Abid Qadeer <abidh@codesourcery.com>
3767 * tracepoint.c (trace_buffer_size): New global.
3768 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3769 (init_trace_buffer): Change to one-argument function. Allocate
3770 trace buffer memory.
3771 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3772 handle QTBuffer:size packet.
3773 (cmd_bigqtbuffer_size): New function.
3774 (initialize_tracepoint): Call init_trace_buffer with
3775 DEFAULT_TRACE_BUFFER_SIZE.
3776 * server.c (handle_query): Add QTBuffer:size in the
3779 2013-03-07 Yao Qi <yao@codesourcery.com>
3781 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3782 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3784 (cmd_qtsp): Adjust condition. Do post increment.
3785 Set cur_action and cur_step_action back to 0.
3787 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3790 * linux-low.c (linux_write_memory): Return early success if LEN is
3793 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3795 * configure.srv: Add x86_64-*-cygwin* as target.
3797 2013-02-28 Tom Tromey <tromey@redhat.com>
3799 * configure.ac: Invoke AC_SYS_LARGEFILE.
3800 * configure, config.in: Rebuild.
3802 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3804 * win32-low.c: Throughout, fix format strings and casts of
3805 printf-like functions to avoid type related warnings on all
3807 (get_child_debug_event): Print dwDebugEventCode as hex since
3808 that's how it's usually documented.
3810 2013-02-28 Yao Qi <yao@codesourcery.com>
3812 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3815 2013-02-27 Jiong Wang <jiwang@tilera.com>
3817 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3818 (reg-tilegx32.c): New rule.
3819 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3820 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3821 different register info initializer according to elf class.
3822 (init_registers_tilgx32): New function. The tilegx32 register info
3824 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3825 (tile_store_gregset): Likewise.
3827 2013-02-27 Yao Qi <yao@codesourcery.com>
3829 * server.c (process_point_options): Print debug message when
3830 debug_threads is true.
3832 2013-02-26 Yao Qi <yao@codesourcery.com>
3834 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3836 2013-02-19 Pedro Alves <palves@redhat.com>
3837 Kai Tietz <ktietz@redhat.com>
3841 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3842 instead of strtoul to extract address from packet.
3843 (process_serial_event) <'z'>: Likewise.
3845 2013-02-18 Yao Qi <yao@codesourcery.com>
3847 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3849 2013-02-14 Pedro Alves <palves@redhat.com>
3853 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3854 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3856 2013-02-14 Pedro Alves <palves@redhat.com>
3858 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3860 2013-02-14 Pedro Alves <palves@redhat.com>
3862 * tracepoint.c (save_string): Delete.
3863 (add_tracepoint_action): Use savestring instead of save_string.
3865 2013-02-12 Pedro Alves <palves@redhat.com>
3867 * linux-xtensa-low.c: Ditto.
3868 * xtensa-xtregs.c: Ditto.
3870 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3872 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3875 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3877 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3878 aarch64_num_wp_regs and aarch64_num_bp_regs to
3879 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3881 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3883 * linux-aarch64-low.c (ps_get_thread_area): Replace
3884 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3886 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3887 Marcus Shawcroft <marcus.shawcroft@arm.com>
3888 Nigel Stephens <nigel.stephens@arm.com>
3889 Yufeng Zhang <yufeng.zhang@arm.com>
3891 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3892 (aarch64.c, aarch64-without-fpu.c): New targets.
3893 * configure.srv (aarch64*-*-linux*): New.
3894 * linux-aarch64-low.c: New file.
3896 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3898 * linux-low.c (handle_extended_wait, linux_create_inferior)
3899 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3900 (dequeue_one_deferred_signal, linux_resume_one_thread)
3901 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3902 (linux_tracefork_grandchild, linux_test_for_tracefork)
3903 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3904 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3905 where the argument is 0.
3907 2013-01-25 Yao Qi <yao@codesourcery.com>
3909 * event-loop.c: Include "queue.h".
3910 (gdb_event_p): New typedef.
3911 (struct gdb_event) <next_event>: Remove.
3912 (event_queue): Change to QUEUE(gdb_event_p).
3913 (async_queue_event): Remove.
3914 (gdb_event_xfree): New.
3915 (initialize_event_loop): New.
3916 (process_event): Use API from QUEUE.
3917 (wait_for_event): Likewise.
3918 * server.c (main): Call initialize_event_loop.
3919 * server.h (initialize_event_loop): Declare.
3921 2013-01-18 Yao Qi <yao@codesourcery.com>
3923 * ax.h (struct eval_agent_expr_context): New.
3924 (gdb_eval_agent_expr): Update declaration.
3925 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3926 TFRAME. Add new argument CTX.
3927 * server.h (struct eval_agent_expr_context): Declare.
3928 (agent_mem_read, agent_tsv_read): Update declaration.
3929 (agent_mem_read_string): Likewise.
3930 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3931 (add_traceframe_block): Add new argument TPOINT.
3932 Increase TPOINT->traceframe_usage.
3933 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3934 eval_tracepoint_agent_expr.
3935 (condition_true_at_tracepoint): Likewise.
3936 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3937 (agent_mem_read_string, agent_tsv_read): Likewise.
3939 2013-01-16 Yao Qi <yao@codesourcery.com>
3941 * linux-low.c (linux_resume_one_lwp): Don't check
3942 'lwp->bp_reinsert != 0'.
3944 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3945 Pedro Alves <palves@redhat.com>
3947 * lynx-low.c (ptrace_request_to_str): Define a temporary
3948 macro and use it to simplify this function's implementation.
3950 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3952 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3955 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3957 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3959 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3961 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3963 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3965 * lynx-low.c (lynx_resume): Use the resume_info parameter
3966 to determine the ptid for the lynx_ptrace call, unless
3967 it is equal to minus_one_ptid, in which case we use the
3968 ptid of the current_inferior.
3969 (lynx_wait_1): After having received a thread create/exit
3970 event, resume the inferior's execution using the signaling
3971 thread's ptid, rather than the old ptid.
3973 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3975 * lynx-low.c (lynx_resume): Delete variable ret.
3977 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3979 * gdbreplay.c (gdbreplay_version): Update copyright year.
3980 * server.c (gdbserver_version): Likewise.
3982 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3984 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3987 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3989 * lynx-low.c (ptrace_request_to_str): Add handling for
3992 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3994 * lynx-low.c (lynx_attach): Delete variable new_process.
3996 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3998 * lynx-low.c (lynx_create_inferior): Delete variable
4001 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4003 * lynx-low.c (ptrace_request_to_str): Do not handle
4004 PTRACE_GETTHREADLIST if this macro does not exist.
4006 2012-12-15 Yao Qi <yao@codesourcery.com>
4008 * Makefile.in (OBS): Add notif.o.
4009 * notif.c, notif.h: New.
4010 * server.c: Include "notif.h".
4011 (struct vstop_notif) <next>: Remove.
4013 (queue_stop_reply): Update.
4014 (push_event, send_next_stop_reply): Remove.
4015 (discard_queued_stop_replies): Update.
4016 (notif_stop): New variable.
4017 (handle_v_stopped): Remove.
4018 (handle_v_requests): Don't call handle_v_stopped. Call
4019 handle_ack_notif instead.
4020 (queue_stop_reply_callback): Call notif_event_enque instead
4021 of queue_stop_reply.
4022 (handle_status): Don't call send_next_stop_reply, call
4023 notif_write_event instead.
4024 (kill_inferior_callback): Likewise.
4025 (detach_or_kill_inferior_callback): Likewise.
4026 (main): Call initialize_notif.
4027 (process_serial_event): Call QUEUE_is_empty.
4028 (handle_target_event): Call notif_push instead of push event.
4029 * server.h (push_event): Remove declaration.
4031 2012-12-10 Tom Tromey <tromey@redhat.com>
4033 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4034 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4037 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4038 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4039 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4040 (amd64-linux-ipa.o, ax.o): Rewrite.
4041 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4042 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4043 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4044 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4045 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4046 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4047 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4048 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4049 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4050 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4051 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4052 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4053 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4054 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4055 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4056 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4057 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4058 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4059 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4060 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4061 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4062 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4063 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4064 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4065 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4066 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4067 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4068 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4069 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4070 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4071 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4072 (reg-tilegx.o): Remove.
4073 (all_object_files): New macro.
4074 Include .deps files.
4075 * aclocal.m4, configure: Rebuild.
4076 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4077 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4078 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4080 2012-12-05 Tom Tromey <tromey@redhat.com>
4083 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4085 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4087 * configure.ac: Check for linux/perf_event.h.
4088 * config.in: Regenerated.
4089 * configure: Regenerated.
4091 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4093 * hostio.c (handle_readlink): Decrease buffer size
4094 parameter passed to readlink by one byte.
4096 2012-11-26 Yao Qi <yao@codesourcery.com>
4098 * configure.ac (build_warnings): Append '-Wempty-body'.
4099 * configure: Regenerated.
4100 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4103 2012-11-15 Pierre Muller <muller@sourceware.org>
4105 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4106 * config.in: Regenerate.
4107 * configure: Regenerate.
4108 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4109 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4110 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4111 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4113 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4114 instead of <sys/wait.h> header.
4115 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4117 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4119 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4120 (various make rules): Remove -DGDBSERVER
4122 2012-11-09 Yao Qi <yao@codesourcery.com>
4124 * spu-low.c (current_ptid): Move it to ..
4125 * gdbthread.h: ... here. New.
4126 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4127 * server.c (myresume, process_serial_event): Likewise.
4128 * thread-db.c (thread_db_find_new_threads): Likewise.
4129 * tracepoint.c (run_inferior_command): Likewise.
4131 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4133 * server.c (handle_search_memory_1): Include access length in
4136 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4138 * linux-crisv32-low.c: Fix compile errors.
4140 2012-09-04 Yao Qi <yao@codesourcery.com>
4142 * tracepoint.c (cmd_qtsv): Adjust debug message.
4143 Don't check CUR_TPOINT.
4145 2012-08-28 Yao Qi <yao@codesourcery.com>
4147 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4148 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4149 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4150 Remove declarations of xmalloc, xreallloc, xstrdup and
4152 * Makefile.in (libiberty_h): New.
4153 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4154 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4156 2012-08-23 Yao Qi <yao@codesourcery.com>
4158 * server.h: Remove declaration of 'xsnprintf'.
4160 2012-08-22 Keith Seitz <keiths@redhat.com>
4162 * server.h: Include build-gnulib-gbserver/config.h.
4163 * gdbreplay.c: Likewise.
4165 2012-08-08 Doug Evans <dje@google.com>
4167 * Makefile.in (SFILES): Add gdb_vecs.c.
4168 (OBS): Add gdb_vecs.o.
4169 (gdb_vecs_h, host_defs_h): New variables.
4170 (thread-db.o): Add $(gdb_vecs_h) dependency.
4171 (gdb_vecs.o): New rule.
4172 * thread-db.c: #include "gdb_vecs.h".
4173 (thread_db_load_search): Use a vector to iterate over path elements.
4174 Handle text appearing after "$pdir".
4176 * configure.ac: Add check for strstr.
4177 * config.in: Regenerate.
4178 * configure: Regenerate.
4180 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4182 * hostio.c (handle_pread): If pread fails, fall back to attempting
4184 (handle_pwrite): Likewise for pwrite.
4186 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4188 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4189 between unsupported TYPE and unimplementable ADDR/LEN combination.
4190 (arm_insert_point): Act on new return value.
4192 2012-07-31 Pedro Alves <palves@redhat.com>
4194 * server.c (process_point_options): Only skip tokens if we find
4195 one that is unrecognized. Don't treat 'X' specially while
4196 skipping unrecognized tokens.
4198 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4200 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4201 to 4-byte-align HW breakpoint addresses for Thumb.
4203 2012-07-27 Yao Qi <yao@codesourcery.com>
4207 * server.h: Declare gdb_agent_about_to_close.
4208 * target.c (kill_inferior): Include "agent.h".
4209 New. Send command 'kill'.
4210 * target.h (kill_inferior): Removed macro.
4211 * tracepoint.c (gdb_agent_about_to_close): New.
4212 (gdb_agent_helper_thread): Handle command 'close'.
4213 Wait endlessly until the inferior stops.
4214 Install gdb_agent_remove_socket to atexit hook.
4215 (agent_socket_name): New static variable.
4216 (gdb_agent_socket_init): Replace local variable 'name' with
4217 'agent_socket_name'.
4218 (gdb_agent_remove_socket): New.
4220 2012-07-27 Yao Qi <yao@codesourcery.com>
4222 * server.c (process_point_options): Stop at 'X' when parsing.
4224 2012-07-19 Michael Eager <eager@eagercon.com>
4226 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4228 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4229 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4230 hardware breakpoint.
4232 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4234 * gdbserver/linux-low.c (initialize_low): Call
4235 linux_ptrace_init_warnings.
4237 2012-07-02 Doug Evans <dje@google.com>
4239 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4242 2012-07-02 Stan Shebs <stan@codesourcery.com>
4244 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4245 (ax.o): Add it to build rule.
4247 (OBS): Add format.o.
4248 (IPA_OBS): Add format.o.
4249 * server.c (handle_query): Claim support for breakpoint commands.
4250 (process_point_options): Add command case.
4251 (process_serial_event): Leave running if there are printfs in
4253 * mem-break.h (any_persistent_commands): Declare.
4254 (add_breakpoint_commands): Declare.
4255 (gdb_no_commands_at_breakpoint): Declare.
4256 (run_breakpoint_commands): Declare.
4257 * mem-break.c (struct point_command_list): New struct.
4258 (struct breakpoint): New field command_list.
4259 (any_persistent_commands): New function.
4260 (add_commands_to_breakpoint): New function.
4261 (add_breakpoint_commands): New function.
4262 (gdb_no_commands_at_breakpoint): New function.
4263 (run_breakpoint_commands): New function.
4264 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4266 * ax.c: Include format.h.
4267 (ax_printf): New function.
4268 (gdb_eval_agent_expr): Add printf opcode.
4270 2012-06-13 Yao Qi <yao@codesourcery.com>
4272 * server.c (start_inferior): Remove duplicated writes to fields
4273 'last_resume_kind' and 'last_status' of 'current_inferior'.
4275 2012-06-12 Yao Qi <yao@codesourcery.com>
4276 Pedro Alves <palves@redhat.com>
4278 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4280 * server.c (handle_v_cont): Extend comment.
4282 2012-06-11 Yao Qi <yao@codesourcery.com>
4284 * linux-low.c (linux_attach): Add 'static'.
4286 2012-06-06 Yao Qi <yao@codesourcery.com>
4288 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4290 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4292 Fix gcc -flto compilation warning.
4293 * server.c (main): Make variable multi_mode and attach volatile.
4295 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4297 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4298 if the platform doesn't know about it.
4300 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4302 * Makefile.in (SFILES): Add linux-tile-low.c.
4303 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4304 * configure.srv: Handle tilegx-*-linux*.
4305 * linux-tile-low.c: New file.
4307 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4309 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4311 2012-05-24 Pedro Alves <palves@redhat.com>
4315 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4317 2012-05-24 Pedro Alves <palves@redhat.com>
4321 Replace target_signal with gdb_signal throughout.
4323 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4325 * linux-low.c (linux_store_registers): Avoid the copying sequence
4326 when no data has been retrieved by ptrace.
4328 2012-05-22 Will Deacon <will.deacon@arm.com>
4330 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4331 Include asm/ptrace.h.
4332 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4335 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4337 * linux-low.c (linux_store_registers): Don't re-retrieve data
4338 with ptrace that has already been obtained from /proc. Always
4339 copy any data retrieved with ptrace to the buffer supplied.
4341 2012-05-11 Yao Qi <yao@codesourcery.com>
4342 Pedro Alves <palves@redhat.com>
4344 * linux-low.c (enum stopping_threads_kind): New.
4345 (stopping_threads): Change type to `enum stopping_threads_kind'.
4346 (handle_extended_wait): If stopping and suspending threads, leave
4347 the new_lwp suspended too.
4348 (linux_wait_for_event): Adjust.
4349 (stop_all_lwps): Set `stopping_threads' to
4350 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4351 whether we're suspending threads or just stopping them. Assert no
4354 2012-04-29 Yao Qi <yao@codesourcery.com>
4356 * server.h: Move some code to ...
4357 * gdbthread.h: ... here. New.
4358 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4359 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4360 (nto-low.o, win32-low.o): Likewise.
4361 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4362 * regcache.c, remote-utils.c, server.c: Likewise.
4363 * target.c, tracepoint.c, win32-low.c: Likewise.
4365 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4367 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4368 (PTRACE_ARG4_TYPE): Likewise.
4369 (PTRACE_XFER_TYPE): Likewise.
4370 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4371 ptrace to PTRACE_ARG3_TYPE.
4372 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4373 (PTRACE_ARG4_TYPE): Likewise.
4374 (PTRACE_XFER_TYPE): Likewise.
4375 (linux_detach_one_lwp): Cast fourth argument of
4376 ptrace to long then PTRACE_ARG4_TYPE.
4377 (regsets_fetch_inferior_registers): Cast third argument of
4378 ptrace to long then PTRACE_ARG3_TYPE.
4379 (regsets_store_inferior_registers): Likewise.
4381 2012-04-20 Pedro Alves <palves@redhat.com>
4383 * configure: Regenerate.
4385 2012-04-19 Pedro Alves <palves@redhat.com>
4387 * Makefile.in (GNULIB_BUILDDIR): New.
4388 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4389 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4390 (all, install-only, uninstall, clean-info, all-lib, clean): No
4391 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4392 (maintainer-clean realclean distclean): Use subdir_do.
4394 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4395 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4396 * acinclude.m4: Include acx_configure_dir.m4.
4397 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4398 calls. Call AC_PROG_RANLIB. Configure gnulib using
4401 (GNULIB_STDINT_H): Adjust.
4402 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4403 * gdbreplay.c: Include build-gnulib/config.h.
4404 * server.h: Likewise.
4405 * aclocal.m4: Regenerate.
4406 * config.in: Regenerate.
4407 * configure: Regenerate.
4409 2012-04-19 Pedro Alves <palves@redhat.com>
4411 * Makefile.in (LIBGNU, INCGNU): Adjust.
4412 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4413 (all, install-only, uninstall, clean-info, all-lib, clean)
4414 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4415 * configure.ac: Adjust AC_OUTPUT output.
4416 * aclocal.m4: Regenerate.
4417 * configure: Regenerate.
4419 2012-04-19 Pedro Alves <palves@redhat.com>
4421 * Makefile.in (generated_files): New.
4422 (server_h): Remove the explicit dependency on config.h, and depend
4423 on $generated_files.
4425 2012-04-19 Pedro Alves <palves@redhat.com>
4427 * Makefile.in (INCGNU): Add -Ignulib.
4429 2012-04-19 Pedro Alves <palves@redhat.com>
4431 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4432 (INCGNU): ... this, and spell out -I here.
4433 (GNULIB_LIB): Rename to ...
4435 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4437 2012-04-19 Pedro Alves <palves@redhat.com>
4439 * config.in: Regenerate.
4441 2012-04-19 Pedro Alves <palves@redhat.com>
4443 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4444 * server.h (memmem): Remove declaration.
4445 * config.in: Regenerate.
4446 * configure: Regenerate.
4448 2012-04-19 Yao Qi <yao@codesourcery.com>
4450 * Makefile.in (SFILES): Add common/vec.c.
4454 2012-04-19 Yao Qi <yao@codesourcery.com>
4456 * remote-utils.c (prepare_resume_reply): Replace with macro
4457 target_core_of_thread.
4458 * server.c (handle_qxfer_threads_proper): Likewise.
4459 * target.h (traget_core_of_thread): New macro.
4461 2012-04-18 Pedro Alves <palves@redhat.com>
4463 * aclocal.m4: Regenerate.
4464 * configure: Regenerate.
4466 2012-04-16 Yao Qi <yao@codesourcery.com>
4468 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4469 duplicated on address.
4471 2012-04-16 Yao Qi <yao@codesourcery.com>
4473 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4474 (struct tracepoint_action_ops) <send>: New field.
4475 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4476 (agent_expr_send, x_tracepoint_action_send): New.
4477 (l_tracepoint_action_send): New.
4478 (cmd_qtdp): Download and install tracepoint
4479 according to `use_agent'.
4480 (run_inferior_command): Add one more parameter `len'.
4482 (tracepoint_send_agent): New.
4483 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4485 2012-04-16 Yao Qi <yao@codesourcery.com>
4487 * tracepoint.c (download_tracepoints): Moved to ...
4488 (cmd_qtstart): ... here.
4490 2012-04-14 Yao Qi <yao@codesourcery.com>
4492 * tracepoint.c: Include inttypes.h.
4493 (struct collect_memory_action): Use sized types.
4494 (struct tracepoint): Likewise.
4495 (cmd_qtdp, stop_tracing): Update print specifiers.
4496 (cmd_qtp, response_tracepoint): Likewise.
4497 (collect_data_at_tracepoint): Likewise.
4498 (collect_data_at_step): Likewise.
4500 2012-04-14 Yao Qi <yao@codesourcery.com>
4502 Import gnulib module inttypes.
4503 * aclocal.m4, config.in, configure: Regenerated.
4505 2012-04-14 Yao Qi <yao@codesourcery.com>
4507 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4508 Makefile and config.status at last.
4510 2012-04-13 Yao Qi <yao@codesourcery.com>
4512 * tracepoint.c: Include stdint.h unconditionally.
4514 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4516 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4517 on BFD_HAVE_SYS_PROCFS_TYPE.
4518 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4519 * configure: Regenerate.
4520 * config.in: Likewise.
4522 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4524 * Makefile.in (clean): Also remove x32.c x32-linux.c
4525 x32-avx.c x32-avx-linux.c.
4526 (x32.o): New target.
4528 (x32-linux.o): Likewise.
4529 (x32-linux.c): Likewise.
4530 (x32-avx.o): Likewise.
4531 (x32-avx.c): Likewise.
4532 (x32-avx-linux.o): Likewise.
4533 (x32-avx-linux.c): Likewise.
4535 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4536 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4537 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4538 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4539 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4540 i386/x32-avx-linux.xml.
4542 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4543 (init_registers_x32_avx_linux): Likwise.
4544 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4545 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4547 2012-04-13 Pedro Alves <palves@redhat.com>
4549 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4550 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4551 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4552 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4555 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4557 * linux-x86-low.c (compat_x32_clock_t): New.
4558 (compat_x32_siginfo_t): Likewise.
4559 (compat_x32_siginfo_from_siginfo): Likewise.
4560 (siginfo_from_compat_x32_siginfo): Likewise.
4561 (linux_is_elf64): Likewise.
4562 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4563 and siginfo_from_compat_x32_siginfo for x32.
4564 (x86_arch_setup): Set linux_is_elf64.
4566 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4569 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4571 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4572 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4573 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4574 compatible with process.
4576 2012-04-12 Yao Qi <yao@codesourcery.com>
4578 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4579 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4580 (install-only, install-info, clean): Handle sub dir gnulib.
4581 (all-lib, am--refresh): New targets.
4582 (memmem.o): Remove target.
4583 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4584 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4585 (AC_REPLACE_FUNCS): Remove memmem.
4586 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4587 (AC_OUTPUT): Generate Makefile in gnulib/.
4588 * aclocal.m4, config.in, configure: Regenerated.
4590 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4592 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4594 2012-04-05 Pedro Alves <palves@redhat.com>
4596 -Werror=strict-aliasing
4598 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4601 2012-04-04 Pedro Alves <palves@redhat.com>
4603 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4604 (sparc_store_gregset_from_stack, sparc_store_gregset)
4605 (sparc_breakpoint_at): Fix formatting.
4607 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4609 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4611 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4612 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4613 * config.in: Regenerate.
4614 * configure: Likewise.
4616 2012-03-29 Pedro Alves <palves@redhat.com>
4618 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4619 Correct ptrace arguments.
4621 2012-03-28 Pedro Alves <palves@redhat.com>
4623 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4624 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4625 (IA64_FR1_REGNUM): New defines.
4626 (ia64_fetch_register): New.
4627 (the_low_target): Install it.
4628 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4630 * linux-low.c (linux_fetch_registers): Try the
4631 the_low_target.fetch_register hook first.
4633 * linux-arm-low.c (the_low_target): Adjust.
4634 * linux-bfin-low.c (the_low_target): Adjust.
4635 * linux-cris-low.c (the_low_target): Adjust.
4636 * linux-crisv32-low.c (the_low_target): Adjust.
4637 * linux-m32r-low.c (the_low_target): Adjust.
4638 * linux-m68k-low.c (the_low_target): Adjust.
4639 * linux-mips-low.c (the_low_target): Adjust.
4640 * linux-ppc-low.c (the_low_target): Adjust.
4641 * linux-s390-low.c (the_low_target): Adjust.
4642 * linux-sh-low.c (the_low_target): Adjust.
4643 * linux-sparc-low.c (the_low_target): Adjust.
4644 * linux-tic6x-low.c (the_low_target): Adjust.
4645 * linux-x86-low.c (the_low_target): Adjust.
4646 * linux-xtensa-low.c (the_low_target): Adjust.
4648 2012-03-26 Pedro Alves <palves@redhat.com>
4650 * server.c (handle_qxfer_libraries): Don't bail early if
4651 the_target->qxfer_libraries_svr4 is not NULL.
4653 2012-03-26 Pedro Alves <palves@redhat.com>
4655 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4657 2012-03-23 Pedro Alves <palves@redhat.com>
4659 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4660 "library-list-svr4" element's start tag when the the DSO list is
4663 2012-03-23 Pedro Alves <palves@redhat.com>
4665 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4666 a variable whose type size is the same as the inferior's pointer
4669 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4671 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4673 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4674 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4675 * linux-low.h: Include <signal.h>.
4676 (struct siginfo): Remove forward declaration.
4677 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4680 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4682 * .gitignore: Ignore more files.
4684 2012-03-19 Pedro Alves <palves@redhat.com>
4685 Jan Kratochvil <jan.kratochvil@redhat.com>
4687 * server.c (cont_thread, general_thread): Add describing comments.
4688 (start_inferior): Clear `cont_thread'.
4689 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4692 2012-03-15 Yao Qi <yao@codesourcery.com>
4694 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4696 (cmd_qtdp): ... here.
4698 2012-03-15 Yao Qi <yao@codesourcery.com>
4700 * tracepoint.c (struct tracepoint_action_ops): New.
4701 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4702 (m_tracepoint_action_download): New.
4703 (r_tracepoint_action_download): New.
4704 (x_tracepoint_action_download): New.
4705 (l_tracepoint_action_download): New.
4706 (add_tracepoint_action): Install `action->ops' according type.
4707 (download_tracepoint_1): Move code `download' function pointer
4708 of various tracepoint_action_ops.
4710 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4712 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4713 linux_ptrace_attach_warnings.
4715 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4717 * Makefile.in (linux-ptrace.o): New.
4718 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4719 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4720 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4721 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4722 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4724 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4726 2012-03-08 Yao Qi <yao@codesourcery.com>
4727 Pedro Alves <palves@redhat.com>
4729 Fix PR server/13392.
4730 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4732 * tracepoint.c (remove_tracepoint): New.
4733 (cmd_qtdp): Call remove_tracepoint when failed to install.
4735 2012-03-07 Pedro Alves <palves@redhat.com>
4737 * linux-low.c (get_detach_signal): New.
4738 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4739 Pass on pending signals to PTRACE_DETACH. Check the result of the
4741 * server.c (program_signals, program_signals_p): New.
4742 (handle_general_set): Handle QProgramSignals.
4743 * server.h (program_signals, program_signals_p): Declare.
4745 2012-03-05 Pedro Alves <palves@redhat.com>
4746 Jan Kratochvil <jan.kratochvil@redhat.com>
4748 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4751 2012-03-03 Yao Qi <yao@codesourcery.com>
4753 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4754 agent_look_up_symbols.
4756 2012-03-03 Yao Qi <yao@codesourcery.com>
4758 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4759 (linux-x86-low.o): Likewise.
4760 * server.h: Remove in_process_agent_loaded.
4761 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4765 2012-03-03 Yao Qi <yao@codesourcery.com>
4767 * tracepoint.c (gdb_agent_capability): New global.
4768 (in_process_agent_loaded_ust): Renamed to
4769 `in_process_agent_supports_ust'.
4771 (in_process_agent_supports_ust): Call agent_capability_check.
4772 (clear_installed_tracepoints): Assert that agent supports
4775 2012-03-03 Yao Qi <yao@codesourcery.com>
4777 * linux-low.c (linux_supports_agent): New.
4778 (linux_target_ops): Initialize field `supports_agent' with
4779 linux_supports_agent.
4780 * target.h (struct target_ops) <supports_agent>: New.
4781 (target_supports_agent): New macro.
4782 * server.c (handle_general_set): Handle packet 'QAgent'.
4783 (handle_query): Send `QAgent+'.
4784 * Makefile.in (server.o): Depends on agent.h.
4786 2012-03-03 Yao Qi <yao@codesourcery.com>
4788 * Makefile.in (OBS): Add agent.o.
4789 Add new rule for agent.o.
4790 Track dependence of tracepoint.c on agent.h.
4791 * tracepoint.c (run_inferior_command_1):
4792 (run_inferior_command): Call agent_run_command.
4793 (gdb_ust_connect_sync_socket): Deleted. Move it to
4795 (resume_thread, stop_thread): Likewise.
4796 (gdb_ust_socket_init): Renamed to ...
4797 (gdb_agent_socket_init): ... New.
4798 (gdb_ust_thread): Renamed to ...
4799 (gdb_agent_helper_thread): ... New.
4800 (gdb_ust_init): Move some code to ...
4801 (gdb_agent_init): ... here. New.
4802 [HAVE_UST]: Call gdb_ust_init.
4803 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4804 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4805 * config.in, configure: Regenerated.
4807 2012-03-02 Pedro Alves <palves@redhat.com>
4809 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4810 * linux-low.c (struct simple_pid_list): New.
4811 (stopped_pids): New a struct simple_pid_list pointer.
4812 (add_to_pid_list, pull_pid_from_list): New.
4813 (handle_extended_wait): Don't assume the first signal new children
4814 report is SIGSTOP. Adjust call to pull_pid_from_list.
4815 (linux_wait_for_lwp): Adjust.
4817 2012-03-02 Yao Qi <yao@codesourcery.com>
4819 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4822 2012-03-02 Yao Qi <yao@codesourcery.com>
4824 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4825 `stop_pc' and `tpoint'. Update caller.
4827 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4829 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4830 * linux-low.c (use_linux_regsets): New macro.
4831 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4832 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4833 (linux_register_in_regsets): New function.
4834 (usr_fetch_inferior_registers): Skip registers covered by
4836 (usr_store_inferior_registers): Likewise.
4837 (usr_fetch_inferior_registers): New macro.
4838 (usr_store_inferior_registers): Likewise.
4839 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4840 (linux_store_registers): Likewise.
4841 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4843 (init_registers_mips64_dsp_linux): Likewise.
4844 (init_registers_mips_linux): New macro.
4845 (init_registers_mips_dsp_linux): Likewise.
4846 (mips_dsp_num_regs): Likewise.
4847 (DSP_BASE, DSP_CONTROL): New fallback macros.
4848 (mips_base_regs): New macro.
4849 (mips_regmap): Use it. Fix the size.
4850 (mips_dsp_regmap): New variable.
4851 (mips_dsp_regset_bitmap): Likewise.
4852 (mips_arch_setup): New function.
4853 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4855 (mips_cannot_store_register): Likewise.
4856 (the_low_target): Update .arch_setup, .num_regs and .regmap
4857 initializers. Add .regset_bitmap initializer.
4858 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4860 * linux-bfin-low.c (the_low_target): Likewise.
4861 * linux-cris-low.c (the_low_target): Likewise.
4862 * linux-crisv32-low.c (the_low_target): Likewise.
4863 * linux-ia64-low.c (the_low_target): Likewise.
4864 * linux-m32r-low.c (the_low_target): Likewise.
4865 * linux-m68k-low.c (the_low_target): Likewise.
4866 * linux-ppc-low.c (the_low_target): Likewise.
4867 * linux-s390-low.c (the_low_target): Likewise.
4868 * linux-sh-low.c (the_low_target): Likewise.
4869 * linux-sparc-low.c (the_low_target): Likewise.
4870 * linux-tic6x-low.c (the_low_target): Likewise.
4871 * linux-x86-low.c (the_low_target): Likewise.
4872 * linux-xtensa-low.c (the_low_target): Likewise.
4873 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4874 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4875 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4877 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4878 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4880 2012-02-29 Yao Qi <yao@codesourcery.com>
4881 Pedro Alves <palves@redhat.com>
4883 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4884 `step_over_finished' is true.
4886 2012-02-27 Pedro Alves <palves@redhat.com>
4888 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4889 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4891 2012-02-27 Pedro Alves <palves@redhat.com>
4894 * linux-low.c (pid_is_stopped): New.
4895 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4897 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4899 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4902 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4904 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4906 2012-02-24 Luis Machado <lgustavo@codesourcery>
4908 * server.c (handle_query): Advertise support for target-side
4909 breakpoint condition evaluation.
4910 (process_point_options): New function.
4911 (process_serial_event): When inserting a breakpoint, check for
4912 a target-side condition that should be evaluated.
4914 * mem-break.c: Include regcache.h and ax.h.
4915 (point_cond_list_t): New data structure.
4916 (breakpoint) <cond_list>: New field.
4917 (find_gdb_breakpoint_at): Make non-static.
4918 (delete_gdb_breakpoint_at): Clear any target-side
4920 (clear_gdb_breakpoint_conditions): New function.
4921 (add_condition_to_breakpoint): Likewise.
4922 (add_breakpoint_condition): Likewise.
4923 (gdb_condition_true_at_breakpoint): Likewise.
4924 (gdb_breakpoint_here): Return result directly instead
4925 of going through a local variable.
4927 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4928 (clear_gdb_breakpoint_conditions): Likewise.
4929 (add_breakpoint_condition): Likewise.
4930 (gdb_condition_true_at_breakpoint): Likewise.
4932 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4933 (need_step_over_p): Take target-side breakpoint condition into
4936 2012-02-24 Luis Machado <lgustavo@codesourcery>
4938 * server.h: Include tracepoint.h.
4939 (agent_mem_read, agent_get_trace_state_variable_value,
4940 agent_set_trace_state_variable_value,
4941 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4942 get_set_tsv_func_addr): New prototypes.
4944 * ax.h: New include file.
4945 * ax.c: New source file.
4947 * tracepoint.c: Include ax.h.
4948 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4949 agent_expr, eval_result_type): Move to ax.h.
4950 (parse_agent_expr): Rename to ...
4951 (gdb_parse_agent_expr): ... this, make it non-static and move
4953 (unparse_agent_expr) Rename to ...
4954 (gdb_unparse_agent_expr): ... this, make it non-static and move
4956 (eval_agent_expr): Rename to ...
4957 (eval_tracepoint_agent_expr): ... this.
4958 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4959 forward declarations.
4960 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4961 (agent_get_trace_state_variable_value): New function.
4962 (agent_set_trace_state_variable_value): New function.
4963 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4964 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4965 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4966 (condition_true_at_tracepoint): Likewise.
4967 (parse_agent_expr): Rename to ...
4968 (gdb_parse_agent_expr): ... this and move to ax.c.
4969 (unparse_agent_expr): Rename to ...
4970 (gdb_unparse_agent_expr): ... this and move to ax.c.
4971 (gdb_agent_op_name): Move to ax.c.
4972 (eval_agent_expr): Rename to ...
4973 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4975 (eval_tracepoint_agent_expr): New function.
4976 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4978 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4980 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4981 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4982 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4983 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4984 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4985 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4986 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4987 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4988 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4989 (compile_bytecodes): Remove forward declaration.
4990 (is_goto_target): Move to ax.c.
4991 (compile_bytecodes): Move to ax.c and call
4992 agent_get_trace_state_variable_value (...) and
4993 agent_set_trace_state_variable_value (...).
4995 * Makefile.in: Update ax.c and IPA dependencies.
4997 2012-02-24 Pedro Alves <palves@redhat.com>
4999 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5000 (cmd_bigqtbuffer_circular): ... this. Only handle
5001 'QTBuffer:circular:'.
5002 (handle_tracepoint_general_set): Adjust.
5004 2012-02-16 Yao Qi <yao@codesourcery.com>
5006 * inferiors.c: Move code to ...
5007 * dll.c: .... here. New.
5008 * server.h: Declare clear_dlls.
5009 * Makefile.in (SFILES): Add dll.c.
5013 2012-02-11 Yao Qi <yao@codesourcery.com>
5015 * server.c: (handle_monitor_command): Add a new parameter
5017 (handle_query): Update caller.
5019 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5021 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5022 * configure, config.in: Regenerate.
5023 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5026 2012-02-02 Pedro Alves <palves@redhat.com>
5028 Try SIGKILL first, then PTRACE_KILL.
5029 * linux-low.c (linux_kill_one_lwp): New.
5030 (linux_kill_one_lwp): Rename to ...
5031 (kill_one_lwp_callback): ... this. Use the new
5034 2012-02-02 Pedro Alves <palves@redhat.com>
5036 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5039 2012-01-27 Pedro Alves <palves@redhat.com>
5041 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5042 (elf_64_file_p): Make static.
5043 (linux_pid_exe_is_elf_64_file): New.
5044 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5045 Delete declarations.
5046 (linux_pid_exe_is_elf_64_file): Declare.
5047 * linux-x86-low.c (x86_arch_setup): Use
5048 linux_pid_exe_is_elf_64_file.
5050 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5052 * linux-low.c (linux_wait_for_event_1): Rename to ...
5053 (linux_wait_for_event): ... here and merge it with former
5054 linux_wait_for_event - new variable wait_ptid, use it.
5055 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5057 2012-01-23 Pedro Alves <palves@redhat.com>
5059 * server.c (main): Avoid yet another case of infinite loop while
5060 detaching/killing after a longjmp.
5062 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5065 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5067 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5069 * hostio.c (handle_readlink): New function.
5070 (handle_vFile): Call it to handle "vFile:readlink" packets.
5072 2012-01-20 Pedro Alves <palves@redhat.com>
5073 Ulrich Weigand <ulrich.weigand@linaro.org>
5075 * server.c (handle_v_requests): Only support vAttach and vRun to
5076 start multiple processes when in extended protocol mode.
5078 2012-01-17 Pedro Alves <palves@redhat.com>
5080 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5081 memalign plus mprotect to allocate the scratch buffer.
5083 2012-01-13 Pedro Alves <palves@redhat.com>
5085 * server.c (attach_inferior): Clear `cont_thread'.
5087 2012-01-13 Pedro Alves <palves@redhat.com>
5089 * server.c (main): Avoid infinite loop while detaching/killing
5092 2012-01-09 Doug Evans <dje@google.com>
5094 * server.c (start_inferior): Set last_ptid in --wrapper case.
5096 2012-01-06 Yao Qi <yao@codesourcery.com>
5098 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5100 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5102 2012-01-04 Yao Qi <yao@codesourcery.com>
5104 * tracepoint.c (cmd_qtdp): Print debug message
5105 for static tracepoint.
5107 2012-01-04 Yao Qi <yao@codesourcery.com>
5109 * tracepoint.c (trace_vdebug): Differentiate debug message
5110 between gdbserver and IPA.
5112 2012-01-03 Yao Qi <yao@codesourcery.com>
5114 * tracepoint.c (tracepoint_was_hit): Don't collect for
5117 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5119 * terminal.h: Reformat copyright header.
5121 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5123 * server.c (gdbserver_version): Update copyright year.
5124 * gdbreplay.c (gdbreplay_version): Likewise.
5126 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5128 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5131 2011-12-18 Hui Zhu <teawater@gmail.com>
5132 * linux-low.c (linux_create_inferior): Save return value to ret.
5134 2011-12-18 Hui Zhu <teawater@gmail.com>
5136 * linux-low.c (linux_create_inferior): Save return value to ret.
5138 2011-12-16 Doug Evans <dje@google.com>
5140 * linux-low.c (linux_create_inferior): If stdio connection,
5141 redirect stdin from /dev/null, stdout to stderr.
5142 * remote-utils.c (remote_is_stdio): New static global.
5143 (remote_connection_is_stdio): New function.
5144 (remote_prepare): Handle stdio connection.
5145 (remote_open): Ditto.
5146 (remote_close): Don't close stdin for stdio connections.
5147 (read_prim,write_prim): New functions. Replace all calls to
5148 read/write to these.
5149 * server.c (main): Watch for "-" argument. Move call to
5150 remote_prepare before start_inferior.
5151 * server.h (STDIO_CONNECTION_NAME): New macro.
5152 (remote_connection_is_stdio): Declare.
5154 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5155 in debugging output.
5157 2011-12-15 Yao Qi <yao@codesourcery.com>
5159 * tracepoint.c: Include sys/syscall.h.
5160 (gdb_ust_thread): Remove preprocessor conditional.
5162 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5164 * linux-low.c (linux_detach_one_lwp): Call
5165 the_low_target.prepare_to_resume before detaching.
5167 2011-12-14 Yao Qi <yao@codesourcery.com>
5169 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5172 2011-12-14 Yao Qi <yao@codesourcery.com>
5174 * i386-low.c (i386_low_stopped_data_address): Initialize local
5177 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5181 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5182 DR_CONTROL unless necessary. Extend comments.
5183 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5184 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5186 2011-12-13 Yao Qi <yao@codesourcery.com>
5188 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5190 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5192 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5194 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5195 Print new debug message for such case.
5197 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5199 Fix overlapping memcpy.
5200 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5201 the read_inferior_memory transfer.
5202 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5203 write_inferior_memory transfer.
5204 (set_fast_tracepoint_jump): New variable buf. Use it for the
5205 read_inferior_memory and write_inferior_memory transfers.
5206 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5207 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5208 Use it for the write_inferior_memory transfer.
5209 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5212 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5214 * linux-low.c (fetch_register, store_register): Make code
5215 consistent, fix formatting.
5217 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5219 * linux-low.c (usr_store_inferior_registers): Factor out code
5220 to handle individual registers into...
5221 (store_register): ... this new function.
5223 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5225 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5226 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5227 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5228 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5229 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5230 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5231 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5232 (srv_xmlfiles): Add new XML files.
5234 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5236 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5237 (init_registers_s390_linux32v1): Add prototype.
5238 (init_registers_s390_linux32v2): Likewise.
5239 (init_registers_s390_linux64v1): Likewise.
5240 (init_registers_s390_linux64v2): Likewise.
5241 (init_registers_s390x_linux64v1): Likewise.
5242 (init_registers_s390x_linux64v2): Likewise.
5243 (s390_num_regs): Increment to 52.
5244 (s390_regmap): Add orig_r2 register.
5245 (s390_num_regs_3264): Increment to 68.
5246 (s390_regmap_3264): Add orig_r2 register.
5247 (s390_collect_ptrace_register): Handle orig_r2 register.
5248 (s390_supply_ptrace_register): Likewise.
5249 (s390_fill_last_break): New function.
5250 (s390_store_last_break): Likewise.
5251 (s390_fill_system_call): New function.
5252 (s390_store_system_call): Likewise.
5253 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5255 (s390_check_regset): New function.
5256 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5257 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5258 Update target_regsets for available register sets.
5260 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5261 Jan Kratochvil <jan.kratochvil@redhat.com>
5263 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5264 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5266 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5267 * linux-low.h (struct process_info_private): New member r_debug.
5268 * server.c (handle_qxfer_libraries): Call
5269 the_target->qxfer_libraries_svr4.
5270 (handle_qxfer_libraries_svr4): New function.
5271 (qxfer_packets): New entry "libraries-svr4".
5272 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5273 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5274 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5275 PACKET_qXfer_libraries_svr4.
5277 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5279 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5280 PSW address/mask between 8-byte and 16-byte formats.
5281 (s390_supply_ptrace_register): Likewise.
5282 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5283 basic addressing mode bit.
5285 2011-11-24 Stan Shebs <stan@codesourcery.com>
5287 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5289 2011-11-17 Stan Shebs <stan@codesourcery.com>
5291 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5292 (tracing_start_time): New global.
5293 (tracing_stop_time): New global.
5294 (tracing_user_name): New global.
5295 (tracing_notes): New global.
5296 (tracing_stop_note): New global.
5297 (cmd_qtstart): Set traceframe_usage, start_time.
5298 (stop_tracing): Set stop_time.
5299 (cmd_qtstatus): Report additional status.
5300 (cmd_qtp): New function.
5301 (handle_tracepoint_query): Call it.
5302 (cmd_qtnotes): New function.
5303 (handle_tracepoint_general_set): Call it.
5304 (get_timestamp): Rename from tsv_get_timestamp.
5306 2011-11-14 Stan Shebs <stan@codesourcery.com>
5307 Kwok Cheung Yeung <kcy@codesourcery.com>
5309 * linux-x86-low.c (small_jump_insn): New.
5310 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5311 trampoline and error message, build a trampoline and issue a small
5312 jump instruction to it.
5313 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5314 trampoline and error message.
5315 (x86_get_min_fast_tracepoint_insn_len): New.
5316 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5317 * linux-low.h (struct linux_target_ops): Add arguments to
5318 install_fast_tracepoint_jump_pad operation, add new operation.
5319 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5321 (linux_get_min_fast_tracepoint_insn_len): New function.
5322 (linux_target_op): Add new operation.
5323 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5324 (gdb_trampoline_buffer_end): Ditto.
5325 (gdb_trampoline_buffer_error): Ditto.
5326 (struct ipa_sym_addresses): Add fields for new IPA variables.
5327 (symbol_list): Add entries for new IPA variables.
5328 (struct tracepoint): Add fields to hold the address range of the
5329 trampoline used by the tracepoint.
5330 (trampoline_buffer_head): New static variable.
5331 (trampoline_buffer_tail): Ditto.
5332 (claim_trampoline_space): New function.
5333 (have_fast_tracepoint_trampoline_buffer): New function.
5334 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5336 (install_fast_tracepoint): Ditto, also add error buffer argument.
5337 (cmd_qtminftpilen): New function.
5338 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5339 (fast_tracepoint_from_trampoline_address): New function.
5340 (fast_tracepoint_collecting): Handle trampoline as part of jump
5342 (set_trampoline_buffer_space): New function.
5343 (initialize_tracepoint): Initialize new IPA variables.
5344 * target.h (struct target_ops): Add arguments to
5345 install_fast_tracepoint_jump_pad operation, add new
5346 get_min_fast_tracepoint_insn_len operation.
5347 (target_get_min_fast_tracepoint_insn_len): New.
5348 (install_fast_tracepoint_jump_pad): Add arguments.
5349 * server.h (IPA_BUFSIZ): Define.
5350 * linux-i386-ipa.c: Include extra header files.
5351 (initialize_fast_tracepoint_trampoline_buffer): New function.
5352 (initialize_low_tracepoint): Call it.
5353 * server.h (set_trampoline_buffer_space): Declare.
5354 (claim_trampoline_space): Ditto.
5355 (have_fast_tracepoint_trampoline_buffer): Ditto.
5357 2011-11-14 Yao Qi <yao@codesourcery.com>
5359 * server.c (handle_query): Handle InstallInTrace for qSupported.
5360 * tracepoint.c (add_tracepoint): Sort list.
5361 (install_tracepoint, download_tracepoint): New.
5362 (cmd_qtdp): Call them to install and download tracepoints.
5363 (sort_tracepoints): Removed.
5364 (cmd_qtstart): Update.
5366 2011-11-14 Yao Qi <yao@codesourcery.com>
5368 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5369 * mem-break.h: Declare.
5370 * tracepoint.c (cmd_qtstart): Move some code to ...
5371 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5373 (download_tracepoints): Move some code to ...
5374 (download_tracepoint_1): ... here. New.
5376 2011-11-08 Yao Qi <yao@codesourcery.com>
5378 * remote-utils.c (relocate_instruction): A comment fix.
5380 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5382 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5383 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5384 dr_status_mirror and dr_control_mirror from debug_reg_state.
5385 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5386 (i386_initial_stuff): Remove use of deleted globals.
5387 (i386_get_thread_context, i386_set_thread_context,
5388 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5389 from debug_reg_state.
5391 2011-11-05 Yao Qi <yao@codesourcery.com>
5393 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5394 address as TPOINT's.
5396 2011-11-02 Stan Shebs <stan@codesourcery.com>
5398 * tracepoint.c (agent_mem_read_string): New function.
5399 (eval_agent_expr): Call it for tracenz.
5400 * server.c (handle_query): Report support for tracenz.
5402 2011-11-02 Yao Qi <yao@codesourcery.com>
5404 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5406 2011-11-02 Yao Qi <yao@codesourcery.com>
5408 * target.h: Fix a typo in comment.
5410 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5412 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5413 clobber the breakpoints' shadows with fast tracepoint jumps.
5414 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5415 * target.c (write_inferior_memory): Also pass MYADDR down to
5418 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5420 * configure.ac: Check support for personality routine.
5421 * configure: Regenerate.
5422 * config.in: Likewise.
5423 * linux-low.c: Include <sys/personality.h>.
5424 Define ADDR_NO_RANDOMIZE if necessary.
5425 (linux_create_inferior): Disable address space randomization when
5426 forking inferior, if requested.
5427 (linux_supports_disable_randomization): New function.
5428 (linux_target_ops): Install it.
5429 * server.h (disable_randomization): Declare.
5430 * server.c (disable_randomization): New global variable.
5431 (handle_general_set): Handle QDisableRandomization.
5432 (handle_query): Likewise for qSupported.
5433 (main): Support --disable-randomization and --no-disable-randomization
5434 command line arguments.
5435 * target.h (struct target_ops): Add supports_disable_randomization.
5436 (target_supports_disable_randomization): New macro.
5438 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5440 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5442 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5443 [!PT_GETDSBT] (target_loadmap): New definition.
5444 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5445 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5446 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5447 and PT_GETDSBT to LINUX_LOADMAP.
5448 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5449 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5451 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5453 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5454 (arm_linux_hwbp_cap): New static variable.
5455 (arm_linux_get_hwbp_cap): Replace by ...
5456 (arm_linux_init_hwbp_cap): ... this new function.
5457 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5458 (arm_linux_get_hw_watchpoint_count): Likewise.
5459 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5460 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5461 (arm_prepare_to_resume): Use perror_with_name instead of error.
5463 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5465 * linux-arm-low.c: Include <signal.h>.
5466 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5467 (struct arm_linux_hwbp_cap): New data type.
5468 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5469 (struct arm_linux_hw_breakpoint): New data type.
5470 (MAX_BPTS, MAX_WPTS): Define.
5471 (struct arch_process_info, struct arch_lwp_info): New data types.
5472 (arm_linux_get_hwbp_cap): New function.
5473 (arm_linux_get_hw_breakpoint_count): Likewise.
5474 (arm_linux_get_hw_watchpoint_count): Likewise.
5475 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5476 (arm_hwbp_control_initialize): Likewise.
5477 (arm_hwbp_control_is_enabled): Likewise.
5478 (arm_hwbp_control_is_initialized): Likewise.
5479 (arm_hwbp_control_disable): Likewise.
5480 (arm_linux_hw_breakpoint_equal): Likewise.
5481 (arm_linux_hw_point_initialize): Likewise.
5482 (struct update_registers_data): New data structure.
5483 (update_registers_callback: New function.
5484 (arm_insert_point): Likewise.
5485 (arm_remove_point): Likewise.
5486 (arm_stopped_by_watchpoint): Likewise.
5487 (arm_stopped_data_address): Likewise.
5488 (arm_new_process): Likewise.
5489 (arm_new_thread): Likewise.
5490 (arm_prepare_to_resume): Likewise.
5491 (the_low_target): Register arm_insert_point, arm_remove_point,
5492 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5493 arm_new_thread, and arm_prepare_to_resume.
5495 2011-09-15 Stan Shebs <stan@codesourcery.com>
5497 * server.h (struct emit_ops): Add compare-goto fields.
5498 * tracepoint.c (gdb_agent_op_sizes): New table.
5499 (emit_eq_goto): New function.
5500 (emit_ne_goto): New function.
5501 (emit_lt_goto): New function.
5502 (emit_le_goto): New function.
5503 (emit_gt_goto): New function.
5504 (emit_ge_goto): New function.
5505 (is_goto_target): New function.
5506 (compile_bytecodes): Recognize special cases of compare-goto
5507 combinations and call specialized emitters for them.
5508 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5509 (amd64_emit_ne_goto): New function.
5510 (amd64_emit_lt_goto): New function.
5511 (amd64_emit_le_goto): New function.
5512 (amd64_emit_gt_goto): New function.
5513 (amd64_emit_ge_goto): New function.
5514 (amd64_emit_ops): Add the new functions.
5515 (i386_emit_eq_goto): New function.
5516 (i386_emit_ne_goto): New function.
5517 (i386_emit_lt_goto): New function.
5518 (i386_emit_le_goto): New function.
5519 (i386_emit_gt_goto): New function.
5520 (i386_emit_ge_goto): New function.
5521 (i386_emit_ops): Add the new functions.
5523 2011-09-08 Stan Shebs <stan@codesourcery.com>
5525 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5526 (i386_emit_epilogue): Restore %ebx.
5528 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5530 * server.c (step_thread): Remove definition.
5531 (process_serial_event): Don't handle Hs.
5532 * server.h (step_thread): Remove declaration.
5533 * target.c (set_desired_inferior): Remove use of step_thread.
5535 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5537 * linux-low.c: Include linux-procfs.h.
5538 (linux_attach_lwp_1): Update comments.
5539 (linux_attach): Scan for existing threads when attaching to a
5540 process that is the tgid.
5541 * Makefile.in: Update dependencies.
5543 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5545 * configure.srv: Add linux-procfs.o dependencies.
5547 2011-08-14 Yao Qi <yao@codesourcery.com>
5549 * target.h (struct target_ops): Fix indent.
5550 * win32-low.c (win32_target_ops): Fix comment.
5552 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5553 Yao Qi <yao@codesourcery.com>
5555 * Makefile.in (clean): Remove tic6x-*.c files.
5556 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5557 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5558 (tic6x-c64xp-linux.c): Likewise.
5559 * configure.srv: Add support for tic6x-*-uclinux.
5560 * linux-tic6x-low.c: New.
5561 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5563 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5564 Yao Qi <yao@codesourcery.com>
5566 * target.h (struct target_ops): Add read_loadmap.
5567 * linux-low.c (struct target_loadseg): New type.
5568 (struct target_loadmap): New type.
5569 (linux_read_loadmap): New function.
5570 (linux_target_ops): Add linux_read_loadmap.
5571 * server.c (handle_query): Support qXfer:fdpic:read packet.
5572 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5575 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5577 * win32-low.c: Include <stdint.h>.
5579 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5581 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5582 to the inferior here.
5583 (i386_remove_aligned_watchpoint): Ditto.
5584 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5585 fit part of the watchpoint in the debug registers.
5586 (i386_update_inferior_debug_regs): New.
5587 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5588 registers, and only update the inferior on success.
5589 (i386_low_remove_watchpoint): Ditto.
5591 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5593 * linux-low.c (compare_ints, unique, list_threads, show_process,
5594 linux_core_of_thread): Delete.
5595 (linux_target_ops): Change linux_core_of_thread to
5596 linux_common_core_of_thread.
5597 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5598 * utils.c (malloc_failure): Change type of argument.
5599 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5600 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5601 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5602 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5603 (IPA_OBJS): Add common-utils-ipa.o.
5604 (ptid_h, linux_osdata_h): New macros.
5605 (server_h): Add common/common-utils.h, common/xml-utils.h,
5606 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5608 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5609 ptid.o, buffer.o): New rules.
5610 (linux-low.o): Add common/linux-osdata.h as a dependency.
5611 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5612 * configure.ac: Add AC_HEADER_DIRENT check.
5613 * config.in: Regenerate.
5614 * configure: Regenerate.
5615 * remote-utils.c (xml_escape_text): Delete.
5616 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5617 buffer_xml_printf): Move to common/buffer.c.
5618 * server.c (main): Remove call to initialize_inferiors.
5619 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5620 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5621 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5622 internal_error, gdb_assert, gdb_assert_fail): Delete.
5623 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5624 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5626 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5627 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5628 initialize_inferiors): Delete.
5630 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5632 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5635 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5637 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5639 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5641 2011-05-26 Yao Qi <yao@codesourcery.com>
5643 * Makefile.in (thread-db.o): Track dependence to
5644 common/gdb_thread_db.h.
5645 * thread-db.c: include gdb_thread_db.h from right place.
5647 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5649 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5650 __FILE__ and __LINE__ to internal_error.
5652 2011-05-13 Doug Evans <dje@google.com>
5654 * thread-db.c (try_thread_db_load_from_sdir): New function.
5655 (try_thread_db_load_from_dir): New function.
5656 (thread_db_load_search): Handle $sdir, ignore $pdir.
5657 Remove trying of system directories if search of
5658 libthread-db-search-path fails, that is now done via $sdir.
5660 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5662 * server.c (handle_query): Add EnableDisableTracepoints to the list
5663 of supported features.
5664 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5666 (cmd_qtenable_disable): New.
5667 (cmd_qtstart): Install tracepoints even if disabled.
5668 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5669 receiving a QTEnable or QTDisable packet.
5670 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5671 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5673 (gdb_probe): Skip data collection if static tracepoint is disabled.
5675 2011-05-10 Doug Evans <dje@google.com>
5677 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5679 2011-05-04 Doug Evans <dje@google.com>
5681 * linux-low.c (linux_join): Skip process lookup.
5682 * spu-low.c (spu_join): Ditto.
5683 * server.c (join_inferiors_callback): Delete.
5684 (process_serial_event): For 'D' packet (detach) call join_inferior
5687 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5689 * README: Don't mention xscale*-*-linux*.
5690 * configure.srv (xscale*-*-linux*): Don't handle target.
5692 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5694 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5696 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5697 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5698 (i386_emit_void_call_2): Likewise.
5700 2011-04-26 Yao Qi <yao@codesourcery.com>
5702 * linux-low.c: Move common macros to linux-ptrace.h.
5703 Include linux-ptrace.h.
5704 * Makefile.in (linux_ptrace_h): New.
5705 (linux-low.o): Depends on linux-ptrace.h.
5707 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5709 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5710 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5711 (remote_prepare): New function with most of the TCP code from ...
5712 (remote_open): ... here. Detect PORT here unconditionally. Move also
5713 setting transport_is_reliable.
5714 * server.c (run_once): New variable.
5715 (gdbserver_usage): Document it.
5716 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5717 the first run if RUN_ONCE.
5718 * server.h (run_once, remote_prepare): New declarations.
5720 2011-04-19 Tom Tromey <tromey@redhat.com>
5722 * win32-low.c (handle_load_dll): Remove duplicate "the".
5724 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5726 Remove support for old Cygwin 1.5 versions.
5727 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5728 function to avoid warning.
5729 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5732 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5734 * gdbserver/server.h (Macro _): Define it if not available.
5736 2011-03-14 Michael Snyder <msnyder@vmware.com>
5738 * hostio.c (handle_close): Remove unnecessary null test.
5740 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5742 * Makefile.in (maintainer-clean realclean distclean): Remove
5743 "make ... subdir_do" command.
5745 2011-03-10 Michael Snyder <msnyder@vmware.com>
5747 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5749 * server.c (handle_v_run): Free alloced buffer on early return.
5751 2011-03-09 Yao Qi <yao@codesourcery.com>
5754 2011-03-04 Yao Qi <yao@codesourcery.com>
5756 * Makefile.in: Remove GNU make feature --directory.
5758 2011-03-05 Yao Qi <yao@codesourcery.com>
5760 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5761 (subdir_do): New make target. Copied from gdb/Makefile.
5762 (maintainer-clean, realclean, distclean, clean): Call corresponding
5763 make targets in common/Makefile.
5765 2011-02-11 Yao Qi <yao@codesourcery.com>
5767 * configure.ac: Call AC_PROG_RANLIB.
5768 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5769 * configure: Regenerate.
5771 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5773 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5775 2011-03-06 Yao Qi <yao@codesourcery.com>
5777 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5779 2011-03-05 Yao Qi <yao@codesourcery.com>
5781 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5782 (subdir_do): New make target. Copied from gdb/Makefile.
5783 (maintainer-clean, realclean, distclean, clean): Call corresponding
5784 make targets in common/Makefile.
5786 2011-03-04 Yao Qi <yao@codesourcery.com>
5788 * Makefile.in: Remove GNU make feature --directory.
5790 2011-03-04 Michael Snyder <msnyder@vmware.com>
5792 * server.c (queue_stop_reply): Call xmalloc not malloc.
5794 2011-03-02 Michael Snyder <msnyder@vmware.com>
5796 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5798 2011-02-28 Michael Snyder <msnyder@vmware.com>
5800 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5801 (cmd_qtframe): Ditto.
5802 (cmd_qtbuffer): Ditto.
5803 (cmd_bigqtbuffer): Ditto.
5805 * utils.c (decimal2str): Initialize 'width' to nine, then
5808 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5810 * hostio.c (require_data): Free *data, not data.
5812 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5814 * hostio.c (require_data): Use free, not xfree.
5816 2011-02-27 Michael Snyder <msnyder@vmware.com>
5818 * server.c (handle_query): Discard unused value.
5820 * hostio.c (require_data): Free malloc memory before returning
5823 2011-02-26 Michael Snyder <msnyder@vmware.com>
5825 * linux-low.c (list_threads): Call closedir for dirent.
5827 2011-02-27 Michael Snyder <msnyder@vmware.com>
5829 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5830 a case statement falls through.
5832 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5834 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5837 2011-02-26 Michael Snyder <msnyder@vmware.com>
5839 * utils.c (decimal2str): Eliminate dead code and dead param.
5840 (pulongest): Drop dead param from call to decimal2str.
5843 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5845 Revert the following patch (not approved yet):
5846 2011-02-21 Hui Zhu <teawater@gmail.com>
5847 * tracepoint.c (tp_printf): New function.
5848 (eval_agent_expr): Handle gdb_agent_op_printf.
5850 2011-02-21 Hui Zhu <teawater@gmail.com>
5852 * tracepoint.c (tp_printf): New function.
5853 (eval_agent_expr): Handle gdb_agent_op_printf.
5855 2011-02-18 Tom Tromey <tromey@redhat.com>
5857 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5858 (tracepoint.o): Likewise.
5859 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5860 (gdb_agent_op_names): Likewise.
5862 2011-02-18 Tom Tromey <tromey@redhat.com>
5864 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5865 gdb_agent_op_rot>: New constants.
5866 (gdb_agent_op_names): Add pick and roll.
5867 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5870 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5872 * aclocal.m4: Regenerated with aclocal-1.11.1.
5874 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5876 * server.c (handle_qxfer_traceframe_info): New.
5877 (qxfer_packets): Register "traceframe-info".
5878 (handle_query): Report support for qXfer:traceframe-info:read+.
5879 * tracepoint.c (match_blocktype): New.
5880 (traceframe_find_block_type): Rename to ...
5881 (traceframe_walk_blocks): ... this. Add callback filter argument,
5883 (traceframe_find_block_type): New, reimplemented on top of
5884 traceframe_walk_blocks.
5885 (build_traceframe_info_xml): New.
5886 (traceframe_read_info): New.
5887 * server.h (traceframe_read_info): Declare.
5889 2011-02-11 Yao Qi <yao@codesourcery.com>
5891 * configure.ac: Call AC_PROG_RANLIB.
5892 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5893 * configure: Regenerate.
5895 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5897 * server.c (gdb_read_memory): Change return semantics to allow
5899 (handle_search_memory_1): Adjust.
5900 (process_serial_event) <'m' packet>: Handle partial transfers.
5901 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5903 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5905 * regcache.c (init_register_cache): Initialize
5906 regcache->register_status.
5907 (free_register_cache): Release regcache->register_status.
5908 (regcache_cpy): Copy register_status.
5909 (registers_to_string): Print 'x's for unavailable registers.
5910 (supply_register): Mark the register's status valid or
5911 unavailable, depending on whether a buffer was passed in or not.
5912 (supply_register_zeroed): New.
5913 (supply_regblock): Mark the registers' status valid or
5914 unavailable, depending on whether a buffer was passed in or not.
5915 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5916 (struct regcache): New `register_status' field.
5917 (supply_register_zeroed): Declare.
5918 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5919 supply_register_zeroed, rather than passing a NULL buffer to
5921 * tracepoint.c (fetch_traceframe_registers): Update comment.
5923 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5925 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5928 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5930 * server.h (decode_xfer_write): Change prototype.
5931 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5932 and don't extract the annex here.
5933 * server.c (decode_xfer_read): Remove `annex' parameter,
5934 and don't extract the annex here.
5936 (struct qxfer): New.
5937 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5938 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5939 (handle_qxfer_statictrace): New functions, abstracted out from
5940 handle_query, and made to use the struct qxfer interface.
5941 (handle_threads_qxfer_proper): Rename to ...
5942 (handle_qxfer_threads_proper): ... this.
5943 (handle_threads_qxfer): Rename to ...
5944 (handle_qxfer_threads): ... this. Adjust.
5945 (qxfer_packets): New array.
5946 (handle_qxfer): New function.
5947 (handle_query): Use handle_qxfer.
5949 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5951 * gdbreplay.c: Shorten lines of >= 80 columns.
5952 * linux-low.c: Ditto.
5953 * linux-ppc-low.c: Ditto.
5954 * linux-s390-low.c: Ditto.
5955 * linux-sparc-low.c: Ditto.
5956 * linux-x86-low.c: Ditto.
5957 * linux-xtensa-low.c: Ditto.
5958 * mem-break.c: Ditto.
5960 * regcache.h: Ditto.
5961 * remote-utils.c: Ditto.
5964 * thread-db.c: Ditto.
5965 * tracepoint.c: Ditto.
5967 * win32-low.h: Ditto.
5969 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5971 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5974 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5976 * server.c (gdbserver_version): Update copyright year in version
5978 * gdbreplay.c (gdbreplay_version): Ditto.
5980 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5982 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5983 * linux-bfin-low.c: New file.
5984 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5985 PT_DATA_ADDR for BFIN targets.
5986 * Makefile.in (SFILES): Add linux-bfin-low.c.
5987 (clean): Remove reg-bfin.c.
5988 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5989 * README: Mention supported Blackfin targets.
5991 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5993 * .gitignore: New file.
5995 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5997 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5999 2010-10-22 Jie Zhang <jie@codesourcery.com>
6001 * Makefile.in: Add FLAGS_TO_PASS variable.
6002 (install): Remove dependency of install-only and recursively
6003 invoke make for install-only.
6005 2010-10-04 Doug Evans <dje@google.com>
6007 * Makefile.in (uninstall): Use $(DESTDIR).
6009 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6013 * linux-x86-low.c (compat_siginfo_from_siginfo)
6014 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6015 si_code is < 0. Check for si_code == SI_TIMER before checking for
6018 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6020 * lynx-i386-low.c: New file.
6021 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6023 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6025 * lynx-low.c (ptrace_request_to_str): Remove handling for
6026 request values that have been removed in LynxOS 5.x.
6028 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6030 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6033 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6035 * configure.ac: Add --enable-inprocess-agent option.
6036 * configure: Rebuilt.
6038 2010-09-06 Yao Qi <yao@codesourcery.com>
6040 * linux-low.c (linux_kill): Remove unused variable.
6041 (linux_stabilize_threads): Likewise.
6042 * server.c (start_inferior): Likewise.
6043 (queue_stop_reply_callback): Likewise.
6044 * tracepoint.c (do_action_at_tracepoint): Likewise.
6046 2010-09-06 Yao Qi <yao@codesourcery.com>
6048 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6051 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6053 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6055 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6057 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6060 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6062 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6063 gdbserver/lynx-ppc-low.c: New files.
6064 * Makefile.in (lynx_low_h): New variable.
6065 (lynx-low.o, lynx-ppc-low.o): New rules.
6066 * configure.ac: On LynxOS, link with -lnetinet.
6067 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6068 * configure: regenerate.
6070 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6072 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6073 * configure.ac: Add check for vasprintf and vsnprintf.
6074 * configure, config.in: Regenerate.
6075 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6077 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6079 * gdbreplay.c: Move include of alloca.h up, next to include of
6081 * server.h: Add include of malloc.h.
6082 * mem-break.c: Remove include of malloc.h.
6083 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6085 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6087 * Makefile.in (memmem.o): Build with -Wno-error.
6089 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6091 * utils.c (xsnprintf): Make non-static.
6092 * server.h: Add xsnprintf declaration.
6093 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6094 replace calls to snprintf by calls to xsnprintf throughout.
6096 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6098 * configure.ac: Add configure check for alloca.
6099 * configure, config.in: Regenerate.
6100 * server.h: Include alloca.h if it exists.
6101 * gdbreplay.c: Include alloca.h if it exists.
6103 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6105 * linux-low.c (__SIGRTMIN): Define if not already defined.
6106 (linux_create_inferior): Check for __ANDROID__ rather than
6108 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6109 are already deferred.
6110 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6111 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6112 stopped and already has a pending signal to report.
6113 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6114 a pending signal to report or is moving out of a jump pad.
6115 (linux_init_signals): Check for __ANDROID__ rather than
6118 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6120 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6121 debug_threads check. Avoid a linear search when not doing debug
6124 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6126 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6127 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6128 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6129 (process_event): Change local fd's type to gdb_fildes_t.
6130 (create_file_handler): Adjust prototype.
6131 (delete_file_handler): Adjust prototype.
6132 (handle_file_event): Adjust prototype. Use pfildes.
6133 (create_file_event): Adjsut prototype.
6134 * remote-utils.c (remote_desc, listen_desc): Change type to
6136 * server.h: New gdb_fildes_t typedef.
6137 [USE_WIN32API]: Include winsock2.h.
6138 (delete_file_handler, add_file_handler): Adjust prototypes.
6140 * utils.c (pfildes): New.
6142 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6144 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6145 * configure: Regenerate.
6147 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6149 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6150 (linux_done_accessing_memory): ... this.
6151 (linux_target_ops): Adjust.
6152 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6153 * nto-low.c (nto_target_ops): Adjust comment.
6154 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6155 * spu-low.c (spu_target_ops): Adjust comment.
6156 * target.h (target_ops): Rename unprepare_to_access_memory field
6157 to done_accessing_memory.
6158 (unprepare_to_access_memory): Rename to ...
6159 (done_accessing_memory): ... this.
6161 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6163 * linux-low.c (linux_prepare_to_access_memory): New.
6164 (linux_unprepare_to_access_memory): New.
6165 (linux_target_ops): Install them.
6166 * server.c (read_memory): Rename to ...
6167 (gdb_read_memory): ... this. Use
6168 prepare_to_access_memory/prepare_to_access_memory.
6169 (write_memory): Rename to ...
6170 (gdb_write_memory): ... this. Use
6171 prepare_to_access_memory/prepare_to_access_memory.
6172 (handle_search_memory_1): Adjust.
6173 (process_serial_event): Adjust.
6174 * target.h (struct target_ops): New fields
6175 prepare_to_access_memory and unprepare_to_access_memory.
6176 (prepare_to_access_memory, unprepare_to_access_memory): New.
6177 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6178 prepare_to_access_memory/prepare_to_access_memory.
6179 * nto-low.c (nto_target_ops): Adjust.
6180 * spu-low.c (spu_target_ops): Adjust.
6181 * win32-low.c (win32_target_ops): Adjust.
6183 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6185 * Makefile.in (WARN_CFLAGS): Get it from configure.
6186 (WERROR_CFLAGS): New.
6187 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6188 * configure.ac: Introduce --enable-werror, which adds -Werror to
6189 the compiler command line. Enabled by default. Disable with
6190 --disable-werror. Add -Wdeclaration-after-statement
6191 Wpointer-arith and -Wformat-nonliteral to warning flags.
6192 * configure: Regenerate.
6194 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6196 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6198 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6200 * gdbreplay.c (remote_error): New.
6202 (expect): Use gdbchar. Check for error reading from GDB.
6203 Clarify sync error output.
6204 (play): Check for errors writing to GDB.
6205 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6206 * remote-utils.c (getpkt): Check for errors writing to the remote
6209 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6211 * linux-low.c (linux_wait_1): Move non-debugging code out of
6212 `debug_threads' control.
6214 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6216 * linux-low.c (linux_wait_1): Don't set last_status here.
6217 * server.c (push_event, queue_stop_reply_callback): Assert we're
6218 not pushing a TARGET_WAITKIND_IGNORE event.
6219 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6220 (myresume, handle_target_event): Set the thread's last_resume_kind
6221 and last_status from the target returned status.
6223 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6227 * linux-x86-low.c (update_debug_registers_callback): New.
6228 (i386_dr_low_set_addr): Use it.
6229 (i386_dr_low_get_addr): New.
6230 (i386_dr_low_set_control): Use update_debug_registers_callback.
6231 (i386_dr_low_get_control): New.
6232 (i386_dr_low_get_status): Adjust.
6233 * linux-low.c (linux_stop_lwp): New.
6234 * linux-low.h (linux_stop_lwp): Declare.
6236 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6237 argument instead of a i386_debug_reg_state.
6238 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6239 a i386_debug_reg_state.
6240 (i386_insert_aligned_watchpoint): Adjust.
6241 (i386_remove_aligned_watchpoint): Adjust.
6242 (i386_low_stopped_data_address): Read the debug registers from the
6243 inferior instead of from the mirrors.
6244 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6245 (i386_dr_low_get_addr): Declare.
6246 (i386_dr_low_get_control): Declare.
6247 (i386_dr_low_get_status): Change prototype.
6249 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6250 (i386_dr_low_get_addr): New.
6251 (i386_dr_low_get_control): New.
6252 (i386_dr_low_get_status): Adjust prototype. Return
6254 (i386_initial_stuff): Clear dr_status_mirror and
6256 (i386_get_thread_context): Adjust.
6257 (i386_set_thread_context): Adjust.
6258 (i386_thread_added): Adjust.
6260 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6262 * linux-low.h (linux_thread_area): Delete declaration.
6264 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6266 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6267 after its termination.
6269 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6271 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6272 (gdb_wants_all_stopped): Delete.
6273 (linux_wait_1): Don't call them.
6274 * server.c (handle_v_cont): Tag all threads as want-stopped.
6275 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6276 stopped as "client-wants-stopped".
6278 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6280 * Makefile.in (signals_h): New.
6281 (server_h): Depend on it.
6282 (server.o): Don't depend on $(signals_def).
6283 (signals.o): Depend on $(signals_def).
6285 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6287 * Makefile.in (signals_def): New.
6288 (server_h): Append include/gdb/signals.h and signals_def.
6289 (server.o): Append signals_def.
6291 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6293 * server.c (handle_target_event): Use target_signal_to_host for
6294 resume_info.sig initialization.
6295 * target.h (struct thread_resume) <sig>: New comment.
6297 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6299 * server.c (handle_query): strcpy() the returned string from paddress()
6300 instead of sprintf().
6301 * utils.c (paddress): Return phex_nz().
6303 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6305 * server.c (handle_v_cont): Call mourn_inferior if process
6307 (myresume): Likewise.
6309 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6311 Static tracepoints, and integration with UST.
6313 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6314 * mem-break.c (uninsert_all_breakpoints)
6315 (reinsert_all_breakpoints): New.
6316 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6317 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6318 (gdb_agent_ust_loaded, helper_thread_id)
6319 (gdb_agent_helper_thread_id): New macros.
6320 (struct ipa_sym_addresses): Add addr_ust_loaded,
6321 addr_helper_thread_id, addr_cmd_buf.
6322 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6323 (in_process_agent_loaded_ust): New.
6324 (write_e_ust_not_loaded): New.
6325 (maybe_write_ipa_ust_not_loaded): New.
6326 (struct collect_static_trace_data_action): New.
6327 (enum tracepoint_type) <static_tracepoint>: New.
6328 (struct tracepoint) <handle>: Mention static tracepoints.
6329 (struct static_tracepoint_ctx): New.
6330 (CMD_BUF_SIZE): New.
6331 (add_tracepoint_action): Handle static tracepoint actions.
6332 (unprobe_marker_at): New.
6333 (clear_installed_tracepoints): Handle static tracepoints.
6334 (cmd_qtdp): Handle static tracepoints.
6335 (probe_marker_at): New.
6336 (cmd_qtstart): Handle static tracepoints.
6337 (response_tracepoint): Handle static tracepoints.
6338 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6339 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6340 (get_context_regcache): Handle static tracepoints.
6341 (do_action_at_tracepoint): Handle static tracepoint actions.
6342 (traceframe_find_block_type): Handle static trace data blocks.
6343 (traceframe_read_sdata): New.
6344 (download_tracepoints): Download static tracepoint actions.
6345 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6346 (GDB_PROBE_NAME): New.
6351 (ust_marker_to_static_tracepoint): New.
6353 (collect_ust_data_at_tracepoint): New.
6354 (gdb_ust_probe): New.
6355 (UNIX_PATH_MAX, SOCK_DIR): New.
6356 (gdb_ust_connect_sync_socket): New.
6357 (resume_thread, stop_thread): New.
6358 (run_inferior_command): New.
6359 (init_named_socket): New.
6360 (gdb_ust_socket_init): New.
6361 (cstr_to_hexstr): New.
6363 (first_marker, next_marker): New.
6364 (response_ust_marker): New.
6365 (cmd_qtfstm, cmd_qtsstm): New.
6366 (unprobe_marker_at, probe_marker_at): New.
6367 (cmd_qtstmat, gdb_ust_thread): New.
6368 (gdb_ust_init): New.
6369 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6370 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6372 (x86_64_st_collect_regmap): New.
6373 (X86_64_NUM_ST_COLLECT_GREGS): New.
6374 (AMD64_RIP_REGNUM): New.
6375 (supply_static_tracepoint_registers): New.
6376 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6378 (i386_st_collect_regmap): New.
6379 (i386_NUM_ST_COLLECT_GREGS): New.
6380 (supply_static_tracepoint_registers): New.
6381 * server.c (handle_query): Handle qXfer:statictrace:read.
6382 <qSupported>: Report support for StaticTracepoints, and
6383 qXfer:statictrace:read features.
6384 * server.h (traceframe_read_sdata)
6385 (supply_static_tracepoint_registers): Declare.
6386 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6387 (unpack_varlen_hex): Include in IPA build.
6388 * Makefile.in (ustlibs, ustinc): New.
6389 (IPA_OBJS): Add remote-utils-ipa.o.
6390 ($(IPA_LIB)): Link -ldl and -lpthread.
6392 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6393 * config.in, configure: Regenerate.
6395 2010-06-20 Ian Lance Taylor <iant@google.com>
6396 Pedro Alves <pedro@codesourcery.com>
6398 * linux-x86-low.c (always_true): Delete.
6399 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6400 trying to fool the compiler with always_true.
6402 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6404 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6405 conditions in gdbserver.
6407 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6409 * spu-low.c (spu_read_memory): Wrap around local store limit.
6410 (spu_write_memory): Likewise.
6412 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6414 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6415 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6417 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6419 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6420 uses with LONGEST uses.
6422 2010-06-14 Stan Shebs <stan@codesourcery.com>
6423 Pedro Alves <pedro@codesourcery.com>
6427 * linux-x86-low.c: Include limits.h.
6432 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6433 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6434 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6435 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6436 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6437 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6438 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6439 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6440 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6441 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6442 (amd64_emit_void_call_2): New.
6443 (amd64_emit_ops): New.
6444 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6445 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6446 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6447 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6448 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6449 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6450 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6451 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6452 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6453 (i386_emit_stack_adjust, i386_emit_int_call_1)
6454 (i386_emit_void_call_2): New.
6455 (i386_emit_ops): New.
6456 (x86_emit_ops): New.
6457 (the_low_target): Install x86_emit_ops.
6458 * server.h (struct emit_ops): New.
6459 (get_raw_reg_func_addr): Declare.
6460 (current_insn_ptr, emit_error): Declare.
6461 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6462 (set_trace_state_variable_value): New defines.
6463 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6464 addr_get_trace_state_variable_value and
6465 addr_set_trace_state_variable_value.
6466 (symbol_list): New fields for get_raw_reg,
6467 get_trace_state_variable_value and set_trace_state_variable_value.
6468 (condfn): New typedef.
6469 (struct tracepoint): New field `compiled_cond'.
6470 (do_action_at_tracepoint): Clear compiled_cond.
6471 (get_trace_state_variable_value, set_trace_state_variable_value):
6473 (condition_true_at_tracepoint): If there's a compiled condition,
6475 (current_insn_ptr, emit_error): New globals.
6476 (struct bytecode_address): New.
6477 (get_raw_reg_func_addr): New.
6478 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6479 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6480 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6481 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6482 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6483 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6484 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6485 (compile_tracepoint_condition, compile_bytecodes): New.
6486 * target.h (emit_ops): Forward declare.
6487 (struct target_ops): New field emit_ops.
6488 (target_emit_ops): New.
6489 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6490 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6491 * linux-low.c (linux_emit_ops): New.
6492 (linux_target_ops): Install it.
6493 * linux-low.h (struct linux_target_ops): New field emit_ops.
6495 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6497 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6498 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6500 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6501 Stan Shebs <stan@codesourcery.com>
6503 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6504 (all): Depend on $(extra_libraries).
6505 (install-only): Install the IPA.
6506 (IPA_OBJS, IPA_LIB): New.
6507 (clean): Remove the IPA lib.
6508 (IPAGENT_CFLAGS): New.
6509 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6510 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6511 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6512 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6513 * configure.ac: Check for atomic builtins support in the compiler.
6514 (IPA_DEPFILES, extra_libraries): Define.
6515 * configure.srv (ipa_obj): Add description.
6516 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6517 (i[34567]86-*-linux*): Set ipa_obj.
6518 (x86_64-*-linux*): Set ipa_obj.
6519 * linux-low.c (stabilizing_threads): New.
6520 (supports_fast_tracepoints): New.
6521 (linux_detach): Stabilize threads before detaching.
6522 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6523 the lwp is either not stabilizing, or is moving out of a jump pad.
6524 (linux_fast_tracepoint_collecting): New.
6525 (maybe_move_out_of_jump_pad): New.
6526 (enqueue_one_deferred_signal): New.
6527 (dequeue_one_deferred_signal): New.
6528 (linux_wait_for_event_1): If moving out of a jump pad, defer
6529 pending signals to later.
6530 (linux_stabilize_threads): New.
6531 (linux_wait_1): Check if threads need moving out of jump pads, and
6533 (stuck_in_jump_pad_callback): New.
6534 (move_out_of_jump_pad_callback): New.
6536 (linux_resume_one_lwp): Handle moving out of jump pads.
6537 (linux_set_resume_request): Dequeue deferred signals.
6538 (need_step_over_p): Also step over fast tracepoint jumps.
6539 (start_step_over): Also uninsert fast tracepoint jumps.
6540 (finish_step_over): Also reinsert fast tracepoint jumps.
6541 (linux_install_fast_tracepoint_jump): New.
6542 (linux_target_ops): Install linux_stabilize_threads and
6543 linux_install_fast_tracepoint_jump_pad.
6544 * linux-low.h (linux_target_ops) <get_thread_area,
6545 install_fast_tracepoint_jump_pad>: New fields.
6546 (struct lwp_info) <collecting_fast_tracepoint,
6547 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6548 (linux_get_thread_area): Declare.
6549 * linux-x86-low.c (jump_insn): New.
6550 (x86_get_thread_area): New.
6551 (append_insns): New.
6553 (amd64_install_fast_tracepoint_jump_pad): New.
6554 (i386_install_fast_tracepoint_jump_pad): New.
6555 (x86_install_fast_tracepoint_jump_pad): New.
6556 (the_low_target): Install x86_get_thread_area and
6557 x86_install_fast_tracepoint_jump_pad.
6558 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6559 (struct fast_tracepoint_jump): New.
6560 (fast_tracepoint_jump_insn): New.
6561 (fast_tracepoint_jump_shadow): New.
6562 (find_fast_tracepoint_jump_at): New.
6563 (fast_tracepoint_jump_here): New.
6564 (delete_fast_tracepoint_jump): New.
6565 (set_fast_tracepoint_jump): New.
6566 (uninsert_fast_tracepoint_jumps_at): New.
6567 (reinsert_fast_tracepoint_jumps_at): New.
6568 (set_breakpoint_at): Use write_inferior_memory.
6569 (uninsert_raw_breakpoint): Use write_inferior_memory.
6570 (check_mem_read): Mask out fast tracepoint jumps.
6571 (check_mem_write): Mask out fast tracepoint jumps.
6572 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6573 (set_fast_tracepoint_jump): Declare.
6574 (delete_fast_tracepoint_jump)
6575 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6576 (reinsert_fast_tracepoint_jumps_at): Declare.
6577 * regcache.c: Don't compile many functions when building the
6578 in-process agent library.
6579 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6580 the register buffer in the heap.
6581 (free_register_cache): If the register buffer isn't owned by the
6582 regcache, don't free it.
6583 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6584 pre-existing register caches.
6585 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6587 (convert_ascii_to_int): : Constify `from' parameter type.
6588 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6589 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6590 the needed buffer in-place.
6591 (relocate_instruction): New.
6592 * server.c (handle_query) <qSymbols>: If the target supports
6593 tracepoints, give it a chance of looking up symbols. Report
6594 support for fast tracepoints.
6595 (handle_status): Stabilize threads.
6596 (process_serial_event): Adjust.
6597 * server.h (struct fast_tracepoint_jump): Forward declare.
6598 (struct process_info) <fast_tracepoint_jumps>: New field.
6599 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6600 (decode_X_packet, decode_M_packet): Adjust.
6601 (relocate_instruction): Declare.
6602 (in_process_agent_loaded): Declare.
6603 (tracepoint_look_up_symbols): Declare.
6604 (struct fast_tpoint_collect_status): Declare.
6605 (fast_tracepoint_collecting): Declare.
6606 (force_unlock_trace_buffer): Declare.
6607 (handle_tracepoint_bkpts): Declare.
6608 (initialize_low_tracepoint)
6609 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6610 * target.h (struct target_ops) <stabilize_threads,
6611 install_fast_tracepoint_jump_pad>: New fields.
6612 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6613 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6614 [HAVE_STDINT_H]: Include stdint.h.
6615 (trace_debug_1): Rename to ...
6616 (trace_vdebug): ... this.
6617 (trace_debug): Rename to ...
6618 (trace_debug_1): ... this. Add `level' parameter.
6620 (ATTR_USED, ATTR_NOINLINE): New.
6621 (IP_AGENT_EXPORT): New.
6622 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6623 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6624 (about_to_request_buffer_space, trace_buffer_is_full)
6625 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6626 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6627 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6628 (traceframe_write_count, traceframes_created)
6629 (trace_state_variables)
6630 New renaming defines.
6631 (struct ipa_sym_addresses): New.
6632 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6634 (ipa_sym_addrs): New.
6635 (all_tracepoint_symbols_looked_up): New.
6636 (in_process_agent_loaded): New.
6637 (write_e_ipa_not_loaded): New.
6638 (maybe_write_ipa_not_loaded): New.
6639 (tracepoint_look_up_symbols): New.
6640 (debug_threads) [IN_PROCESS_AGENT]: New.
6641 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6642 (UNKNOWN_SIDE_EFFECTS): New.
6643 (stop_tracing): New.
6644 (flush_trace_buffer): New.
6645 (stop_tracing_bkpt): New.
6646 (flush_trace_buffer_bkpt): New.
6647 (read_inferior_integer): New.
6648 (read_inferior_uinteger): New.
6649 (read_inferior_data_pointer): New.
6650 (write_inferior_data_pointer): New.
6651 (write_inferior_integer): New.
6652 (write_inferior_uinteger): New.
6653 (struct collect_static_trace_data_action): Delete.
6654 (enum tracepoint_type): New.
6655 (struct tracepoint) <type>: New field `type'.
6656 <actions_str, step_actions, step_actions_str>: Only include in
6658 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6659 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6660 (tracepoints): Use IP_AGENT_EXPORT.
6661 (last_tracepoint): Don't include in the IPA.
6662 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6663 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6664 (alloced_trace_state_variables): New.
6665 (trace_state_variables): Use IP_AGENT_EXPORT.
6666 (traceframe_t): Delete unused variable.
6667 (circular_trace_buffer): Don't include in the IPA.
6668 (trace_buffer_start): Delete.
6669 (struct trace_buffer_control): New.
6670 (trace_buffer_free): Delete.
6671 (struct ipa_trace_buffer_control): New.
6672 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6673 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6675 (trace_buffer_ctrl): New.
6676 (TRACE_BUFFER_CTRL_CURR): New.
6677 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6678 Reimplement as macros.
6679 (trace_buffer_wrap): Delete.
6680 (traceframe_write_count, traceframe_read_count)
6681 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6682 (struct tracepoint_hit_ctx) <type>: New field.
6683 (struct fast_tracepoint_ctx): New.
6684 (memory_barrier): New.
6686 (record_tracepoint_error): Update atomically in the IPA.
6687 (clear_inferior_trace_buffer): New.
6688 (about_to_request_buffer_space): New.
6689 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6690 updating the same buffer.
6691 (add_tracepoint): Default the tracepoint's type to trap
6692 tracepoint, and orig_size to -1.
6693 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6695 (create_trace_state_variable): New parameter `gdb'. Handle it.
6696 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6697 (cmd_qtdp): Handle fast tracepoints.
6699 (max_jump_pad_size): New.
6700 (gdb_jump_pad_head): New.
6701 (get_jump_space_head): New.
6702 (claim_jump_space): New.
6703 (sort_tracepoints): New.
6704 (MAX_JUMP_SIZE): New.
6705 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6707 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6708 support. Upload fast traceframes, and delete internal IPA
6710 (stop_tracing_handler): New.
6711 (flush_trace_buffer_handler): New.
6712 (cmd_qtstop): Upload fast tracepoints.
6713 (response_tracepoint): Handle fast tracepoints.
6714 (tracepoint_finished_step): Upload fast traceframes. Set the
6715 tracepoint hit context's tracepoint type.
6716 (handle_tracepoint_bkpts): New.
6717 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6718 type. Add comment about fast tracepoints.
6719 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6720 non-existing action_str field.
6721 (get_context_regcache): Handle fast tracepoints.
6722 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6724 (fast_tracepoint_from_jump_pad_address): New.
6725 (fast_tracepoint_from_ipa_tpoint_address): New.
6726 (collecting_t): New.
6727 (force_unlock_trace_buffer): New.
6728 (fast_tracepoint_collecting): New.
6731 (write_inferior_data_ptr): New.
6732 (target_tp_heap): New.
6733 (target_malloc): New.
6734 (download_agent_expr): New.
6736 (download_tracepoints): New.
6737 (download_trace_state_variables): New.
6738 (upload_fast_traceframes): New.
6739 (IPA_FIRST_TRACEFRAME): New.
6740 (IPA_NEXT_TRACEFRAME_1): New.
6741 (IPA_NEXT_TRACEFRAME): New.
6742 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6743 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6744 (gdb_jump_pad_buffer_end): New.
6745 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6746 (initialize_tracepoint): Adjust.
6747 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6748 buffer. Initialize the low module.
6749 * utils.c (PREFIX, TOOLNAME): New.
6750 (malloc_failure): Use PREFIX.
6751 (error): In the IPA, an error causes an exit.
6752 (fatal, warning): Use PREFIX.
6753 (internal_error): Use TOOLNAME.
6754 (NUMCELLS): Increase to 10.
6755 * configure, config.in: Regenerate.
6757 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6759 * server.c (handle_query) <qSupported>: Do two passes over the
6760 qSupported string to avoid nesting strtok.
6762 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6764 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6766 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6768 * configure: Regenerate.
6769 * proc-service.list: New.
6771 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6773 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6776 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6778 * gdbreplay.c (remote_open): Check error return from socket() call by
6779 its equality to -1 not by it being negative.
6780 * remote-utils.c (remote_open): Likewise.
6782 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6784 * config.h: Regenerate.
6786 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6788 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6789 doesn't provide PTRACE_GET_THREAD_AREA.
6791 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6793 * linux-m68k-low.c: Include <asm/ptrace.h>
6794 (ps_get_thread_area): Implement.
6796 2010-05-03 Doug Evans <dje@google.com>
6798 * event-loop.c (struct callback_event): New struct.
6799 (callback_list): New global.
6800 (append_callback_event, delete_callback_event): New functions.
6801 (process_callback): New function.
6802 (start_event_loop): Call it.
6803 * remote-utils.c (NOT_SCHEDULED): Define.
6804 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6805 moved out of readchar.
6806 (readchar): Rewrite. Call reschedule before returning.
6807 (reset_readchar): New function.
6808 (remote_close): Call it.
6809 (process_remaining, reschedule): New functions.
6810 * server.h (callback_handler_func): New typedef.
6811 (append_callback_event, delete_callback_event): Declare.
6813 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6815 * proc-service.c (ps_pglobal_lookup): Use
6816 thread_db_look_up_one_symbol.
6817 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6818 parameter. Use it instead of all_symbols_looked_up.
6819 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6821 (all_symbols_looked_up): Don't declare.
6822 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6823 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6825 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6826 Set all_symbols_looked_up here.
6827 (thread_db_look_up_one_symbol): New.
6828 (thread_db_get_tls_address): Adjust.
6829 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6830 thread_db object on the heap, and tentatively set it in the
6832 (thread_db_init): Don't set all_symbols_looked_up here.
6833 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6835 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6837 * linux-low.c (linux_kill, linux_detach): Adjust.
6838 (status_pending_p_callback): Remove redundant statement. Check
6839 for !TARGET_WAITIKIND_IGNORE, instead of
6840 TARGET_WAITKIND_STOPPED.
6841 (handle_tracepoints): Make sure LWP is locked. Adjust.
6842 (linux_wait_for_event_1): Adjust.
6843 (linux_cancel_breakpoints): New.
6844 (unsuspend_one_lwp): New.
6845 (unsuspend_all_lwps): New.
6846 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6847 (send_sigstop_callback): Change return type to int, add new
6848 `except' parameter and handle it.
6849 (suspend_and_send_sigstop_callback): New.
6850 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6851 pass them down. If SUSPEND, also increment the lwp's suspend
6853 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6854 (need_step_over_p): Don't consider suspended LWPs.
6855 (start_step_over): Adjust.
6856 (proceed_one_lwp): Change return type to int, add new `except'
6857 parameter and handle it.
6858 (unsuspend_and_proceed_one_lwp): New.
6859 (proceed_all_lwps): Use find_inferior instead of
6861 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6862 also decrement the suspend count of LWPs. Pass `except' down,
6863 instead of hacking its suspend count.
6864 (linux_pause_all): Add `freeze' parameter. Adjust.
6865 (linux_unpause_all): New.
6866 (linux_target_ops): Install linux_unpause_all.
6867 * server.c (handle_status): Adjust.
6868 * target.h (struct target_ops): New fields `unpause_all' and
6869 `cancel_breakpoints'. Add new parameter to `pause_all'.
6870 (pause_all): Add new `freeze' parameter.
6872 (cancel_breakpoints): New.
6873 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6875 (cmd_qtstart): Pause threads.
6876 (stop_tracing): Pause threads, and cancel breakpoints.
6877 * win32-low.c (win32_target_ops): Adjust.
6879 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6881 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6882 the inferior right away from here...
6883 (linux_wait_1): ... to here, and adjust to check the thread's
6884 last_resume_kind instead of the lwp's step or stop_expected flags.
6886 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6888 * README: Use consistent `GDB' and `GDBserver' spellings.
6890 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6892 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6893 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6894 (linux_detach_one_lwp): Assume the lwp is stopped.
6895 (any_thread_of): Delete.
6896 (linux_detach): Stop all lwps here. Don't blindly delete all
6898 (delete_lwp_callback): New.
6899 (linux_mourn): Delete all lwps of the process that is gone.
6900 (linux_wait_1): Don't delete the last lwp of the process here.
6901 * mem-break.h (mark_breakpoints_out): Declare.
6902 * mem-break.c (mark_breakpoints_out): New.
6903 (free_all_breakpoints): Use it.
6904 * server.c (handle_target_event): If the process is gone, mark
6906 * thread-db.c (struct thread_db) <create_bp>: New field.
6907 (thread_db_enable_reporting): Fix prototype. Store a thread event
6908 breakpoint reference in the thread_db struct.
6909 (thread_db_load_search): Clear the thread_db object.
6910 (try_thread_db_load_1): Ditto.
6911 (switch_to_process): New.
6912 (disable_thread_event_reporting): Use it.
6913 (remove_thread_event_breakpoints): New.
6914 (thread_db_detach, thread_db_mourn): Use it.
6916 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6918 * linux-low.c (linux_enable_event_reporting): New.
6919 (linux_wait_for_event_1, handle_extended_wait): Use it.
6921 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6923 * linux-low.c (linux_kill_one_lwp, linux_kill)
6924 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6925 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6926 SIGSTOP even if the LWP is stopped.
6927 (send_sigstop_callback): New.
6928 (stop_all_lwps): Use send_sigstop_callback instead.
6929 (linux_resume_one_thread): Adjust.
6930 (proceed_one_lwp): Still proceed an LWP that the client has
6931 requested to stop, if we haven't reported it as stopped yet. Make
6932 sure that LWPs the client want stopped, have a pending SIGSTOP.
6934 2010-04-26 Doug Evans <dje@google.com>
6936 * server.c (handle_general_set): Make static.
6938 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6939 Print received char after testing for error/eof instead of before.
6940 (input_interrupt): Tweak comment.
6942 2010-04-23 Doug Evans <dje@google.com>
6944 * server.c (start_inferior): Print inferior argv if --debug.
6946 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6948 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6949 * nto-x86-low.c: Include server.h
6951 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6953 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6954 be consistent with other sources of this directory.
6955 (init_registers_amd64): Correct name of source file of this function
6958 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6960 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6963 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6965 * win32-i386-low.c: Add 64-bit support.
6966 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6967 (init_registers_amd64): Declare.
6968 (mappings): Add 64-bit version of array.
6969 (init_windows_x86): New function.
6970 (the_low_target): Change init_arch field to init_windows_x86.
6972 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6974 * win32-low.c: Adapt to support also 64-bit architecture.
6975 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6976 (get_image_name): Use SIZE_T type for local variable `done'.
6977 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6978 (toolhelp_get_dll_name): Idem.
6979 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6980 Use uintptr_t typecast to avoid warning.
6981 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6982 (handle_exception): Use phex_nz to avoid warning.
6983 (win32_wait): Remove unused local variable `process'.
6985 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6987 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6990 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6992 * configure.ac: Use `ws2_32' library for srv_mingw.
6993 * configure: Regenerate.
6994 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6995 * remote-utils.c: Likewise.
6997 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6999 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7000 if __x86_64__ is defined.
7002 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7004 * configure: Regenerate.
7006 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7008 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7009 * target.h (target_ops): New get_tib_address field.
7010 * win32-low.h (win32_thread_info): Add thread_local_base field.
7011 * win32-low.c (child_add_thread): Add tlb argument.
7012 Set thread_local_base field to TLB.
7013 (get_child_debug_event): Adapt to child_add_thread change.
7014 (win32_get_tib_address): New function.
7015 (win32_target_ops): Set get_tib_address field to
7016 win32_get_tib_address.
7017 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7019 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7021 * linux-low.c (linux_mourn): Also remove the process.
7022 * server.c (handle_target_event): Don't remove the process here.
7023 * nto-low.c (nto_mourn): New.
7024 (nto_target_ops): Install it.
7025 * spu-low.c (spu_mourn): New.
7026 (spu_target_ops): Install it.
7027 * win32-low.c (win32_mourn): New.
7028 (win32_target_ops): Install it.
7030 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7032 * server.h (buffer_xml_printf): Remove redundant `;'.
7034 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7036 * regcache.c (set_register_cache): Invalidate regcaches before
7037 changing the register cache layout.
7038 (regcache_invalidate_one): Allow a NULL regcache.
7039 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7040 regcaches before changing the register cache layout or the target
7043 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7045 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7046 variable warning on Linux/x86-64.
7048 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7050 GDBserver disconnected tracing support.
7052 * linux-low.c (linux_remove_process): Delete.
7053 (add_lwp): Don't set last_resume_kind here.
7054 (linux_kill): Use `mourn'.
7055 (linux_detach): Use `thread_db_detach', and `mourn'.
7057 (linux_attach_lwp_1): Adjust comment.
7058 (linux_attach): last_resume_kind moved the thread_info; adjust.
7059 (status_pending_p_callback): Adjust.
7060 (linux_wait_for_event_1): Adjust.
7061 (count_events_callback, select_singlestep_lwp_callback)
7062 (select_event_lwp_callback, cancel_breakpoints_callback)
7063 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7064 (proceed_one_lwp): Adjust.
7065 (linux_async): Add debug output.
7066 (linux_thread_stopped): New.
7067 (linux_pause_all): New.
7068 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7070 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7071 (thread_db_free): Delete declaration.
7072 (thread_db_detach, thread_db_mourn): Declare.
7073 * thread-db.c (thread_db_init): Use thread_db_mourn.
7074 (thread_db_free): Delete, split in two.
7075 (disable_thread_event_reporting): New.
7076 (thread_db_detach): New.
7077 (thread_db_mourn): New.
7079 * server.h (struct thread_info) <last_resume_kind>: New field.
7080 <attached>: Add comment.
7081 <gdb_detached>: New field.
7082 (handler_func): Change return type to int.
7083 (handle_serial_event, handle_target_event): Ditto.
7084 (gdb_connected): Declare.
7086 (disconnected_tracing): Declare.
7087 (stop_tracing): Declare.
7089 * server.c (handle_query) <qSupported>: Report support for
7090 disconnected tracing.
7091 (queue_stop_reply_callback): Account for running threads.
7092 (gdb_wants_thread_stopped): New.
7093 (gdb_wants_all_threads_stopped): New.
7094 (gdb_reattached_process): New.
7095 (handle_status): Clear the `gdb_detached' flag of all processes.
7096 In all-stop, stop all threads.
7097 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7098 (process_serial_event): If the remote connection breaks, or if an
7099 exit was forced with "monitor exit", force an event loop exit.
7100 Handle disconnected tracing on detach.
7101 (handle_serial_event): Adjust.
7102 (handle_target_event): If GDB isn't connected, forward events back
7103 to the inferior, unless the last process exited, in which case,
7104 exit gdbserver. Adjust interface.
7106 * remote-utils.c (remote_open): Don't block in accept. Instead
7107 register an event loop source on the listen socket file
7108 descriptor. Refactor bits into ...
7109 (listen_desc): ... this new global.
7110 (gdb_connected): ... this new function.
7111 (enable_async_notification): ... this new function.
7112 (handle_accept_event): ... this new function.
7113 (remote_close): Clear remote_desc.
7115 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7117 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7119 (mourn_inferior): Define.
7120 (target_process_qsupported): Avoid the dangling else problem.
7121 (thread_stopped): Define.
7122 (pause_all): Define.
7123 (target_waitstatus_to_string): Declare.
7124 * target.c (target_waitstatus_to_string): New.
7126 * tracepoint.c (tracing): Make extern.
7127 (disconnected_tracing): New.
7128 (stop_tracing): Make extern. Handle tracing stops due to GDB
7130 (cmd_qtdisconnected): New.
7131 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7132 (handle_tracepoint_general_set): Handle QTDisconnected.
7134 * event-loop.c (event_handler_func): Change return type to int.
7135 (process_event): Bail out if the event handler wants the event
7137 (handle_file_event): Ditto.
7138 (start_event_loop): Bail out if the event handler wants the event
7141 * nto-low.c (nto_target_ops): Adjust.
7142 * spu-low.c (spu_wait): Don't remove the process here.
7143 (spu_target_ops): Adjust.
7144 * win32-low.c (win32_wait): Don't remove the process here.
7145 (win32_target_ops): Adjust.
7147 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7149 * regcache.c (realloc_register_cache): Invalidate inferior's
7150 regcache before recreating it.
7152 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7154 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7156 2010-04-09 Stan Shebs <stan@codesourcery.com>
7157 Pedro Alves <pedro@codesourcery.com>
7159 * server.h (LONGEST): New.
7160 (struct thread_info) <while_stepping>: New field.
7161 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7163 (initialize_tracepoint, handle_tracepoint_general_set)
7164 (handle_tracepoint_query, tracepoint_finished_step)
7165 (tracepoint_was_hit, release_while_stepping_state_list):
7166 (current_traceframe): Declare.
7167 * server.c (handle_general_set): Handle tracepoint packets.
7169 (write_memory): New.
7170 (handle_search_memory_1): Use read_memory.
7171 (handle_query): Report support for conditional tracepoints, trace
7172 state variables, and tracepoint sources. Handle tracepoint
7174 (main): Initialize the tracepoints module.
7175 (process_serial_event): Handle traceframe reads/writes.
7177 * linux-low.c (handle_tracepoints): New.
7178 (linux_wait_1): Call it.
7179 (linux_resume_one_lwp): Handle while-stepping.
7180 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7181 (linux_target_ops): Install them.
7182 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7184 * linux-x86-low.c (x86_supports_tracepoints): New.
7185 (the_low_target). Install it.
7187 * mem-break.h (delete_breakpoint): Declare.
7188 * mem-break.c (delete_breakpoint): Make external.
7190 * target.h (struct target_ops): Add `supports_tracepoints',
7191 `read_pc', and `write_pc' fields.
7192 (target_supports_tracepoints): Define.
7193 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7196 * regcache.h (struct regcache) <registers_owned>: New field.
7197 (init_register_cache, regcache_cpy): Declare.
7198 (regcache_read_pc, regcache_write_pc): Declare.
7199 (register_cache_size): Declare.
7200 (supply_regblock): Declare.
7201 * regcache.c (init_register_cache): New.
7202 (new_register_cache): Use it.
7203 (regcache_cpy): New.
7204 (register_cache_size): New.
7205 (supply_regblock): New.
7206 (regcache_read_pc, regcache_write_pc): New.
7208 * tracepoint.c: New.
7210 * Makefile.in (OBS): Add tracepoint.o.
7211 (tracepoint.o): New rule.
7213 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7215 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7217 (i386-mmx.c): Likewise.
7218 (i386-mmx-linux.o): Likewise.
7219 (i386-mmx-linux.c): Likewise.
7221 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7222 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7223 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7224 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7226 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7227 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7228 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7230 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7232 * Makefile.in (clean): Updated.
7234 (i386-avx.c): Likewise.
7235 (i386-avx-linux.o): Likewise.
7236 (i386-avx-linux.c): Likewise.
7237 (amd64-avx.o): Likewise.
7238 (amd64-avx.c): Likewise.
7239 (amd64-avx-linux.o): Likewise.
7240 (amd64-avx-linux.c): Likewise.
7242 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7243 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7244 (srv_amd64_regobj): Add amd64-avx.o.
7245 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7246 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7247 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7248 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7249 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7250 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7251 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7253 * i387-fp.c: Include "i386-xstate.h".
7255 (i387_cache_to_xsave): Likewise.
7256 (i387_xsave_to_cache): Likewise.
7257 (x86_xcr0): Likewise.
7259 * i387-fp.h (i387_cache_to_xsave): Likewise.
7260 (i387_xsave_to_cache): Likewise.
7261 (x86_xcr0): Likewise.
7263 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7264 * linux-crisv32-low.c (target_regsets): Likewise.
7265 * linux-m68k-low.c (target_regsets): Likewise.
7266 * linux-mips-low.c (target_regsets): Likewise.
7267 * linux-ppc-low.c (target_regsets): Likewise.
7268 * linux-s390-low.c (target_regsets): Likewise.
7269 * linux-sh-low.c (target_regsets): Likewise.
7270 * linux-sparc-low.c (target_regsets): Likewise.
7271 * linux-xtensa-low.c (target_regsets): Likewise.
7273 * linux-low.c: Include <sys/uio.h>.
7274 (regsets_fetch_inferior_registers): Support nt_type.
7275 (regsets_store_inferior_registers): Likewise.
7276 (linux_process_qsupported): New.
7277 (linux_target_ops): Add linux_process_qsupported.
7279 * linux-low.h (regset_info): Add nt_type.
7280 (linux_target_ops): Add process_qsupported.
7282 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7284 (init_registers_i386_avx_linux): New.
7285 (init_registers_amd64_avx_linux): Likewise.
7286 (xmltarget_i386_linux_no_xml): Likewise.
7287 (xmltarget_amd64_linux_no_xml): Likewise.
7288 (PTRACE_GETREGSET): Likewise.
7289 (PTRACE_SETREGSET): Likewise.
7290 (x86_fill_xstateregset): Likewise.
7291 (x86_store_xstateregset): Likewise.
7292 (use_xml): Likewise.
7293 (x86_linux_update_xmltarget): Likewise.
7294 (x86_linux_process_qsupported): Likewise.
7295 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7296 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7297 init_registers_i386_linux here. Call
7298 x86_linux_update_xmltarget.
7299 (the_low_target): Add x86_linux_process_qsupported.
7301 * server.c (handle_query): Call target_process_qsupported.
7303 * target.h (target_ops): Add process_qsupported.
7304 (target_process_qsupported): New.
7306 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7308 * inferiors.c (add_thread): Set last_status kind to
7309 TARGET_WAITKIND_IGNORE.
7310 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7311 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7312 (linux_wait_1): Move `thread' local definition to block that uses
7313 it. Don't NULL initialize `event_child'.
7314 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7315 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7316 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7318 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7320 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7321 an extended waitstatus, or by a watchpoint.
7322 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7323 thread was stepping or has been stopped by a watchpoint.
7325 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7327 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7328 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7329 of another, then delete the previous, and validate all
7331 (validate_inserted_breakpoint): New.
7332 (delete_disabled_breakpoints): New.
7333 (validate_breakpoints): New.
7334 (check_mem_read): Validate breakpoints before trusting their
7335 shadow. Delete disabled breakpoints.
7336 (check_mem_write): Validate breakpoints before trusting they
7337 should be inserted. Delete disabled breakpoints.
7338 * mem-break.h (validate_breakpoints):
7339 * server.c (handle_query): Validate breakpoints when we see a
7342 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7344 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7345 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7346 if we could tell there's a GDB breakpoint at stop_pc.
7347 (need_step_over_p): Don't do a step over if we find a GDB
7348 breakpoint at the resume PC.
7350 * mem-break.c (struct raw_breakpoint): New.
7351 (enum bkpt_type): New type `gdb_breakpoint'.
7352 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7353 fields. New field `raw'.
7354 (find_raw_breakpoint_at): New.
7355 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7357 (set_breakpoint_at): Adjust.
7358 (delete_raw_breakpoint): New.
7359 (release_breakpoint): New.
7360 (delete_breakpoint): Rename to...
7361 (delete_breakpoint_1): ... this. Add proc parameter. Use
7362 release_breakpoint. Return ENOENT.
7363 (delete_breakpoint): Reimplement.
7364 (find_breakpoint_at): Delete.
7365 (find_gdb_breakpoint_at): New.
7366 (delete_breakpoint_at): Delete.
7367 (set_gdb_breakpoint_at): New.
7368 (delete_gdb_breakpoint_at): New.
7369 (gdb_breakpoint_here): New.
7370 (set_reinsert_breakpoint): Use release_breakpoint.
7371 (uninsert_breakpoint): Rename to ...
7372 (uninsert_raw_breakpoint): ... this.
7373 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7374 (reinsert_raw_breakpoint): Change parameter type to
7376 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7378 (check_breakpoints): Adjust. Use release_breakpoint.
7379 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7380 (breakpoint_inserted_here): Ditto.
7381 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7382 Don't trust the breakpoint's shadow if it is not inserted.
7383 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7384 (delete_all_breakpoints): Adjust.
7385 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7386 use delete_breakpoint_1.
7388 * mem-break.h (breakpoints_supported): Delete declaration.
7389 (set_gdb_breakpoint_at): Declare.
7390 (gdb_breakpoint_here): Declare.
7391 (delete_breakpoint_at): Delete.
7392 (delete_gdb_breakpoint_at): Declare.
7394 * server.h (struct raw_breakpoint): Forward declare.
7395 (struct process_info): New field `raw_breakpoints'.
7397 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7400 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7402 * linux-low.c (status_pending_p_callback): Fix comment.
7403 (linux_wait_for_event_1): Move most of the internal breakpoint
7404 handling from here...
7405 (linux_wait_1): ... to here.
7406 (count_events_callback): New.
7407 (select_singlestep_lwp_callback): New.
7408 (select_event_lwp_callback): New.
7409 (cancel_breakpoints_callback): New.
7410 (select_event_lwp): New.
7411 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7412 priority to all LWPs that have had events that should be reported
7413 to the client. Cancel breakpoints when about to reporting the
7414 event to the client, not while stopping lwps. No longer cancel
7415 finished single-steps here.
7416 (cancel_finished_single_step): Delete.
7417 (cancel_finished_single_steps): Delete.
7419 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7421 * mem-break.c (enum bkpt_type): New.
7422 (struct breakpoint): New field `type'.
7423 (set_breakpoint_at): Change return type to struct breakpoint
7424 pointer. Set type to `other_breakpoint' by default.
7425 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7426 in the breakpoint list.
7427 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7428 (reinsert_breakpoint): Rename to ...
7429 (reinsert_raw_breakpoint): ... this.
7430 (reinsert_breakpoints_at): Adjust.
7431 * mem-break.h (struct breakpoint): Declare.
7432 (set_breakpoint_at): Change return type to struct breakpoint
7435 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7437 * server.c (handle_query): Assign, not compare.
7439 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7441 Teach linux gdbserver to step-over-breakpoints.
7443 * linux-low.c (can_hardware_single_step): New.
7444 (supports_breakpoints): New.
7445 (handle_extended_wait): If stopping threads, read the stop pc of
7448 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7449 low target doesn't support retrieving the PC.
7450 (add_lwp): Set last_resume_kind to resume_continue.
7451 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7452 (linux_attach): Don't clear stop_expected. Set the lwp's
7453 last_resume_kind to resume_stop.
7454 (linux_detach_one_lwp): Don't check for removed breakpoints.
7455 (check_removed_breakpoint): Delete.
7456 (status_pending_p): Rename to ...
7457 (status_pending_p_callback): ... this. Don't check for removed
7458 breakpoints. Don't consider threads that are stopped from GDB's
7460 (linux_wait_for_lwp): Always read the stop_pc here.
7461 (cancel_breakpoint): New.
7462 (step_over_bkpt): New global.
7463 (linux_wait_for_event_1): Implement stepping over breakpoints.
7464 (gdb_wants_lwp_stopped): New.
7465 (gdb_wants_all_stopped): New.
7466 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7467 single-step traps here. Store the thread's last reported target
7469 (send_sigstop): Don't clear stop_expected. Always set it,
7471 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7472 (cancel_finished_single_step): New.
7473 (cancel_finished_single_steps): New.
7474 (wait_for_sigstop): Don't cancel finished single-step traps here.
7475 (linux_resume_one_lwp): Don't check for removed breakpoints.
7476 Don't set `step' on non-hardware step archs.
7477 (linux_set_resume_request): Ignore resume_stop requests if already
7478 stopping or stopped. Set the lwp's last_resume_kind.
7479 (resume_status_pending_p): Don't check for removed breakpoints.
7480 (need_step_over_p): New.
7481 (start_step_over): New.
7482 (finish_step_over): New.
7483 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7484 requests. Clear the thread's last reported target waitstatus.
7485 Don't use the `suspended' flag. Don't consider pending breakpoints.
7486 (linux_resume): Start a step-over if necessary.
7487 (proceed_one_lwp): New.
7488 (proceed_all_lwps): New.
7489 (unstop_all_lwps): New.
7490 * linux-low.h (struct lwp_info): Rewrite comment for the
7491 `suspended' flag. Add the `stop_pc' field. Delete the
7492 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7493 Add `'last_resume_kind' and `need_step_over' fields.
7494 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7495 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7496 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7497 (set_raw_breakpoint_at): New.
7498 (set_breakpoint_at): Rewrite to use it.
7499 (reinsert_breakpoint_handler): Delete.
7500 (set_reinsert_breakpoint): New.
7501 (reinsert_breakpoint_by_bp): Delete.
7502 (delete_reinsert_breakpoints): New.
7503 (uninsert_breakpoint): Rewrite.
7504 (uninsert_breakpoints_at): New.
7505 (reinsert_breakpoint): Rewrite.
7506 (reinsert_breakpoints_at): New.
7507 (check_breakpoints): Rewrite.
7508 (breakpoint_here): New.
7509 (breakpoint_inserted_here): New.
7510 (check_mem_read): Adjust.
7511 * mem-break.h (breakpoints_supported, breakpoint_here)
7512 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7513 (reinsert_breakpoint_by_bp): Delete declaration.
7514 (delete_reinsert_breakpoints): Declare.
7515 (reinsert_breakpoint): Delete declaration.
7516 (reinsert_breakpoints_at): Declare.
7517 (uninsert_breakpoint): Delete declaration.
7518 (uninsert_breakpoints_at): Declare.
7519 (check_breakpoints): Adjust prototype.
7520 * server.h: Adjust include order.
7521 (struct thread_info): Declare here. Add a `last_status' field.
7523 2010-03-23 Michael Snyder <msnyder@vmware.com>
7525 * server.c (crc32): New function.
7526 (handle_query): Add handling for 'qCRC:' request.
7528 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7530 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7531 lwp had been stopped by a watchpoint.
7533 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7535 * server.h (internal_error): Declare.
7536 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7537 * utils.c (internal_error): New function.
7539 2010-03-15 Andreas Schwab <schwab@redhat.com>
7541 * configure.srv: Fix typo setting srv_regobj.
7543 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7545 * linux-low.c (fetch_register): Avoid passing a non string literal
7547 (usr_store_inferior_registers): Ditto.
7549 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7551 * linux-low.c (linux_write_memory): Bail out early if peeking
7554 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7556 * linux-low.h (struct lwp_info): New fields
7557 `stopped_by_watchpoint' and `stopped_data_address'.
7558 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7559 here, and cache them in the lwp object.
7560 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7562 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7564 (linux_stopped_by_watchpoint): Rewrite.
7565 (linux_stopped_data_address): Rewrite.
7567 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7569 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7570 switching the current inferior, not before.
7572 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7574 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7575 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7576 i386-linux.c and amd64-linux.c.
7577 (reg-i386.o): Removed.
7578 (reg-i386.c): Likewise.
7579 (reg-i386-linux.o): Likewise.
7580 (reg-i386-linux.c): Likewise.
7581 (reg-x86-64.o): Likewise.
7582 (reg-x86-64.c): Likewise.
7583 (reg-x86-64-linux.o): Likewise.
7584 (reg-x86-64-linux.c): Likewise.
7587 (i386-linux.o): Likewise.
7588 (i386-linux.c): Likewise.
7589 (amd64.o): Likewise.
7590 (amd64.c): Likewise.
7591 (amd64-linux.o): Likewise.
7592 (amd64-linux.c): Likewise.
7594 * configure.srv (srv_i386_regobj): New.
7595 (srv_i386_linux_regobj): Likewise.
7596 (srv_amd64_regobj): Likewise.
7597 (srv_amd64_linux_regobj): Likewise.
7598 (srv_i386_32bit_xmlfiles): Likewise.
7599 (srv_i386_64bit_xmlfiles): Likewise.
7600 (srv_i386_xmlfiles): Likewise.
7601 (srv_amd64_xmlfiles): Likewise.
7602 (srv_i386_linux_xmlfiles): Likewise.
7603 (srv_amd64_linux_xmlfiles): Likewise.
7604 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7605 srv_xmlfiles to $srv_i386_xmlfiles.
7606 (i[34567]86-*-mingw32ce*): Likewise.
7607 (i[34567]86-*-mingw*): Likewise.
7608 (i[34567]86-*-nto*): Likewise.
7609 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7610 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7611 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7612 (x86_64-*-linux*): Likewise.
7614 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7615 (init_registers_amd64_linux): New.
7616 (x86_arch_setup): Replace init_registers_x86_64_linux with
7617 init_registers_amd64_linux.
7619 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7621 * configure.ac: Check for libdl. If it is not available link against
7622 static libthread_db.
7623 * configure: Regenerate.
7625 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7629 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7630 handing a read watchpoint.
7631 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7633 2010-02-12 Doug Evans <dje@google.com>
7635 * linux-low.c (linux_supports_tracefork_flag): Document.
7636 (linux_look_up_symbols): Add comment.
7638 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7640 * regcache.c (supply_register): Clear regcache if buf is NULL.
7642 2010-02-02 Nicolas Roche <roche@sourceware.org>
7643 Joel Brobecker <brobecker@adacore.com>
7645 * inferiors.c (find_inferior): Add function documentation.
7646 (unloaded_dll): Handle the case where the unloaded dll has not
7647 been previously registered in the dll list.
7649 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7651 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7652 (thumb2_breakpoint): New.
7653 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7655 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7657 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7658 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7661 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7663 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7665 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7667 * linux-s390-low.c (s390_collect_ptrace_register)
7668 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7670 2010-01-21 Doug Evans <dje@google.com>
7672 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7673 (PTRACE_ARG4_TYPE): New macro.
7674 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7675 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7676 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7677 (usr_store_inferior_registers): Ditto.
7678 (linux_read_memory, linux_write_memory): Ditto.
7679 (linux_test_for_tracefork): Ditto.
7681 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7682 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7684 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7686 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7689 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7691 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7692 prototype to take a regcache. Adjust.
7694 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7696 * regcache.h (struct thread_info): Forward declare.
7697 (struct regcache): New.
7698 (new_register_cache): Adjust prototype.
7699 (get_thread_regcache): Declare.
7700 (free_register_cache): Adjust prototype.
7701 (registers_to_string, registers_from_string): Ditto.
7702 (supply_register, supply_register_by_name, collect_register)
7703 (collect_register_as_string, collect_register_by_name): Ditto.
7704 * regcache.c (struct inferior_regcache_data): Delete.
7705 (get_regcache): Rename to ...
7706 (get_thread_regcache): ... this. Adjust. Switch inferior before
7708 (regcache_invalidate_one): Adjust.
7709 (regcache_invalidate): Fix prototype.
7710 (new_register_cache): Return the new register cache.
7711 (free_register_cache): Change prototype.
7712 (realloc_register_cache): Adjust.
7713 (registers_to_string): Change prototype to take a regcache. Adjust.
7714 (registers_from_string): Ditto.
7715 (register_data): Ditto.
7716 (supply_register): Ditto.
7717 (supply_register_by_name): Ditto.
7718 (collect_register): Ditto.
7719 (collect_register_as_string): Ditto.
7720 (collect_register_by_name): Ditto.
7721 * server.c (process_serial_event): Adjust.
7722 * linux-low.h (regset_fill_func, regset_store_func): Change
7724 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7726 * linux-low.c (get_stop_pc): Adjust.
7727 (check_removed_breakpoint): Adjust.
7728 (linux_wait_for_event): Adjust.
7729 (linux_resume_one_lwp): Adjust.
7730 (fetch_register): Add regcache parameter. Adjust.
7731 (usr_store_inferior_registers): Ditto.
7732 (regsets_fetch_inferior_registers): Ditto.
7733 (regsets_store_inferior_registers): Ditto.
7734 (linux_fetch_registers, linux_store_registers): Ditto.
7735 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7737 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7739 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7740 prototype to take a regcache.
7741 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7742 * remote-utils.c (convert_ascii_to_int, outreg)
7743 (prepare_resume_reply): Change prototype to take a regcache.
7745 * target.h (struct target_ops) <fetch_registers, store_registers>:
7746 Change prototype to take a regcache.
7747 (fetch_inferior_registers, store_inferior_registers): Change
7748 prototype to take a regcache. Adjust.
7749 * proc-service.c (ps_lgetregs): Adjust.
7750 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7751 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7752 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7753 take a regcache. Adjust.
7754 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7755 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7756 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7757 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7758 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7759 (cris_cannot_fetch_register):
7760 (cris_breakpoint_at): Change prototype to take a regcache.
7762 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7763 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7764 to take a regcache. Adjust.
7765 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7767 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7768 take a regcache. Adjust.
7769 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7770 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7771 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7772 * linux-mips-low.c (mips_get_pc):
7773 (mips_set_pc): Change prototype to take a regcache. Adjust.
7774 (mips_reinsert_addr): Adjust.
7775 (mips_collect_register): Change prototype to take a regcache.
7777 (mips_supply_register):
7778 (mips_collect_register_32bit, mips_supply_register_32bit)
7779 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7780 (mips_store_fpregset): Ditto.
7781 * linux-ppc-low.c (ppc_supply_ptrace_register)
7782 (ppc_supply_ptrace_register): Ditto.
7783 (parse_spufs_run): Adjust.
7784 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7785 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7786 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7787 take a regcache. Adjust.
7788 * linux-s390-low.c (s390_collect_ptrace_register)
7789 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7790 (s390_set_pc): Change prototype to take a regcache. Adjust.
7791 (s390_arch_setup): Adjust.
7792 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7793 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7794 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7795 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7796 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7798 (sparc_breakpoint_at): Adjust.
7799 * linux-xtensa-low.c (xtensa_fill_gregset):
7800 (xtensa_store_gregset):
7801 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7802 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7803 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7804 prototype to take a regcache. Adjust.
7805 * win32-arm-low.c (arm_fetch_inferior_register)
7806 (arm_store_inferior_register): Change prototype to take a
7808 * win32-i386-low.c (i386_fetch_inferior_register)
7809 (i386_store_inferior_register): Change prototype to take a
7811 * win32-low.c (child_fetch_inferior_registers)
7812 (child_store_inferior_registers): Change prototype to take a
7814 (win32_wait): Adjust.
7815 (win32_fetch_inferior_registers): Change prototype to take a
7817 (win32_store_inferior_registers): Adjust.
7818 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7819 store_inferior_register>: Change prototype to take a regcache.
7821 2010-01-20 Doug Evans <dje@google.com>
7823 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7825 (linux_wait_for_event1, linux_init_signals): Ditto.
7826 (W_STOPCODE): Provide definition if missing.
7828 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7830 * linux-low.c (linux_core_of_thread): New.
7831 (compare_ints, show_process, list_threads): New.
7832 (linux_qxfer_osdata): Report threads and cores.
7833 (linux_target_op): Register linux_core_of_thread.
7834 * remote-utils.c (prepare_resume_reply): Report the core.
7835 (buffer_xml_printf): Support %d specifier.
7836 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7838 (handle_query): Handle qXfer:threads. Announce availability
7840 * target.h (struct target_ops): New field core_of_thread.
7842 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7844 * Makefile.in (clean): Remove new generated files.
7845 (reg-s390.o, reg-s390.c): Remove rules.
7846 (reg-s390x.o, reg-s390x.c): Likewise.
7847 (s390-linux32.o, s390-linux32.c): Add rules.
7848 (s390-linux64.o, s390-linux64.c): Likewise.
7849 (s390x-linux64.o, s390x-linux64.c): Likewise.
7850 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7851 * linux-s390-low.c: Include <elf.h>.
7852 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7853 (init_registers_s390): Remove prototype.
7854 (init_registers_s390x): Likewise.
7855 (init_registers_s390_linux32): Add prototype.
7856 (init_registers_s390_linux64): Likewise.
7857 (init_registers_s390x_linux64): Likewise.
7858 (s390_num_regs_3264): New define.
7859 (s390_regmap_3264): New global variable.
7860 (s390_cannot_fetch_register): Remove obsolete check.
7861 (s390_cannot_store_register): Likewise.
7862 (s390_collect_ptrace_register): Handle upper/lower register halves.
7863 (s390_supply_ptrace_register): Likewise.
7864 (s390_fill_gregset): Update to register number changes.
7865 (s390_get_hwcap): New routine.
7866 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7867 Install appropriate regmap and register set.
7869 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7871 * server.c (gdbserver_version): Update copyright year to 2010.
7872 * gdbreplay.c (gdbreplay_version): Likewise.
7874 2009-12-28 Doug Evans <dje@google.com>
7876 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7877 elf/external.h. Include <elf.h> instead but only if necessary.
7879 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7881 * linux-low.c (linux_remove_process): Remove `detaching'
7882 parameter. Don't release/detach from thread_db here.
7883 (linux_kill): Release/detach from thread_db here, ...
7884 (linux_detach): ... and here, before actually detaching.
7885 (linux_wait_1): ... and here, when a process exits.
7886 * thread-db.c (any_thread_of): New.
7887 (thread_db_free): Switch the current inferior to a thread of the
7890 2009-12-21 Doug Evans <dje@google.com>
7892 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7894 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7895 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7896 warning ifndef __NR_tkill. Move setting of errno there too.
7897 Delete unnecessary resetting of errno after syscall.
7898 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7900 * configure.ac: Check for dladdr.
7901 * config.in: Regenerate.
7902 * configure: Regenerate.
7903 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7904 (try_thread_db_load): Update.
7906 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7908 2009-12-18 Doug Evans <dje@google.com>
7910 * event-loop.c: Include unistd.h if it exists.
7912 * linux-low.c (my_waitpid): Move definition away from being in
7913 between linux_tracefork_child/linux_test_for_tracefork.
7915 * gdb_proc_service.h (psaddr_t): Fix type.
7916 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7917 signature to match glibc.
7919 2009-12-16 Doug Evans <dje@google.com>
7921 * linux-low.c (linux_read_memory): Fix argument to read.
7923 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7925 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7926 events, don't leave current_inferior pointing at null.
7928 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7930 * win32-low.c (LOG): Delete.
7931 (OUTMSG): Output to stderr.
7932 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7933 on compile time LOG macro.
7934 (win32_wait): Fix debug output.
7936 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7938 * win32-low.c (win32_add_one_solib): If the dll name is
7939 "ntdll.dll", prepend the system directory to the dll path.
7941 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7943 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7945 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7946 Vladimir Prus <vladimir@codesourcery.com>
7948 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7949 * configure.ac: Check for __mcoldfire__ and set
7950 gdb_cv_m68k_is_coldfire.
7951 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7952 reg-cf.o and reg-m68k.o.
7953 * configure: Regenerated.
7955 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7957 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7958 Pass it to thread_db_free.
7959 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7960 proper `detaching' argument to linux_remove_process.
7961 * linux-low.h (thread_db_free): Add `detaching' parameter.
7962 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7964 (thread_db_free): Add `detaching' parameter. Only
7965 call td_ta_clear_event if detaching from process.
7967 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7969 * thread-db.c (thread_db_free): Fix typo.
7971 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7974 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7976 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7978 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7979 with an i686 compiler.
7980 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7982 * configure: Rebuilt.
7984 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7988 * server.c (handle_search_memory_1): Correct read_addr initialization
7989 in loop for searching subsequent chunks.
7991 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7993 * configure.ac: New --with-libthread-db option.
7994 * thread-db.c: Allow direct dependence on libthread_db.
7995 (thread_db_free): Adjust.
7996 * config.in: Regenerate.
7997 * configure: Likewise.
7999 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8002 * thread-db.c (attach_thread): New function.
8003 (maybe_attach_thread): Return success/failure.
8004 (find_new_threads_callback): Adjust.
8005 (thread_db_find_new_threads): Loop until no new threads.
8007 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8009 * proc-service.c (ps_lgetregs): Formatting.
8011 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8013 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8014 * configure.ac: Adjust.
8015 * linux-low.h (struct process_info_private): Move members to struct
8017 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8018 * linux-low.c (linux_remove_process): Adjust.
8019 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8020 * server.c (handle_query): Move code ...
8021 (handle_monitor_command): ... here. New function.
8022 * target.h (struct target_ops): New member.
8023 * thread-db.c (struct thread_db): New.
8024 (libthread_db_search_path): New variable.
8025 (thread_db_create_event, thread_db_enable_reporting)
8026 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8027 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8028 (try_thread_db_load_1, dladdr_to_soname): New functions.
8029 (try_thread_db_load, thread_db_load_search): New functions.
8030 (thread_db_init): Search for libthread_db.
8031 (thread_db_free): New function.
8032 (thread_db_handle_monitor_command): Likewise.
8033 * config.in: Regenerate.
8034 * configure: Regenerate.
8036 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8038 * spu-low.c (spu_kill): Wait for inferior to terminate.
8039 Call clear_inferiors.
8040 (spu_detach): Call clear_inferiors.
8042 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8044 * aclocal.m4: Regenerate.
8045 * config.in: Likewise.
8046 * configure: Likewise.
8048 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8050 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8051 (parse_spufs_run): New function.
8052 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8053 (ppc_breakpoint_at): Handle SPU breakpoints.
8055 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8057 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8058 (SPUFS_MAGIC): Define.
8059 (spu_enumerate_spu_ids): New function.
8060 (linux_qxfer_spu): New function.
8061 (linux_target_ops): Install linux_qxfer_spu.
8063 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8065 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8066 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8067 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8068 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8069 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8070 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8071 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8072 (init_registers_powerpc_cell32l): Add prototype.
8073 (init_registers_powerpc_cell64l): Likewise.
8074 (ppc_arch_setup): Detect Cell/B.E. architecture.
8076 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8078 * Makefile.in (datarootdir): New variable.
8080 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8082 * linux-low.c (linux_write_memory): Update debugging output.
8083 * Makefile.in (clean): Add new descriptions.
8084 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8085 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8086 * configure.srv: Add new files for arm*-*-linux*.
8087 * linux-arm-low.c: Add new declarations.
8088 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8089 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8090 (HWCAP_VFPv3D16): New.
8091 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8092 instead of __IWMMXT__.
8093 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8094 (arm_arch_setup): New.
8095 (target_regsets): Remove #ifdef. Add VFP regset.
8096 (the_low_target): Use arm_arch_setup.
8098 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8100 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8101 the main thread again.
8103 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8105 Adding Neutrino gdbserver.
8106 * configure: Regenerated.
8107 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8108 * configure.srv (i[34567]86-*-nto*): New target.
8109 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8110 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8111 (nto_comctrl) [__QNX__]: New function.
8112 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8114 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8116 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8119 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8120 Pedro Alves <pedro@codesourcery.com>
8122 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8123 don't support CONTEXT_EXTENDED_REGISTERS.
8124 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8125 (the_low_target): Install them.
8126 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8127 failing with ERROR_PIPE_NOT_CONNECTED.
8129 2009-06-30 Doug Evans <dje@google.com>
8130 Pierre Muller <muller@ics.u-strasbg.fr>
8132 Add h/w watchpoint support to x86-linux, win32-i386.
8133 * Makefile.in (SFILES): Add i386-low.c
8134 (i386_low_h): Define.
8135 (i386-low.o): Add dependencies.
8136 (linux-x86-low.o): Add i386-low.h dependency.
8137 (win32-i386-low.o): Ditto.
8138 * i386-low.c: New file.
8139 * i386-low.h: New file.
8140 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8141 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8142 * linux-low.c (linux_add_process): Initialize arch_private.
8143 (linux_remove_process): Free arch_private.
8144 (add_lwp): Initialize arch_private.
8145 (delete_lwp): Free arch_private.
8146 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8148 * linux-low.h (process_info_private): New member arch_private.
8149 (lwp_info): New member arch_private.
8150 (linux_target_ops): New members new_process, new_thread,
8152 (ptid_of): New macro.
8153 * linux-x86-low.c: Include stddef.h, i386-low.h.
8154 (arch_process_info): New struct.
8155 (arch_lwp_info): New struct.
8156 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8157 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8158 (i386_dr_low_get_status): New function.
8159 (x86_insert_point, x86_remove_point): New functions.
8160 (x86_stopped_by_watchpoint): New function.
8161 (x86_stopped_data_address): New function.
8162 (x86_linux_new_process, x86_linux_new_thread): New functions.
8163 (x86_linux_prepare_to_resume): New function.
8164 (the_low_target): Add entries for insert_point, remove_point,
8165 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8167 * server.c (debug_hw_points): New global.
8168 (monitor_show_help): Document set debug-hw-points.
8169 (handle_query): Process "set debug-hw-points".
8170 * server.h (debug_hw_points): Declare.
8171 (paddress): Declare.
8172 * utils.c (NUMCELLS, CELLSIZE): New macros.
8173 (get_sell, xsnprintf, paddress): New functions.
8174 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8175 remove_point, stopped_by_watchpoint, stopped_data_address.
8176 * win32-i386-low.c: Include i386-low.h.
8177 (debug_reg_state): Replaces dr.
8178 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8179 (i386_dr_low_get_status): New function.
8180 (i386_insert_point, i386_remove_point): New functions.
8181 (i386_stopped_by_watchpoint): New function.
8182 (i386_stopped_data_address): New function.
8183 (i386_initial_stuff): Update.
8184 (get_thread_context,set_thread_context,i386_thread_added): Update.
8185 (the_low_target): Add entries for insert_point,
8186 remove_point, stopped_by_watchpoint, stopped_data_address.
8187 * win32-low.c (win32_insert_watchpoint): New function.
8188 (win32_remove_watchpoint): New function.
8189 (win32_stopped_by_watchpoint): New function.
8190 (win32_stopped_data_address): New function.
8191 (win32_target_ops): Add entries for insert_watchpoint,
8192 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8193 * win32-low.h (win32_target_ops): New members insert_point,
8194 remove_point, stopped_by_watchpoint, stopped_data_address.
8196 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8198 * server.c (process_serial_event): Re-return unsupported, not
8199 error, if the type isn't recognized. Re-allow supporting only
8200 insert or remove packets. Also call require_running for
8201 breakpoints. Add missing break statement to default case. Tidy.
8202 * target.h (struct target_ops): Rename insert_watchpoint to
8203 insert_point, and remove_watchpoint to remove_point.
8205 * linux-low.h (struct linux_target_ops): Likewise.
8206 * linux-low.c (linux_insert_watchpoint): Rename to ...
8207 (linux_insert_point): ... this. Adjust.
8208 (linux_remove_watchpoint): Rename to ...
8209 (linux_remove_point): ... this. Adjust.
8210 (linux_target_ops): Adjust.
8211 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8212 (cris_insert_point): ... this.
8213 (cris_remove_watchpoint): Rename to ...
8214 (cris_remove_point): ... this.
8215 (the_low_target): Adjust.
8217 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8219 * server.c (handle_v_kill): Pass signal_pid to
8220 kill_inferior if multi_process is zero.
8222 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8224 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8225 * target.h (target_ops): Comment for *_watchpoint to make it clear
8226 the functions can get types '0' and '1'.
8228 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8230 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8231 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8232 * regcache.c (get_regcache): Likewise.
8233 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8234 * win32-low.c (child_fetch_inferior_registers): Remove check for
8237 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8238 Pedro Alves <pedro@codesourcery.com>
8240 * target.h (struct target_ops) <supports_multi_process>: New
8242 (target_supports_multi_process): New.
8243 * server.c (handle_query): Even if GDB reports support, only
8244 enable multi-process if the target also supports it. Report
8245 multi-process support only if the target backend supports it.
8246 * linux-low.c (linux_supports_multi_process): New function.
8247 (linux_target_ops): Install it as target_supports_multi_process
8250 2009-05-24 Doug Evans <dje@google.com>
8252 Global renaming of find_thread_pid to find_thread_ptid.
8253 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8254 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8255 All callers updated.
8257 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8258 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8261 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8262 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8263 (linux_resume_one_lwp): Ditto.
8265 2009-05-23 Doug Evans <dje@google.com>
8267 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8268 from struct inferior_list_entry * to struct lwp_info *.
8269 All callers updated.
8271 2009-05-13 Doug Evans <dje@google.com>
8273 * linux-x86-low.c: Don't include assert.h.
8274 (x86_siginfo_fixup): Use fatal, not assert.
8275 (x86_arch_setup): Fix comment.
8277 2009-05-12 Doug Evans <dje@google.com>
8279 Biarch support for i386/amd64 gdbserver.
8280 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8281 Add linux-x86-low.c.
8282 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8283 (linux-x86-low.o): Add.
8284 * linux-x86-64-low.c: Delete.
8285 * linux-i386-low.c: Delete.
8286 * linux-x86-low.c: New file.
8287 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8289 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8291 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8292 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8293 (linux_child_pid_to_exec_file): New function.
8294 (elf_64_header_p, elf_64_file_p): New functions.
8295 (siginfo_fixup): New function.
8296 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8297 give target a chance to convert layout.
8298 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8299 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8301 2009-05-07 Doug Evans <dje@google.com>
8303 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8304 (regsets_store_inferior_registers): Ditto.
8306 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8310 * linux-low.c (must_set_ptrace_flags): Delete.
8311 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8313 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8314 `lwp->must_set_ptrace_flags' instead.
8315 (linux_wait_for_event_1): Set ptrace options here.
8316 (linux_wait_1): ... not here.
8318 2009-04-30 Doug Evans <dje@google.com>
8320 * inferiors.c (started_inferior_callback): New function.
8321 (attached_inferior_callback): New function.
8322 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8323 * server.c (print_started_pid, print_attached_pid): New functions.
8324 (detach_or_kill_for_exit): New function.
8325 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8326 * server.h (have_started_inferiors_p): Declare.
8327 (have_attached_inferiors_p): Declare.
8329 * inferiors.c (remove_process): Fix memory leak, free process.
8330 * linux-low.c (linux_remove_process): New function.
8331 (linux_kill): Call it instead of remove_process.
8332 (linux_detach, linux_wait_1): Ditto.
8334 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8336 * configure.srv: Add x86 Windows CE target.
8338 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8340 * inferiors.c (get_thread_process): Make global.
8341 * server.h (get_thread_process): Add prototype.
8342 * thread-db.c (find_one_thread): Use get_thread_process
8343 instead of current_process.
8344 (thread_db_get_tls_address): Do not crash if called when
8345 thread layer is not yet initialized.
8347 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8349 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8350 * spu-low.c (current_tid): Rename to ...
8351 (current_ptid): ... this.
8352 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8353 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8354 ptid_get_lwp (current_ptid) instead of current_tid.
8355 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8356 instead of current_tid. Use find_process_pid to verify pid
8357 argument is valid. Pass proper argument to remove_process.
8358 (spu_thread_alive): Compare current_ptid instead of current_tid.
8359 (spu_resume): Likewise.
8361 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8363 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8366 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8368 Implement the multiprocess extensions, and add linux multiprocess
8371 * server.h (ULONGEST): Declare.
8372 (struct ptid, ptid_t): New.
8373 (minus_one_ptid, null_ptid): Declare.
8374 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8375 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8376 (struct inferior_list_entry): Change `id' type from unsigned from
8378 (struct sym_cache, struct breakpoint, struct
8379 process_info_private): Forward declare.
8380 (struct process_info): Declare.
8381 (current_process): Declare.
8382 (all_processes): Declare.
8383 (initialize_inferiors): Declare.
8384 (add_thread): Adjust to use ptid_t.
8385 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8386 (add_process, remove_process, find_thread_pid): Declare.
8387 (find_inferior_id): Adjust to use ptid_t.
8388 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8389 (multi_process): Declare.
8390 (push_event): Adjust to use ptid_t.
8391 (read_ptid, write_ptid): Declare.
8392 (prepare_resume_reply): Adjust to use ptid_t.
8393 (clear_symbol_cache): Declare.
8394 * inferiors.c (all_processes): New.
8395 (null_ptid, minus_one_ptid): New.
8396 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8397 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8398 (add_thread): Change unsigned long to ptid. Remove gdb_id
8400 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8401 (gdb_id_to_thread): Rename to ...
8402 (find_thread_pid): ... this. Change unsigned long to ptid.
8403 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8404 (loaded_dll, pull_pid_from_list): Adjust.
8405 (add_process, remove_process, find_process_pid)
8406 (get_thread_process, current_process, initialize_inferiors): New.
8407 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8408 (struct target_waitstatus) <related_pid>: Ditto.
8409 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8411 (struct target_ops) <join>: Add `pid' argument.
8412 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8413 (struct target_ops) <wait>: Add `ptid' field. Change return type
8415 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8416 (mywait): Add `ptid' argument. Change return type to ptid_t.
8417 (target_pid_to_str): Declare.
8418 * target.c (set_desired_inferior): Adjust to use ptids.
8419 (mywait): Add new `ptid' argument. Adjust.
8420 (target_pid_to_str): New.
8421 * mem-break.h (free_all_breakpoints): Declare.
8422 * mem-break.c (breakpoints): Delelete.
8423 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8424 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8425 to use per-process breakpoint list.
8426 (free_all_breakpoints): New.
8427 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8428 (symbol_cache, all_symbols_looked_up): Delete.
8430 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8432 (prepare_resume_reply): Change ptid argument's type from unsigned
8433 long to ptid_t. Adjust. Implement W;process and X;process.
8434 (free_sym_cache, clear_symbol_cache): New.
8435 (look_up_one_symbol): Adjust to per-process symbol cache. *
8436 * server.c (cont_thread, general_thread, step_thread): Change type
8439 (multi_process): New.
8440 (last_ptid): Change type to ptid_t.
8441 (struct vstop_notif) <ptid>: Change type to ptid_t.
8442 (queue_stop_reply, push_event): Change `ptid' argument's type to
8444 (discard_queued_stop_replies): Add `pid' argument.
8445 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8446 changes. Don't reference the `attached' global.
8447 (attach_inferior): Adjust to mywait interface changes.
8448 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8449 features. Handle and report "multiprocess+". Handle
8451 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8453 (handle_v_kill): New.
8454 (handle_v_stopped): Adjust to use target_pid_to_str.
8455 (handle_v_requests): Allow multiple attaches and runs when
8456 multiprocess extensions are in effect. Handle "vKill".
8457 (myresume): Adjust to use ptids.
8458 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8459 (handle_status): Adjust to discard_queued_stop_replies interface
8461 (first_thread_of, kill_inferior_callback)
8462 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8463 (main): Call initialize_inferiors. Adjust to use ptids, killing
8464 and detaching from all inferiors. Handle multiprocess packet
8466 * linux-low.h: Include gdb_proc_service.h.
8467 (struct process_info_private): New.
8468 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8469 <lwpid_of>: Use ptid_get_lwp.
8470 (get_lwp_thread): Adjust.
8471 (struct lwp_info): Add `dead' member.
8472 (find_lwp_pid): Declare.
8473 * linux-low.c (thread_db_active): Delete.
8474 (new_inferior): Adjust comment.
8475 (inferior_pid): Delete.
8476 (linux_add_process): New.
8477 (handle_extended_wait): Adjust.
8478 (add_lwp): Change unsigned long to ptid.
8479 (linux_create_inferior): Add process to processes table. Adjust
8480 to use ptids. Don't set new_inferior here.
8481 (linux_attach_lwp): Rename to ...
8482 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8483 it. Adjust to use ptids.
8484 (linux_attach_lwp): New.
8485 (linux_attach): Add process to processes table. Don't set
8487 (struct counter): New.
8488 (second_thread_of_pid_p, last_thread_of_process_p): New.
8489 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8491 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8492 processes. Remove process from process table.
8493 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8494 to multiple processes.
8495 (any_thread_of): New.
8496 (linux_detach): Add `pid' argument, and handle it. Remove process
8497 from processes table.
8498 (linux_join): Add `pid' argument. Handle it.
8499 (linux_thread_alive): Change unsighed long argument to ptid_t.
8500 Consider dead lwps as not being alive.
8501 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8502 threads we're not interested in.
8503 (same_lwp, find_lwp_pid): New.
8504 (linux_wait_for_lwp): Change `pid' argument's type from int to
8506 (linux_wait_for_event): Rename to ...
8507 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8508 from int to ptid_t. Adjust.
8509 (linux_wait_for_event): New.
8510 (linux_wait_1): Add `ptid' argument. Change return type to
8511 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8512 that exit from the process table.
8513 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8515 (mark_lwp_dead): New.
8516 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8517 stopping all threads, mark its main lwp as dead.
8518 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8520 (fetch_register, usr_store_inferior_registers)
8521 (regsets_fetch_inferior_registers)
8522 (regsets_store_inferior_registers, linux_read_memory)
8523 (linux_write_memory): Inline `inferior_pid'.
8524 (linux_look_up_symbols): Adjust to use per-process
8526 (linux_request_interrupt): Adjust to use ptids.
8527 (linux_read_auxv): Inline `inferior_pid'.
8528 (initialize_low): Don't reference thread_db_active.
8529 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8530 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8531 (ps_getpid): Return the pid of the current inferior.
8532 * thread-db.c (proc_handle, thread_agent): Delete.
8533 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8535 (find_one_thread): Change argument type to ptid_t. Adjust to
8537 (maybe_attach_thread): Adjust to per-process data and ptids.
8538 (thread_db_find_new_threads): Ditto.
8539 (thread_db_init): Ditto.
8540 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8541 processes table. Adjust to use ptids.
8542 (spu_kill, spu_detach): Adjust interface. Remove process from
8544 (spu_join, spu_thread_alive): Adjust interface.
8545 (spu_wait): Adjust interface. Remove process from processes
8546 table. Adjust to use ptids.
8547 * win32-low.c (current_inferior_tid): Delete.
8548 (current_inferior_ptid): New.
8549 (debug_event_ptid): New.
8550 (thread_rec): Take a ptid. Adjust.
8551 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8552 (child_delete_thread): Ditto.
8553 (do_initial_child_stuff): Add `attached' argument. Add process to
8555 (child_fetch_inferior_registers, child_store_inferior_registers):
8557 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8558 (win32_attach): Pass 1 to do_initial_child_stuff.
8559 (win32_kill): Adjust interface. Remove process from processes
8561 (win32_detach): Ditto.
8562 (win32_join): Adjust interface.
8563 (win32_thread_alive): Take a ptid.
8564 (win32_resume): Adjust to use ptids.
8565 (get_child_debug_event): Ditto.
8566 (win32_wait): Adjust interface. Remove exiting process from
8569 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8571 Non-stop mode support.
8573 * server.h (non_stop): Declare.
8574 (gdb_client_data, handler_func): Declare.
8575 (delete_file_handler, add_file_handler, start_event_loop):
8577 (handle_serial_event, handle_target_event, push_event)
8578 (putpkt_notif): Declare.
8579 * target.h (enum resume_kind): New.
8580 (struct thread_resume): Replace `step' field by `kind' field.
8581 (TARGET_WNOHANG): Define.
8582 (struct target_ops) <wait>: Add `options' argument.
8583 <supports_non_stop, async, start_non_stop>: New fields.
8584 (target_supports_non_stop, target_async): New.
8585 (start_non_stop): Declare.
8586 (mywait): Add `options' argument.
8587 * target.c (mywait): Add `options' argument. Print child exit
8589 (start_non_stop): New.
8590 * server.c (non_stop, own_buf, mem_buf): New globals.
8591 (struct vstop_notif): New.
8592 (notif_queue): New global.
8593 (queue_stop_reply, push_event, discard_queued_stop_replies)
8594 (send_next_stop_reply): New.
8595 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8597 (attach_inferior): In non-stop mode, don't wait for the target
8599 (handle_general_set): Handle QNonStop.
8600 (handle_query): When handling qC, return the current general
8601 thread, instead of the first thread of the list.
8602 (handle_query): If the backend supports non-stop mode, include
8603 QNonStop+ in the qSupported query response.
8604 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8606 (handle_v_attach, handle_v_run): Handle non-stop mode.
8607 (handle_v_stopped): New.
8608 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8609 (myresume): Adjust to use resume_kind. Handle non-stop.
8610 (queue_stop_reply_callback): New.
8611 (handle_status): Handle non-stop mode.
8612 (main): Clear non_stop flag on reconnection. Use the event-loop.
8613 Refactor serial protocol handling from here ...
8614 (process_serial_event): ... to this new function. When GDB
8615 selects any thread, select one here. In non-stop mode, wait until
8616 GDB acks all pending events before exiting.
8617 (handle_serial_event, handle_target_event): New.
8618 * remote-utils.c (remote_open): Install remote_desc in the event
8620 (remote_close): Remove remote_desc from the event loop.
8621 (putpkt_binary): Rename to...
8622 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8623 (putpkt_binary): New as wrapper around putpkt_binary_1.
8624 (putpkt_notif): New.
8625 (prepare_resume_reply): In non-stop mode, don't change the
8627 * event-loop.c: New.
8628 * Makefile.in (OBJ): Add event-loop.o.
8629 (event-loop.o): New rule.
8631 * linux-low.h (pid_of): Moved here.
8633 (get_lwp_thread): Use lwpid_of.
8634 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8635 * linux-low.c (pid_of): Delete.
8636 (inferior_pid): Use lwpid_of.
8637 (linux_event_pipe): New.
8638 (target_is_async_p): New.
8640 (handle_extended_wait): Use lwpid_of.
8641 (add_lwp): Don't set lwpid field.
8642 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8643 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8644 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8645 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8646 first. Adjust to linux_wait_for_event interface changes. Use
8648 (linux_detach): Don't delete the main lwp here.
8649 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8650 (status_pending_p): Don't consider explicitly suspended lwps.
8651 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8652 pointer. Add OPTIONS argument. Change return type to int. Use
8653 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8654 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8655 pointer. Add status pointer argument. Return a pid instead of a
8656 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8657 changes. In non-stop mode, don't switch to a random thread.
8658 (linux_wait): Rename to...
8659 (linux_wait_1): ... this. Add target_options argument, and handle
8660 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8661 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8662 clean exit and signal exit code. Don't stop all threads in
8663 non-stop mode. In all-stop mode, only stop all threads when
8664 reporting a stop to GDB. Handle explicit thread stop requests.
8665 (async_file_flush, async_file_mark): New.
8667 (send_sigstop): Use lwpid_of.
8668 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8669 interface changes. In non-stop mode, don't switch to a random
8671 (linux_resume_one_lwp): Use lwpid_of.
8672 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8673 (linux_resume_one_thread): ... this. Handle resume_stop. In
8674 non-stop mode, don't look for pending flag in all threads.
8675 (resume_status_pending_p): Don't consider explicitly suspended
8677 (my_waitpid): Reimplement. Emulate __WALL.
8678 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8680 (sigchld_handler, linux_supports_non_stop, linux_async)
8681 (linux_start_non_stop): New.
8682 (linux_target_ops): Register linux_supports_non_stop, linux_async
8683 and linux_start_non_stop.
8684 (initialize_low): Install SIGCHLD handler.
8685 * thread-db.c (thread_db_create_event, find_one_thread)
8686 (thread_db_get_tls_address): Use lwpid_of.
8687 * win32-low.c (win32_detach): Adjust to use resume_kind.
8688 (win32_wait): Add `options' argument.
8689 * spu-low.c (spu_resume): Adjust to use resume_kind.
8690 (spu_wait): Add `options' argument.
8692 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8694 Decouple target code from remote protocol.
8696 * target.h (enum target_waitkind): New.
8697 (struct target_waitstatus): New.
8698 (struct target_ops) <wait>: Return an unsigned long. Take a
8699 target_waitstatus pointer instead of a char pointer.
8701 * target.c (mywait): Change prototype to return an unsigned long.
8702 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8703 * server.h (thread_from_wait, old_thread_from_wait): Delete
8705 (prepare_resume_reply): Change prototype to take a
8707 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8708 (last_status, last_ptid): New.
8709 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8710 pid instead of a signal.
8711 (attach_inferior): Remove "status" and "signal" parameters.
8713 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8715 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8716 (handle_v_requests, myresume): Remove "status" and "signal"
8718 (handle_status): New.
8719 (main): Delete local `status'. Adjust.
8720 * remote-utils.c: Include target.h.
8721 (prepare_resume_reply): Change prototype to take a
8722 target_waitstatus. Adjust.
8724 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8726 * spu-low.c (spu_wait): Adjust.
8727 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8729 (win32_wait): Adjust.
8731 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8733 * target.h (struct thread_resume): Delete leave_stopped member.
8734 (struct target_ops): Add a `n' argument to the `resume' callback.
8735 * server.c (start_inferior): Adjust.
8736 (handle_v_cont, myresume): Adjust.
8737 * linux-low.c (check_removed_breakpoint): Adjust to resume
8738 interface change, and to removed leave_stopped field.
8739 (resume_ptr): Delete.
8740 (struct thread_resume_array): New.
8741 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8742 resume interface change.
8743 (linux_continue_one_thread, linux_queue_one_thread)
8744 (resume_status_pending_p): Check if the resume field is NULL
8745 instead of checking the leave_stopped member.
8746 (linux_resume): Adjust to the target resume interface change.
8747 * spu-low.c (spu_resume): Adjust to the target resume interface
8749 * win32-low.c (win32_detach, win32_resume): Ditto.
8751 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8753 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8755 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8757 (linux_continue_one_thread): Only preserve the stepping flag if
8758 there's a pending breakpoint.
8760 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8762 * server.c (main): After the inferior having exited, call
8763 remote_close before exiting gdbserver.
8765 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8767 Fix size of FPSCR in Power 7 processors.
8768 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8769 (PPC_FEATURE_HAS_DFP): New #define.
8770 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8773 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8775 * server.c (handle_query) Whitespace and formatting.
8777 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8779 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8780 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8781 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8782 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8783 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8784 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8785 Makefile.in, configure.ac: Fix whitespace throughout.
8786 * configure: Regenerate.
8788 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8790 * inferiors.c (find_inferior): Make it safe for the callback
8791 function to delete the currently iterated inferior.
8793 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8795 * Makefile.in (linuw_low_h): Move higher.
8796 (thread-db.o): Depend on $(linux_low_h).
8798 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8800 Rename "process" to "lwp" throughout.
8802 * linux-low.c (all_processes): Rename to...
8803 (all_lwps): ... this.
8804 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8805 (add_process): Rename to ...
8806 (add_lwp): ... this. Adjust.
8807 (linux_create_inferior): Adjust.
8808 (linux_attach_lwp): Adjust.
8809 (linux_attach): Adjust.
8810 (linux_kill_one_process): Rename to ...
8811 (linux_kill_one_lwp): ... this. Adjust.
8812 (linux_kill): Adjust.
8813 (linux_detach_one_process): Rename to ...
8814 (linux_detach_one_lwp): ... this. Adjust.
8815 (linux_detach): Adjust.
8816 (check_removed_breakpoint): Adjust.
8817 (status_pending_p): Adjust.
8818 (linux_wait_for_process): Rename to ...
8819 (linux_wait_for_lwp): ... this. Adjust.
8820 (linux_wait_for_event): Adjust.
8821 (send_sigstop): Adjust.
8822 (wait_for_sigstop): Adjust.
8823 (stop_all_processes): Rename to ...
8824 (stop_all_lwps): ... this.
8825 (linux_resume_one_process): Rename to ...
8826 (linux_resume_one_lwp): ... this. Adjust.
8827 (linux_set_resume_request, linux_continue_one_thread)
8828 (linux_queue_one_thread, resume_status_pending_p)
8829 (usr_store_inferior_registers, regsets_store_inferior_registers)
8830 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8832 * linux-low.h (get_process): Rename to ...
8833 (get_lwp): ... this. Adjust.
8834 (get_thread_process): Rename to ...
8835 (get_thread_lwp): ... this. Adjust.
8836 (get_process_thread): Rename to ...
8837 (get_lwp_thread): ... this. Adjust.
8838 (struct process_info): Rename to ...
8839 (struct lwp_info): ... this.
8840 (all_processes): Rename to ...
8841 (all_lwps): ... this.
8842 * proc-service.c (ps_lgetregs): Adjust.
8843 * thread-db.c (thread_db_create_event, find_one_thread)
8844 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8846 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8848 * server.c (handle_query): Handle "qAttached".
8850 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8852 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8853 GPLv3, update license URL.
8855 2009-03-01 Doug Evans <dje@google.com>
8857 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8858 (server_h): Add gdb_signals.h.
8859 (signals.o): Update.
8860 * server.h (target_signal_from_host,target_signal_to_host_p)
8861 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8863 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8865 * remote-utils.c (getpkt): Also generate remote-debug
8866 information if noack_mode is set.
8868 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8870 * server.c (handle_query): Report qXfer:siginfo:read and
8871 qXfer:siginfo:write as supported and handle them.
8872 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8873 * linux-low.c (linux_xfer_siginfo): New.
8874 (linux_target_ops): Set it.
8876 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8878 * server.c (gdbserver_usage): Mention --remote-debug.
8879 (main): Accept '--remote-debug' switch.
8881 2009-01-18 Doug Evans <dje@google.com>
8883 * regcache.c (new_register_cache): No need to check result of xcalloc.
8884 * server.c (handle_search_memory): Back out calls to xmalloc,
8885 result is checked and error is returned to user upon failure.
8886 (handle_query): Ditto. Add more checks for result of malloc.
8887 (handle_v_cont): Check result of malloc, report error back to
8889 (handle_v_run): Ditto. Call freeargv.
8890 * server.h (freeargv): Declare.
8891 * utils.c (freeargv): New fn.
8893 2009-01-15 Doug Evans <dje@google.com>
8895 * gdbreplay.c (perror_with_name): Make arg const char *.
8896 * server.h (target_signal_to_name): Make return type const char *.
8897 * thread-db.c (thread_db_err_str): Make return type const char *.
8898 * utils.c (perror_with_name): Make arg const char *.
8900 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8902 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8903 when handling a EXIT_PROCESS_DEBUG_EVENT.
8905 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8907 * gdbreplay.c (gdbreplay_version): Update copyright year.
8908 * server.c (gdbserver_version): Likewise.
8910 2009-01-05 Doug Evans <dje@google.com>
8912 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8913 (handle_extended_wait): Improve comment.
8915 2008-12-13 Doug Evans <dje@google.com>
8917 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8918 * server.h (ATTR_MALLOC): New macro.
8919 (xmalloc,xcalloc,xstrdup): Declare.
8920 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8921 * inferiors.c: Ditto.
8922 * linux-low.c: Ditto.
8923 * mem-break.c: Ditto.
8924 * regcache.c: Ditto.
8925 * remote-utils.c: Ditto.
8928 * win32-low.c: Ditto.
8930 2008-12-12 Doug Evans <dje@google.com>
8932 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8933 in debugging printf.
8935 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8937 2008-12-09 Doug Evans <dje@google.com>
8939 * linux-low.h (struct process_info): Delete member tid, unused.
8940 * thread-db.c (find_one_thread): Update.
8941 (maybe_attach_thread): Update.
8943 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8945 * target.h (struct target_ops): Add qxfer_osdata member.
8946 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8948 (linux_qxfer_osdata): New functions.
8949 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8951 * server.c (handle_query): Handle "qXfer:osdata:read:".
8952 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8953 (buffer_xml_printf): New functions.
8954 * server.h (struct buffer): New.
8955 (buffer_grow_str, buffer_grow_str0): New macros.
8956 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8957 (buffer_xml_printf): Declare.
8959 2008-11-24 Doug Evans <dje@google.com>
8961 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8963 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8965 * server.c (handle_v_run): Always use the supplied argument list.
8967 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8969 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8970 (xtensa_regmap_table): Add entry for scompare1.
8972 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8974 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8975 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8976 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8977 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8978 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8979 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8980 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8981 XML target descriptions.
8982 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8983 when inferior is running on an ISA 2.05 or later processor. Add
8984 special case to return offset for full 64-bit slot of FPSCR when
8987 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8989 * Makefile.in (SFILES, clean): Added sparc64 files.
8990 (reg-sparc64.o, reg-sparc64.c): New.
8991 * configure.srv (sparc*-*-linux*): New configuration.
8992 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8993 syscall arguments for SPARC.
8994 (regsets_store_inferior_registers): Likewise.
8995 * linux-sparc-low.c: New file.
8997 2008-10-21 Doug Evans <dje@google.com>
8999 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9000 (READLINE_DIR,READLINE_DEP): Delete.
9001 (INTERNAL_CFLAGS): Update.
9002 (LINTFLAGS): Update.
9004 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9006 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9007 whole argv from the last run, not just argv[0].
9009 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9011 * regcache.c (new_register_cache): Return NULL if the register
9012 cache size isn't known yet.
9013 (free_register_cache): Avoid dereferencing a NULL regcache.
9015 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9017 * configure.srv: Merge MIPS and MIPS64.
9019 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9021 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9023 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9025 * Makefile.in: Add required vsx dependencies.
9027 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9028 Declare init_registers_powerpc_vsx32l.
9029 Declare init_registers_powerpc_vsx64l.
9030 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9031 (ppc_arch_setup): Check for VSX in hwcap.
9032 (ppc_fill_vsxregset): New function.
9033 (ppc_store_vsxregset): New function.
9034 Add new VSX entry in regset_info target_regsets.
9036 * configure.srv: Add new VSX dependencies.
9038 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9040 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9041 (remote_open): Set or clear transport_is_reliable.
9042 (putpkt_binary): Don't expect acks in noack mode.
9043 (getpkt): Don't send ack/nac in noack mode.
9044 * server.c (handle_general_set): Handle QStartNoAckMode.
9045 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9047 (main): Reset noack_mode on every connection.
9048 * server.h (noack_mode): Declare.
9050 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9052 * Makefile.in (GDBREPLAY_OBS): New variable.
9053 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9055 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9056 Daniel Jacobowitz <dan@codesourcery.com>
9058 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9059 (usr_store_inferior_registers): Likewise.
9060 (regsets_store_inferior_registers): Likewise.
9062 2008-07-31 Rolf Jansen <rj@surtec.com>
9063 Pedro Alves <pedro@codesourcery.com>
9065 * configure.ac: Check for memmem declaration.
9066 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9067 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9068 (disable_packet_qfThreadInfo): Unconditionally compile.
9069 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9070 * configure, config.in: Regenerate.
9072 2008-07-28 Doug Kwan <dougkwan@google.com>
9074 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9075 (linux_write_memory): Remove declaration of errno.
9077 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9079 * linux-low.c (handle_extended_wait): Do not use "status"
9080 variable uninitialized.
9082 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9084 * server.c (handle_v_attach): Inhibit reporting dll changes.
9086 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9088 * remote-utils.c (prepare_resume_reply): If requested, don't
9089 output "thread:TID" in the T stop reply.
9091 * server.c (disable_packet_vCont, disable_packet_Tthread)
9092 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9093 (handle_query): If requested, disable support for qC, qfThreadInfo
9095 (handle_v_requests): If requested, disable support for vCont.
9096 (gdbserver_show_disableable): New.
9097 (main): Handle --disable-packet and --disable-packet=LIST.
9099 * server.h (disable_packet_vCont, disable_packet_Tthread)
9100 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9102 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9104 * server.c (gdbserver_usage): Mention --version.
9106 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9108 * Makefile.in (gdbreplay.o): New rule.
9110 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9112 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9113 message, not gdbserver.
9115 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9116 Nathan Sidwell <nathan@codesourcery.com>
9117 Joseph Myers <joseph@codesourcery.com>
9119 * acinclude.m4: Include ../../config/acx.m4.
9120 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9121 * configure, config.in: Regenerate.
9122 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9123 * server.c (gdbserver_version): Print PKGVERSION.
9124 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9125 (main): Adjust gdbserver_usage calls.
9126 * gdbreplay.c (version, host_name): Add declarations.
9127 (gdbreplay_version, gdbreplay_usage): New.
9128 (main): Accept --version and --help options.
9130 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9132 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9133 (arm_breakpoint_at): Handle Thumb.
9134 (the_low_target): Add comment.
9136 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9138 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9140 2008-05-09 Doug Evans <dje@google.com>
9142 * server.h (decode_search_memory_packet): Declare.
9143 * remote-utils.c (decode_search_memory_packet): New fn.
9144 * server.c (handle_search_memory_1): New fn.
9145 (handle_search_memory): New fn.
9146 (handle_query): Process qSearch:memory packets.
9148 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9150 * regcache.c (registers_length): Remove.
9151 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9152 full register packet.
9153 * regcache.h (registers_length): Remove prototype.
9154 * server.h (PBUFSIZ): Define to 16384.
9156 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9158 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9159 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9160 powerpc-64l.o, and powerpc-altivec64l.o.
9161 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9162 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9163 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9164 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9165 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9168 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9169 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9170 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9171 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9172 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9173 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9174 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9175 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9176 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9177 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9180 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9181 (init_registers_powerpc_32l): ... this new prototype.
9182 (init_registers_powerpc_32): Remove, replace by ...
9183 (init_registers_powerpc_altivec32l): ... this new prototype.
9184 (init_registers_powerpc_e500): Remove, replace by ...
9185 (init_registers_powerpc_e500l): ... this new prototype.
9186 (init_registers_ppc64): Remove, replace by ...
9187 (init_registers_powerpc_64l): ... this new prototype.
9188 (init_registers_powerpc_64): Remove, replace by ...
9189 (init_registers_powerpc_altivec64l): ... this new prototype.
9190 (ppc_num_regs): Set to 73.
9191 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9192 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9193 (ppc_cannot_store_register): Handle orig_r3 and trap.
9194 (ppc_arch_setup): Update init_registers_... calls.
9195 (ppc_fill_gregset): Handle orig_r3 and trap.
9197 * inferiors.c (clear_inferiors): Reset current_inferior.
9199 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9201 * acinclude.m4: Add override.m4.
9202 * configure: Regenerate.
9204 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9206 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9207 initial call to init_register_ppc64.
9209 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9211 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9212 single powerpc*-*-linux* case.
9213 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9215 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9217 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9218 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9220 * linux-ppc-low.c: Include <elf.h>.
9221 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9222 (ppc_hwcap): New global variable.
9223 (ppc_regmap): Remove __SPE__ #ifdef sections.
9224 (ppc_regmap_e500): New global variable.
9225 (ppc_cannot_store_register): Update __SPE__ special case.
9226 (ppc_get_hwcap): New function.
9227 (ppc_arch_setup): Use it to determine whether inferior supports
9228 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9229 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9230 Do not access registers if target does not support AltiVec.
9231 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9232 Do not access registers if target does not support SPE.
9233 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9235 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9237 * linux-low.c (disabled_regsets, num_regsets): New.
9238 (use_regsets_p): Delete.
9239 (linux_wait_for_process): Clear disabled_regsets.
9240 (regsets_fetch_inferior_registers): Check and set it.
9241 (regsets_store_inferior_registers): Likewise.
9242 (linux_fetch_registers, linux_store_registers): Do not use
9244 (initialize_low): Allocate disabled_regsets.
9246 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9248 * Makefile.in (LIBOBJS): New.
9250 (memmem.o): New rule.
9251 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9252 * configure: Regenerated.
9254 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9256 * server.c (handle_query): Never return "unsupported" for
9257 qXfer:features:read queries.
9259 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9261 * server.c (get_features_xml): Fix inverted condition.
9262 (handle_query): Always support qXfer:feature:read.
9264 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9266 * server.c (wrapper_argv): New.
9267 (start_inferior): Handle wrapper_argv. If set, expect an extra
9269 (gdbserver_usage): Document --wrapper.
9270 (main): Parse --wrapper.
9272 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9274 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9275 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9276 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9277 (ppc_set_pc): Likewise.
9278 (ppc_arch_setup): New function.
9279 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9280 of collect_register.
9281 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9283 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9285 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9286 instead of linux-ppc64-low.o.
9287 * linux-ppc64-low.c: Remove file.
9288 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9289 (linux-ppc64-low.o): Remove rule.
9291 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9292 (init_registers_powerpc_64): Likewise.
9293 (ppc_regmap): Conditionally define depending on __powerpc64__.
9294 (ppc_cannot_store_register): Do not special-case "fpscr" when
9295 compiled on __powerpc64__.
9296 (ppc_collect_ptrace_register): New function.
9297 (ppc_supply_ptrace_register): New function.
9298 (ppc_breakpoint): Change type to "unsigned int".
9299 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9300 (the_low_target): Conditionally provide initializers for the
9301 arch_setup member depending on __powerpc64__. Install
9302 collect_ptrace_register and supply_ptrace_register members.
9304 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9306 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9307 * server.c (gdbserver_xmltarget): Define.
9308 (get_features_xml): Use it to replace "target.xml" and arch_string.
9310 * configure.srv: Remove srv_xmltarget. Add XML files that were
9311 mentioned there to srv_xmlfiles instead. Remove conditional tests
9312 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9313 srv_xmlfiles and srv_regobj to include all possible choices.
9314 * configure.ac (srv_xmltarget): Remove.
9315 (srv_xmlfiles): Do not add "target.xml".
9316 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9317 checks for supplementary target information.
9318 * configure: Regenerate.
9319 * Makefile.in (XML_TARGET): Remove.
9320 (target.xml): Remove rule.
9321 (clean): Do not clean up target.xml.
9322 (.PRECIOUS): Do not mention target.xml.
9324 * target.h (struct target_ops): Remove arch_string member.
9325 * linux-low.c (linux_arch_string): Remove.
9326 (linux_target_ops): Remove arch_string initializer.
9327 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9328 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9329 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9330 * spu-low.c (spu_arch_string): Remove.
9331 (spu_target_ops): Remove arch_string initializer.
9332 * win32-low.c (win32_arch_string): Remove.
9333 (win32_target_ops): Remove arch_string initializer.
9334 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9335 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9336 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9338 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9340 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9341 by collect_ptrace_register and supply_ptrace_register hooks.
9342 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9343 instead of checking for the_low_target.left_pad_xfer.
9344 (usr_store_inferior_registers): Use collect_ptrace_register callback
9345 instead of checking for the_low_target.left_pad_xfer.
9347 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9348 (s390_supply_ptrace_register): Likewise.
9349 (s390_fill_gregset): Call s390_collect_ptrace_register.
9350 (the_low_target): Update.
9352 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9353 (ppc_supply_ptrace_register): Likewise.
9354 (the_low_target): Update.
9356 * linux-i386-low.c (the_low_target): Update.
9357 * linux-x86-64-low.c (the_low_target): Update.
9359 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9361 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9362 reg-s390.o and reg-s390x.o.
9364 * linux-low.c (new_inferior): New global variable.
9365 (linux_create_inferior, linux_attach): Set it.
9366 (linux_wait_for_process): Call the_low_target.arch_setup after the
9367 target has stopped for the first time.
9368 (initialize_low): Do not call the_low_target.arch_setup.
9370 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9371 (s390_set_pc): Likewise.
9372 (s390_arch_setup): New function.
9373 (the_low_target): Use s390_arch_setup as arch_setup routine.
9375 * regcache.c (realloc_register_cache): New function.
9376 (set_register_cache): Call it for each existing regcache.
9378 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9380 * server.h (init_registers): Remove prototype.
9382 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9383 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9384 instead of init_registers ().
9385 * linux-arm-low.c (init_registers_arm): Add prototype.
9386 (init_registers_arm_with_iwmmxt): Likewise.
9387 (the_low_target): Add initializer for arch_setup field.
9388 * linux-cris-low.c (init_registers_cris): Add prototype.
9389 (the_low_target): Add initializer for arch_setup field.
9390 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9391 (the_low_target): Add initializer for arch_setup field.
9392 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9393 (the_low_target): Add initializer for arch_setup field.
9394 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9395 (the_low_target): Add initializer for arch_setup field.
9396 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9397 (the_low_target): Add initializer for arch_setup field.
9398 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9399 (the_low_target): Add initializer for arch_setup field.
9400 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9401 (init_registers_mips64_linux): Likewise.
9402 (the_low_target): Add initializer for arch_setup field.
9403 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9404 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9405 (the_low_target): Add initializer for arch_setup field.
9406 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9407 (init_registers_powerpc_64): Likewise.
9408 (the_low_target): Add initializer for arch_setup field.
9409 * linux-s390-low.c (init_registers_s390): Add prototype.
9410 (init_registers_s390x): Likewise.
9411 (the_low_target): Add initializer for arch_setup field.
9412 * linux-sh-low.c (init_registers_sh): Add prototype.
9413 (the_low_target): Add initializer for arch_setup field.
9414 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9415 (the_low_target): Add initializer for arch_setup field.
9416 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9417 (the_low_target): Add initializer for arch_setup field.
9419 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9420 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9421 instead of init_registers ().
9422 * win32-arm-low.c (init_registers_arm): Add prototype.
9423 (the_low_target): Add initializer for arch_setup field.
9424 * win32-i386-low.c (init_registers_i386): Add prototype.
9425 (the_low_target): Add initializer for arch_setup field.
9427 * spu-low.c (init_registers_spu): Add prototype.
9428 (initialize_low): Call initialie_registers_spu () instead of
9429 initialize_registers ().
9431 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9433 * server.c (handle_v_requests): When handling the vRun and vAttach
9434 packets, if already debugging a process, don't kill it. Return an
9437 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9439 * server.c (handle_query): Correct length check.
9441 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9443 * win32-low.c (do_initial_child_stuff): Add process handle
9444 parameter. Set current_process_handle and current_process_id from the
9445 parameters. Clear globals.
9446 (win32_create_inferior): Don't set current_process_handle and
9447 current_process_id here. Instead pass them on the call to
9448 do_initial_child_stuff.
9449 (win32_attach): Likewise.
9450 (win32_clear_inferiors): New.
9451 (win32_kill): Don't close the current process handle or the
9452 current thread handle here. Instead call win32_clear_inferiors.
9453 (win32_detach): Don't open a new handle to the process. Call
9454 win32_clear_inferiors.
9455 (win32_join): Don't rely on current_process_handle; open a new
9456 handle using the process id.
9457 (win32_wait): Call win32_clear_inferiors when the inferior process
9460 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9462 * server.c (monitor_show_help): Add "exit".
9464 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9466 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9467 (clean): Add reg-xtensa.c.
9468 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9469 * configure.srv (xtensa*-*-linux*) New target.
9470 * linux-xtensa-low.c: New.
9471 * xtensa-xtregs.c: New.
9473 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9475 * hostio.c: Don't include errno.h.
9476 (errno_to_fileio_errno): Move to hostio-errno.
9477 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9478 error number outputting to the target->hostio_last_error callback.
9479 (hostio_packet_error): Use FILEIO_EINVAL directly.
9480 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9481 calls to hostio_error.
9482 * hostio-errno.c: New.
9483 * server.h (hostio_last_error_from_errno): Declare.
9484 * target.h (target_ops): Add hostio_last_error member.
9485 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9486 as hostio_last_error handler.
9487 * spu-low.c (spu_target_ops): Likewise.
9488 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9489 (wince_hostio_last_error): New functions.
9490 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9491 as hostio_last_error handler.
9492 (win32_target_ops) [!_WIN32_WCE]: Register
9493 hostio_last_error_from_errno as hostio_last_error handler.
9494 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9495 (hostio-errno.o): New rule.
9496 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9497 * configure.srv (srv_hostio_err_objs): New variable. Default to
9499 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9500 * configure: Regenerate.
9502 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9504 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9505 (linux_kill, linux_detach): Clean up the process list.
9506 * remote-utils.c (remote_open): Improve port number parsing.
9507 (putpkt_binary, input_interrupt): Only send interrupts if the target
9509 * server.c (extended_protocol): Make static.
9510 (attached): Define earlier.
9511 (exit_requested, response_needed, program_argv): New variables.
9512 (target_running): New.
9513 (start_inferior): Clear attached here.
9514 (attach_inferior): Set attached here.
9515 (require_running): Define.
9516 (handle_query): Use require_running and target_running. Implement
9518 (handle_v_attach, handle_v_run): New.
9519 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9520 (gdbserver_usage): Update.
9521 (main): Redo argument parsing. Handle --debug and --multi. Handle
9522 --attach along with other options or after the port. Save
9523 program_argv. Support no initial program. Resynchronize
9524 communication with GDB after an error. Handle "monitor exit".
9525 Use require_running and target_running. Always allow the extended
9526 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9527 restart in extended mode.
9528 * README: Refer to the GDB manual. Update --attach usage.
9530 2007-12-20 Andreas Schwab <schwab@suse.de>
9532 * linux-low.c (STACK_SIZE): Define.
9533 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9534 (linux_test_for_tracefork): Likewise.
9536 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9538 * linux-low.c (linux_wait_for_event): Update messages. Do not
9539 reinsert auto-delete breakpoints.
9540 * mem-break.c (struct breakpoint): Change return type of handler to
9542 (set_breakpoint_at): Update handler type.
9543 (reinsert_breakpoint_handler): Return 1 instead of calling
9545 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9547 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9548 * mem-break.h (set_breakpoint_at): Update handler type.
9549 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9550 * win32-low.c (auto_delete_breakpoint): New.
9551 (get_child_debug_event): Use it.
9553 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9555 * configure.ac: Check for pread and pwrite.
9556 * hostio.c (handle_pread): Fall back to lseek and read.
9557 (handle_pwrite): Fall back to lseek and write.
9558 * config.in, configure: Regenerated.
9560 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9562 * server.c (myresume): Add own_buf argument.
9563 (main): Update calls.
9565 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9567 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9568 * remote-utils.c (remote_open): Do not call disable_async_io.
9569 (block_async_io): Delete.
9570 (unblock_async_io): Make static.
9571 (initialize_async_io): New.
9572 * server.c (handle_v_cont): Handle async I/O here.
9573 (myresume): Likewise. Move other common resume tasks here...
9574 (main): ... from here. Call initialize_async_io. Disable async
9575 I/O before the main loop.
9576 * server.h (initialize_async_io): Declare.
9577 (block_async_io, unblock_async_io): Delete prototypes.
9578 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9580 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9582 * remote-utils.c (readchar): Allow binary data in received messages.
9584 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9586 * win32-low.c (attaching): New global.
9587 (win32_create_inferior): Clear the `attaching' global.
9588 (win32_attach): Set the `attaching' global.
9589 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9590 attaching. Only set a breakpoint at the entry point if not
9593 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9595 * server.c (main): Don't report dll events on the initial
9596 connection on attaches.
9598 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9600 * server.c (main): Relax numerical bases supported for the pid of
9601 the --attach command line argument.
9603 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9605 * win32-low.c (win32_attach): Call OpenProcess before
9606 DebugActiveProcess, not after. Add last error output to error
9609 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9611 * win32-low.c (win32_get_thread_context)
9612 (win32_set_thread_context): New functions.
9613 (thread_rec): Use win32_get_thread_context.
9614 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9615 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9618 2007-12-03 Leo Zayas
9619 Pedro Alves <pedro_alves@portugalmail.pt>
9621 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9623 (child_add_thread): Minor cleanup.
9624 (child_continue): Resume artificially suspended threads before
9625 calling ContinueDebugEvent.
9626 (suspend_one_thread): New.
9627 (fake_breakpoint_event): New.
9628 (get_child_debug_event): Change return type to int. Check here if
9629 gdb sent an interrupt request. If a soft interrupt was requested,
9630 fake a breakpoint event. Return 0 if there is no event to handle,
9632 (win32_wait): Don't check here if gdb sent an interrupt request.
9633 Ensure there is a valid event to handle.
9634 (win32_request_interrupt): Add soft interruption method as last
9637 2007-12-03 Leo Zayas
9638 Pedro Alves <pedro_alves@portugalmail.pt>
9640 * win32-low.h (win32_thread_info): Add descriptions to the
9641 structure members. Replace `suspend_count' counter by a
9643 * win32-low.c (thread_rec): Update condition of when to get the
9644 context from the inferior. Rely on ContextFlags being set if it
9645 has already been retrieved. Only suspend the inferior thread if
9646 we haven't already. Warn if that fails.
9647 (continue_one_thread): s/suspend_count/suspended/. Only call
9648 ResumeThread once. Warn if that fails.
9650 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9652 * win32-low.c (win32_wait): Don't read from the inferior when it
9655 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9657 * Makefile.in (win32_low_h): New variable.
9658 (win32-low.o): Add dependency on $(win32_low_h).
9659 (win32-arm-low.o, win32-i386-low.o): New rules.
9661 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9663 * hostio.c: Correct copyright year.
9665 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9667 * Makefile.in (OBS): Add hostio.o.
9668 (hostio.o): New rule.
9669 * server.h (handle_vFile): Declare.
9670 * hostio.c: New file.
9671 * server.c (handle_v_requests): Take packet_len and new_packet_len
9672 for binary packets. Call handle_vFile.
9673 (main): Update call to handle_v_requests.
9675 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9677 * linux-low.c: Include <sched.h>.
9679 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9681 * linux-low.c (linux_tracefork_grandchild): New.
9682 (linux_tracefork_child): Use clone.
9683 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9685 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9687 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9689 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9691 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9693 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9695 * inferiors.c (change_inferior_id): Delete.
9696 (add_pid_to_list, pull_pid_from_list): New.
9697 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9698 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9699 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9700 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9701 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9702 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9703 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9704 (using_threads): Always set to 1.
9705 (handle_extended_wait): New.
9706 (add_process): Do not set TID.
9707 (linux_create_inferior): Set must_set_ptrace_flags.
9708 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9709 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9710 (linux_thread_alive): Rename TID argument to LWPID.
9711 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9712 (linux_wait_for_event): Do not use TID or check using_threads. Update
9713 call to dead_thread_notify. Call handle_extended_wait.
9714 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9715 (send_sigstop): Delete sigstop_sent.
9716 (wait_for_sigstop): Avoid TID.
9717 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9718 (linux_test_for_tracefork): New.
9719 (linux_lookup_signals): Use thread_db_active and
9720 linux_supports_tracefork_flag.
9721 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9722 * linux-low.h (get_process_thread): Avoid TID.
9723 (struct process_ifo): Move thread_known and tid to the end. Remove
9725 (linux_attach_lwp, thread_db_init): Update prototypes.
9726 * server.h (change_inferior_id): Delete prototype.
9727 (add_pid_to_list, pull_pid_from_list): New prototypes.
9728 * thread-db.c (thread_db_use_events): New.
9729 (find_first_thread): Rename to...
9730 (find_one_thread): ...this. Update callers and messages. Do not
9731 call fatal. Check thread_db_use_events. Do not call
9732 change_inferior_id or new_thread_notify.
9733 (maybe_attach_thread): Update. Do not call new_thread_notify.
9734 (thread_db_init): Set thread_db_use_events. Check use_events.
9735 * utils.c (fatal, warning): Correct message prefix.
9737 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9739 * Makefile.in (clean): Remove new files.
9740 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9741 (powerpc-64.o, powerpc-64.c): New rules.
9742 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9743 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9745 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9747 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9748 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9749 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9750 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9751 (target_regsets): Add AltiVec and SPE register sets.
9752 * configure.ac: Check for AltiVec and SPE.
9753 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9754 (ppc_fill_vrregset, ppc_store_vrregset): New.
9755 (target_regsets): Add AltiVec register set.
9756 * configure: Regenerated.
9758 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9760 * linux-low.c (O_LARGEFILE): Define.
9761 (linux_read_memory): Use /proc/PID/mem.
9762 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9763 * configure, config.in: Regenerated.
9765 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9767 * linux-low.c (linux_wait_for_event): Do not pass signals while
9770 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9772 * win32-low.c (create_process): New.
9773 (win32_create_inferior): Use create_process instead of
9774 CreateProcess. If create_process failed retry appending an ".exe"
9775 suffix. Store the GetLastError result immediatelly after
9776 create_process calls and use it on the call to error.
9778 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9780 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9782 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9784 * configure.ac: Switch license to GPLv3.
9786 2007-08-01 Michael Snyder <msnyder@access-company.com>
9788 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9790 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9792 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9794 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9795 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9796 CloseToolhelp32Snapshot.
9797 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9798 CloseToolhelp32Snapshot.
9800 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9802 * server.c (main): Check for inferior exit before main loop.
9804 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9806 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9807 instead of on tmp_desc.
9809 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9810 Daniel Jacobowitz <dan@codesourcery.com>
9812 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9813 (add_thread): Minor cleanups.
9814 (clear_inferiors): Move lower in the file. Clear the DLL
9816 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9817 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9818 (xml_escape_text): New.
9819 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9821 (handle_v_cont): Report errors.
9822 (gdbserver_version): Update.
9823 (main): Correct size of own_buf. Do not report initial DLL events.
9824 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9825 (unloaded_dll, xml_escape_text): New.
9826 * win32-low.c (enum target_waitkind): Update comments.
9827 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9828 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9829 (win32_EnumProcessModules, win32_GetModuleInformation)
9830 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9831 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9832 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9833 (win32_Module32First, win32_Module32Next, load_toolhelp)
9834 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9835 (get_child_debug_event): Handle DLL events.
9836 (win32_wait): Likewise.
9838 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9840 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9841 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9843 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9845 * win32-low.c (handle_output_debug_string): Ignore event if not
9848 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9850 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9852 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9854 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9856 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9858 * inferiors.c (change_inferior_id): Add comment.
9859 * linux-low.c (check_removed_breakpoint): Add an early
9860 prototype. Improve debug output.
9861 (linux_attach): Doc update.
9862 (linux_detach_one_process, linux_detach): Clean up before releasing
9864 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9865 * linux-low.h (struct process_info): Doc improvement.
9866 * mem-break.c (delete_all_breakpoints): New.
9867 * mem-break.h (delete_all_breakpoints): New prototype.
9868 * thread-db.c (find_first_thread): New.
9869 (thread_db_create_event): Call it instead of
9870 thread_db_find_new_threads. Clean up unused variables.
9871 (maybe_attach_thread): Remove first thread handling.
9872 (thread_db_find_new_threads): Use find_first_thread.
9873 (thread_db_get_tls_address): Likewise.
9875 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9877 * thread-db.c (thread_db_find_new_threads): Add prototype.
9878 (thread_db_create_event): Check for the main thread before adding
9880 (maybe_attach_thread): Only enable event reporting if TID == 0.
9881 (thread_db_get_tls_address): Check for new threads.
9883 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9885 * linux-low.c (linux_create_inferior): Try execv before execvp.
9886 * spu-low.c (spu_create_inferior): Likewise.
9888 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9890 * linux-low.c (linux_create_inferior): Change execv to execvp.
9891 * spu-low.c (spu_create_inferior): Likewies.
9893 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9895 * Makefile.in (clean): Clean new files instead of deleted ones.
9896 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9897 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9899 * configure.srv: Specify XML files and new regformats for MIPS and
9901 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9902 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9903 an entry for the restart register.
9904 (mips_cannot_fetch_register, mips_cannot_store_register)
9905 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9906 register names to match the XML descriptions.
9907 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9908 restart register instead of $0.
9910 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9911 Markus Deuling <deuling@de.ibm.com>
9913 * remote-utils.c (decode_xfer_write): New function.
9914 * server.h (decode_xfer_write): Add prototype.
9915 * server.c (handle_query): Add PACKET_LEN argument. Support
9916 qXfer:spu:read and qXfer:spu:write packets.
9917 (main): Pass packet_len to handle_query.
9918 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9919 * target.h (target_ops): Add qxfer_spu.
9921 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9923 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9924 accessing non-seekable spufs files.
9926 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9928 * server.c (handle_query): Add reply for qC packet.
9930 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9931 Leo Zayas <lerele@champenstudios@com>
9933 * server.h (check_remote_input_interrupt_request): New function.
9934 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9935 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9936 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9937 (check_remote_input_interrupt_request): New function.
9938 * server.h (check_remote_input_interrupt_request): Declare.
9939 * win32-low.c (winapi_DebugBreakProcess,
9940 winapi_GenerateConsoleCtrlEvent): New typedefs.
9941 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9943 (win32_wait): Check for remote interrupt request
9944 with check_remote_input_interrupt_request.
9945 (win32_request_interrupt): New function.
9946 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9948 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9950 * win32-low.c (debug_registers_changed,
9951 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9952 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9953 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9954 (thread_rec): Get context using the low target.
9955 (child_add_thread): Call thread_added on the low target,
9956 which does the same thing.
9958 (do_initial_child_stuff): Remove debug registers references.
9959 Set context using the low target. Resume threads after
9960 setting the contexts.
9961 (child_continue): Remove dead variable. Remove debug
9962 registers references.
9963 (child_fetch_inferior_registers): Go through the low target.
9964 (do_child_store_inferior_registers): Remove.
9965 (child_store_inferior_registers): Go through the low target.
9966 (win32_resume): Remove debug registers references.
9967 Set context using the low target.
9968 (handle_exception): Change return type to void. Don't record
9969 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9970 first chance exception.
9971 (get_child_debug_event): Change return type to void. Remove
9972 goto loop. Always return after waiting for debug event.
9973 (win32_wait): Convert to switch statement. Handle spurious
9976 * win32-i386-low.c (debug_registers_changed,
9977 debug_registers_used): New.
9978 (initial_stuff): Rename to ...
9979 (i386_initial_stuff): ... this. Clear debug registers
9981 (store_debug_registers): Delete.
9982 (i386_get_thread_context): New.
9983 (load_debug_registers): Delete.
9984 (i386_set_thread_context): New.
9985 (i386_thread_added): New.
9986 (single_step): Rename to ...
9987 (i386_single_step): ... this.
9988 (do_fetch_inferior_registers): Rename to ...
9989 (i386_fetch_inferior_register): ... this.
9990 (i386_store_inferior_register): New.
9991 (the_low_target): Adapt to new interface.
9993 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9994 (arm_get_thread_context): New.
9995 (arm_set_thread_context): New.
9997 (do_fetch_inferior_registers): Rename to ...
9998 (arm_fetch_inferior_register): ... this.
9999 (arm_store_inferior_register): New.
10000 (arm_wince_breakpoint): Reimplement as unsigned long.
10001 (arm_wince_breakpoint_len): Define.
10002 (the_low_target): Adapt to new interface.
10004 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10005 load_debug_registers. Add get_thread_context, set_thread_context,
10006 thread_added and store_inferior_register. Rename
10007 fetch_inferior_registers to fetch_inferior_register.
10008 (regptr): Remove declaration.
10010 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10012 * linux-low.c (linux_detach): Change return type to int. Return 0.
10013 * spu-low.c (spu_detach): Likewise.
10015 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10017 * target.h (target_ops): Change return type of detach to int.
10019 (join_inferior): New.
10020 * server.c (main): Don't skip detach support on mingw32.
10021 If the inferior doesn't support detaching return error.
10022 Call join_inferior instead of using waitpid.
10023 * linux-low.c (linux_join): New.
10024 (linux_target_op): Add linux_join.
10025 * spu-low.c (spu_join): New.
10026 (spu_target_ops): Add spu_join.
10027 * win32-low.c (win32_detach): Adapt to new interface.
10028 Reopen current_process_handle before detaching. Issue a child
10029 resume before detaching.
10031 (win32_target_op): Add win32_join.
10033 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10035 * win32-low.c (win32-attach): Fix return value.
10036 * target.h (target_ops): Describe ATTACH return values.
10038 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10040 * win32-low.c (GETPROCADDRESS): Define.
10041 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10042 (winapi_DebugSetProcessKillOnExit): Likewise.
10043 (win32_create_inferior): Force usage of ansi CreateProcessA.
10044 (win32_attach): Use GETPROCADDRESS.
10045 (win32_detach): Likewise.
10047 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10049 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10051 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10053 * win32-low.c: Commit leftover changes from 2007-03-29.
10055 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10057 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10058 fields short instead of int. Add explicit padding.
10059 (i387_cache_to_fsave): Remove unnecessary casts.
10060 (i387_fsave_to_cache): Doc fix.
10061 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10063 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10065 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10066 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10068 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10070 * configure.srv (arm*-*-mingw32ce*): Move near the other
10073 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10075 * configure.ac: Add errno checking.
10076 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10077 sys/file.h and malloc.h.
10078 (AC_CHECK_DECLS): Add perror.
10079 (srv_mingwce): Handle.
10080 * configure.srv (i[34567]86-*-cygwin*): Add
10081 win32-i386-low.o to srv_tgtobj.
10082 (i[34567]86-*-mingw*): Likewise.
10083 (arm*-*-mingw32ce*): Add case.
10084 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10085 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10086 [__MINGW32CE__] (strerror): New function.
10087 [__MINGW32CE__] (errno): Define to GetLastError.
10088 [__MINGW32CE__] (COUNTOF): New macro.
10089 (remote_open): Remove extra close call.
10090 * mem-break.c (delete_breakpoint_at): New function.
10091 * mem-break.h (delete_breakpoint_at): Declare.
10092 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10093 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10094 [USE_WIN32API] (read, write): Add char* casts.
10095 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10096 * server.h: Include wincecompat.h on Windows CE.
10097 [HAVE_ERRNO_H]: Check.
10098 (perror): Declare if not declared.
10099 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10100 (perror_with_name): Remove errno declaration.
10101 * wincecompat.h: New.
10102 * wincecompat.c: New.
10103 * win32-low.h: New.
10104 * win32-arm-low.c: New.
10105 * win32-i386-low.c: New.
10106 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10107 (OUTMSG2): Make it safe.
10109 (COUNTOF): New macro.
10110 (NUM_REGS): Get it from the low target.
10111 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10112 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10113 (thread_rec): Let low target handle debug registers.
10114 (child_add_thread): Likewise.
10115 (child_init_thread_list): Likewise.
10116 (continue_one_thread): Likewise.
10118 (do_child_fetch_inferior_registers): Move to ...
10119 * win32-i386-low.c: ... here, and rename to ...
10120 (do_fetch_inferior_registers): ... this.
10121 * win32-low.c (child_fetch_inferior_registers):
10122 Go through the low target.
10123 (do_child_store_inferior_registers): Use regptr.
10124 (strwinerror): New function.
10125 (win32_create_inferior): Handle Windows CE.
10126 Use strwinerror instead of strerror on Windows error
10127 codes. Add program to the error output.
10128 Don't close the main thread handle on Windows CE.
10129 (win32_attach): Use coredll.dll on Windows CE.
10130 (win32_kill): Close current process and current
10132 (win32_detach): Use coredll.dll on Windows CE.
10133 (win32_resume): Let low target handle debug registers, and
10135 (handle_exception): Add/Remove initial breakpoint. Avoid
10136 non-existant WSTOPSIG on Windows CE.
10137 (win32_read_inferior_memory): Cast to remove warning.
10138 (win32_arch_string): Go through the low target.
10139 (initialize_low): Call set_breakpoint_data with the low
10140 target's breakpoint.
10141 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10142 FOP_REGNUM, mappings): Move to ...
10143 * win32-i386-low.c: ... here.
10144 * win32-low.c (win32_thread_info): Move to ...
10145 * win32-low.h: ... here.
10146 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10147 win32-arm-low.c and wincecompat.c.
10148 (all:): Add $EXEEXT.
10149 (install-only:): Likewise.
10150 (gdbserver:): Likewise.
10151 (gdbreplay:): Likewise.
10152 * config.in: Regenerate.
10153 * configure: Regenerate.
10155 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10157 * win32-low.c: Rename typedef thread_info to
10158 win32_thread_info throughout.
10160 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10162 * win32-i386-low.c: Rename to ...
10163 * win32-low.c: ... this.
10164 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10165 * Makefile.in: Likewise.
10167 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10169 * remote-utils.c (monitor_output): Constify msg parameter.
10170 * server.h (monitor_output): Likewise.
10171 * win32-i386-low.c (handle_output_debug_string): New.
10172 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10173 handle_output_debug_string.
10174 (get_child_debug_event): Likewise.
10176 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10178 * server.c (main): Correct strtoul check.
10180 2007-03-27 Jon Ringle <jon@ringle.org>
10182 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10184 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10186 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10188 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10190 * terminal.h: Check HAVE_SGTTY_H.
10192 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10194 * remote-utils.c (remote_open): Print out the assigned port number.
10196 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10198 * remote-utils.c (monitor_output): New function.
10199 * server.c (debug_threads): Define here.
10200 (monitor_show_help): New function.
10201 (handle_query): Handle qRcmd.
10202 (main): Do not handle 'd' packet.
10203 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10204 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10207 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10209 * Makefile.in (EXEEXT): New.
10210 (clean): Use $(EXEEXT).
10212 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10214 * target.h (target_ops): Rename send_signal to request_interrupt,
10215 and remove enum target_signal parameter.
10216 * linux-low.c (linux_request_interrupt): Rename from
10217 linux_send_signal, and always send SIGINT.
10218 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10219 and always send SIGINT.
10220 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10222 (input_interrupt): Likewise.
10224 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10226 * server.c (get_features_xml): Check if target implemented
10228 * win32-i386-low.c (win32_arch_string): New.
10229 (win32_target_ops): Add win32_arch_string as arch_string member.
10231 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10233 * spu-low.c (spu_arch_string): New.
10234 (spu_target_ops): Add spu_arch_string.
10236 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10238 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10239 * configure.ac: Do not check for terminal.h.
10240 * configure, config.in: Regenerated.
10242 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10244 * Makefile.in (OBS): Add $(XML_BUILTIN).
10245 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10247 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10248 (arm-with-iwmmxt.c): New.
10249 * config.in, configure: Regenerate.
10250 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10251 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10252 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10253 (arm*-*-linux*): Add iWMMXt and regset support.
10254 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10255 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10256 (arm_store_wmmxregset, target_regsets): New.
10257 * server.c (get_features_xml): Take annex argument. Check builtin
10259 (handle_query): Handle multiple annexes.
10261 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10263 * remote-utils.c [USE_WIN32API] (read, write): Define.
10264 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10267 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10269 * linux-i386-low.c (the_low_target): Set arch_string.
10270 * linux-x86-64-low.c (the_low_target): Likewise.
10271 * linux-low.c (linux_arch_string): New.
10272 (linux_target_ops): Add it.
10273 * linux-low.h (struct linux_target_ops): Add arch_string.
10274 * server.c (write_qxfer_response): Use const void * for DATA.
10275 (get_features_xml): New.
10276 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10277 * target.h (struct target_ops): Add arch_string method.
10279 2007-01-03 Denis Pilat <denis.pilat@st.com>
10280 Daniel Jacobowitz <dan@codesourcery.com>
10282 * linux-low.c (linux_kill): Handle being called with no threads.
10283 * win32-i386-low.c (win32_kill): Likewise.
10284 (get_child_debug_event): Clear current_process_handle.
10286 2006-12-30 Denis PILAT <denis.pilat@st.com>
10287 Daniel Jacobowitz <dan@codesourcery.com>
10289 * remote-utils.c (remote_open): Check the type of specified
10290 serial port devices before opening them.
10291 * server.c (main): Kill the inferior if an error occurs during
10292 the first remote_open.
10294 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10296 * README: Update supported targets.
10298 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10300 * Makefile.in (clean): Remove reg-mips64.c.
10301 (reg-mips64.c, reg-mips64.o): New rules.
10302 * configure.srv: Handle mips64. Include regset support for mips.
10303 * linux-mips-low.c (union mips_register): New.
10304 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10305 (mips_breakpoint, mips_breakpoint_at): Use int.
10306 (mips_collect_register, mips_supply_register)
10307 (mips_collect_register_32bit, mips_supply_register_32bit)
10308 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10309 (mips_store_fpregset, target_regsets): New.
10310 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10312 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10314 * configure.srv: Add target "spu*-*-*".
10315 * Makefile.in (clean): Remove reg-spu.c.
10316 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10317 * spu-low.c: New file.
10319 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10321 * configure.ac: Correct td_thr_tls_get_addr test.
10322 * configure: Regenerated.
10324 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10326 * linux-low.c (linux_wait_for_event): Reformat. Use the
10327 pass_signals array.
10328 * remote-utils.c (decode_address_to_semicolon): New.
10329 * server.c (pass_signals, handle_general_set): New.
10330 (handle_query): Mention QPassSignals for qSupported.
10331 (main): Call handle_general_set.
10332 * server.h (pass_signals, decode_address_to_semicolon): New.
10334 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10336 * server.c (handle_query): Correct error handling for read_auxv.
10338 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10340 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10341 and srv_linux_thread_db to yes.
10342 * linux-s390-low.c (s390_fill_gregset): New function.
10343 (target_regsets): Define data structure.
10345 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10347 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10348 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10349 * config.in, configure: Regenerated.
10350 * inferiors.c (gdb_id_to_thread): New function.
10351 (gdb_id_to_thread_id): Use it.
10352 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10353 * linux-low.h (struct process_info): Add th member.
10354 (thread_db_get_tls_address): New prototype.
10355 * remote-utils.c (decode_address): Make non-static.
10356 * server.c (handle_query): Handle qGetTLSAddr.
10357 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10358 * target.h (struct target_ops): Add get_tls_address.
10359 * thread-db.c (maybe_attach_thread): Save the thread handle.
10360 (thread_db_get_tls_address): New.
10362 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10364 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10365 (linux_resume_one_process): Take a siginfo_t *. Update all
10366 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10367 (struct pending_signals): Add a siginfo_t.
10368 (linux_wait_for_process): Always set last_status.
10369 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10370 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10371 * linux-low.h (struct process_info): Add last_status.
10373 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10375 * remote-utils.c (try_rle): New function.
10376 (putpkt_binary): Use it.
10378 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10380 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10381 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10382 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10383 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10384 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10387 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10389 * server.c (terminal_fd): New variable.
10390 (old_foreground_pgrp): Likewise.
10391 (restore_old_foreground_pgrp): New function.
10392 (start_inferior): Record the terminal file descriptor in terminal_fd
10393 and its original foreground group in old_foreground_pgrp. Register
10394 restore_old_foreground_pgrp with atexit().
10396 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10398 * server.c (handle_query): Correct qPart to qXfer.
10400 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10402 * configure.ac: Check for more headers which are missing on
10403 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10404 * configure.srv: Add Cygwin and mingw32.
10405 * remote-utils.c: Don't include headers unconditionally which
10406 are missing on mingw32. Include <winsock.h> for mingw32.
10407 (remote_open): Adjust for mingw32 support. Flush
10408 standard error after writing to it.
10409 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10410 (unblock_async_io, enable_async_io, disable_async_io)
10411 (readchar, getpkt): Update for Winsock support.
10412 (prepare_resume_reply): Expect a protocol signal number.
10413 * server.c: Disable <sys/wait.h> on mingw32.
10414 (start_inferior): Adjust for mingw32 support. Flush
10415 standard error after writing to it.
10416 (attach_inferior): Likewise. Use protocol signal
10418 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10420 * win32-i386-low.c: New file.
10421 * Makefile.in (XM_CLIBS): Set.
10422 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10423 (win32-i386-low.o): New dependency rule.
10424 * linux-low.c (linux_wait): Use target signal numbers.
10425 * target.h (struct target_ops): Doc fix.
10426 * server.h (target_signal_to_name): New prototype.
10427 * gdbreplay.c: Don't include headers unconditionally which
10428 are missing on mingw32. Include <winsock.h> for mingw32.
10429 (remote_close, remote_open): Adjust for Winsock support.
10430 * configure, config.in: Regenerated.
10432 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10434 * server.c (decode_xfer_read, write_qxfer_response): New.
10435 (handle_query): Take a packet length argument. Handle
10436 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10437 the qSupported response.
10438 (main): Update call to handle_query.
10440 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10442 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10443 (putpkt_binary): Renamed from putpkt and adjusted for binary
10445 (putpkt): New wrapper for putpkt_binary.
10446 (readchar): Don't mask off the high bit.
10447 (decode_X_packet): New function.
10448 * server.c (main): Call putpkt_binary if a handler sets the packet
10449 length. Save the length of the incoming packet. Handle 'X'.
10450 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10452 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10454 * server.c (handle_query): Handle qSupported.
10456 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10458 * remote-utils.c (all_symbols_looked_up): New variable.
10459 (look_up_one_symbol): Check it.
10460 * server.h (look_up_one_symbol): New declaration.
10461 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10463 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10465 * Makefile.in (linux-arm-low.o): Update dependencies.
10466 * linux-arm-low.c: Include "gdb_proc_service.h".
10467 (PTRACE_GET_THREAD_AREA): Define.
10468 (ps_get_thread_area): New function.
10470 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10472 * configure.srv (m68k*-*-uclinux*): New target.
10473 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10474 (linux_resume_one_process): Remove extraneous cast.
10475 (linux_read_offsets): New.
10476 (linux_target_op): Add linux_read_offsets on mmuless systems.
10477 * server.c (handle_query): Add qOffsets logic.
10478 * target.h (struct target_ops): Add read_offsets.
10480 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10482 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10483 (PTRACE_GET_THREAD_AREA): Define.
10484 (ps_get_thread_area): New function.
10485 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10486 (linux-x86-64-low.o): Update.
10488 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10490 * configure.ac: Remove checks for prfpregset_t.
10491 * gdb_proc_service.h: New file.
10492 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10493 new "gdb_proc_service.h".
10494 * proc-service.c: Likewise.
10495 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10496 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10497 * Makefile.in (gdb_proc_service_h): Updated.
10498 * configure, config.in: Regenerated.
10500 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10502 * remote-utils.c (prepare_resume_reply): Move declaration
10503 of gdb_id_from_wait to the top of the block.
10505 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10507 * linux-low.c (regsets_store_inferior_registers): Read the regset
10508 from the target before filling it.
10510 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10512 * server.c (attach_inferior): Return SIGTRAP for a successful
10515 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10517 * Makefile.in (OBS): Add version.o.
10518 (STAGESTUFF): Delete.
10519 (version.o): Add dependencies.
10520 (version.c): Replace rule.
10521 (clean): Remove version.c.
10522 * server.c (gdbserver_version): New.
10523 (gdbserver_usage): Use printf.
10524 (main): Handle --version and --help.
10525 * server.h (version, host_name): Add declarations.
10527 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10539 * linux-x86-64-low.c:
10541 * linux-s390-low.c:
10542 * linux-ppc64-low.c:
10544 * linux-mips-low.c:
10545 * linux-m68k-low.c:
10546 * linux-m32r-low.c:
10549 * linux-ia64-low.c:
10550 * linux-i386-low.c:
10551 * linux-crisv32-low.c:
10563 * gdbserver.1: Add (C) after Copyright. Update the FSF
10566 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10568 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10569 (arm_breakpoint_at): Recognize both breakpoints.
10570 (the_low_target): Use the correct breakpoint instruction.
10572 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10574 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10575 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10576 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10577 (the_low_target): Update.
10579 2005-10-25 Andreas Schwab <schwab@suse.de>
10581 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10583 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10584 (ia64_num_regs): Reduce to 462.
10586 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10588 * acinclude.m4: Correct quoting.
10589 * aclocal.m4: Regenerated.
10591 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10592 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10593 (thread_db_init): Call thread_db_err_str.
10594 * configure.ac: Check for TD_VERSION.
10595 * config.in, configure: Regenerated.
10597 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10599 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10601 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10603 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10604 is not available. Define HAVE_PTRACE_GETREGS if it is.
10605 * config.in, configure: Regenerated.
10606 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10607 * linux-i386-low.c, linux-m68k-low.c: Update to use
10608 HAVE_PTRACE_GETREGS.
10609 * linux-low.c (regsets_fetch_inferior_registers)
10610 (regsets_store_inferior_registers): Only return 0 if we processed
10612 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10613 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10615 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10617 * inferiors.c (struct thread_info): Add gdb_id.
10618 (add_thread): Add gdb_id argument.
10619 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10620 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10621 calls to add_thread.
10622 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10623 * server.c (handle_query): Use thread_to_gdb_id.
10624 (handle_v_cont, main): Use gdb_id_to_thread_id.
10625 * server.h (add_thread): Update prototype.
10626 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10629 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10631 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10632 left-padded registers.
10633 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10634 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10636 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10638 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10639 * configure: Regenerate.
10640 * config.in: Regenerate.
10641 * server.h (NEED_DECLARATION_STRERROR):
10642 Replace with !HAVE_DECL_STRERROR.
10644 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10646 * linux-low.c (linux_wait, linux_send_signal): Don't test
10647 an unsigned long variable for > 0 if it could be MAX_ULONG.
10648 * server.c (myresume): Likewise.
10649 * target.c (set_desired_inferior): Likewise.
10651 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10653 * configure.ac: Simplify and improve check for socklen_t.
10654 * configure, config.in: Regenerate.
10656 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10658 * acconfig.h: Remove.
10659 * configure.ac: Add a test for socklen_t. Use three-argument
10660 AC_DEFINE throughout.
10661 * config.in: Regenerated using autoheader 2.59.
10662 * configure: Regenerated.
10664 * gdbreplay.c (socklen_t): Provide a default.
10665 (remote_open): Use socklen_t.
10666 * remote-utils.c (socklen_t): Provide a default.
10667 (remote_open): Use socklen_t.
10668 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10671 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10673 * linux-low.c (linux_read_memory, linux_write_memory)
10674 (linux_read_auxv): Likewise.
10675 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10676 (check_mem_write): Likewise.
10677 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10679 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10680 (registers_from_string, register_data): Likewise.
10681 * server.c (handle_query, main): Likewise.
10682 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10683 (decode_M_packet): Likewise.
10684 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10685 * target.h (struct target_ops): Update read_memory, write_memory,
10687 (read_inferior_memory, write_inferior_memory): Update.
10688 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10689 to unsigned char *.
10690 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10691 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10692 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10693 linux-s390-low.c, linux-sh-low.c: Update for changes in
10694 read_inferior_memory and the_low_target->breakpoint.
10696 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10698 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10699 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10700 * configure.srv: Add powerpc64-*-linux*.
10701 * linux-ppc64-low.c: New file.
10703 2005-05-23 Orjan Friberg <orjanf@axis.com>
10705 * linux-cris-low.c: New file with support for CRIS.
10706 * linux-crisv32-low.c: Ditto for CRISv32.
10707 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10708 (clean): Add reg-cris.c and reg-crisv32.c.
10709 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10710 reg-crisv32.o, and reg-crisv32.c to make rules.
10711 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10712 recognized targets.
10714 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10716 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10717 of sizeof (PTRACE_XFER_TYPE).
10718 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10720 2005-05-12 Orjan Friberg <orjanf@axis.com>
10722 * target.h (struct target_ops): Add insert_watchpoint,
10723 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10724 pointers for hardware watchpoint support.
10725 * linux-low.h (struct linux_target_ops): Ditto.
10726 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10727 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10728 to linux_target_ops.
10729 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10731 * server.c (main): Recognize 'Z' and 'z' packets.
10733 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10735 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10736 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10737 (the_low_target): Add new members.
10739 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10741 * proc-service.c (ps_lgetregs): Search all_processes instead of
10744 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10746 * server.c (start_inferior): Change return type to int.
10747 (attach_inferior): Change sigptr to int *.
10748 (handle_v_cont, handle_v_requests): Change signal to int *.
10749 (main): Change signal to int.
10751 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10753 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10754 * configure.srv: Add m32r*-*-linux*.
10755 * linux-m32r-low.c: New file.
10757 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10759 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10761 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10763 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10764 Take unsigned long arguments for PIDs.
10765 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10766 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10767 (wait_for_sigstop, linux_resume_one_process)
10768 (regsets_fetch_inferior_registers, linux_send_signal)
10769 (linux_read_auxv): Likewise. Update the types of variables holding
10770 PIDs. Update format string specifiers.
10771 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10772 * remote-utils.c (prepare_resume_reply): Likewise.
10773 * server.c (cont_thread, general_thread, step_thread)
10774 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10776 (handle_query): Update format specifiers.
10777 (handle_v_cont, main): Use strtoul for thread IDs.
10778 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10779 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10780 (general_thread, step_thread, thread_from_wait)
10781 (old_thread_from_wait): Update.
10782 * target.h (struct thread_resume): Use unsigned long for THREAD.
10783 (struct target_ops): Use unsigned long for arguments to attach and
10786 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10788 * acinclude.m4: Include bfd/bfd.m4 directly.
10789 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10790 <agriffis@toolchain.org>.
10791 * aclocal.m4, configure: Regenerated.
10793 2005-01-07 Andrew Cagney <cagney@gnu.org>
10795 * configure.ac: Rename configure.in, require autoconf 2.59.
10796 * configure: Re-generate.
10798 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10800 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10801 LIBS when finished.
10802 * aclocal.m4: Regenerated.
10803 * configure: Regenerated.
10805 2004-11-21 Andreas Schwab <schwab@suse.de>
10807 * linux-m68k-low.c (m68k_num_gregs): Define.
10808 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10809 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10810 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10811 (m68k_breakpoint_at): New. Add to the_low_target.
10813 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10814 srv_linux_thread_db to yes.
10816 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10818 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10819 (ARCH_SET_FS): Likewise.
10820 (ARCH_GET_FS): Likewise.
10821 (ARCH_GET_GS): Likewise.
10823 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10825 * linux-i386-low.c (ps_get_thread_area): New.
10826 * linux-x86-64-low.c (ps_get_thread_area): New.
10827 * linux-low.c: Include <sys/syscall.h>.
10828 (linux_kill_one_process): Don't kill the first thread here.
10829 (linux_kill): Kill the first thread here.
10830 (kill_lwp): New function.
10831 (send_sigstop, linux_send_signal): Use it.
10832 * proc-service.c: Clean up #ifdefs.
10833 (fpregset_info): Delete.
10834 (ps_lgetregs): Update and enable implementation.
10835 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10837 * remote-utils.c (struct sym_cache, symbol_cache): New.
10838 (input_interrupt): Print a clearer message.
10839 (async_io_enabled): New variable.
10840 (enable_async_io, disable_async_io): Use it. Update comments.
10841 (look_up_one_symbol): Use the symbol cache.
10842 * thread-db.c (thread_db_look_up_symbols): New function.
10843 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10845 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10847 * configure.in: Test for -rdynamic.
10848 * configure: Regenerated.
10849 * Makefile (INTERNAL_LDFLAGS): New.
10850 (gdbserver, gdbreplay): Use it.
10852 2004-09-02 Andrew Cagney <cagney@gnu.org>
10854 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10856 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10858 * linux-low.c (linux_wait): Clear all_processes list also.
10860 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10862 * linux-low.c: Include <errno.h>. Remove extern declaration of
10865 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10867 * gdbreplay.c, server.h, utils.c: Update copyright years.
10869 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10871 * server.c (main): Print child status or termination signal from
10872 variable 'signal', not 'sig'.
10874 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10876 * linux-low.c (linux_read_memory): Change return type to
10877 int. Check for and return error from ptrace().
10878 * target.c (read_inferior_memory): Change return type to int. Pass
10879 back return status from the_target->read_memory().
10880 * target.h (struct target_ops): Adapt *read_memory() prototype.
10882 (read_inferior_memory): Adapt prototype.
10883 * server.c (main): Return an error packet if
10884 read_inferior_memory() returns an error.
10886 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10888 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10889 Unify with other clean targets.
10891 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10893 * server.c (handle_v_cont): Call set_desired_inferior.
10895 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10897 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10899 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10901 * linux-low.c (linux_wait): Unblock async I/O.
10902 (linux_resume): Block and enable async I/O.
10903 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10904 * server.h (block_async_io, unblock_async_io): Add prototypes.
10906 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10908 * remote-utils.c (remote_open): Print a status notice after
10909 opening a TCP port.
10910 * server.c (attach_inferior): Print a status notice after
10913 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10915 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10917 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10919 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10921 * server.c, target.h: Update copyright years.
10923 2004-02-25 Roland McGrath <roland@redhat.com>
10925 * target.h (struct target_ops): New member `read_auxv'.
10926 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10927 * linux-low.c (linux_read_auxv): New function.
10928 (linux_target_ops): Initialize `read_auxv' member to that.
10930 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10932 Committed by Jim Blandy <jimb@redhat.com>.
10934 * linux-s390-low.c (s390_num_regs): Update.
10935 (s390_regmap): Remove control registers. Use __s390x__ predefine
10936 instead of GPR_SIZE to distiguish s390 and s390x targets.
10938 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10940 * linux-low.c: Update copyright year.
10941 (check_removed_breakpoint): Clear pending_is_breakpoint.
10942 (linux_set_resume_request, linux_queue_one_thread)
10943 (resume_status_pending_p): New functions.
10944 (linux_continue_one_thread): Use process->resume.
10945 (linux_resume): Only resume threads if there are no pending events.
10946 * linux-low.h (struct process_info): Add resume request
10949 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10951 * regcache.c (new_register_cache): Clear the allocated register
10952 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10954 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10956 * linux-low.c (linux_resume): Take a struct thread_resume *
10958 (linux_wait): Update call.
10959 (resume_ptr): New static variable.
10960 (linux_continue_one_thread): Renamed from
10961 linux_continue_one_process. Use resume_ptr.
10962 (linux_resume): Use linux_continue_one_thread.
10963 * server.c (handle_v_cont, handle_v_requests): New functions.
10964 (myresume): New function.
10965 (main): Handle 'v' case.
10966 * target.h (struct thread_resume): New type.
10967 (struct target_ops): Change argument of "resume" to struct
10969 (myresume): Delete macro.
10971 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10973 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10974 (uninstall): Support DESTDIR.
10976 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10978 * configure.srv: Add xscale*linux copy of arm*linux entry.
10980 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10982 * linux-arm-low.c (arm_reinsert_addr): New function.
10983 (the_low_target): Add arm_reinsert_addr.
10985 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10987 * mem-break.c: Remove whitespace at end of file.
10989 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10991 * configure.in: Check whether we need to prototype strerror.
10992 * server.h: Optionally prototype strerror.
10993 * gdbreplay.c (perror_with_name): Use strerror.
10994 * linux-low.c (linux_attach_lwp): Use strerror.
10995 * utils.c (perror_with_name): Use strerror.
10996 * config.in, configure: Regenerated.
10998 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11000 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11003 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11005 * Makefile.in (SFILES): Update.
11006 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11007 low-sun3.c: Remove files.
11009 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11011 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11012 (linux_detach_one_process, linux_detach): New functions.
11013 (linux_target_ops): Add linux_detach.
11014 * server.c (main): Handle 'D' packet.
11015 * target.h (struct target_ops): Add "detach" member.
11016 (detach_inferior): Define.
11018 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11020 From Kelley Cook <kelleycook@wideopenwest.com>:
11021 * configure.srv: Accept i[34567]86 variants.
11023 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11025 * linux-low.c (linux_wait_for_event): Correct comment typos.
11026 (linux_resume_one_process): Call check_removed_breakpoint.
11027 (linux_send_signal): New function.
11028 (linux_target_ops): Add linux_send_signal.
11029 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11031 * target.h (struct target_ops): Add send_signal.
11033 2003-05-29 Jim Blandy <jimb@redhat.com>
11035 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11036 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11037 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11038 away part of the register's value.
11040 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11042 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11043 (linux_wait_for_event, linux_init_signals): Likewise.
11045 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11047 * configure.in: Check for stdlib.h.
11048 * configure: Regenerated.
11049 * config.in: Regenerated.
11051 2003-01-04 Andreas Schwab <schwab@suse.de>
11053 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11055 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11057 * Makefile.in: Remove obsolete code.
11059 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11061 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11062 defined(PT_FPR0_HI).
11064 2002-11-17 Stuart Hughes <seh@zee2.com>
11066 * linux-arm-low.c (arm_num_regs): Increase.
11067 (arm_regmap): Include status register.
11069 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11071 * linux-low.c (register_addr): Remove incorrect -1 check.
11073 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11075 * linux-low.c (linux_create_inferior): Call setpgid. Return
11077 (unstopped_p, linux_signal_pid): Remove.
11078 (linux_target_ops): Remove linux_signal_pid.
11079 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11080 global instead of target method.
11081 * target.h (struct target_ops): Remove signal_pid. Update comment
11082 for create_inferior.
11083 * server.c (signal_pid): New variable.
11084 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11085 gdbserver. Set the child to be the foreground process group.
11086 (attach_inferior): Set signal_pid.
11088 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11090 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11092 2002-08-20 Jim Blandy <jimb@redhat.com>
11094 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11097 2002-08-01 Andrew Cagney <cagney@redhat.com>
11099 * Makefile.in: Make chill references obsolete.
11101 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11103 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11104 * configure: Regenerate.
11105 * config.in: Regenerate.
11107 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11109 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11110 (perror_with_name, remote_close, remote_open, expect, play): Static.
11112 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11114 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11115 byte offsets instead of an array of indexes.
11116 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11118 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11120 * regcache.c: Add comment.
11122 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11124 * thread-db.c: New file.
11125 * proc-service.c: New file.
11126 * acinclude.m4: New file.
11127 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11128 proc-service.o, and thread-db.o.
11129 (linux-low.o): Add USE_THREAD_DB.
11130 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11131 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11132 * aclocal.m4: Regenerated.
11133 * config.in: Regenerated.
11134 * configure: Regenerated.
11135 * configure.in: Check for proc_service.h, sys/procfs.h,
11136 thread_db.h, and linux/elf.h headrs.
11137 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11138 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11139 Check for -lthread_db and thread support.
11140 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11141 PowerPC, and SuperH.
11142 * i387-fp.c: Constify arguments.
11143 * i387-fp.h: Likewise.
11144 * inferiors.c: (struct thread_info): Renamed from
11145 `struct inferior_info'. Remove PID member. Use generic inferior
11146 list header. All uses updated.
11147 (inferiors, signal_pid): Removed.
11148 (all_threads): New variable.
11149 (get_thread): Define.
11150 (add_inferior_to_list): New function.
11151 (for_each_inferior): New function.
11152 (change_inferior_id): New function.
11153 (add_inferior): Removed.
11154 (remove_inferior): New function.
11155 (add_thread): New function.
11156 (free_one_thread): New function.
11157 (remove_thread): New function.
11158 (clear_inferiors): Use for_each_inferior and free_one_thread.
11159 (find_inferior): New function.
11160 (find_inferior_id): New function.
11161 (inferior_target_data): Update argument type.
11162 (set_inferior_target_data): Likewise.
11163 (inferior_regcache_data): Likewise.
11164 (set_inferior_regcache_data): Likewise.
11165 * linux-low.c (linux_bp_reinsert): Remove.
11166 (all_processes, stopping_threads, using_thrads)
11167 (struct pending_signals, debug_threads, pid_of): New.
11168 (inferior_pid): Replace with macro.
11169 (struct inferior_linux_data): Remove.
11170 (get_stop_pc, add_process): New functions.
11171 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11172 Use add_process and add_thread.
11173 (linux_attach_lwp): New function, based on old linux_attach. Use
11174 add_process and add_thread. Set stop_expected for new threads.
11175 (linux_attach): New function.
11176 (linux_kill_one_process): New function.
11177 (linux_kill): Kill all LWPs.
11178 (linux_thread_alive): Use find_inferior_id.
11179 (check_removed_breakpoints, status_pending_p): New functions.
11180 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11181 Update. Use WNOHANG. Wait for cloned processes also. Update process
11182 struct for the found process.
11183 (linux_wait_for_event): New function.
11184 (linux_wait): Use it. Support LWPs.
11185 (send_sigstop, wait_for_sigstop, stop_all_processes)
11186 (linux_resume_one_process, linux_continue_one_process): New functions.
11187 (linux_resume): Support LWPs.
11188 (REGISTER_RAW_SIZE): Remove.
11189 (fetch_register): Use register_size instead. Call supply_register.
11190 (usr_store_inferior_registers): Likewise. Call collect_register.
11191 Fix recursive case.
11192 (regsets_fetch_inferior_registers): Improve error message.
11193 (regsets_store_inferior_registers): Add debugging.
11194 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11195 (unstopped_p, linux_signal_pid): New functions.
11196 (linux_target_ops): Add linux_signal_pid.
11197 (linux_init_signals): New function.
11198 (initialize_low): Call it. Initialize using_threads.
11199 * regcache.c (inferior_regcache_data): Add valid
11201 (get_regcache): Fetch registers lazily. Add fetch argument
11202 and update all callers.
11203 (regcache_invalidate_one, regcache_invalidate): New
11205 (new_register_cache): Renamed from create_register_cache.
11206 Return the new regcache.
11207 (free_register_cache): Change argument to a void *.
11208 (registers_to_string, registers_from_string): Call get_regcache
11209 with fetch flag set.
11210 (register_data): Make static. Pass fetch flag to get_regcache.
11211 (supply_register): Call get_regcache with fetch flag clear.
11212 (collect_register): Call get_regcache with fetch flag set.
11213 (collect_register_as_string): New function.
11214 * regcache.h: Update.
11215 * remote-utils.c (putpkt): Flush after debug output and use
11217 Handle input interrupts while waiting for an ACK.
11218 (input_interrupt): Use signal_pid method.
11219 (getpkt): Flush after debug output and use stderr.
11220 (outreg): Use collect_register_as_string.
11221 (new_thread_notify, dead_thread_notify): New functions.
11222 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11223 and general_thread.
11224 (look_up_one_symbol): Flush after debug output.
11225 * server.c (step_thread, server_waiting): New variables.
11226 (start_inferior): Don't use signal_pid. Update call to mywait.
11227 (attach_inferior): Update call to mywait.
11228 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11229 (main): Don't fetch/store registers explicitly. Use
11230 set_desired_inferior. Support proposed ``Hs'' packet. Update
11232 * server.h: Update.
11233 (struct inferior_list, struct_inferior_list_entry): New.
11234 * target.c (set_desired_inferior): New.
11235 (write_inferior_memory): Constify.
11236 (mywait): New function.
11237 * target.h: Update.
11238 (struct target_ops): New signal_pid method.
11239 (mywait): Removed macro, added prototype.
11241 * linux-low.h (regset_func): Removed.
11242 (regset_fill_func, regset_store_func): New.
11243 (enum regset_type): New.
11244 (struct regset_info): Add type field. Use new operation types.
11245 (struct linux_target_ops): stop_pc renamed to get_pc.
11246 Add decr_pc_after_break and breakpoint_at.
11247 (get_process, get_thread_proess, get_process_thread)
11248 (strut process_info, all_processes, linux_attach_lwp)
11249 (thread_db_init): New.
11251 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11252 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11253 (the_low_target): Add new members.
11254 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11255 (i386_store_fpxregset): Constify.
11256 (target_regsets): Add new kind identifier.
11257 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11258 (i386_set_pc): Add debugging.
11259 (i386_breakpoint_at): New function.
11260 (the_low_target): Add new members.
11261 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11262 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11263 (mips_breakpoint_at): New.
11264 (the_low_target): Add new members.
11265 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11266 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11267 (the_low_target): Add new members.
11268 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11269 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11270 (the_low_target): Add new members.
11271 * linux-x86-64-low.c (target_regsets): Add new kind
11274 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11276 From Martin Pool <mbp@samba.org>:
11277 * server.c (gdbserver_usage): New function.
11280 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11282 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11283 stop_at -> stop_pc.
11285 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11287 * Makefile.in: Remove obsolete code.
11289 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11291 * linux-low.c (regsets_fetch_inferior_registers),
11292 (regsets_store_inferior_registers): Removed cast to int from
11294 * regcache.h: Added declaration of struct inferior_info.
11296 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11298 * inferiors.c (struct inferior_info): Add regcache_data.
11299 (add_inferior): Call create_register_cache.
11300 (clear_inferiors): Call free_register_cache.
11301 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11302 * regcache.c (struct inferior_regcache_data): New.
11303 (registers): Remove.
11304 (get_regcache): New function.
11305 (create_register_cache, free_register_cache): New functions.
11306 (set_register_cache): Don't initialize the register cache here.
11307 (registers_to_string, registers_from_string, register_data): Call
11309 * regcache.h: Add prototypes.
11310 * server.h: Likewise.
11312 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11314 * mem-break.c: New file.
11315 * mem-break.h: New file.
11316 * Makefile.in: Add mem-break.o rule; update server.h
11318 * inferiors.c (struct inferior_info): Add target_data
11320 (clear_inferiors): Free target_data member if set.
11321 (inferior_target_data, set_inferior_target_data): New functions.
11322 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11323 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11324 * linux-low.c (linux_bp_reinsert): New variable.
11325 (struct inferior_linux_data): New.
11326 (linux_create_inferior): Use set_inferior_target_data.
11327 (linux_attach): Likewise. Call add_inferior.
11328 (linux_wait_for_one_inferior): New function.
11329 (linux_wait): Call it.
11330 (linux_write_memory): Add const.
11331 (initialize_low): Call set_breakpoint_data.
11332 * linux-low.h (struct linux_target_ops): Add breakpoint
11334 * server.c (attach_inferior): Remove extra add_inferior
11336 * server.h: Include mem-break.h. Update inferior.c
11338 * target.c (read_inferior_memory)
11339 (write_inferior_memory): New functions.
11340 * target.h (read_inferior_memory)
11341 (write_inferior_memory): Change macros to prototypes.
11342 (struct target_ops): Update comments. Add const to write_memory
11345 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11347 * linux-low.c (usr_store_inferior_registers): Support
11348 registers which are allowed to fail to store.
11349 * linux-low.h (linux_target_ops): Likewise.
11350 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11351 (ppc_cannot_store_register): FPSCR may not be storable.
11353 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11355 * server.h: Include <string.h> if HAVE_STRING_H.
11356 * ChangeLog: Correct paths in last ChangeLog entry.
11358 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11360 * linux-low.h: Remove obsolete prototypes.
11361 (struct linux_target_ops): New.
11362 (extern the_low_target): New.
11363 * linux-low.c (num_regs, regmap): Remove declarations.
11364 (register_addr): Use the_low_target explicitly.
11365 (fetch_register): Likewise.
11366 (usr_fetch_inferior_registers): Likewise.
11367 (usr_store_inferior_registers): Likewise.
11368 * linux-arm-low.c (num_regs): Remove.
11369 (arm_num_regs): Define.
11370 (arm_regmap): Renamed from regmap, made static.
11371 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11373 (arm_cannot_store_register): Renamed from cannot_store_register,
11375 (the_low_target): New.
11376 * linux-i386-low.c (num_regs): Remove.
11377 (i386_num_regs): Define.
11378 (i386_regmap): Renamed from regmap, made static.
11379 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11381 (i386_cannot_store_register): Renamed from cannot_store_register,
11383 (the_low_target): New.
11384 * linux-ia64-low.c (num_regs): Remove.
11385 (ia64_num_regs): Define.
11386 (ia64_regmap): Renamed from regmap, made static.
11387 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11389 (ia64_cannot_store_register): Renamed from cannot_store_register,
11391 (the_low_target): New.
11392 * linux-m68k-low.c (num_regs): Remove.
11393 (m68k_num_regs): Define.
11394 (m68k_regmap): Renamed from regmap, made static.
11395 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11397 (m68k_cannot_store_register): Renamed from cannot_store_register,
11399 (the_low_target): New.
11400 * linux-mips-low.c (num_regs): Remove.
11401 (mips_num_regs): Define.
11402 (mips_regmap): Renamed from regmap, made static.
11403 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11405 (mips_cannot_store_register): Renamed from cannot_store_register,
11407 (the_low_target): New.
11408 * linux-ppc-low.c (num_regs): Remove.
11409 (ppc_num_regs): Define.
11410 (ppc_regmap): Renamed from regmap, made static.
11411 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11413 (ppc_cannot_store_register): Renamed from cannot_store_register,
11415 (the_low_target): New.
11416 * linux-s390-low.c (num_regs): Remove.
11417 (s390_num_regs): Define.
11418 (s390_regmap): Renamed from regmap, made static.
11419 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11421 (s390_cannot_store_register): Renamed from cannot_store_register,
11423 (the_low_target): New.
11424 * linux-sh-low.c (num_regs): Remove.
11425 (sh_num_regs): Define.
11426 (sh_regmap): Renamed from regmap, made static.
11427 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11429 (sh_cannot_store_register): Renamed from cannot_store_register,
11431 (the_low_target): New.
11432 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11433 (the_low_target): New.
11435 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11437 * Makefile.in: Add stamp-h target.
11438 * configure.in: Create stamp-h.
11439 * configure: Regenerated.
11441 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11443 * inferiors.c: New file.
11444 * target.c: New file.
11445 * target.h: New file.
11446 * Makefile.in: Add target.o and inferiors.o. Update
11448 * linux-low.c (inferior_pid): New static variable,
11449 moved from server.c.
11450 (linux_create_inferior): Renamed from create_inferior.
11451 Call add_inferior. Return 0 on success instead of a PID.
11452 (linux_attach): Renamed from myattach.
11453 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11454 (linux_thread_alive): Renamed from mythread_alive.
11455 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11457 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11458 (regsets_store_inferior_registers): Correct error message.
11459 Add missing ``return 0''.
11460 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11461 (linux_store_registers): Renamed from store_inferior_registers.
11462 (linux_read_memory): Renamed from read_inferior_memory.
11463 (linux_write_memory): Renamed from write_inferior_memory.
11464 (linux_target_ops): New structure.
11465 (initialize_low): Call set_target_ops ().
11466 * remote-utils.c (unhexify): New function.
11467 (hexify): New function.
11468 (input_interrupt): Send signals to ``signal_pid''.
11469 * server.c (inferior_pid): Remove.
11470 (start_inferior): Update create_inferior call.
11471 (attach_inferior): Call add_inferior.
11472 (handle_query): New function.
11473 (main): Call handle_query for `q' packets.
11474 * server.h: Include "target.h". Remove obsolete prototypes.
11475 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11477 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11479 * Makefile.in: Add WARN_CFLAGS. Update configury
11481 * configure.in: Check for <string.h>
11482 * configure: Regenerate.
11483 * config.in: Regenerate.
11484 * gdbreplay.c: Include needed system headers.
11485 (remote_open): Remove strchr prototype.
11486 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11487 * regcache.c (supply_register): Change buf argument to const void *.
11488 (supply_register_by_name): Likewise.
11489 (collect_register): Change buf argument to void *.
11490 (collect_register_by_name): Likewise.
11491 * regcache.h: Add missing prototypes.
11492 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11493 * server.c (handle_query): New function.
11494 (attached): New static variable, moved out of main.
11495 (main): Quiet longjmp clobber warnings.
11496 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11497 * utils.c (error): Remove NORETURN.