1 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4 (%.c: ../regformats/%.dat,
5 (%.c: ../regformats/arm/%.dat,
6 (%.c: ../regformats/i386/%.dat,
7 (%.c: ../regformats/rs6000/%.dat): New rules.
10 (arm-with-iwmmxt.c): Remove.
11 (arm-with-vfpv2.c): Remove.
12 (arm-with-vfpv3.c): Remove.
13 (arm-with-neon.c): Remove.
16 (reg-crisv32.c): Remove.
18 (i386-linux.c): Remove.
20 (i386-avx-linux.c): Remove.
21 (i386-avx-avx512.c): Remove.
22 (i386-avx-avx512-linux.c): Remove.
24 (i386-mpx-linux.c): Remove.
25 (i386-avx-mpx-avx512-pku.c): Remove.
26 (i386-avx-mpx-avx512-pku-linux.c): Remove.
27 (i386-avx-mpx.c): Remove.
28 (i386-avx-mpx-linux.c): Remove.
30 (i386-mmx-linux.c): Remove.
35 (mips-linux.c): Remove.
36 (mips-dsp-linux.c): Remove.
37 (mips64-linux.c): Remove.
38 (mips64-dsp-linux.c): Remove.
39 (nios2-linux.c): Remove.
40 (powerpc-32.c): Remove.
41 (powerpc-32l.c): Remove.
42 (powerpc-altivec32l.c): Remove.
43 (powerpc-cell32l.c): Remove.
44 (powerpc-vsx32l.c): Remove.
45 (powerpc-isa205-32l.c): Remove.
46 (powerpc-isa205-altivec32l.c): Remove.
47 (powerpc-isa205-vsx32l.c): Remove.
48 (powerpc-e500l.c): Remove.
49 (powerpc-64l.c): Remove.
50 (powerpc-altivec64l.c): Remove.
51 (powerpc-cell64l.c): Remove.
52 (powerpc-vsx64l.c): Remove.
53 (powerpc-isa205-64l.c): Remove.
54 (powerpc-isa205-altivec64l.c): Remove.
55 (powerpc-isa205-vsx64l.c): Remove.
56 (s390-linux32.c): Remove.
57 (s390-linux32v1.c): Remove.
58 (s390-linux32v2.c): Remove.
59 (s390-linux64.c): Remove.
60 (s390-linux64v1.c): Remove.
61 (s390-linux64v2.c): Remove.
62 (s390-te-linux64.c): Remove.
63 (s390-vx-linux64.c): Remove.
64 (s390-tevx-linux64.c): Remove.
65 (s390x-linux64.c): Remove.
66 (s390x-linux64v1.c): Remove.
67 (s390x-linux64v2.c): Remove.
68 (s390x-te-linux64.c): Remove.
69 (s390x-vx-linux64.c): Remove.
70 (s390x-tevx-linux64.c): Remove.
71 (tic6x-c64xp-linux.c): Remove.
72 (tic6x-c64x-linux.c): Remove.
73 (tic6x-c62x-linux.c): Remove.
75 (reg-sparc64.c): Remove.
78 (amd64-linux.c): Remove.
79 (amd64-avx.c): Remove.
80 (amd64-avx-linux.c): Remove.
81 (amd64-avx-avx512.c): Remove.
82 (amd64-avx-avx512-linux.c): Remove.
83 (amd64-mpx.c): Remove.
84 (amd64-mpx-linux.c): Remove.
85 (amd64-avx-mpx-avx512-pku.c): Remove.
86 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
87 (amd64-avx-mpx.c): Remove.
88 (amd64-avx-mpx-linux.c): Remove.
90 (x32-linux.c): Remove.
92 (x32-avx-linux.c): Remove.
93 (x32-avx-avx512.c): Remove.
94 (x32-avx-avx512-linux.c): Remove.
95 (reg-xtensa.c): Remove.
96 (reg-tilegx.c): Remove.
97 (reg-tilegx32.c): Remove.
99 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
101 * Makefile.in (SFILES): Add "common/environ.c".
102 (OBJS): Add "common/environ.h".
104 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
106 * configure.ac: Check if the fs_base and gs_base members of
107 `struct user_regs_struct' exist.
108 * config.in: Regenerated.
109 * configure: Likewise.
111 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
113 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
115 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
116 (get_next_pcs_syscall_next_pc): Likewise.
118 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
120 * win32-i386-low.c: Fix incorrect reference to a couple source files.
121 * nto-x86-low.c: Likewise.
123 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
125 * Makefile.in: Include disable-implicit-rules.mk.
127 2016-11-23 Pedro Alves <palves@redhat.com>
129 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
130 (debug_vprintf): Use std::chrono::steady_clock instead of
131 gettimeofday. Use '.' instead of ':'.
132 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
133 (get_timestamp): Use std::chrono::steady_clock instead of
136 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
138 * Makefile.in: Fix whitespace formatting.
140 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
142 * Makefile.in (SFILES, OBS): Flatten list and order
145 2016-11-23 Pedro Alves <palves@redhat.com>
147 * event-loop.c (handle_file_event): Use warning.
148 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
149 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
152 2016-11-23 Pedro Alves <palves@redhat.com>
154 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
156 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
157 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
158 debug_printf and debug_flush for debug output.
159 * server.c (handle_general_set): Likewise.
160 * thread-db.c (try_thread_db_load): Use debug_printf for debug
163 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
165 * Makefile.in (.c.o): Replace rule with ...
166 (%.o: %.c): ... this one.
168 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
170 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
171 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
173 * configure.ac: Remove checks for the make program.
174 * configure: Re-generate.
176 2016-10-28 Pedro Alves <palves@redhat.com>
178 * Makefile.in (CXX_DIALECT): Get from configure.
179 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
180 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
181 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
182 * config.in: Regenerate.
183 * configure: Regenerate.
185 2016-10-27 Yao Qi <yao.qi@linaro.org>
187 * linux-low.c (linux_supports_range_stepping): Return true if
188 can_software_single_step return true.
190 2016-10-27 Yao Qi <yao.qi@linaro.org>
192 * inferiors.c (find_inferior_in_random): New function.
193 * inferiors.h (find_inferior_in_random): Declare.
194 * linux-low.c (linux_wait_for_event_filtered): Call
195 find_inferior_in_random instead of find_inferior.
197 2016-10-27 Yao Qi <yao.qi@linaro.org>
199 * linux-low.c (linux_wait_1): If single-step breakpoints are
200 inserted, remove them.
202 2016-10-26 Pedro Alves <palves@redhat.com>
204 * linux-low.c (handle_extended_wait): Link parent/child fork
206 (linux_wait_1): Unlink them.
207 (linux_set_resume_request): Ignore resume requests for
208 already-resumed and unhandled fork child threads.
209 * linux-low.h (struct lwp_info) <fork_relative>: New field.
210 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
212 (handle_v_requests) <vCont>: Don't call require_running.
213 * server.h (in_queued_stop_replies): New declaration.
215 2016-10-24 Yao Qi <yao.qi@linaro.org>
218 * linux-aarch64-low.c (append_insns): Cast the return value to
221 2016-10-10 Yao Qi <yao.qi@linaro.org>
223 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
225 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
227 * target.c (target_supports_multi_process): New function, moved
229 * target.h (target_supports_multi_process): ... here. Remove
232 2016-10-05 Tom Tromey <tom@tromey.com>
235 * tracepoint.c (handle_tracepoint_bkpts): Check
236 ipa_error_tracepoint, not ipa_stopping_tracepoint.
238 2016-10-05 Yao Qi <yao.qi@linaro.org>
240 * configure.srv: Update the path of arm-*.xml files.
242 2016-10-05 Terry Guo <terry.guo@arm.com>
243 Yao Qi <yao.qi@linaro.org>
245 * Makefile.in: Adjust the path of rules.
246 * configure.srv: Update the path of xml files.
247 * regformats/arm-with-iwmmxt.dat: Regenerated.
248 * regformats/arm-with-neon.dat: Likewise.
249 * regformats/arm-with-vfpv2.dat: Likewise.
250 * regformats/arm-with-vfpv3.dat Likewise.
252 2016-09-30 Yao Qi <yao.qi@linaro.org>
255 * target.c (target_stop_and_wait): Don't call
256 target_continue_no_signal, use resume_stop instead.
258 2016-09-26 Yao Qi <yao.qi@linaro.org>
260 * linux-low.c (linux_wait_1): Call debug_exit.
262 2016-09-23 Pedro Alves <palves@redhat.com>
264 * Makefile.in (SFILES): Add common/new-op.c.
265 (OBS): Add common/new-op.o.
266 (new-op.o): New rule.
268 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
270 * .gitinore: Ignore more files.
272 2016-09-21 Yao Qi <yao.qi@linaro.org>
274 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
277 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
279 * server.c (start_inferior): Call target_mourn_inferior instead of
280 mourn_inferior; pass ptid_t argument to it.
282 (handle_target_event): Likewise.
283 * target.c (target_mourn_inferior): New function.
284 * target.h (mourn_inferior): Delete macro.
286 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
288 * linux-low.c (lwp_is_stepping): New function.
290 2016-09-06 Carl Love <cel@us.ibm.com>
292 * server.c (start_inferior): Fixed comment, requested comment change
293 didn't get updated correctly. Removed reference to ptrace () call as
294 it is only true on Linux systems.
296 2016-09-06 Carl Love <cel@us.ibm.com>
298 * server.c (start_inferior): Do not call
299 function target_post_create_inferior () if the
300 inferior process has already exited.
302 2016-09-05 Pedro Alves <palves@redhat.com>
304 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
305 (COMPILE.pre, CC_LD): Use CXX directly.
306 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
307 * acinclude.m4: Don't include build-with-cxx.m4.
308 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
309 * configure: Regenerate.
311 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
314 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
315 call writing data to own_buf.
317 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
319 * target.c (mywait): Call target_wait instead of
321 (target_wait): New function.
323 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
325 * server.c (start_inferior): New variable 'ptid'. Replace calls
326 to the_target->resume by target_continue{,_no_signal}, depending
328 * target.c (target_stop_and_wait): Call target_continue_no_signal
329 instead of the_target->resume.
330 (target_continue): New function.
332 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
334 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
336 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
339 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
341 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
342 * linux-arm-low.c (ps_get_thread_area): Likewise.
343 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
344 * linux-m68k-low.c (ps_get_thread_area): Likewise.
345 * linux-mips-low.c (ps_get_thread_area): Likewise.
346 * linux-nios2-low.c (ps_get_thread_area): Likewise.
347 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
348 * linux-x86-low.c (ps_get_thread_area): Likewise.
349 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
351 2016-08-19 Pedro Alves <palves@redhat.com>
353 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
355 2016-08-19 Pedro Alves <palves@redhat.com>
357 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
358 comment. Use memcpy instead of casting through unsigned long.
360 2016-08-19 Pedro Alves <palves@redhat.com>
362 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
363 allocating around 0x80000000.
365 2016-08-19 Pedro Alves <palves@redhat.com>
368 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
369 (x32-avx512-linux-ipa.o): New rules.
370 * configure.ac (x86_64-*-linux*): New x32 check.
371 * configure.srv (ipa_x32_linux_regobj): New.
372 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
373 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
375 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
377 * configure: Regenerate.
379 2016-08-09 Pedro Alves <palves@redhat.com>
382 * Makefile.in (OBS): Add signals-state-save-restore.o.
383 (signals-state-save-restore.o): New rule.
384 * config.in: Regenerate.
385 * configure: Regenerate.
386 * linux-low.c: Include "signals-state-save-restore.h".
387 (linux_create_inferior): Call
388 restore_original_signals_state.
389 * server.c: Include "dispositions-save-restore.h".
390 (captured_main): Call save_original_signals_state.
392 2016-08-05 Pedro Alves <palves@redhat.com>
394 * configure: Regenerate.
396 2016-08-04 Yao Qi <yao.qi@linaro.org>
398 * linux-low.c (regsets_fetch_inferior_registers): Check
399 errno is ESRCH or not.
401 2016-08-02 Yao Qi <yao.qi@linaro.org>
403 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
404 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
405 (thread_db_load_search): Update.
406 (try_thread_db_load_1): Don't look for td_ta_event_addr,
407 td_ta_set_event and td_ta_event_getmsg.
409 2016-07-26 Pedro Alves <palves@redhat.com>
412 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
413 of unsigned long for 64-bit registers and use uint32_t instead of
414 unsigned int for 32-bit registers.
416 2016-07-26 Pedro Alves <palves@redhat.com>
418 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
421 2016-07-21 Tom Tromey <tom@tromey.com>
423 * configure: Rebuild.
425 2016-07-21 Yao Qi <yao.qi@linaro.org>
427 * mem-break.c (find_gdb_breakpoint): Cast bp to
428 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
430 2016-07-21 Yao Qi <yao.qi@linaro.org>
432 * server.c (handle_v_requests): Support s and S actions
433 if target_supports_software_single_step return true.
435 2016-07-21 Yao Qi <yao.qi@linaro.org>
437 * linux-low.c (resume_stopped_resumed_lwps): If resume request
438 is resume_step, call maybe_hw_step.
439 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
441 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
443 (proceed_one_lwp): If resume request is resume_step, install
444 reinsert breakpoints and call maybe_hw_step.
446 2016-07-21 Yao Qi <yao.qi@linaro.org>
448 * linux-low.c (proceed_one_lwp): Declare.
449 (linux_resume_one_thread): Remove local variable 'step'.
450 Lift code enqueue signal. Call proceed_one_lwp instead of
451 linux_resume_one_lwp.
453 2016-07-21 Yao Qi <yao.qi@linaro.org>
455 * linux-low.c (linux_resume_one_thread): Call
456 enqueue_pending_signal.
458 2016-07-21 Yao Qi <yao.qi@linaro.org>
460 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
461 * inferiors.c (do_restore_current_thread_cleanup): New function.
462 (make_cleanup_restore_current_thread): Likewise.
463 * linux-low.c (install_software_single_step_breakpoints): Call
464 make_cleanup_restore_current_thread. Switch current_thread to
467 2016-07-21 Yao Qi <yao.qi@linaro.org>
469 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
470 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
471 (clone_one_breakpoint): Likewise.
472 (delete_reinsert_breakpoints): Change parameter to thread.
474 (has_reinsert_breakpoints): Likewise.
475 (uninsert_reinsert_breakpoints): Likewise.
476 (reinsert_reinsert_breakpoints): Likewise.
477 * mem-break.h (set_reinsert_breakpoint): Update declaration.
478 (delete_reinsert_breakpoints): Likewise.
479 (reinsert_reinsert_breakpoints): Likewise.
480 (uninsert_reinsert_breakpoints): Likewise.
481 (has_reinsert_breakpoints): Likewise.
483 2016-07-21 Yao Qi <yao.qi@linaro.org>
485 * inferiors.c (get_thread_process): Make parameter const.
486 * inferiors.h (get_thread_process): Update declaration.
487 * mem-break.c (clone_all_breakpoints): Remove all parameters.
488 Add new parameters child_thread and parent_thread. Callers
490 * mem-break.h (clone_all_breakpoints): Update declaration.
492 2016-07-21 Yao Qi <yao.qi@linaro.org>
494 * mem-break.c (struct breakpoint) <cond_list>: Remove.
495 <command_list, handler>: Remove.
496 (struct gdb_breakpoint): New.
497 (struct other_breakpoint): New.
498 (struct reinsert_breakpoint): New.
499 (is_gdb_breakpoint): New function.
500 (any_persistent_commands): Update command_list if
501 is_gdb_breakpoint returns true.
502 (set_breakpoint): Create breakpoints according to their types.
503 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
504 (set_gdb_breakpoint_1): Likewise.
505 (set_gdb_breakpoint): Likewise.
506 (clear_breakpoint_conditions): Change parameter type to
507 'struct gdb_breakpoint *'.
508 (clear_breakpoint_commands): Likewise.
509 (clear_breakpoint_conditions_and_commands): Likewise.
510 (add_condition_to_breakpoint): Likewise.
511 (add_breakpoint_condition): Likewise.
512 (add_commands_to_breakpoint): Likewise.
513 (check_breakpoints): Check other_breakpoint.
514 (clone_one_breakpoint): Clone breakpopint according to its type.
515 * mem-break.h (struct gdb_breakpoint): Declare.
516 (set_gdb_breakpoint): Update declaration.
517 (clear_breakpoint_conditions_and_commands): Likewise.
518 (add_breakpoint_condition): Likewise.
519 (add_breakpoint_commands): Likewise.
520 * server.c (process_point_options): Change parameter type to
521 'struct gdb_breakpoint *'.
523 2016-07-21 Yao Qi <yao.qi@linaro.org>
525 * mem-break.c (set_breakpoint_at): Rename it to ...
526 (set_breakpoint_type_at): ... it.
527 (set_breakpoint_at): Call set_breakpoint_type_at.
528 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
529 * mem-break.h (set_breakpoint_at): Update comments.
531 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
533 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
535 (nios2_store_gregset): Likewise.
537 2016-07-01 Pedro Alves <palves@redhat.com>
538 Antoine Tremblay <antoine.tremblay@ericsson.com>
540 * linux-low.c: Change interface to take the target lwp_info
541 pointer directly and return void. Handle detaching from a zombie
543 (linux_detach_lwp_callback): New function.
544 (linux_detach): Detach from the leader thread after detaching from
547 2016-06-28 Yao Qi <yao.qi@linaro.org>
549 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
550 for variable new_offset.
551 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
552 (aarch64_ftrace_insn_reloc_cb): Likewise.
553 (aarch64_ftrace_insn_reloc_tb): Likewise.
554 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
555 PRIx64 instead of PRIx32.
557 2016-06-28 Yao Qi <yao.qi@linaro.org>
559 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
560 (the_low_target): Install arm_get_syscall_trapinfo.
562 2016-06-28 Yao Qi <yao.qi@linaro.org>
564 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
566 (the_low_target): Install aarch64_get_syscall_trapinfo.
568 2016-06-28 Yao Qi <yao.qi@linaro.org>
570 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
572 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
573 Remove parameter sysno.
574 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
577 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
579 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
580 (s390_emit_ne_goto): Likewise.
581 (s390_emit_lt_goto): Likewise.
582 (s390_emit_le_goto): Likewise.
583 (s390_emit_gt_goto): Likewise.
584 (s390_emit_ge_goto): Likewise.
585 (s390x_emit_eq_goto): Likewise.
586 (s390x_emit_ne_goto): Likewise.
587 (s390x_emit_lt_goto): Likewise.
588 (s390x_emit_le_goto): Likewise.
589 (s390x_emit_gt_goto): Likewise.
590 (s390x_emit_ge_goto): Likewise.
591 (s390_emit_ops_impl): Mark variable static.
592 (s390x_emit_ops): Likewise.
594 2016-06-17 Yao Qi <yao.qi@linaro.org>
596 * linux-low.c (handle_extended_wait): Call
597 uninsert_reinsert_breakpoints for the parent process. Remove
598 reinsert breakpoints from the child process. Reinsert them to
599 the parent process when vfork is done.
600 * mem-break.c (uninsert_reinsert_breakpoints): New function.
601 (reinsert_reinsert_breakpoints): New function.
602 * mem-break.h (uninsert_reinsert_breakpoints): Declare
603 (reinsert_reinsert_breakpoints): Declare.
605 2016-06-17 Yao Qi <yao.qi@linaro.org>
607 * linux-low.c (handle_extended_wait): If the parent is doing
608 step-over, remove the reinsert breakpoints from the forked child.
610 2016-06-17 Yao Qi <yao.qi@linaro.org>
612 * linux-low.c (unsuspend_all_lwps): Declare.
613 (linux_low_filter_event): If thread exited, call finish_step_over.
614 If step-over is finished, unsuspend other threads.
616 2016-06-17 Yao Qi <yao.qi@linaro.org>
618 * linux-low.c (linux_resume_one_lwp_throw): Assert
619 has_reinsert_breakpoints returns false.
620 * mem-break.c (delete_disabled_breakpoints): Assert
621 bp type isn't reinsert_breakpoint.
623 2016-06-17 Yao Qi <yao.qi@linaro.org>
625 * linux-low.c (maybe_hw_step): New function.
626 (linux_resume_one_lwp_throw): Call maybe_hw_step.
627 (finish_step_over): Switch current_thread to lwp temporarily,
628 and assert has_reinsert_breakpoints returns true.
629 (proceed_one_lwp): Call maybe_hw_step.
630 * mem-break.c (has_reinsert_breakpoints): New function.
631 * mem-break.h (has_reinsert_breakpoints): Declare.
633 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
635 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
637 2016-05-17 Yao Qi <yao.qi@linaro.org>
639 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
640 instead of find_inferior.
642 2016-05-05 Yao Qi <yao.qi@linaro.org>
644 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
645 Initialize res to zero.
647 2016-05-05 Yao Qi <yao.qi@linaro.org>
649 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
652 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
654 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
655 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
656 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
658 2016-04-28 Par Olsson <par.olsson@windriver.com>
659 Simon Marchi <simon.marchi@ericsson.com>
661 * tracepoint.c (write_inferior_int8): New function.
662 (cmd_qtenable_disable): Write enable flag using
665 2016-04-25 Yao Qi <yao.qi@linaro.org>
667 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
668 (need_step_over_p): Return zero if the LWP has pending signals
669 can be delivered on software single step target.
671 2016-04-25 Yao Qi <yao.qi@linaro.org>
673 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
674 return instead of error.
676 2016-04-22 Yao Qi <yao.qi@linaro.org>
678 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
681 2016-04-22 Yao Qi <yao.qi@linaro.org>
683 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
684 signal when stepping over breakpoint with software single
687 2016-04-21 Pedro Alves <palves@redhat.com>
689 * linux-s390-low.c (s390_collect_ptrace_register)
690 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
692 (s390_check_regset): Use void * instead of gdb_byte *.
694 2016-04-20 Pedro Alves <palves@redhat.com>
696 * configure: Renegerate.
698 2016-04-20 Yao Qi <yao.qi@linaro.org>
700 * linux-aarch32-low.c: Include "arch/arm-linux.h".
701 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
703 (arm_store_gregset): Likewise.
705 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
707 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
708 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
709 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
710 (amd64-avx-mpx-linux.c): New rules.
711 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
712 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
713 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
714 (srv_amd64_regobj): Add amd64-avx-mpx.o.
715 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
716 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
717 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
718 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
719 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
720 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
721 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
722 * linux-x86-low.c (x86_linux_read_description): Add case for
723 X86_XSTATE_AVX_MPX_MASK.
724 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
725 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
726 init_registers_i386_avx_mpx_linux.
727 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
728 (initialize_low_tracepoint): Call
729 init_registers_i386_avx_mpx_linux.
730 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
731 (initialize_low_tracepoint): Call
732 init_registers_amd64_avx_mpx_linux.
733 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
734 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
735 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
738 2016-04-18 Pedro Alves <palves@redhat.com>
740 * configure: Regenerate.
742 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
744 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
745 (aarch64_emit_sub): Likewise.
747 2016-04-12 Pedro Alves <palves@redhat.com>
749 * utils.c (prepare_to_throw_exception): Delete.
751 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
753 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
755 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
757 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
759 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
761 * linux-aarch64-ipa.c: Add <elf.h> include.
762 * linux-ppc-ipa.c: Add <elf.h> include.
763 * linux-s390-ipa.c: Add <elf.h> include.
765 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
767 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
768 (get_raw_reg_ptr): Likewise.
769 (get_trace_state_variable_value_ptr): Likewise.
770 (set_trace_state_variable_value_ptr): Likewise.
771 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
774 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
775 Marcin Kościelnicki <koriakin@0x04.net>
778 * linux-ppc-low.c (emit_insns): New function.
779 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
780 (ppc_emit_prologue): New function.
781 (ppc_emit_epilogue): New function.
782 (ppc_emit_add): New function.
783 (ppc_emit_sub): New function.
784 (ppc_emit_mul): New function.
785 (ppc_emit_lsh): New function.
786 (ppc_emit_rsh_signed): New function.
787 (ppc_emit_rsh_unsigned): New function.
788 (ppc_emit_ext): New function.
789 (ppc_emit_zero_ext): New function.
790 (ppc_emit_log_not): New function.
791 (ppc_emit_bit_and): New function.
792 (ppc_emit_bit_or): New function.
793 (ppc_emit_bit_xor): New function.
794 (ppc_emit_bit_not): New function.
795 (ppc_emit_equal): New function.
796 (ppc_emit_less_signed): New function.
797 (ppc_emit_less_unsigned): New function.
798 (ppc_emit_ref): New function.
799 (ppc_emit_const): New function.
800 (ppc_emit_reg): New function.
801 (ppc_emit_pop): New function.
802 (ppc_emit_stack_flush): New function.
803 (ppc_emit_swap): New function.
804 (ppc_emit_stack_adjust): New function.
805 (ppc_emit_call): New function.
806 (ppc_emit_int_call_1): New function.
807 (ppc_emit_void_call_2): New function.
808 (ppc_emit_if_goto): New function.
809 (ppc_emit_goto): New function.
810 (ppc_emit_eq_goto): New function.
811 (ppc_emit_ne_goto): New function.
812 (ppc_emit_lt_goto): New function.
813 (ppc_emit_le_goto): New function.
814 (ppc_emit_gt_goto): New function.
815 (ppc_emit_ge_goto): New function.
816 (ppc_write_goto_address): New function.
817 (ppc_emit_ops_impl): New static variable.
818 (ppc64v1_emit_prologue): New function.
819 (ppc64v2_emit_prologue): New function.
820 (ppc64_emit_epilogue): New function.
821 (ppc64_emit_add): New function.
822 (ppc64_emit_sub): New function.
823 (ppc64_emit_mul): New function.
824 (ppc64_emit_lsh): New function.
825 (ppc64_emit_rsh_signed): New function.
826 (ppc64_emit_rsh_unsigned): New function.
827 (ppc64_emit_ext): New function.
828 (ppc64_emit_zero_ext): New function.
829 (ppc64_emit_log_not): New function.
830 (ppc64_emit_bit_and): New function.
831 (ppc64_emit_bit_or): New function.
832 (ppc64_emit_bit_xor): New function.
833 (ppc64_emit_bit_not): New function.
834 (ppc64_emit_equal): New function.
835 (ppc64_emit_less_signed): New function.
836 (ppc64_emit_less_unsigned): New function.
837 (ppc64_emit_ref): New function.
838 (ppc64_emit_const): New function.
839 (ppc64v1_emit_reg): New function.
840 (ppc64v2_emit_reg): New function.
841 (ppc64_emit_pop): New function.
842 (ppc64_emit_stack_flush): New function.
843 (ppc64_emit_swap): New function.
844 (ppc64v1_emit_call): New function.
845 (ppc64v2_emit_call): New function.
846 (ppc64v1_emit_int_call_1): New function.
847 (ppc64v2_emit_int_call_1): New function.
848 (ppc64v1_emit_void_call_2): New function.
849 (ppc64v2_emit_void_call_2): New function.
850 (ppc64_emit_if_goto): New function.
851 (ppc64_emit_eq_goto): New function.
852 (ppc64_emit_ne_goto): New function.
853 (ppc64_emit_lt_goto): New function.
854 (ppc64_emit_le_goto): New function.
855 (ppc64_emit_gt_goto): New function.
856 (ppc64_emit_ge_goto): New function.
857 (ppc64v1_emit_ops_impl): New static variable.
858 (ppc64v2_emit_ops_impl): New static variable.
859 (ppc_emit_ops): New function.
860 (linux_low_target): Wire in ppc_emit_ops.
862 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
863 Marcin Kościelnicki <koriakin@0x04.net>
866 * Makefile.in: Add powerpc-*-ipa.o
867 * configure.srv: Add ipa_obj for powerpc*-linux.
868 * linux-ppc-ipa.c: New file.
869 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
871 (PPC_FIELD): New macro.
872 (PPC_SEXT): New macro.
873 (PPC_OP6): New macro.
877 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
878 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
879 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
880 (ppc_get_thread_area): New function.
881 (is_elfv2_inferior): New function.
882 (gen_ds_form): New function.
883 (GEN_STD): New macro.
884 (GEN_STDU): New macro.
886 (GEN_LDU): New macro.
887 (gen_d_form): New function.
888 (GEN_ADDI): New macro.
889 (GEN_ADDIS): New macro.
891 (GEN_LIS): New macro.
892 (GEN_ORI): New macro.
893 (GEN_ORIS): New macro.
894 (GEN_LWZ): New macro.
895 (GEN_STW): New macro.
896 (GEN_STWU): New macro.
897 (gen_xfx_form): New function.
898 (GEN_MFSPR): New macro.
899 (GEN_MTSPR): New macro.
900 (GEN_MFCR): New macro.
901 (GEN_MTCR): New macro.
902 (GEN_SYNC): New macro.
903 (GEN_LWSYNC): New macro.
904 (gen_x_form): New function.
907 (GEN_LWARX): New macro.
908 (GEN_STWCX): New macro.
909 (GEN_CMPW): New macro.
910 (gen_md_form): New function.
911 (GEN_RLDICL): New macro.
912 (GEN_RLDICR): New macro.
913 (gen_i_form): New function.
916 (gen_b_form): New function.
917 (GEN_BNE): New macro.
918 (GEN_LOAD): New macro.
919 (GEN_STORE): New macro.
920 (gen_limm): New function.
921 (gen_atomic_xchg): New function.
922 (gen_call): New function.
923 (ppc_relocate_instruction): New function.
924 (ppc_install_fast_tracepoint_jump_pad): New function.
925 (ppc_get_min_fast_tracepoint_insn_len): New function.
926 (ppc_get_ipa_tdesc_idx): New function.
927 (the_low_target): Wire in the new functions.
928 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
930 * linux-ppc-tdesc.h: New file.
932 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
934 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
935 (alloc_jump_pad_buffer): New function.
936 * linux-amd64-ipa.c: Add <sys/mman.h> include.
937 (alloc_jump_pad_buffer): New function.
938 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
939 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
940 (alloc_jump_pad_buffer): New function.
941 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
942 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
943 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
944 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
946 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
948 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
949 * linux-amd64-ipa.c: Likewise.
950 * linux-i386-ipa.c: Likewise.
951 * linux-s390-ipa.c: Likewise.
952 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
953 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
954 set_trace_state_variable_value_ptr.
955 (struct ipa_sym_addresses): Likewise.
956 (symbol_list): Likewise.
957 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
958 accessing gdb_collect directly.
959 (gdb_collect_ptr_type): New typedef.
960 (get_raw_reg_ptr_type): New typedef.
961 (get_trace_state_variable_value_ptr_type): New typedef.
962 (set_trace_state_variable_value_ptr_type): New typedef.
963 (gdb_collect_ptr): New global.
964 (get_raw_reg_ptr): New global.
965 (get_trace_state_variable_value_ptr): New global.
966 (set_trace_state_variable_value_ptr): New global.
967 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
968 accessing get_raw_reg directly.
969 (get_get_tsv_func_addr): Likewise for
970 get_trace_state_variable_value_ptr.
971 (get_set_tsv_func_addr): Likewise for
972 set_trace_state_variable_value_ptr.
973 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
975 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
977 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
979 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
981 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
983 (relocate_instruction): Remove own_buf.
984 * server.c (own_buf): Make global.
985 (handle_v_requests): Make global.
986 * server.h (own_buf): New declaration.
987 (handle_v_requests): New prototype.
989 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
992 * linux-s390-low.c (add_insns): New function.
993 (s390_emit_prologue): New function.
994 (s390_emit_epilogue): New function.
995 (s390_emit_add): New function.
996 (s390_emit_sub): New function.
997 (s390_emit_mul): New function.
998 (s390_emit_lsh): New function.
999 (s390_emit_rsh_signed): New function.
1000 (s390_emit_rsh_unsigned): New function.
1001 (s390_emit_ext): New function.
1002 (s390_emit_log_not): New function.
1003 (s390_emit_bit_and): New function.
1004 (s390_emit_bit_or): New function.
1005 (s390_emit_bit_xor): New function.
1006 (s390_emit_bit_not): New function.
1007 (s390_emit_equal): New function.
1008 (s390_emit_less_signed): New function.
1009 (s390_emit_less_unsigned): New function.
1010 (s390_emit_ref): New function.
1011 (s390_emit_if_goto): New function.
1012 (s390_emit_goto): New function.
1013 (s390_write_goto_address): New function.
1014 (s390_emit_litpool): New function.
1015 (s390_emit_const): New function.
1016 (s390_emit_call): New function.
1017 (s390_emit_reg): New function.
1018 (s390_emit_pop): New function.
1019 (s390_emit_stack_flush): New function.
1020 (s390_emit_zero_ext): New function.
1021 (s390_emit_swap): New function.
1022 (s390_emit_stack_adjust): New function.
1023 (s390_emit_set_r2): New function.
1024 (s390_emit_int_call_1): New function.
1025 (s390_emit_void_call_2): New function.
1026 (s390_emit_eq_goto): New function.
1027 (s390_emit_ne_goto): New function.
1028 (s390_emit_lt_goto): New function.
1029 (s390_emit_le_goto): New function.
1030 (s390_emit_gt_goto): New function.
1031 (s390_emit_ge_goto): New function.
1032 (s390x_emit_prologue): New function.
1033 (s390x_emit_epilogue): New function.
1034 (s390x_emit_add): New function.
1035 (s390x_emit_sub): New function.
1036 (s390x_emit_mul): New function.
1037 (s390x_emit_lsh): New function.
1038 (s390x_emit_rsh_signed): New function.
1039 (s390x_emit_rsh_unsigned): New function.
1040 (s390x_emit_ext): New function.
1041 (s390x_emit_log_not): New function.
1042 (s390x_emit_bit_and): New function.
1043 (s390x_emit_bit_or): New function.
1044 (s390x_emit_bit_xor): New function.
1045 (s390x_emit_bit_not): New function.
1046 (s390x_emit_equal): New function.
1047 (s390x_emit_less_signed): New function.
1048 (s390x_emit_less_unsigned): New function.
1049 (s390x_emit_ref): New function.
1050 (s390x_emit_if_goto): New function.
1051 (s390x_emit_const): New function.
1052 (s390x_emit_call): New function.
1053 (s390x_emit_reg): New function.
1054 (s390x_emit_pop): New function.
1055 (s390x_emit_stack_flush): New function.
1056 (s390x_emit_zero_ext): New function.
1057 (s390x_emit_swap): New function.
1058 (s390x_emit_stack_adjust): New function.
1059 (s390x_emit_int_call_1): New function.
1060 (s390x_emit_void_call_2): New function.
1061 (s390x_emit_eq_goto): New function.
1062 (s390x_emit_ne_goto): New function.
1063 (s390x_emit_lt_goto): New function.
1064 (s390x_emit_le_goto): New function.
1065 (s390x_emit_gt_goto): New function.
1066 (s390x_emit_ge_goto): New function.
1067 (s390_emit_ops): New function.
1068 (struct linux_target_ops): Fill in emit_ops hook.
1070 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1073 * Makefile.in: Add s390 IPA files.
1074 * configure.srv: Build IPA for s390.
1075 * linux-s390-ipa.c: New file.
1076 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1077 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1078 (tdesc_s390_linux32): Likewise.
1079 (init_registers_s390_linux32v1): Likewise.
1080 (tdesc_s390_linux32v1): Likewise.
1081 (init_registers_s390_linux32v2): Likewise.
1082 (tdesc_s390_linux32v2): Likewise.
1083 (init_registers_s390_linux64): Likewise.
1084 (tdesc_s390_linux64): Likewise.
1085 (init_registers_s390_linux64v1): Likewise.
1086 (tdesc_s390_linux64v1): Likewise.
1087 (init_registers_s390_linux64v2): Likewise.
1088 (tdesc_s390_linux64v2): Likewise.
1089 (init_registers_s390_te_linux64): Likewise.
1090 (tdesc_s390_te_linux64): Likewise.
1091 (init_registers_s390_vx_linux64): Likewise.
1092 (tdesc_s390_vx_linux64): Likewise.
1093 (init_registers_s390_tevx_linux64): Likewise.
1094 (tdesc_s390_tevx_linux64): Likewise.
1095 (init_registers_s390x_linux64): Likewise.
1096 (tdesc_s390x_linux64): Likewise.
1097 (init_registers_s390x_linux64v1): Likewise.
1098 (tdesc_s390x_linux64v1): Likewise.
1099 (init_registers_s390x_linux64v2): Likewise.
1100 (tdesc_s390x_linux64v2): Likewise.
1101 (init_registers_s390x_te_linux64): Likewise.
1102 (tdesc_s390x_te_linux64): Likewise.
1103 (init_registers_s390x_vx_linux64): Likewise.
1104 (tdesc_s390x_vx_linux64): Likewise.
1105 (init_registers_s390x_tevx_linux64): Likewise.
1106 (tdesc_s390x_tevx_linux64): Likewise.
1107 (have_hwcap_s390_vx): New static variable.
1108 (s390_arch_setup): Fill have_hwcap_s390_vx.
1109 (s390_get_thread_area): New function.
1110 (s390_ft_entry_gpr_esa): New const.
1111 (s390_ft_entry_gpr_zarch): New const.
1112 (s390_ft_entry_misc): New const.
1113 (s390_ft_entry_fr): New const.
1114 (s390_ft_entry_vr): New const.
1115 (s390_ft_main_31): New const.
1116 (s390_ft_main_64): New const.
1117 (s390_ft_exit_fr): New const.
1118 (s390_ft_exit_vr): New const.
1119 (s390_ft_exit_misc): New const.
1120 (s390_ft_exit_gpr_esa): New const.
1121 (s390_ft_exit_gpr_zarch): New const.
1122 (append_insns): New function.
1123 (s390_relocate_instruction): New function.
1124 (s390_install_fast_tracepoint_jump_pad): New function.
1125 (s390_get_min_fast_tracepoint_insn_len): New function.
1126 (s390_get_ipa_tdesc_idx): New function.
1127 (struct linux_target_ops): Wire in the above functions.
1128 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1129 * linux-s390-tdesc.h: New file.
1131 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1133 * linux-s390-low.c (s390_supports_tracepoints): New function.
1134 (struct linux_target_ops): Fill supports_tracepoints hook.
1136 2016-03-18 Yao Qi <yao.qi@linaro.org>
1138 * linux-low.c (lwp_signal_can_be_delivered): New function.
1139 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1141 2016-03-18 Yao Qi <yao.qi@linaro.org>
1143 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1144 0 if signal is enqueued. Remove 'signal' from one debugging
1145 message. Move one debugging message to some lines below.
1146 Remove code setting 'signal' to 0.
1148 2016-03-18 Yao Qi <yao.qi@linaro.org>
1150 * linux-low.c (linux_low_filter_event): Remove redundant
1151 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1153 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1155 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1156 (struct linux_target_ops): Wire in the above.
1158 2016-03-03 Yao Qi <yao.qi@linaro.org>
1160 * linux-low.c: Update comments to start_step_over.
1162 2016-03-03 Yao Qi <yao.qi@linaro.org>
1165 * linux-low.c (handle_extended_wait): Set child suspended
1166 if event_lwp->bp_reinsert isn't zero.
1168 2016-03-02 Yao Qi <yao.qi@linaro.org>
1170 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1171 enqueue_pending_signal.
1173 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1175 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1178 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1180 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1181 (s390_regmap_3264) [!__s390x__]: New global.
1182 (s390_collect_ptrace_register): Skip map entries containing -1.
1183 (s390_supply_ptrace_register): Ditto.
1184 (s390_fill_gprs_high): New function.
1185 (s390_store_gprs_high): New function.
1186 (s390_regsets): Add NT_S390_HIGH_GPRS.
1187 (s390_get_hwcap): Enable on 31-bit.
1188 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1189 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1190 Detect NT_S390_HIGH_GPRS.
1191 (s390_usrregs_info_3264): Enable on 31-bit.
1192 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1193 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1195 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1198 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1199 * configure.srv: Ditto.
1200 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1201 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1202 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1203 (init_registers_amd64_linux): Remove prototype.
1204 (tdesc_amd64_linux): Remove declaration.
1205 (get_ipa_tdesc): New function.
1206 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1207 initialize remaining tdescs.
1208 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1209 (init_registers_i386_linux): Remove prototype.
1210 (tdesc_i386_linux): Remove declaration.
1211 (get_ipa_tdesc): New function.
1212 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1213 initialize remaining tdescs.
1214 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1215 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1216 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1217 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1218 (x86_get_ipa_tdesc_idx): New function.
1219 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1220 * linux-x86-tdesc.h: New file.
1221 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1222 (target_get_ipa_tdesc_idx): New macro.
1223 * tracepoint.c (ipa_tdesc_idx): New macro.
1224 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1225 (symbol_list): Add ipa_tdesc_idx.
1226 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1227 (ipa_tdesc): Remove.
1228 (ipa_tdesc_idx): New variable.
1229 (get_context_regcache): Use get_ipa_tdesc.
1230 (gdb_collect): Ditto.
1232 * tracepoint.h (get_ipa_tdesc): New prototype.
1233 (ipa_tdesc): Remove.
1235 2016-02-24 Pedro Alves <palves@redhat.com>
1237 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1238 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1239 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1240 Factor out common code between the USE_SIGTRAP_SIGINFO and
1241 !USE_SIGTRAP_SIGINFO blocks.
1242 (linux_low_filter_event): Call save_stop_reason instead of
1243 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1245 (linux_wait_1): Update comments.
1247 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1249 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1250 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1251 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1252 ppc_insert_point, ppc_remove_point.
1254 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1256 * linux-s390-low.c (s390_supports_z_point_type): New function.
1257 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1259 2016-02-16 Yao Qi <yao.qi@linaro.org>
1261 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1262 PC. Get pc from regcache_read_pc.
1264 2016-02-12 Yao Qi <yao.qi@linaro.org>
1266 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1267 or linux_get_pc_32bit.
1268 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1270 2016-02-12 Yao Qi <yao.qi@linaro.org>
1272 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1273 arm_linux_get_next_pcs_fixup.
1275 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1277 * tracepoint.c (x_tracepoint_action_download): Change
1278 write_inferior_data_ptr to write_inferior_data_pointer.
1279 (cmd_qtstart): Likewise.
1280 (write_inferior_data_ptr): Remove.
1281 (download_agent_expr): Change write_inferior_data_ptr to
1282 write_inferior_data_pointer.
1283 (download_tracepoint_1): Likewise.
1284 (download_tracepoint): Likewise.
1285 (download_trace_state_variables): Likewise.
1287 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1288 Marcin Kościelnicki <koriakin@0x04.net>
1290 * tracepoint.c (struct tracepoint_action_ops): Remove.
1291 (struct tracepoint_action): Remove ops.
1292 (m_tracepoint_action_download, r_tracepoint_action_download)
1293 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1294 size and offset accordingly.
1295 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1296 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1297 (tracepoint_action_send, tracepoint_action_download): New functions.
1298 Helpers for trace action handlers.
1299 (add_tracepoint_action): Remove setup actions ops.
1300 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1302 2016-02-10 Yao Qi <yao.qi@linaro.org>
1304 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1306 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1308 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1310 * configure: Regenerate.
1312 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1314 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1315 void * to gdb_byte *.
1316 * linux-low.c (siginfo_fixup): Likewise.
1317 (linux_xfer_siginfo): Likewise.
1318 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1320 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1322 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1324 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1326 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1328 * linux-x86-low.c [__x86_64__]: Include
1329 "nat/amd64-linux-siginfo.h".
1330 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1331 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1332 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1333 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1334 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1335 (cpt_si_fd, si_timerid, si_overrun): Move from
1336 nat/amd64-linux-siginfo.c.
1337 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1339 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1341 * server.c (skip_to_semicolon): Remove.
1342 (process_point_options): Use strchrnul instead of
1345 2016-01-26 Yao Qi <yao.qi@linaro.org>
1347 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1348 * linux-low.c (install_software_single_step_breakpoints): Don't
1349 call regcache_read_pc.
1350 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1353 2016-01-26 Yao Qi <yao.qi@linaro.org>
1355 * linux-low.c (install_software_single_step_breakpoints): Call
1356 regcache_read_pc instead of get_pc.
1358 2016-01-26 Yao Qi <yao.qi@linaro.org>
1360 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1361 (unblock_async_io): Rename to ...
1362 (block_unblock_async_io): ... it. New function.
1363 (enable_async_io): Don't install SIGIO handler. Unblock it
1365 (disable_async_io): Don't ignore SIGIO. Block it instead.
1366 (initialize_async_io): Install SIGIO handler. Don't call
1369 2016-01-26 Yao Qi <yao.qi@linaro.org>
1371 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1372 first character is '\003', call *the_target->request_interrupt.
1374 2016-01-25 Yao Qi <yao.qi@linaro.org>
1376 * remote-utils.c (new_thread_notify): Remove.
1377 (dead_thread_notify): Likewise.
1378 * remote-utils.h (new_thread_notify): Remove declaration.
1379 (dead_thread_notify): Likewise.
1381 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1383 * gdb.trace/pending.exp: Fix expected message on continue.
1385 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1387 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1388 it works properly on big-endian machines where sizeof (CORE_ADDR)
1391 2016-01-21 Pedro Alves <palves@redhat.com>
1393 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1394 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1395 * configure: Regenerate.
1397 2016-01-21 Yao Qi <yao.qi@linaro.org>
1399 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1400 is_thumb and set it according to CPSR saved on the stack.
1401 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1402 arm_sigreturn_next_pc.
1404 2016-01-18 Yao Qi <yao.qi@linaro.org>
1406 * linux-low.c (linux_set_pc_64bit): New function.
1407 (linux_get_pc_64bit): New function.
1408 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1410 * linux-sparc-low.c (debug_threads): Remove declaration.
1411 (sparc_get_pc): Remove.
1412 (the_low_target): Use linux_get_pc_64bit instead of
1414 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1415 (the_low_target): Use linux_get_pc_64bit and
1418 2016-01-18 Yao Qi <yao.qi@linaro.org>
1420 * linux-arm-low.c (debug_threads): Remove declaration.
1421 (arm_get_pc, arm_set_pc): Remove.
1422 (the_low_target): Use linux_get_pc_32bit and
1424 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1425 (the_low_target): Use linux_get_pc_32bit and
1427 * linux-cris-low.c (debug_threads): Remove declaration.
1428 (cris_get_pc, cris_set_pc,): Remove.
1429 (the_low_target): Use linux_get_pc_32bit and
1431 * linux-crisv32-low.c (debug_threads): Remove declaration.
1432 (cris_get_pc, cris_set_pc): Remove.
1433 (the_low_target): Use linux_get_pc_32bit and
1435 * linux-low.c: Include inttypes.h.
1436 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1437 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1438 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1439 (the_low_target): Use linux_get_pc_32bit and
1441 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1442 (the_low_target): Use linux_get_pc_32bit and
1444 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1445 (the_low_target): Use linux_get_pc_32bit and
1447 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1448 (the_low_target): Use linux_get_pc_32bit and
1450 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1451 (the_low_target): Use linux_get_pc_32bit and
1454 2016-01-18 Gary Benson <gbenson@redhat.com>
1456 * configure.ac (AC_FUNC_FORK): New check.
1457 * config.in: Regenerate.
1458 * configure: Likewise.
1460 2016-01-14 Yao Qi <yao.qi@linaro.org>
1462 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1463 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1464 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1465 arm_get_next_pcs_ctor.
1467 2016-01-12 Josh Stone <jistone@redhat.com>
1468 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1470 * inferiors.h: Include "gdb_vecs.h".
1471 (struct process_info): Add syscalls_to_catch.
1472 * inferiors.c (remove_process): Free syscalls_to_catch.
1473 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1474 syscall_return stops.
1475 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1476 * server.c (handle_general_set): Handle QCatchSyscalls.
1477 (handle_query): Report support for QCatchSyscalls.
1478 * target.h (struct target_ops): Add supports_catch_syscall.
1479 (target_supports_catch_syscall): New macro.
1480 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1481 (struct lwp_info): Add syscall_state.
1482 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1483 Maintain syscall_state and syscalls_to_catch across exec.
1484 (get_syscall_trapinfo): New function, proxy to the_low_target.
1485 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1486 (linux_low_filter_event): Toggle syscall_state entry/return for
1487 syscall traps, and set it ignored for all others.
1488 (gdb_catching_syscalls_p): New function.
1489 (gdb_catch_this_syscall_p): New function.
1490 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1491 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1492 (linux_supports_catch_syscall): New function.
1493 (linux_target_ops): Install it.
1494 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1495 (the_low_target): Install it.
1497 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1499 * acinclude.m4: Include new ../warning.m4 file.
1500 * configure: Regenerated.
1501 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1503 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1505 * ax.c (is_goto_target): Mark static.
1506 * linux-low.c (register_addr): Likewise.
1507 (linux_fetch_registers, linux_store_registers): Likewise.
1508 * mem-break.c (any_persistent_commands): Fix old prototype.
1509 (add_commands_to_breakpoint): Mark static.
1510 * regcache.c (find_register_by_name): Delete unused func.
1511 * remote-utils.c (hex_or_minus_one): Mark static.
1512 * server.c (monitor_show_help): Mark static.
1513 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1514 handle_v_requests): Likewise.
1516 2016-01-12 Pedro Alves <palves@redhat.com>
1518 Remove use of the registered trademark symbol throughout.
1520 2016-01-08 Yao Qi <yao.qi@linaro.org>
1522 * remote-utils.c (getpkt): If c is '\003', call target hook
1525 2016-01-06 Yao Qi <yao.qi@linaro.org>
1527 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1528 linux-aarch32-low.c.
1529 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1530 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1531 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1532 (thumb2_breakpoint): Declare.
1533 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1534 linux-aarch32-low.h.
1535 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1536 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1537 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1539 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1541 * gdbreplay.c (gdbreplay_version): Change copyright year in
1543 * server.c (gdbserver_version): Likewise.
1545 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1547 * server.c (crc32_table): Delete.
1548 (crc32): Use libiberty's xcrc32 function.
1550 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1552 * lynx-low.c (lynx_delete_thread_callback): New function.
1553 (lynx_mourn): Properly delete our process and all of its
1554 threads. Remove call to clear_inferiors.
1556 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1558 * target.c (thread_search_callback): Add check that
1559 the thread_stopped target callback is not NULL before
1562 2015-12-21 Yao Qi <yao.qi@linaro.org>
1564 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1567 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1569 * server.c (handle_query): Call target_supports_software_single_step.
1571 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1573 * linux-low.c (single_step): New function.
1574 (linux_resume_one_lwp_throw): Call single_step.
1575 (start_step_over): Likewise.
1577 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1579 * Makefile.in (SFILES): Append arch/arm-linux.c,
1580 arch/arm-get-next-pcs.c.
1581 (arm-linux.o): New rule.
1582 (arm-get-next-pcs.o): New rule.
1583 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1585 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1586 to linux-aarch32-low.c.
1587 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1588 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1589 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1590 (thumb2_breakpoint_len): Likewise.
1591 (arm_is_thumb_mode): Make non-static.
1592 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1593 from linux-aarch32-low.c.
1594 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1595 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1596 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1597 (thumb2_breakpoint_len): Likewise.
1598 (arm_is_thumb_mode): New declaration.
1599 * linux-arm-low.c: Include arch/arm-linux.h
1600 aarch/arm-get-next-pcs.h, sys/syscall.h.
1601 (get_next_pcs_ops): New struct.
1602 (get_next_pcs_addr_bits_remove): New function.
1603 (get_next_pcs_is_thumb): New function.
1604 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1605 (arm_sigreturn_next_pc): Likewise.
1606 (get_next_pcs_syscall_next_pc): Likewise.
1607 (arm_gdbserver_get_next_pcs): Likewise.
1608 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1610 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1611 * server.h: Include gdb_vecs.h.
1613 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1615 * Makefile.in (SFILES): Append common/common-regcache.c.
1616 (OBS): Append common-regcache.o.
1617 (common-regcache.o): New rule.
1618 * regcache.c (init_register_cache): Initialize cache to
1620 (regcache_raw_read_unsigned): New function.
1621 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1622 register_status enum.
1624 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1626 * linux-aarch64-low.c (the_low_targets): Rename
1627 breakpoint_reinsert_addr to get_next_pcs.
1628 * linux-arm-low.c (the_low_targets): Likewise.
1629 * linux-bfin-low.c (the_low_targets): Likewise.
1630 * linux-cris-low.c (the_low_targets): Likewise.
1631 * linux-crisv32-low.c (the_low_targets): Likewise.
1632 * linux-low.c (can_software_single_step): Likewise.
1633 (install_software_single_step_breakpoints): New function.
1634 (start_step_over): Use install_software_single_step_breakpoints.
1635 * linux-low.h: New CORE_ADDR vector.
1636 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1638 * linux-mips-low.c (the_low_targets): Likewise.
1639 * linux-nios2-low.c (the_low_targets): Likewise.
1640 * linux-sparc-low.c (the_low_targets): Likewise.
1642 2015-12-17 Pedro Alves <palves@redhat.com>
1644 * linux-low.c (linux_kill_one_lwp): Remove references to
1646 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1648 (linux_init_signals): Delete.
1649 (initialize_low): Adjust.
1650 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1652 2015-12-16 Pedro Alves <palves@redhat.com>
1654 * configure.ac (compiler warning flags): When testing a
1655 -Wno-foo option, check whether -Wfoo works instead.
1656 * configure: Regenerate.
1658 2015-12-11 Don Breazeal <donb@codesourcery.com>
1660 * server.c (process_serial_event): Don't exit from gdbserver
1661 in remote mode if there are still active inferiors.
1663 2015-12-11 Yao Qi <yao.qi@linaro.org>
1665 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1666 arm_breakpoint_at if the process is 32-bit.
1668 2015-12-11 Yao Qi <yao.qi@linaro.org>
1670 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1673 2015-12-07 Yao Qi <yao.qi@linaro.org>
1675 * configure.srv: Append arm.o to srv_tgtobj for
1676 aarch64*-*-linux* target.
1677 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1678 from linux-arm-low.c.
1679 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1680 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1681 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1682 (thumb2_breakpoint_len): Likewise.
1683 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1684 (arm_breakpoint_kinds): Likewise.
1685 (arm_breakpoint_kind_from_pc): Likewise.
1686 (arm_sw_breakpoint_from_kind): Likewise.
1687 (arm_breakpoint_kind_from_current_state): Likewise.
1688 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1689 (arm_sw_breakpoint_from_kind): Declare.
1690 (arm_breakpoint_kind_from_current_state): Declare.
1691 (arm_breakpoint_at): Declare.
1692 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1693 arm_sw_breakpoint_from_kind if process is 32-bit.
1694 (aarch64_breakpoint_kind_from_pc): New function.
1695 (aarch64_breakpoint_kind_from_current_state): New function.
1696 (the_low_target): Initialize fields breakpoint_kind_from_pc
1697 and breakpoint_kind_from_current_state.
1698 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1699 linux-aarch32-low.c.
1700 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1701 (arm_breakpoint, arm_breakpoint_len): Likewise.
1702 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1703 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1704 (arm_is_thumb_mode): Likewise.
1705 (arm_breakpoint_at): Likewise.
1706 (arm_breakpoint_kind_from_pc): Likewise.
1707 (arm_sw_breakpoint_from_kind): Likewise.
1708 (arm_breakpoint_kind_from_current_state): Likewise.
1711 2015-08-04 Yao Qi <yao.qi@linaro.org>
1713 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1714 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1715 * server.c (extended_protocol): Remove "static".
1716 * server.h (extended_protocol): Declare it.
1718 2015-12-04 Josh Stone <jistone@redhat.com>
1720 * target.h (struct target_ops) <arch_setup>: Rename to ...
1721 (struct target_ops) <post_create_inferior>: ... this.
1722 (target_arch_setup): Rename to ...
1723 (target_post_create_inferior): ... this, calling post_create_inferior.
1724 * server.c (start_inferior): Update target_arch_setup calls to
1725 target_post_create_inferior.
1726 * linux-low.c (linux_low_ptrace_options): Forward declare.
1727 (linux_arch_setup): Update its comment for general use.
1728 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1729 (struct linux_target_ops): Use linux_post_create_inferior.
1730 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1731 to post_create_inferior.
1732 * nto-low.c (struct nto_target_ops): Likewise.
1733 * spu-low.c (struct spu_target_ops): Likewise.
1734 * win32-low.c (struct win32_target_ops): Likewise.
1736 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1738 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1740 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1742 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1743 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1744 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1745 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1746 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1747 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1748 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1749 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1750 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1751 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1752 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1753 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1755 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1757 * linux-low.c (linux_look_up_symbols): Don't call
1758 linux_supports_traceclone.
1759 * linux-low.h (thread_db_init): Remove use_events argument.
1760 * thread-db.c (thread_db_use_event): Remove global variable.
1761 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1762 (struct thread_db) <td_create_bp>: Remove field.
1763 (thread_db_create_event): Remove function.
1764 (thread_db_enable_reporting): Likewise.
1765 (find_one_thread): Don't check for thread_db_use_events.
1766 (attach_thread): Likewise.
1767 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1768 (try_thread_db_load_1): Don't check for thread_db_use_events.
1769 (thread_db_init): Remove use_events argument and thread events
1771 (remove_thread_event_breakpoints): Remove function.
1772 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1774 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1776 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1778 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1779 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1780 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1781 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1782 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1784 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1786 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1787 * linux-low.c (can_hardware_single_step): Use
1788 supports_hardware_single_step.
1789 (can_software_single_step): New function.
1790 (start_step_over): Call can_software_single_step.
1791 (linux_supports_hardware_single_step): New function.
1792 (struct target_ops) <supports_software_single_step>: Initialize.
1793 * linux-low.h (struct linux_target_ops)
1794 <supports_hardware_single_step>: Initialize.
1795 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1796 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1797 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1798 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1799 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1800 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1801 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1802 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1803 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1804 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1806 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1807 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1809 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1810 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1811 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1813 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1814 * target.h (struct target_ops): <supports_software_single_step>:
1816 (target_supports_software_single_step): New macro.
1818 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1820 * linux-low.c (linux_wait_1): Fix pc advance condition.
1821 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1822 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1824 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1826 * linux-arm-low.c (arm_is_thumb_mode): New function.
1827 (arm_breakpoint_at): Use arm_is_thumb_mode.
1828 (arm_breakpoint_kind_from_current_state): New function.
1829 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1831 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1832 (linux_breakpoint_kind_from_current_state): New function.
1833 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1834 * linux-low.h (struct linux_target_ops)
1835 <breakpoint_kind_from_current_state>: New field.
1836 * target.h (struct target_ops): Likewise.
1837 (target_breakpoint_kind_from_current_state): New macro.
1839 2015-11-30 Pedro Alves <palves@redhat.com>
1841 * linux-low.c (linux_resume): Wake up the event loop before
1844 2015-11-30 Pedro Alves <palves@redhat.com>
1846 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1848 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1850 * target.c (struct thread_search): New structure.
1851 (thread_search_callback): New function.
1852 (prev_general_thread): New global.
1853 (prepare_to_access_memory, done_accessing_memory): New functions.
1854 * target.h (prepare_to_access_memory, done_accessing_memory):
1855 Replace macros with function declarations.
1857 2015-11-30 Pedro Alves <palves@redhat.com>
1860 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1861 report TARGET_WAITKIND_NO_RESUMED.
1862 * remote-utils.c (prepare_resume_reply): Handle
1863 TARGET_WAITKIND_NO_RESUMED.
1864 * server.c (report_no_resumed): New global.
1865 (handle_query) <qSupported>: Handle "no-resumed+". Report
1866 "no-resumed+" support.
1867 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1868 return error if the client doesn't support no-resumed events.
1869 (push_stop_notification): New function.
1870 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1871 events if the client supports them.
1873 2015-11-30 Pedro Alves <palves@redhat.com>
1875 * linux-low.c (thread_still_has_status_pending_p): Don't check
1877 (lwp_resumed): New function.
1878 (status_pending_p_callback): Return early if the LWP is not
1879 supposed to be resumed.
1881 2015-11-30 Pedro Alves <palves@redhat.com>
1883 * linux-low.c (handle_extended_wait): Assert that the LWP's
1884 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1885 thread create events, leave the new child's status pending.
1886 (linux_low_filter_event): If GDB wants to hear about thread exit
1887 events, leave the LWP marked dead and don't delete it.
1888 (linux_wait_for_event_filtered): Don't check for thread exit.
1889 (filter_exit_event): New function.
1890 (linux_wait_1): Use it, when returning an exit event.
1891 (linux_resume_one_lwp_throw): Assert that the LWP's
1892 waitstatus is TARGET_WAITKIND_IGNORE.
1893 * remote-utils.c (prepare_resume_reply): Handle
1894 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1895 * server.c (report_thread_events): New global.
1896 (handle_general_set): Handle QThreadEvents.
1897 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1898 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1899 TARGET_WAITKIND_THREAD_EXITED.
1900 * server.h (report_thread_events): Declare.
1902 2015-11-30 Pedro Alves <palves@redhat.com>
1904 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1905 the thread's last_resume_kind was resume_stop.
1907 2015-11-30 Pedro Alves <palves@redhat.com>
1909 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1912 2015-11-30 Pedro Alves <palves@redhat.com>
1914 * server.c (handle_v_requests): Handle vCtrlC.
1916 2015-11-30 Pedro Alves <palves@redhat.com>
1918 * gdbthread.h (find_any_thread_of_pid): Declare.
1919 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1921 * server.c (handle_query): If current_thread is NULL, look for
1922 another thread of the selected process.
1924 2015-11-26 Daniel Colascione <dancol@dancol.org>
1925 Simon Marchi <simon.marchi@ericsson.com>
1927 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1928 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1930 * target.h (struct target_ops) <thread_name>: New field.
1931 (target_thread_name): New macro.
1933 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1935 * regcache.h (regcache_invalidate_pid): Add declaration.
1936 * regcache.c (regcache_invalidate_pid): New function, extracted
1937 from regcache_invalidate.
1938 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1939 Add trivial documentation comment.
1940 * lynx-low.c: Use regcache_invalidate_pid instead of
1941 regcache_invalidate.
1943 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1945 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1946 and Elf64_auxv_t if the target is Android.
1948 2015-11-22 Doug Evans <xdje42@gmail.com>
1950 * target.h: #include <sys/types.h>.
1952 2015-11-19 Pedro Alves <palves@redhat.com>
1954 * linux-low.c (linux_process_qsupported): Change prototype.
1956 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1958 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1959 and adjust to loop over all features.
1960 * server.c (handle_query) <qSupported>: Adjust to call
1961 target_process_qsupported once, passing it a vector of unprocessed
1963 * target.h (struct target_ops) <process_qsupported>: Change
1965 (target_process_qsupported): Adjust.
1967 2015-11-19 Pedro Alves <palves@redhat.com>
1969 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1971 * configure: Regenerate.
1973 2015-11-19 Pedro Alves <palves@redhat.com>
1975 * configure: Regenerate.
1977 2015-11-19 Yao Qi <yao.qi@linaro.org>
1979 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1982 2015-11-19 Yao Qi <yao.qi@linaro.org>
1984 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1985 (struct aarch64_operand): Move enum out.
1987 2015-11-19 Yao Qi <yao.qi@linaro.org>
1989 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1990 struct user_fpsimd_state *.
1991 (aarch64_store_fpregset): Likewise.
1993 2015-11-19 Yao Qi <yao.qi@linaro.org>
1995 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1996 struct user_pt_regs *.
1997 (aarch64_store_gregset): Likewise.
1999 2015-11-18 Pedro Alves <palves@redhat.com>
2001 * Makefile.in (all_object_files): Add $IPA_OBJS.
2003 2015-11-17 Pedro Alves <palves@redhat.com>
2005 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2006 GDB_SIGNAL_0 and gdb_signal_to_string.
2008 2015-11-17 Pedro Alves <palves@redhat.com>
2010 * win32-low.c (handle_output_debug_string): Remove parameter.
2011 (win32_kill): Remove our_status local and adjust call to
2012 handle_output_debug_string.
2013 (get_child_debug_event): Adjust call to
2014 handle_output_debug_string.
2016 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2018 * linux-mips-low.c (mips_fill_gregset): Add cast.
2019 (mips_store_gregset): Likewise.
2020 (mips_fill_fpregset): Likewise.
2021 (mips_store_fpregset): Likewise.
2023 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2025 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2028 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2030 * linux-mips-low.c (mips_linux_new_thread): Change type of
2031 watch_type to enum target_hw_bp_type.
2033 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2035 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2036 Change return type to arm_hwbp_type.
2038 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2040 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2041 (arm_store_gregset): Likewise.
2042 * linux-arm-low.c (arm_get_hwcap): Likewise.
2043 (arm_read_description): Likewise.
2045 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2047 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2049 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2051 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2052 (ppc_fill_vsxregset): Likewise.
2053 (ppc_store_vsxregset): Likewise.
2054 (ppc_fill_vrregset): Likewise.
2055 (ppc_store_vrregset): Likewise.
2056 (ppc_fill_evrregset): Likewise.
2057 (ppc_store_evrregset): Likewise.
2059 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2061 * linux-ppc-low.c (ppc_usrregs_info): Remove
2062 forward-declaration.
2063 (ppc_arch_setup): Move lower in file.
2065 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2067 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2068 (ps_pdwrite): Likewise.
2070 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2072 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2073 to after assert checks.
2075 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2077 * proc-service.c (ps_pdread): Add/adjust casts.
2078 (ps_pdwrite): Add/adjust casts.
2080 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2082 * server.c (handle_search_memory_1): Cast return value of
2085 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2087 * server.c (write_qxfer_response): Change type of data to
2090 2015-10-29 Pedro Alves <palves@redhat.com>
2092 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2094 2015-10-29 Pedro Alves <palves@redhat.com>
2096 * tracepoint.c (clear_installed_tracepoints): Add casts.
2098 2015-10-29 Pedro Alves <palves@redhat.com>
2100 * server.c (handle_v_cont, process_serial_event): Add enum
2101 gdb_signal casts to signal parsing code.
2103 2015-10-29 Pedro Alves <palves@redhat.com>
2105 * linux-low.h (NULL_REGSET): Define.
2106 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2107 * linux-arm-low.c (arm_regsets): Likewise.
2108 * linux-crisv32-low.c (cris_regsets): Likewise.
2109 * linux-m68k-low.c (m68k_regsets): Likewise.
2110 * linux-mips-low.c (mips_regsets): Likewise.
2111 * linux-nios2-low.c (nios2_regsets): Likewise.
2112 * linux-ppc-low.c (ppc_regsets): Likewise.
2113 * linux-s390-low.c (s390_regsets): Likewise.
2114 * linux-sh-low.c (sh_regsets): Likewise.
2115 * linux-sparc-low.c (sparc_regsets): Likewise.
2116 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2117 * linux-tile-low.c (tile_regsets): Likewise.
2118 * linux-x86-low.c (x86_regsets): Likewise.
2119 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2121 2015-10-29 Pedro Alves <palves@redhat.com>
2123 * linux-low.h (NULL_REGSET): Define.
2124 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2125 * linux-arm-low.c (arm_regsets): Likewise.
2126 * linux-crisv32-low.c (cris_regsets): Likewise.
2127 * linux-m68k-low.c (m68k_regsets): Likewise.
2128 * linux-mips-low.c (mips_regsets): Likewise.
2129 * linux-nios2-low.c (nios2_regsets): Likewise.
2130 * linux-ppc-low.c (ppc_regsets): Likewise.
2131 * linux-s390-low.c (s390_regsets): Likewise.
2132 * linux-sh-low.c (sh_regsets): Likewise.
2133 * linux-sparc-low.c (sparc_regsets): Likewise.
2134 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2135 * linux-tile-low.c (tile_regsets): Likewise.
2136 * linux-x86-low.c (x86_regsets): Likewise.
2137 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2139 2015-10-26 Doug Evans <dje@google.com>
2141 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2143 2015-10-26 Doug Evans <dje@google.com>
2145 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2147 2015-10-26 Doug Evans <dje@google.com>
2149 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2151 (attach_thread, find_new_threads_callback): Ditto.
2153 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2155 * mem-break.h (set_breakpoint_data): Remove.
2157 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2159 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2160 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2161 (initialize_low): Remove set_breakpoint_data call.
2162 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2163 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2164 (initialize_low): Remove set_breakpoint_data call.
2165 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2166 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2167 (initialize_low): Remove set_breakpoint_data call.
2169 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2171 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2172 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2173 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2174 * target.h (target_breakpoint_kind_from_pc): New macro.
2176 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2178 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2179 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2180 the default breakpoint kind.
2182 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2184 * linux-arm-low.c (arm_supports_z_point_type): Add software
2187 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2189 * linux-arm-low.c: Refactor breakpoint definitions.
2190 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2191 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2193 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2195 * Makefile.in: Add arm.c/o.
2196 * configure.srv: Likewise.
2197 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2198 (arm_breakpoint_kind_from_pc): New function.
2199 (arm_sw_breakpoint_from_kind): Return proper kind.
2200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2202 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2204 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2206 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2207 (struct raw_breakpoint) <size>: Remove.
2208 (struct raw_breakpoint) <kind>: Add.
2209 (bp_size): New function.
2210 (bp_opcode): Likewise.
2211 (find_raw_breakpoint_at): Adjust for kind.
2212 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2213 (remove_memory_breakpoint): Adjust for kind call bp_size.
2214 (set_raw_breakpoint_at): Adjust for kind.
2215 (set_breakpoint): Likewise.
2216 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2217 (delete_raw_breakpoint): Adjust for kind.
2218 (delete_breakpoint): Likewise.
2219 (find_gdb_breakpoint): Likewise.
2220 (set_gdb_breakpoint_1): Likewise.
2221 (set_gdb_breakpoint): Likewise.
2222 (delete_gdb_breakpoint_1): Likewise.
2223 (delete_gdb_breakpoint): Likewise.
2224 (uninsert_raw_breakpoint): Likewise.
2225 (reinsert_raw_breakpoint): Likewise.
2226 (set_breakpoint_data): Remove.
2227 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2228 (check_mem_read): Adjust for kind call bp_size.
2229 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2230 (clone_one_breakpoint): Adjust for kind.
2231 * mem-break.h (set_gdb_breakpoint): Likewise.
2232 (delete_gdb_breakpoint): Likewise.
2233 * server.c (process_serial_event): Likewise.
2235 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2237 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2238 (struct linux_target_ops) <breakpoint>: Remove.
2239 (struct linux_target_ops) <breakpoint_len>: Remove.
2240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2242 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2243 (arm_sw_breakpoint_from_kind): New function.
2244 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2245 (struct linux_target_ops) <breakpoint>: Remove.
2246 (struct linux_target_ops) <breakpoint_len>: Remove.
2247 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2248 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2249 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2250 (struct linux_target_ops) <breakpoint>: Remove.
2251 (struct linux_target_ops) <breakpoint_len>: Remove.
2252 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2253 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2254 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2255 (struct linux_target_ops) <breakpoint>: Remove.
2256 (struct linux_target_ops) <breakpoint_len>: Remove.
2257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2259 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2260 and sw_breakpoint_from_kind to increment the pc.
2261 (linux_breakpoint_kind_from_pc): New function.
2262 (linux_sw_breakpoint_from_kind): New function.
2263 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2264 (initialize_low): Call breakpoint_kind_from_pc and
2265 sw_breakpoint_from_kind to replace breakpoint_data/len.
2266 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2269 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2270 (struct linux_target_ops) <breakpoint>: Remove.
2271 (struct linux_target_ops) <breakpoint_len>: Remove.
2272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2274 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2275 (struct linux_target_ops) <breakpoint>: Remove.
2276 (struct linux_target_ops) <breakpoint_len>: Remove.
2277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2279 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2280 (struct linux_target_ops) <breakpoint>: Remove.
2281 (struct linux_target_ops) <breakpoint_len>: Remove.
2282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2284 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2285 (struct linux_target_ops) <breakpoint>: Remove.
2286 (struct linux_target_ops) <breakpoint_len>: Remove.
2287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2289 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2290 (struct linux_target_ops) <breakpoint>: Remove.
2291 (struct linux_target_ops) <breakpoint_len>: Remove.
2292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2294 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2295 (struct linux_target_ops) <breakpoint>: Remove.
2296 (struct linux_target_ops) <breakpoint_len>: Remove.
2297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2299 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2300 (struct linux_target_ops) <breakpoint>: Remove.
2301 (struct linux_target_ops) <breakpoint_len>: Remove.
2302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2304 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2305 (struct linux_target_ops) <breakpoint>: Remove.
2306 (struct linux_target_ops) <breakpoint_len>: Remove.
2307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2309 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2310 (struct linux_target_ops) <breakpoint>: Remove.
2311 (struct linux_target_ops) <breakpoint_len>: Remove.
2312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2314 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2315 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2316 (struct linux_target_ops) <breakpoint>: Remove.
2317 (struct linux_target_ops) <breakpoint_len>: Remove.
2318 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2320 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2321 (struct linux_target_ops) <breakpoint>: Remove.
2322 (struct linux_target_ops) <breakpoint_len>: Remove.
2323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2326 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2328 * linux-cris-low.c (cris_get_pc): Remove void arg.
2330 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2332 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2335 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2337 * inferiors.c (thread_pid_matches_callback): New function.
2338 (find_thread_process): New function.
2339 (remove_thread): Reset current_thread.
2340 (remove_process): Assert threads have been removed first.
2342 2015-10-15 Yao Qi <yao.qi@linaro.org>
2344 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2346 (aarch64_remove_point): Likewise.
2347 * regcache.c (regcache_register_size): New function.
2349 2015-10-12 Yao Qi <yao.qi@linaro.org>
2351 * linux-aarch64-low.c: Update all callers as emit_load_store
2352 is renamed to aarch64_emit_load_store.
2354 2015-10-12 Yao Qi <yao.qi@linaro.org>
2356 * linux-aarch64-low.c: Update all callers of function renaming
2357 from emit_insn to aarch64_emit_insn.
2359 2015-10-12 Yao Qi <yao.qi@linaro.org>
2361 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2362 arch/aarch64-insn.h.
2363 (struct aarch64_memory_operand): Likewise.
2365 (emit_insn): Move to arch/aarch64-insn.c.
2366 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2367 (emit_load_store): Move to arch/aarch64-insn.c.
2368 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2369 (can_encode_int32): Remove.
2371 2015-10-12 Yao Qi <yao.qi@linaro.org>
2373 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2374 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2375 (aarch64_relocate_instruction): Likewise.
2376 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2377 (struct aarch64_insn_visitor): Likewise.
2379 2015-10-12 Yao Qi <yao.qi@linaro.org>
2381 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2382 (struct aarch64_insn_visitor): New.
2383 (struct aarch64_insn_relocation_data): New.
2384 (aarch64_ftrace_insn_reloc_b): New function.
2385 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2386 (aarch64_ftrace_insn_reloc_cb): Likewise.
2387 (aarch64_ftrace_insn_reloc_tb): Likewise.
2388 (aarch64_ftrace_insn_reloc_adr): Likewise.
2389 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2390 (aarch64_ftrace_insn_reloc_others): Likewise.
2392 (aarch64_relocate_instruction): Use visitor.
2394 2015-10-12 Yao Qi <yao.qi@linaro.org>
2396 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2397 int. Add argument buf.
2398 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2399 aarch64_relocate_instruction.
2401 2015-10-12 Yao Qi <yao.qi@linaro.org>
2403 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2404 argument insn. Remove local variable insn. Don't call
2406 (aarch64_install_fast_tracepoint_jump_pad): Call
2409 2015-09-30 Yao Qi <yao.qi@linaro.org>
2411 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2412 (emit_load_store_pair): Likewise.
2414 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2416 * dll.c (match_dll): Add cast(s).
2417 (unloaded_dll): Likewise.
2418 * linux-low.c (second_thread_of_pid_p): Likewise.
2419 (delete_lwp_callback): Likewise.
2420 (count_events_callback): Likewise.
2421 (select_event_lwp_callback): Likewise.
2422 (linux_set_resume_request): Likewise.
2423 * server.c (accumulate_file_name_length): Likewise.
2424 (emit_dll_description): Likewise.
2425 (handle_qxfer_threads_worker): Likewise.
2426 (visit_actioned_threads): Likewise.
2427 * thread-db.c (any_thread_of): Likewise.
2428 * tracepoint.c (same_process_p): Likewise.
2429 (match_blocktype): Likewise.
2430 (build_traceframe_info_xml): Likewise.
2432 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2434 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2436 (gdb_unparse_agent_expr): Likewise.
2437 * hostio.c (require_data): Likewise.
2438 (handle_pread): Likewise.
2439 * linux-low.c (disable_regset): Likewise.
2440 (fetch_register): Likewise.
2441 (store_register): Likewise.
2442 (get_dynamic): Likewise.
2443 (linux_qxfer_libraries_svr4): Likewise.
2444 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2445 (set_fast_tracepoint_jump): Likewise.
2446 (uninsert_fast_tracepoint_jumps_at): Likewise.
2447 (reinsert_fast_tracepoint_jumps_at): Likewise.
2448 (validate_inserted_breakpoint): Likewise.
2449 (clone_agent_expr): Likewise.
2450 * regcache.c (init_register_cache): Likewise.
2451 * remote-utils.c (putpkt_binary_1): Likewise.
2452 (decode_M_packet): Likewise.
2453 (decode_X_packet): Likewise.
2454 (look_up_one_symbol): Likewise.
2455 (relocate_instruction): Likewise.
2456 (monitor_output): Likewise.
2457 * server.c (handle_search_memory): Likewise.
2458 (handle_qxfer_exec_file): Likewise.
2459 (handle_qxfer_libraries): Likewise.
2460 (handle_qxfer): Likewise.
2461 (handle_query): Likewise.
2462 (handle_v_cont): Likewise.
2463 (handle_v_run): Likewise.
2464 (captured_main): Likewise.
2465 * target.c (write_inferior_memory): Likewise.
2466 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2467 * tracepoint.c (init_trace_buffer): Likewise.
2468 (add_tracepoint_action): Likewise.
2469 (add_traceframe): Likewise.
2470 (add_traceframe_block): Likewise.
2471 (cmd_qtdpsrc): Likewise.
2472 (cmd_qtdv): Likewise.
2473 (cmd_qtstatus): Likewise.
2474 (response_source): Likewise.
2475 (response_tsv): Likewise.
2476 (cmd_qtnotes): Likewise.
2477 (gdb_collect): Likewise.
2478 (initialize_tracepoint): Likewise.
2480 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2482 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2483 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2484 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2486 (enum aarch64_condition_codes): New enum.
2487 (w0): New static global.
2490 (struct aarch64_memory_operand) <type>: New
2491 MEMORY_OPERAND_POSTINDEX type.
2492 (postindex_memory_operand): New helper function.
2493 (emit_ret): New function.
2494 (emit_load_store_pair): New function, factored out of emit_stp
2495 with support for MEMORY_OPERAND_POSTINDEX.
2496 (emit_stp): Rewrite using emit_load_store_pair.
2497 (emit_ldp): New function.
2498 (emit_load_store): Likewise.
2499 (emit_ldr): Mention post-index instruction in comment.
2500 (emit_ldrh): New function.
2501 (emit_ldrb): New function.
2502 (emit_ldrsw): Mention post-index instruction in comment.
2503 (emit_str): Likewise.
2504 (emit_subs): New function.
2505 (emit_cmp): Likewise.
2506 (emit_and): Likewise.
2507 (emit_orr): Likewise.
2508 (emit_orn): Likewise.
2509 (emit_eor): Likewise.
2510 (emit_mvn): Likewise.
2511 (emit_lslv): Likewise.
2512 (emit_lsrv): Likewise.
2513 (emit_asrv): Likewise.
2514 (emit_mul): Likewise.
2515 (emit_sbfm): Likewise.
2516 (emit_sbfx): Likewise.
2517 (emit_ubfm): Likewise.
2518 (emit_ubfx): Likewise.
2519 (emit_csinc): Likewise.
2520 (emit_cset): Likewise.
2521 (emit_nop): Likewise.
2522 (emit_ops_insns): New helper function.
2523 (emit_pop): Likewise.
2524 (emit_push): Likewise.
2525 (aarch64_emit_prologue): New function.
2526 (aarch64_emit_epilogue): Likewise.
2527 (aarch64_emit_add): Likewise.
2528 (aarch64_emit_sub): Likewise.
2529 (aarch64_emit_mul): Likewise.
2530 (aarch64_emit_lsh): Likewise.
2531 (aarch64_emit_rsh_signed): Likewise.
2532 (aarch64_emit_rsh_unsigned): Likewise.
2533 (aarch64_emit_ext): Likewise.
2534 (aarch64_emit_log_not): Likewise.
2535 (aarch64_emit_bit_and): Likewise.
2536 (aarch64_emit_bit_or): Likewise.
2537 (aarch64_emit_bit_xor): Likewise.
2538 (aarch64_emit_bit_not): Likewise.
2539 (aarch64_emit_equal): Likewise.
2540 (aarch64_emit_less_signed): Likewise.
2541 (aarch64_emit_less_unsigned): Likewise.
2542 (aarch64_emit_ref): Likewise.
2543 (aarch64_emit_if_goto): Likewise.
2544 (aarch64_emit_goto): Likewise.
2545 (aarch64_write_goto_address): Likewise.
2546 (aarch64_emit_const): Likewise.
2547 (aarch64_emit_call): Likewise.
2548 (aarch64_emit_reg): Likewise.
2549 (aarch64_emit_pop): Likewise.
2550 (aarch64_emit_stack_flush): Likewise.
2551 (aarch64_emit_zero_ext): Likewise.
2552 (aarch64_emit_swap): Likewise.
2553 (aarch64_emit_stack_adjust): Likewise.
2554 (aarch64_emit_int_call_1): Likewise.
2555 (aarch64_emit_void_call_2): Likewise.
2556 (aarch64_emit_eq_goto): Likewise.
2557 (aarch64_emit_ne_goto): Likewise.
2558 (aarch64_emit_lt_goto): Likewise.
2559 (aarch64_emit_le_goto): Likewise.
2560 (aarch64_emit_gt_goto): Likewise.
2561 (aarch64_emit_ge_got): Likewise.
2562 (aarch64_emit_ops_impl): New static global variable.
2563 (aarch64_emit_ops): New target function, return
2564 &aarch64_emit_ops_impl.
2565 (struct linux_target_ops): Install it.
2567 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2569 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2570 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2572 * linux-aarch64-ipa.c: New file.
2573 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2575 (aarch64_get_thread_area): New target method.
2576 (extract_signed_bitfield): New helper function.
2577 (aarch64_decode_ldr_literal): New function.
2578 (enum aarch64_opcodes): New enum.
2579 (struct aarch64_register): New struct.
2580 (struct aarch64_operand): New struct.
2581 (x0): New static global.
2590 (aarch64_register): New helper function.
2591 (register_operand): Likewise.
2592 (immediate_operand): Likewise.
2593 (struct aarch64_memory_operand): New struct.
2594 (offset_memory_operand): New helper function.
2595 (preindex_memory_operand): Likewise.
2596 (enum aarch64_system_control_registers): New enum.
2597 (ENCODE): New macro.
2598 (emit_insn): New helper function.
2599 (emit_b): New function.
2600 (emit_bcond): Likewise.
2601 (emit_cb): Likewise.
2602 (emit_tb): Likewise.
2603 (emit_blr): Likewise.
2604 (emit_stp): Likewise.
2605 (emit_ldp_q_offset): Likewise.
2606 (emit_stp_q_offset): Likewise.
2607 (emit_load_store): Likewise.
2608 (emit_ldr): Likewise.
2609 (emit_ldrsw): Likewise.
2610 (emit_str): Likewise.
2611 (emit_ldaxr): Likewise.
2612 (emit_stxr): Likewise.
2613 (emit_stlr): Likewise.
2614 (emit_data_processing_reg): Likewise.
2615 (emit_data_processing): Likewise.
2616 (emit_add): Likewise.
2617 (emit_sub): Likewise.
2618 (emit_mov): Likewise.
2619 (emit_movk): Likewise.
2620 (emit_mov_addr): Likewise.
2621 (emit_mrs): Likewise.
2622 (emit_msr): Likewise.
2623 (emit_sevl): Likewise.
2624 (emit_wfe): Likewise.
2625 (append_insns): Likewise.
2626 (can_encode_int32_in): New helper function.
2627 (aarch64_relocate_instruction): New function.
2628 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2629 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2630 (struct linux_target_ops): Install aarch64_get_thread_area,
2631 aarch64_install_fast_tracepoint_jump_pad and
2632 aarch64_get_min_fast_tracepoint_insn_len.
2634 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2636 * Makefile.in (aarch64-insn.o): New rule.
2637 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2639 2015-09-21 Yao Qi <yao.qi@linaro.org>
2641 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2643 2015-09-21 Yao Qi <yao.qi@linaro.org>
2645 * tracepoint.c (max_jump_pad_size): Remove.
2647 2015-09-18 Yao Qi <yao.qi@linaro.org>
2649 * linux-aarch64-low.c: Don't include sys/uio.h.
2650 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2652 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2654 * tracepoint.c (eval_result_type): Change prototype.
2655 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2657 2015-09-15 Pedro Alves <palves@redhat.com>
2659 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2660 Check whether to report exec events instead of checking whether
2661 multiprocess is enabled.
2663 2015-09-15 Pedro Alves <palves@redhat.com>
2666 * remote-utils.c (prepare_resume_reply): Merge
2667 TARGET_WAITKIND_VFORK_DONE switch case with the
2668 TARGET_WAITKIND_FORKED case.
2670 2015-09-15 Yao Qi <yao.qi@linaro.org>
2672 * server.c (handle_query): Check string comparison using
2673 "else if" instead of "if".
2675 2015-09-15 Yao Qi <yao.qi@linaro.org>
2677 * server.c (vCont_supported): New global variable.
2678 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2679 matches. Append ";vContSupported+" to own_buf.
2680 (handle_v_requests): Append ";s;S" to own_buf if target supports
2681 hardware single step or vCont_supported is false.
2682 (capture_main): Set vCont_supported to zero.
2684 2015-09-15 Yao Qi <yao.qi@linaro.org>
2686 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2688 (linux_supports_hardware_single_step): ... New function.
2689 (linux_target_ops): Update.
2690 * lynx-low.c (lynx_target_ops): Set field
2691 supports_hardware_single_step to target_can_do_hardware_single_step.
2692 * nto-low.c (nto_target_ops): Likewise.
2693 * spu-low.c (spu_target_ops): Likewise.
2694 * win32-low.c (win32_target_ops): Likewise.
2695 * target.c (target_can_do_hardware_single_step): New function.
2696 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2697 Remove. <supports_hardware_single_step>: New field.
2698 (target_supports_conditional_breakpoints): Remove.
2699 (target_supports_hardware_single_step): New macro.
2700 (target_can_do_hardware_single_step): Declare.
2701 * server.c (handle_query): Use target_supports_hardware_single_step
2702 instead of target_supports_conditional_breakpoints.
2704 2015-09-15 Yao Qi <yao.qi@linaro.org>
2706 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2708 (struct linux_target_ops the_low_target): Install
2709 aarch64_linux_siginfo_fixup.
2711 2015-09-11 Don Breazeal <donb@codesourcery.com>
2712 Luis Machado <lgustavo@codesourcery.com>
2714 * linux-low.c (linux_mourn): Static declaration.
2715 (linux_arch_setup): Move in front of
2716 handle_extended_wait.
2717 (linux_arch_setup_thread): New function.
2718 (handle_extended_wait): Handle exec events. Call
2719 linux_arch_setup_thread. Make event_lwp argument a
2720 pointer-to-a-pointer.
2721 (check_zombie_leaders): Do not check stopped threads.
2722 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2723 (linux_low_filter_event): Add lwp and thread for exec'ing
2724 non-leader thread if leader thread has been deleted.
2725 Refactor code into linux_arch_setup_thread and call it.
2726 Pass child lwp pointer by reference to handle_extended_wait.
2727 (linux_wait_for_event_filtered): Update comment.
2728 (linux_wait_1): Prevent clobbering exec event status.
2729 (linux_supports_exec_events): New function.
2730 (linux_target_ops) <supports_exec_events>: Initialize new member.
2731 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2733 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2734 * server.c (report_exec_events): New global variable.
2735 (handle_query): Handle qSupported query for exec-events feature.
2736 (captured_main): Initialize report_exec_events.
2737 * server.h (report_exec_events): Declare new global variable.
2738 * target.h (struct target_ops) <supports_exec_events>: New
2740 (target_supports_exec_events): New macro.
2741 * win32-low.c (win32_target_ops) <supports_exec_events>:
2742 Initialize new member.
2744 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2746 * linux-low.c (linux_low_enable_btrace): Remove.
2747 (linux_target_ops): Replace linux_low_enable_btrace with
2748 linux_enable_btrace.
2750 2015-09-03 Yao Qi <yao.qi@linaro.org>
2752 * linux-aarch64-low.c (aarch64_insert_point): Call
2753 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2756 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2758 * linux-low.c (check_stopped_by_breakpoint): Use
2759 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2761 2015-08-27 Pedro Alves <palves@redhat.com>
2763 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2765 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2767 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2768 the XNEW-family equivalent.
2769 (compile_bytecodes): Likewise.
2770 * dll.c (loaded_dll): Likewise.
2771 * event-loop.c (append_callback_event): Likewise.
2772 (create_file_handler): Likewise.
2773 (create_file_event): Likewise.
2774 * hostio.c (handle_open): Likewise.
2775 * inferiors.c (add_thread): Likewise.
2776 (add_process): Likewise.
2777 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2778 * linux-arm-low.c (arm_new_process): Likewise.
2779 (arm_new_thread): Likewise.
2780 * linux-low.c (add_to_pid_list): Likewise.
2781 (linux_add_process): Likewise.
2782 (handle_extended_wait): Likewise.
2783 (add_lwp): Likewise.
2784 (enqueue_one_deferred_signal): Likewise.
2785 (enqueue_pending_signal): Likewise.
2786 (linux_resume_one_lwp_throw): Likewise.
2787 (linux_resume_one_thread): Likewise.
2788 (linux_read_memory): Likewise.
2789 (linux_write_memory): Likewise.
2790 * linux-mips-low.c (mips_linux_new_process): Likewise.
2791 (mips_linux_new_thread): Likewise.
2792 (mips_add_watchpoint): Likewise.
2793 * linux-x86-low.c (initialize_low_arch): Likewise.
2794 * lynx-low.c (lynx_add_process): Likewise.
2795 * mem-break.c (set_raw_breakpoint_at): Likewise.
2796 (set_breakpoint): Likewise.
2797 (add_condition_to_breakpoint): Likewise.
2798 (add_commands_to_breakpoint): Likewise.
2799 (clone_agent_expr): Likewise.
2800 (clone_one_breakpoint): Likewise.
2801 * regcache.c (new_register_cache): Likewise.
2802 * remote-utils.c (look_up_one_symbol): Likewise.
2803 * server.c (queue_stop_reply): Likewise.
2804 (start_inferior): Likewise.
2805 (queue_stop_reply_callback): Likewise.
2806 (handle_target_event): Likewise.
2807 * spu-low.c (fetch_ppc_memory): Likewise.
2808 (store_ppc_memory): Likewise.
2809 * target.c (set_target_ops): Likewise.
2810 * thread-db.c (thread_db_load_search): Likewise.
2811 (try_thread_db_load_1): Likewise.
2812 * tracepoint.c (add_tracepoint): Likewise.
2813 (add_tracepoint_action): Likewise.
2814 (create_trace_state_variable): Likewise.
2815 (cmd_qtdpsrc): Likewise.
2816 (cmd_qtro): Likewise.
2817 (add_while_stepping_state): Likewise.
2818 * win32-low.c (child_add_thread): Likewise.
2819 (get_image_name): Likewise.
2821 2015-08-25 Yao Qi <yao.qi@linaro.org>
2823 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2825 2015-08-25 Yao Qi <yao.qi@linaro.org>
2827 * Makefile.in (aarch64-linux.o): New rule.
2828 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2830 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2831 (aarch64_init_debug_reg_state): Make it extern.
2832 (aarch64_linux_prepare_to_resume): Remove.
2834 2015-08-25 Yao Qi <yao.qi@linaro.org>
2836 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2837 lwp_arch_private_info and ptid_of_lwp.
2839 2015-08-25 Yao Qi <yao.qi@linaro.org>
2841 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2842 Find proc_info by find_process_pid. All callers updated.
2844 2015-08-25 Yao Qi <yao.qi@linaro.org>
2846 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2848 (debug_reg_change_callback): Remove.
2849 (aarch64_notify_debug_reg_change): Remove.
2851 2015-08-25 Yao Qi <yao.qi@linaro.org>
2853 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2854 Call current_lwp_ptid.
2856 2015-08-25 Yao Qi <yao.qi@linaro.org>
2858 * linux-aarch64-low.c (debug_reg_change_callback): Use
2861 2015-08-25 Yao Qi <yao.qi@linaro.org>
2863 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2865 2015-08-25 Yao Qi <yao.qi@linaro.org>
2867 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2869 2015-08-25 Yao Qi <yao.qi@linaro.org>
2871 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2874 2015-08-25 Yao Qi <yao.qi@linaro.org>
2876 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2878 (debug_reg_change_callback): Remove argument entry and add argument
2879 lwp. Remove local variable thread. Don't print thread id in the
2880 debugging output. Don't check whether pid of thread equals to pid.
2881 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2882 iterate_over_lwps instead find_inferior.
2884 2015-08-24 Pedro Alves <palves@redhat.com>
2886 * inferiors.c (get_first_process): New function.
2887 * inferiors.h (get_first_process): New declaration.
2888 * remote-utils.c (read_ptid): Default to the first process in the
2889 list, instead of to the current thread's process.
2891 2015-08-24 Pedro Alves <palves@redhat.com>
2893 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2894 * event-loop.c: Likewise.
2895 * remote-utils.c: Likewise.
2896 * tracepoint.c: Likewise.
2898 2015-08-24 Pedro Alves <palves@redhat.com>
2900 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2903 2015-08-21 Pedro Alves <palves@redhat.com>
2905 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2906 instead of literal 1.
2908 2015-08-21 Pedro Alves <palves@redhat.com>
2910 * tdesc.c (default_description): Explicitly zero-initialize.
2912 2015-08-21 Pedro Alves <palves@redhat.com>
2915 * inferiors.c (remove_thread): Discard any pending stop reply for
2917 * server.c (remove_all_on_match_pid): Rename to ...
2918 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2920 (discard_queued_stop_replies): Change parameter to a ptid. Now
2922 (handle_v_kill, kill_inferior_callback, captured_main)
2923 (process_serial_event): Adjust.
2924 * server.h (discard_queued_stop_replies): Declare.
2926 2015-08-21 Pedro Alves <palves@redhat.com>
2928 * linux-low.c (wait_for_sigstop): Always switch to no thread
2929 selected if the previously current thread dies.
2930 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2931 process instead of the current thread's.
2932 * remote-utils.c (input_interrupt): Don't check if there's no
2934 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2935 current thread to the general thread fails, error out.
2936 (handle_qxfer_auxv, handle_qxfer_libraries)
2937 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2938 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2939 (handle_query): Check if there's a thread selected instead of
2940 checking whether there's any thread in the thread list.
2941 (handle_qxfer_threads, handle_qxfer_btrace)
2942 (handle_qxfer_btrace_conf): Don't error out early if there's no
2943 thread in the thread list.
2944 (handle_v_cont, myresume): Don't set the current thread to the
2946 (process_serial_event) <Hg handling>: Also set thread_id if the
2947 previous general thread is still alive.
2948 (process_serial_event) <g/G handling>: If setting the current
2949 thread to the general thread fails, error out.
2950 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2951 thread's lwp instead of the current thread's.
2952 * target.c (set_desired_thread): If the desired thread was not
2953 found, leave the current thread pointing to NULL. Return an int
2954 (boolean) indicating success.
2955 * target.h (set_desired_thread): Change return type to int.
2957 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2959 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2960 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2962 (ps_get_thread_area): New function.
2964 2015-08-19 Gary Benson <gbenson@redhat.com>
2966 * hostio.c (handle_pread): Do not attempt to read more data
2967 than hostio_reply_with_data can fit in a packet.
2969 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2971 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2973 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2975 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2977 2015-08-06 Pedro Alves <palves@redhat.com>
2979 * tracepoint.c (expr_eval_result): Now an int.
2981 2015-08-06 Pedro Alves <palves@redhat.com>
2983 * gdbthread.h (struct regcache): Forward declare.
2984 (struct thread_info) <regcache_data>: Now a struct regcache
2986 * inferiors.c (inferior_regcache_data)
2987 (set_inferior_regcache_data): Now work with struct regcache
2989 * inferiors.h (struct regcache): Forward declare.
2990 (inferior_regcache_data, set_inferior_regcache_data): Now work
2991 with struct regcache pointers.
2992 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2993 (free_register_cache_thread): Remove struct regcache pointer
2996 2015-08-06 Pedro Alves <palves@redhat.com>
2998 * server.c (captured_main): On error, print the exception message
2999 to stderr, and if run_once is set, throw a quit.
3001 2015-08-06 Pedro Alves <palves@redhat.com>
3003 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3006 2015-08-06 Pedro Alves <palves@redhat.com>
3008 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3009 reading beyond the passed in buffer length.
3011 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3013 * tracepoint.c (symbol_list) <required>: Remove.
3015 2015-08-06 Pedro Alves <palves@redhat.com>
3017 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3018 count if stopping and suspending threads.
3019 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3020 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3021 (linux_detach): Complete an ongoing step-over.
3022 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3024 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3025 (linux_wait_1): If passing a signal to the inferior after
3026 finishing a step-over, unsuspend and re-resume all lwps. If we
3027 see a single-step event but the thread should be continuing, don't
3028 pass the trap to gdb.
3029 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3030 internal_error instead of gdb_assert.
3031 (enqueue_pending_signal): New function.
3032 (check_ptrace_stopped_lwp_gone): Add debug output.
3033 (start_step_over): Use internal_error instead of gdb_assert.
3034 (complete_ongoing_step_over): New function.
3035 (linux_resume_one_thread): Don't resume a suspended thread.
3036 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3039 2015-08-06 Pedro Alves <palves@redhat.com>
3041 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3042 (linux_thread_alive): Use lwp_is_marked_dead.
3043 (extended_event_reported): Delete.
3044 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3045 instead of extended_event_reported.
3046 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3048 (lwp_is_marked_dead): New function.
3049 (lwp_running): Use lwp_is_marked_dead.
3050 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3053 2015-08-06 Pedro Alves <palves@redhat.com>
3055 * linux-low.c (linux_wait_1): Move fork event output out of the
3056 !report_to_gdb check. Pass event_child->waitstatus to
3057 target_waitstatus_to_string instead of ourstatus.
3059 2015-08-04 Yao Qi <yao.qi@linaro.org>
3061 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3062 if current_thread is 32 bit.
3064 2015-08-04 Yao Qi <yao.qi@linaro.org>
3066 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3067 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3068 * server.c (extended_protocol): Remove "static".
3069 * server.h (extended_protocol): Declare it.
3071 2015-08-04 Yao Qi <yao.qi@linaro.org>
3073 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3074 both aarch64 and aarch32.
3075 (aarch64_set_pc): Likewise.
3077 2015-08-04 Yao Qi <yao.qi@linaro.org>
3079 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3080 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3081 arm-with-neon.xml to srv_xmlfiles.
3082 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3083 (is_64bit_tdesc): New function.
3084 (aarch64_linux_read_description): New function.
3085 (aarch64_arch_setup): Call aarch64_linux_read_description.
3086 (regs_info): Rename to regs_info_aarch64.
3087 (aarch64_regs_info): Return right regs_info.
3088 (initialize_low_arch): Call initialize_low_arch_aarch32.
3090 2015-08-04 Yao Qi <yao.qi@linaro.org>
3092 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3093 * linux-aarch32-low.c: New file.
3094 * linux-aarch32-low.h: New file.
3095 * linux-arm-low.c (arm_fill_gregset): Move it to
3096 linux-aarch32-low.c.
3097 (arm_store_gregset): Likewise.
3098 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3099 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3100 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3101 (regs_info): Rename to regs_info_arm.
3102 (arm_regs_info): Return regs_info_aarch32 if
3103 have_ptrace_getregset is 1 and target description is
3104 arm_with_neon or arm_with_vfpv3.
3105 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3106 Call initialize_low_arch_aarch32 instead.
3108 2015-08-04 Yao Qi <yao.qi@linaro.org>
3110 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3111 * linux-low.c: ... here.
3112 * linux-low.h (have_ptrace_getregset): Declare it.
3114 2015-08-04 Pedro Alves <palves@redhat.com>
3116 * thread-db.c (struct thread_db): Use new typedefs.
3117 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3119 (disable_thread_event_reporting): Cast result of dlsym to
3120 destination function pointer type.
3121 (thread_db_mourn): Use td_ta_delete_ftype.
3123 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3125 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3127 (CDX_BREAKPOINT): Define for R2.
3128 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3129 (the_low_target): Add comments.
3131 2015-07-30 Yao Qi <yao.qi@linaro.org>
3133 * linux-arm-low.c (arm_hwcap): Remove it.
3134 (arm_read_description): New local variable arm_hwcap. Don't
3135 set arm_hwcap to zero.
3137 2015-07-30 Yao Qi <yao.qi@linaro.org>
3139 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3140 Use regcache->tdesc instead.
3141 (arm_store_wmmxregset): Likewise.
3142 (arm_fill_vfpregset): Likewise.
3143 (arm_store_vfpregset): Likewise.
3145 2015-07-30 Yao Qi <yao.qi@linaro.org>
3147 * linux-arm-low.c: Include arch/arm.h.
3148 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3149 (arm_store_gregset): Likewise.
3151 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3153 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3154 ptrace's 4th parameter.
3156 2015-07-27 Yao Qi <yao.qi@linaro.org>
3158 * configure.srv (case aarch64*-*-linux*): Don't set
3161 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3163 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3165 * linux-arm-low.c: Likewise.
3166 * linux-cris-low.c: Likewise.
3167 * linux-crisv32-low.c: Likewise.
3168 * linux-low.c: Likewise.
3169 * linux-m68k-low.c: Likewise.
3170 * linux-mips-low.c: Likewise.
3171 * linux-nios2-low.c: Likewise.
3172 * linux-s390-low.c: Likewise.
3173 * linux-sparc-low.c: Likewise.
3174 * linux-tic6x-low.c: Likewise.
3175 * linux-tile-low.c: Likewise.
3176 * linux-x86-low.c: Likewise.
3178 2015-07-24 Pedro Alves <palves@redhat.com>
3180 * config.in: Regenerate.
3181 * configure: Regenerate.
3183 2015-07-24 Pedro Alves <palves@redhat.com>
3185 * acinclude.m4: Include ../ptrace.m4.
3186 * configure.ac: Call GDB_AC_PTRACE.
3187 * config.in, configure: Regenerate.
3189 2015-07-24 Yao Qi <yao.qi@linaro.org>
3191 * linux-low.c (linux_create_inferior): Remove setting to
3192 proc->priv->new_inferior.
3193 (linux_attach): Likewise.
3194 (linux_low_filter_event): Likewise.
3195 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3197 2015-07-24 Yao Qi <yao.qi@linaro.org>
3199 * linux-low.c (linux_arch_setup): New function.
3200 (linux_low_filter_event): If proc->tdesc is NULL and
3201 proc->attached is true, call the_low_target.arch_setup.
3202 Otherwise, keep status pending, and return.
3203 (linux_resume_one_lwp_throw): Don't call get_pc if
3204 thread->while_stepping isn't NULL. Don't call
3205 get_thread_regcache if proc->tdesc is NULL.
3206 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3207 (linux_target_ops): Install arch_setup.
3208 * server.c (start_inferior): Call the_target->arch_setup.
3209 * target.h (struct target_ops) <arch_setup>: New field.
3210 (target_arch_setup): New marco.
3211 * lynx-low.c (lynx_target_ops): Update.
3212 * nto-low.c (nto_target_ops): Update.
3213 * spu-low.c (spu_target_ops): Update.
3214 * win32-low.c (win32_target_ops): Update.
3216 2015-07-24 Yao Qi <yao.qi@linaro.org>
3218 * linux-low.c (linux_add_process): Don't set
3219 proc->priv->new_inferior.
3220 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3221 (linux_attach): Likewise.
3223 2015-07-24 Yao Qi <yao.qi@linaro.org>
3225 * server.c (start_inferior): Code refactor.
3227 2015-07-24 Yao Qi <yao.qi@linaro.org>
3229 * server.c (process_serial_event): Set general_thread.
3231 2015-07-21 Yao Qi <yao.qi@linaro.org>
3233 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3234 aarch64_linux_get_debug_reg_capacity.
3236 2015-07-17 Yao Qi <yao.qi@linaro.org>
3238 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3239 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3240 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3241 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3242 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3243 (AARCH64_HWP_ALIGNMENT): Likewise.
3244 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3245 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3246 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3247 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3248 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3249 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3250 (struct aarch64_debug_reg_state): Likewise.
3251 (struct arch_lwp_info): Likewise.
3252 (aarch64_align_watchpoint): Likewise.
3253 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3254 (aarch64_watchpoint_length): Likewise.
3255 (aarch64_point_encode_ctrl_reg): Likewise
3256 (aarch64_point_is_aligned): Likewise.
3257 (aarch64_align_watchpoint): Likewise.
3258 (aarch64_linux_set_debug_regs):
3259 (aarch64_dr_state_insert_one_point): Likewise.
3260 (aarch64_dr_state_remove_one_point): Likewise.
3261 (aarch64_handle_breakpoint): Likewise.
3262 (aarch64_handle_aligned_watchpoint): Likewise.
3263 (aarch64_handle_unaligned_watchpoint): Likewise.
3264 (aarch64_handle_watchpoint): Likewise.
3266 2015-07-17 Yao Qi <yao.qi@linaro.org>
3268 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3269 and don't aarch64_get_debug_reg_state. All callers update.
3270 (aarch64_handle_aligned_watchpoint): Likewise.
3271 (aarch64_handle_unaligned_watchpoint): Likewise.
3272 (aarch64_handle_watchpoint): Likewise.
3273 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3274 (aarch64_remove_point): Likewise.
3276 2015-07-17 Yao Qi <yao.qi@linaro.org>
3278 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3280 (aarch64_handle_unaligned_watchpoint): Likewise.
3282 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3284 Revert the previous 3 commits:
3285 Move gdb_regex* to common/
3286 Move linux_find_memory_regions_full & co.
3287 gdbserver build-id attribute generator
3289 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3290 Jan Kratochvil <jan.kratochvil@redhat.com>
3292 gdbserver build-id attribute generator.
3293 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3294 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3295 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3297 (get_dynamic): Use find_pdhr to traverse program headers.
3298 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3299 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3300 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3301 (get_hex_build_id): New.
3302 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3303 to reply XML document.
3305 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3306 Jan Kratochvil <jan.kratochvil@redhat.com>
3308 * target.c: Include target/target-utils.h and fcntl.h.
3309 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3310 (target_fileio_read_stralloc): New functions.
3312 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3314 * Makefile.in (OBS): Add gdb_regex.o.
3316 * config.in: Rebuilt.
3317 * configure: Rebuilt.
3319 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3320 Jan Kratochvil <jan.kratochvil@redhat.com>
3322 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3323 * Makefile.in (OBS): Add target-utils.o.
3324 (linux-maps.o, target-utils.o): New.
3325 * configure.srv (srv_linux_obj): Add linux-maps.o.
3327 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3329 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3331 (the_low_target): Install it.
3333 2015-07-14 Pedro Alves <palves@redhat.com>
3335 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3336 Instead, ignore ECHILD, and throw an error for other errnos.
3338 2015-07-10 Pedro Alves <palves@redhat.com>
3340 * event-loop.c (struct callback_event) <data>: Change type to
3341 gdb_client_data instance instead of gdb_client_data pointer.
3342 (append_callback_event): Adjust.
3344 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3346 * linux-aarch64-low.c: Add comments for each linux_target_ops
3347 method. Remove comments already covered in target_ops and
3348 linux_target_ops definitions.
3349 (the_low_target): Add comments for each unimplemented method.
3351 2015-07-09 Yao Qi <yao.qi@linaro.org>
3353 * linux-aarch64-low.c (aarch64_regmap): Remove.
3354 (aarch64_usrregs_info): Remove.
3355 (regs_info): Set field usrregs to NULL.
3357 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3359 * linux-low.c: Include "rsp-low.h"
3360 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3361 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3362 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3363 (handle_btrace_enable_pt): New.
3364 (handle_btrace_general_set): Support "pt".
3365 (handle_btrace_conf_general_set): Support "pt:size".
3367 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3369 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3372 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3374 * linux-aarch64-low.c: Remove comment about endianness.
3375 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3376 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3379 2015-06-24 Gary Benson <gbenson@redhat.com>
3381 * linux-i386-ipa.c (stdint.h): Do not include.
3382 * lynx-i386-low.c (stdint.h): Likewise.
3383 * lynx-ppc-low.c (stdint.h): Likewise.
3384 * mem-break.c (stdint.h): Likewise.
3385 * thread-db.c (stdint.h): Likewise.
3386 * tracepoint.c (stdint.h): Likewise.
3387 * win32-low.c (stdint.h): Likewise.
3389 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3391 * server.c (write_qxfer_response): Update call to
3392 remote_escape_output.
3394 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3395 Jan Kratochvil <jan.kratochvil@redhat.com>
3397 Merge multiple hex conversions.
3398 * gdbreplay.c (tohex): Rename to 'fromhex'.
3399 (logchar): Use fromhex.
3401 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3403 * server.c (handle_qxfer_libraries): Set `version' attribute for
3406 2015-06-10 Gary Benson <gbenson@redhat.com>
3408 * target.h (struct target_ops) <multifs_open>: New field.
3409 <multifs_unlink>: Likewise.
3410 <multifs_readlink>: Likewise.
3411 * linux-low.c (nat/linux-namespaces.h): New include.
3412 (linux_target_ops): Initialize the_target->multifs_open,
3413 the_target->multifs_unlink and the_target->multifs_readlink.
3414 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3415 * hostio.c (hostio_fs_pid): New static variable.
3416 (hostio_handle_new_gdb_connection): New function.
3417 (handle_setfs): Likewise.
3418 (handle_open): Use the_target->multifs_open as appropriate.
3419 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3420 (handle_readlink): Use the_target->multifs_readlink as
3422 (handle_vFile): Handle vFile:setfs packets.
3423 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3424 after target_handle_new_gdb_connection.
3426 2015-06-10 Gary Benson <gbenson@redhat.com>
3428 * configure.ac (AC_CHECK_FUNCS): Add setns.
3429 * config.in: Regenerate.
3430 * configure: Likewise.
3431 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3432 (linux-namespaces.o): New rule.
3433 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3435 2015-06-09 Gary Benson <gbenson@redhat.com>
3437 * hostio.c (handle_open): Process mode argument with
3438 fileio_to_host_mode.
3440 2015-06-01 Yao Qi <yao.qi@linaro.org>
3442 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3443 * linux-x86-low.c: Likewise.
3445 2015-05-28 Don Breazeal <donb@codesourcery.com>
3447 * linux-low.c (handle_extended_wait): Initialize
3448 thread_info.last_resume_kind for new fork children.
3450 2015-05-15 Pedro Alves <palves@redhat.com>
3452 * target.h (target_handle_new_gdb_connection): Rewrite using if
3453 wrapped in do/while.
3455 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3457 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3458 * configure, config.in: Regenerate.
3459 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3462 2015-05-12 Don Breazeal <donb@codesourcery.com>
3464 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3465 PTRACE_EVENT_VFORK_DONE.
3466 (linux_low_ptrace_options, extended_event_reported): Add vfork
3468 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3469 and "vforkdone" for RSP 'T' Stop Reply Packet.
3470 * server.h (report_vfork_events): Declare
3473 2015-05-12 Don Breazeal <donb@codesourcery.com>
3475 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3476 (the_low_target) <new_fork>: Initialize new member.
3477 * linux-arm-low.c (arm_new_fork): New function.
3478 (the_low_target) <new_fork>: Initialize new member.
3479 * linux-low.c (handle_extended_wait): Call new target function
3481 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3482 * linux-mips-low.c (mips_add_watchpoint): New function
3483 extracted from mips_insert_point.
3484 (the_low_target) <new_fork>: Initialize new member.
3485 (mips_linux_new_fork): New function.
3486 (mips_insert_point): Call mips_add_watchpoint.
3487 * linux-x86-low.c (x86_linux_new_fork): New function.
3488 (the_low_target) <new_fork>: Initialize new member.
3490 2015-05-12 Don Breazeal <donb@codesourcery.com>
3492 * linux-low.c (handle_extended_wait): Implement return value,
3493 rename argument 'event_child' to 'event_lwp', handle
3494 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3495 (linux_low_ptrace_options): New function.
3496 (linux_low_filter_event): Call linux_low_ptrace_options,
3497 use different argument fo linux_enable_event_reporting,
3498 use return value from handle_extended_wait.
3499 (extended_event_reported): New function.
3500 (linux_wait_1): Call extended_event_reported and set
3501 status to report fork events.
3502 (linux_write_memory): Add pid to debug message.
3503 (reset_lwp_ptrace_options_callback): New function.
3504 (linux_handle_new_gdb_connection): New function.
3505 (linux_target_ops): Initialize new structure member.
3506 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3507 * lynx-low.c: Initialize new structure member.
3508 * remote-utils.c (prepare_resume_reply): Implement stop reason
3509 "fork" for "T" stop message.
3510 * server.c (handle_query): Call handle_new_gdb_connection.
3511 * server.h (report_fork_events): Declare global flag.
3512 * target.h (struct target_ops) <handle_new_gdb_connection>:
3514 (target_handle_new_gdb_connection): New macro.
3515 * win32-low.c: Initialize new structure member.
3517 2015-05-12 Don Breazeal <donb@codesourcery.com>
3519 * mem-break.c (APPEND_TO_LIST): Define macro.
3520 (clone_agent_expr): New function.
3521 (clone_one_breakpoint): New function.
3522 (clone_all_breakpoints): New function.
3523 * mem-break.h: Declare new functions.
3525 2015-05-12 Don Breazeal <donb@codesourcery.com>
3527 * linux-low.c (linux_supports_fork_events): New function.
3528 (linux_supports_vfork_events): New function.
3529 (linux_target_ops): Initialize new structure members.
3530 (initialize_low): Call linux_check_ptrace_features.
3531 * lynx-low.c (lynx_target_ops): Initialize new structure
3533 * server.c (report_fork_events, report_vfork_events):
3535 (handle_query): Add new features to qSupported packet and
3537 (captured_main): Initialize new global variables.
3538 * target.h (struct target_ops) <supports_fork_events>:
3540 <supports_vfork_events>: New member.
3541 (target_supports_fork_events): New macro.
3542 (target_supports_vfork_events): New macro.
3543 * win32-low.c (win32_target_ops): Initialize new structure
3546 2015-05-12 Gary Benson <gbenson@redhat.com>
3548 * server.c (handle_qxfer_exec_file): Use current process
3551 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3553 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3554 Remove HAVE_PTRACE_GETREGS conditionals.
3555 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3556 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3558 2015-05-08 Yao Qi <yao.qi@linaro.org>
3560 * linux-low.c (linux_supports_conditional_breakpoints): New
3562 (linux_target_ops): Install new target method.
3563 * lynx-low.c (lynx_target_ops): Install NULL hook for
3564 supports_conditional_breakpoints.
3565 * nto-low.c (nto_target_ops): Likewise.
3566 * spu-low.c (spu_target_ops): Likewise.
3567 * win32-low.c (win32_target_ops): Likewise.
3568 * server.c (handle_query): Check
3569 target_supports_conditional_breakpoints.
3570 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3572 (target_supports_conditional_breakpoints): New macro.
3574 2015-05-06 Pedro Alves <palves@redhat.com>
3577 * server.c (start_inferior): If the process exits, mourn it.
3579 2015-04-21 Gary Benson <gbenson@redhat.com>
3581 * hostio.c (fileio_open_flags_to_host): Factored out to
3582 fileio_to_host_openflags in common/fileio.c. Single use
3585 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3587 * linux-xtensa-low.c (xtensa_fill_gregset)
3588 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3591 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3593 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3594 (regs_info): Replace usrregs pointer with NULL.
3596 2015-04-17 Gary Benson <gbenson@redhat.com>
3598 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3599 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3600 * server.c (handle_qxfer_exec_file): New function.
3601 (qxfer_packets): Add exec-file entry.
3602 (handle_query): Report qXfer:exec-file:read as supported packet.
3604 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3606 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3608 2015-04-09 Gary Benson <gbenson@redhat.com>
3610 * hostio-errno.c (errno_to_fileio_error): Remove function.
3611 Update caller to use remote_fileio_to_fio_error.
3613 2015-04-09 Yao Qi <yao.qi@linaro.org>
3615 * linux-low.c (linux_insert_point): Call
3616 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3617 (linux_remove_point): Call remove_memory_breakpoint if type is
3619 * linux-x86-low.c (x86_insert_point): Don't call
3620 insert_memory_breakpoint.
3621 (x86_remove_point): Don't call remove_memory_breakpoint.
3623 2015-04-01 Pedro Alves <palves@redhat.com>
3624 Cleber Rosa <crosa@redhat.com>
3626 * server.c (gdbserver_usage): Reorganize and extend the usage
3629 2015-03-24 Pedro Alves <palves@redhat.com>
3631 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3632 output. Also dump TRAP_TRACE.
3633 (linux_low_filter_event): In debug output, distinguish a
3634 resume_stop SIGSTOP from a delayed SIGSTOP.
3636 2015-03-24 Gary Benson <gbenson@redhat.com>
3638 * linux-x86-low.c (x86_linux_new_thread): Moved to
3640 (x86_linux_prepare_to_resume): Likewise.
3642 2015-03-24 Gary Benson <gbenson@redhat.com>
3644 * Makefile.in (x86-linux-dregs.o): New rule.
3645 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3646 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3647 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3648 (x86_linux_dr_get): Likewise.
3649 (x86_linux_dr_set): Likewise.
3650 (update_debug_registers_callback): Likewise.
3651 (x86_linux_dr_set_addr): Likewise.
3652 (x86_linux_dr_get_addr): Likewise.
3653 (x86_linux_dr_set_control): Likewise.
3654 (x86_linux_dr_get_control): Likewise.
3655 (x86_linux_dr_get_status): Likewise.
3656 (x86_linux_update_debug_registers): Likewise.
3658 2015-03-24 Gary Benson <gbenson@redhat.com>
3660 * linux-x86-low.c (x86_linux_update_debug_registers):
3661 New function, factored out from...
3662 (x86_linux_prepare_to_resume): ...this.
3664 2015-03-24 Gary Benson <gbenson@redhat.com>
3666 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3667 (x86_linux_dr_set): Likewise.
3668 (update_debug_registers_callback): Likewise.
3669 (x86_linux_dr_set_addr): Likewise.
3670 (x86_linux_dr_get_addr): Likewise.
3671 (x86_linux_dr_set_control): Likewise.
3672 (x86_linux_dr_get_control): Likewise.
3673 (x86_linux_dr_get_status): Likewise.
3674 (x86_linux_prepare_to_resume): Likewise.
3676 2015-03-24 Gary Benson <gbenson@redhat.com>
3678 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3679 Use perror_with_name. Pass string through gettext.
3680 (x86_linux_dr_set): Likewise.
3682 2015-03-24 Gary Benson <gbenson@redhat.com>
3684 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3685 (x86_linux_dr_set_addr): ...this.
3686 (x86_dr_low_get_addr): Rename to...
3687 (x86_linux_dr_get_addr): ...this.
3688 (x86_dr_low_set_control): Rename to...
3689 (x86_linux_dr_set_control): ...this.
3690 (x86_dr_low_get_control): Rename to...
3691 (x86_linux_dr_get_control): ...this.
3692 (x86_dr_low_get_status): Rename to...
3693 (x86_linux_dr_get_status): ...this.
3694 (x86_dr_low): Update with new function names.
3696 2015-03-24 Gary Benson <gbenson@redhat.com>
3698 * Makefile.in (x86-linux.o): New rule.
3699 * configure.srv: Add x86-linux.o to relevant targets.
3700 * linux-low.c (lwp_set_arch_private_info): New function.
3701 (lwp_arch_private_info): Likewise.
3702 * linux-x86-low.c: Include nat/x86-linux.h.
3703 (arch_lwp_info): Removed structure.
3704 (update_debug_registers_callback):
3705 Use lwp_set_debug_registers_changed.
3706 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3707 and lwp_set_debug_registers_changed.
3708 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3710 2015-03-24 Gary Benson <gbenson@redhat.com>
3712 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3713 * linux-arm-low.c (arm_new_thread): Likewise.
3714 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3715 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3716 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3717 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3719 2015-03-24 Gary Benson <gbenson@redhat.com>
3721 * linux-low.c (ptid_of_lwp): New function.
3722 (lwp_is_stopped): Likewise.
3723 (lwp_stop_reason): Likewise.
3724 * linux-x86-low.c (update_debug_registers_callback):
3726 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3729 2015-03-24 Gary Benson <gbenson@redhat.com>
3731 * linux-low.h (linux_stop_lwp): Remove declaration.
3733 2015-03-24 Gary Benson <gbenson@redhat.com>
3735 * linux-low.h: Include nat/linux-nat.h.
3736 * linux-low.c (iterate_over_lwps_args): New structure.
3737 (iterate_over_lwps_filter): New function.
3738 (iterate_over_lwps): Likewise.
3739 * linux-x86-low.c (update_debug_registers_callback):
3740 Update signature to what iterate_over_lwps expects.
3741 Remove PID check that iterate_over_lwps now performs.
3742 (x86_dr_low_set_addr): Use iterate_over_lwps.
3743 (x86_dr_low_set_control): Likewise.
3745 2015-03-24 Gary Benson <gbenson@redhat.com>
3747 * linux-x86-low.c (x86_debug_reg_state): New function.
3748 (x86_linux_prepare_to_resume): Use the above.
3750 2015-03-24 Gary Benson <gbenson@redhat.com>
3752 * linux-low.c (current_lwp_ptid): New function.
3753 * linux-x86-low.c: Include nat/linux-nat.h.
3754 (x86_dr_low_get_addr): Use current_lwp_ptid.
3755 (x86_dr_low_get_control): Likewise.
3756 (x86_dr_low_get_status): Likewise.
3758 2015-03-20 Pedro Alves <palves@redhat.com>
3760 * tracepoint.c (cmd_qtstatus): Make "str" const.
3762 2015-03-20 Pedro Alves <palves@redhat.com>
3764 * server.c (handle_general_set): Make "req_str" const.
3766 2015-03-19 Pedro Alves <palves@redhat.com>
3768 * linux-low.c (linux_resume_one_lwp): Rename to ...
3769 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3770 instead call perror_with_name.
3771 (check_ptrace_stopped_lwp_gone): New function.
3772 (linux_resume_one_lwp): Reimplement as wrapper around
3773 linux_resume_one_lwp_throw that swallows errors if the LWP is
3776 2015-03-19 Pedro Alves <palves@redhat.com>
3778 * linux-low.c (count_events_callback, select_event_lwp_callback):
3779 No longer check whether the thread has resume_stop as last resume
3782 2015-03-19 Pedro Alves <palves@redhat.com>
3784 * linux-low.c (count_events_callback, select_event_lwp_callback):
3785 Use the lwp's status_pending_p field, not the thread's.
3787 2015-03-19 Pedro Alves <palves@redhat.com>
3789 * linux-low.c (select_event_lwp_callback): Update comments to
3790 no longer mention SIGTRAP.
3792 2015-03-18 Gary Benson <gbenson@redhat.com>
3794 * server.c (handle_query): Do not report vFile:fstat as supported.
3796 2015-03-11 Gary Benson <gbenson@redhat.com>
3798 * hostio.c (sys/types.h): New include.
3799 (sys/stat.h): Likewise.
3800 (common-remote-fileio.h): Likewise.
3801 (handle_fstat): New function.
3802 (handle_vFile): Handle vFile:fstat packets.
3804 2015-03-11 Gary Benson <gbenson@redhat.com>
3806 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3807 struct stat.st_blocks and struct stat.st_blksize.
3808 * configure: Regenerate.
3809 * config.in: Likewise.
3810 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3811 (OBS): Add common-remote-fileio.o.
3812 (common-remote-fileio.o): New rule.
3814 2015-03-09 Pedro Alves <palves@redhat.com>
3816 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3817 'struct sockaddr' pointer in 'accept' call.
3819 2015-03-09 Pedro Alves <palves@redhat.com>
3822 2015-03-07 Pedro Alves <palves@redhat.com>
3823 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3824 or <winsock2.h> here. Instead include "gdb_socket.h".
3825 (remote_open): Use union gdb_sockaddr_u.
3826 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3827 or <winsock2.h> here. Instead include "gdb_socket.h".
3828 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3829 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3831 (init_named_socket, gdb_agent_helper_thread): Use union
3834 2015-03-07 Pedro Alves <palves@redhat.com>
3836 * configure.ac (build_warnings): Move
3837 -Wdeclaration-after-statement to the C-specific set.
3838 * configure: Regenerate.
3840 2015-03-07 Pedro Alves <palves@redhat.com>
3842 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3843 or <winsock2.h> here. Instead include "gdb_socket.h".
3844 (remote_open): Use union gdb_sockaddr_u.
3845 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3846 or <winsock2.h> here. Instead include "gdb_socket.h".
3847 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3848 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3850 (init_named_socket, gdb_agent_helper_thread): Use union
3853 2015-03-07 Pedro Alves <palves@redhat.com>
3855 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3858 2015-03-06 Yao Qi <yao.qi@linaro.org>
3860 * linux-aarch64-low.c (aarch64_insert_point): Use
3861 show_debug_regs as a boolean.
3862 (aarch64_remove_point): Likewise.
3864 2015-03-05 Pedro Alves <palves@redhat.com>
3866 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3867 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3868 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3869 * nto-low.c (nto_target_ops): Likewise.
3870 * spu-low.c (spu_target_ops): Likewise.
3871 * win32-low.c (win32_target_ops): Likewise.
3873 2015-03-04 Pedro Alves <palves@redhat.com>
3875 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3876 Decide whether a breakpoint triggered based on the SIGTRAP's
3878 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3879 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3880 (linux_low_filter_event): Check for breakpoints before checking
3882 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3884 (linux_stopped_by_sw_breakpoint)
3885 (linux_supports_stopped_by_sw_breakpoint)
3886 (linux_stopped_by_hw_breakpoint)
3887 (linux_supports_stopped_by_hw_breakpoint): New functions.
3888 (linux_target_ops): Install new target methods.
3890 2015-03-04 Pedro Alves <palves@redhat.com>
3892 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3893 * server.c (swbreak_feature, hwbreak_feature): New globals.
3894 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3895 (captured_main): Clear swbreak_feature and hwbreak_feature.
3896 * server.h (swbreak_feature, hwbreak_feature): Declare.
3897 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3898 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3899 supports_stopped_by_hw_breakpoint>: New fields.
3900 (target_supports_stopped_by_sw_breakpoint)
3901 (target_stopped_by_sw_breakpoint)
3902 (target_supports_stopped_by_hw_breakpoint)
3903 (target_stopped_by_hw_breakpoint): Declare.
3905 2015-03-04 Pedro Alves <palves@redhat.com>
3907 enum lwp_stop_reason -> enum target_stop_reason
3908 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3909 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3910 (linux_wait_1, stuck_in_jump_pad_callback)
3911 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3912 (linux_stopped_by_watchpoint):
3913 * linux-low.h (enum lwp_stop_reason): Delete.
3914 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3915 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3917 2015-03-04 Yao Qi <yao.qi@linaro.org>
3919 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3921 2015-03-03 Gary Benson <gbenson@redhat.com>
3923 * hostio.c (handle_vFile): Fix prefix lengths.
3925 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3927 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3930 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3932 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3933 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3934 (clean): Add "rm -f" for above C files.
3935 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3936 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3937 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3938 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3939 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3940 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3941 (init_registers_s390x_vx_linux64)
3942 (init_registers_s390x_tevx_linux64)
3943 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3944 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3946 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3947 (s390_store_vxrs_high): New functions.
3948 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3950 (s390_arch_setup): Add logic for selecting one of the new target
3951 descriptions. Activate the new vector regsets if applicable.
3952 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3953 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3954 and init_registers_s390x_tevx_linux64.
3956 2015-03-01 Pedro Alves <palves@redhat.com>
3958 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3961 2015-02-27 Pedro Alves <palves@redhat.com>
3963 * linux-x86-low.c (u_debugreg_offset): New function.
3964 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3966 2015-02-27 Pedro Alves <palves@redhat.com>
3968 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3969 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3970 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3971 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3972 (ps_lsetfpregs, ps_getpid)
3973 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3974 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3975 (ps_lsetxregs, ps_plog): Declare.
3977 2015-02-27 Pedro Alves <palves@redhat.com>
3979 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3980 IP_AGENT_EXPORT_FUNC.
3981 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3982 IP_AGENT_EXPORT_FUNC.
3983 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3984 (IP_AGENT_EXPORT): Delete.
3985 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3986 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3987 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3988 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3989 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3990 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3991 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3992 (traceframe_read_count, traceframe_write_count)
3993 (traceframes_created, trace_state_variables, get_raw_reg)
3994 (get_trace_state_variable_value, set_trace_state_variable_value)
3995 (ust_loaded, helper_thread_id, cmd_buf): Use
3996 IPA_SYM_EXPORTED_NAME.
3997 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3998 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3999 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4000 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4001 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4002 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4003 EXTERN_C_PUSH/EXTERN_C_POP.
4004 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4005 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4006 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4007 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4008 (traceframe_write_count, traceframe_read_count)
4009 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4010 (about_to_request_buffer_space, get_trace_state_variable_value)
4011 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4012 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4013 EXTERN_C_PUSH/EXTERN_C_POP.
4014 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4015 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4016 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4017 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4018 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4019 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4020 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4021 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4023 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4024 (IP_AGENT_EXPORT_VAR_DECL): Define.
4026 (gdb_agent_get_raw_reg): Declare.
4028 2015-02-27 Tom Tromey <tromey@redhat.com>
4029 Pedro Alves <palves@redhat.com>
4031 Rename symbols whose names are reserved C++ keywords throughout.
4033 2015-02-27 Pedro Alves <palves@redhat.com>
4035 * Makefile.in (COMPILER): New, get it from autoconf.
4036 (CXX): Get from autoconf instead.
4037 (COMPILE.pre): Use COMPILER.
4038 (CC-LD): Rename to ...
4039 (CC_LD): ... this. Use COMPILER.
4040 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4041 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4042 * acinclude.m4: Include build-with-cxx.m4.
4043 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4044 Disable -Werror by default if building in C++ mode.
4045 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4046 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4047 the C++ compiler. Save/restore CXXFLAGS too.
4048 * configure: Regenerate.
4050 2015-02-27 Pedro Alves <palves@redhat.com>
4052 * acinclude.m4: Include libiberty.m4.
4053 * configure.ac: Call libiberty_INIT.
4054 * config.in, configure: Regenerate.
4056 2015-02-26 Pedro Alves <palves@redhat.com>
4058 * linux-low.c (linux_wait_1): When incrementing the PC past a
4059 program breakpoint always use the_low_target.breakpoint_len as
4060 increment, rather than the maximum between that and
4061 the_low_target.decr_pc_after_break.
4063 2015-02-23 Pedro Alves <palves@redhat.com>
4065 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4066 thread was doing a step-over; always adjust the PC if
4067 we stepped over a permanent breakpoint.
4068 (linux_wait_1): If we stepped over breakpoint that was on top of a
4069 permanent breakpoint, manually advance the PC past it.
4071 2015-02-23 Pedro Alves <palves@redhat.com>
4073 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4075 (x86_fill_gregset, x86_store_gregset): Use it when handling
4078 2015-02-20 Pedro Alves <palves@redhat.com>
4080 * thread-db.c: Include "nat/linux-procfs.h".
4081 (thread_db_init): Skip listing new threads if the kernel supports
4082 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4084 2015-02-20 Pedro Alves <palves@redhat.com>
4086 * linux-low.c (status_pending_p_callback): Use ptid_match.
4088 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4090 PR breakpoints/16812
4091 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4092 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4093 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4095 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4097 PR breakpoints/15956
4098 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4100 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4102 * linux-low.c (linux_low_btrace_conf): Print size.
4103 * server.c (handle_btrace_conf_general_set): New.
4104 (hanle_general_set): Call handle_btrace_conf_general_set.
4105 (handle_query): Report Qbtrace-conf:bts:size as supported.
4107 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4109 * linux-low.c (linux_low_enable_btrace): Update parameters.
4110 (linux_low_btrace_conf): New.
4111 (linux_target_ops)<to_btrace_conf>: Initialize.
4112 * server.c (current_btrace_conf): New.
4113 (handle_btrace_enable): Rename to ...
4114 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4115 to target_enable_btrace. Update comment. Update users.
4116 (handle_qxfer_btrace_conf): New.
4117 (qxfer_packets): Add btrace-conf entry.
4118 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4119 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4120 (target_ops)<read_btrace_conf>: New.
4121 (target_enable_btrace): Update parameters.
4122 (target_read_btrace_conf): New.
4124 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4126 * server.c (handle_btrace_general_set): Remove call to
4127 target_supports_btrace.
4128 (supported_btrace_packets): New.
4129 (handle_query): Call supported_btrace_packets.
4130 * target.h: include btrace-common.h.
4131 (btrace_target_info): Removed.
4132 (supports_btrace, target_supports_btrace): Update parameters.
4134 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4136 * Makefile.in (SFILES): Add common/btrace-common.c.
4137 (OBS): Add common/btrace-common.o.
4138 (btrace-common.o): Add build rules.
4139 * linux-low: Include btrace-common.h.
4140 (linux_low_read_btrace): Use struct btrace_data. Call
4141 btrace_data_init and btrace_data_fini.
4143 2015-02-06 Pedro Alves <palves@redhat.com>
4145 * thread-db.c (find_new_threads_callback): Add debug output.
4147 2015-02-04 Pedro Alves <palves@redhat.com>
4149 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4150 (resume_stopped_resumed_lwps): New function.
4151 (linux_wait_for_event_filtered): Use it.
4153 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4155 * Makefile.in (SFILES): Add linux-personality.c.
4156 (linux-personality.o): New rule.
4157 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4158 list of objects to be built.
4159 * linux-low.c: Include nat/linux-personality.h.
4160 (linux_create_inferior): Remove code to disable address space
4161 randomization (moved to ../nat/linux-personality.c). Create
4162 cleanup to disable address space randomization.
4164 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4166 * Makefile.in (posix-strerror.o): New rule.
4167 (mingw-strerror.o): Likewise.
4168 * configure: Regenerated.
4169 * configure.ac: Source file ../common/common.host. Initialize new
4170 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4172 2015-01-14 Yao Qi <yao@codesourcery.com>
4174 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4175 (ppc-linux.o): New rule.
4176 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4177 * configure.ac: AC_CHECK_FUNCS(getauxval).
4178 * config.in: Re-generated.
4179 * configure: Re-generated.
4180 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4181 ppc64_64bit_inferior_p
4183 2015-01-14 Yao Qi <yao@codesourcery.com>
4185 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4186 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4187 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4188 (PT_ORIG_R3, PT_TRAP): Likewise.
4189 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4190 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4191 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4193 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4195 * i387-fp.c (i387_cache_to_xsave): In look over
4196 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4197 zmmh_low_space field by use of zmmh_high_space.
4199 2015-01-09 Pedro Alves <palves@redhat.com>
4201 * linux-low.c (step_over_bkpt): Move higher up in the file.
4202 (handle_extended_wait): Don't store the stop_pc here.
4203 (get_stop_pc): Adjust comments and rename to ...
4204 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4205 stopped for a software breakpoint or hardware breakpoint.
4206 (thread_still_has_status_pending_p): New function.
4207 (status_pending_p_callback): Use
4208 thread_still_has_status_pending_p. If the event is no longer
4209 interesting, resume the LWP.
4210 (handle_tracepoints): Add assert.
4211 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4212 (wstatus_maybe_breakpoint): New function.
4213 (cancel_breakpoint): Delete function.
4214 (check_stopped_by_watchpoint): New function, factored out from
4215 linux_low_filter_event.
4216 (lp_status_maybe_breakpoint): Delete function.
4217 (linux_low_filter_event): Remove filter_ptid argument.
4218 Leave thread group exits pending here. Store the LWP's stop PC.
4219 Always leave events pending.
4220 (linux_wait_for_event_filtered): Pull all events out of the
4221 kernel, and leave them all pending.
4222 (count_events_callback, select_event_lwp_callback): Consider all
4224 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4225 (select_event_lwp): Only give preference to the stepping LWP in
4226 all-stop mode. Adjust comments.
4227 (ignore_event): New function.
4228 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4229 references to cancel_breakpoints. Adjust to renames. Also give
4230 equal priority to all LWPs that have had events in non-stop mode.
4231 If reporting a software breakpoint event, unadjust the LWP's PC.
4232 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4233 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4235 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4236 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4237 (linux_stopped_by_watchpoint): Adjust.
4238 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4239 * linux-low.h (enum lwp_stop_reason): New.
4240 (struct lwp_info) <stop_pc>: Adjust comment.
4241 <stopped_by_watchpoint>: Delete field.
4242 <stop_reason>: New field.
4243 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4244 * mem-break.c (software_breakpoint_inserted_here)
4245 (hardware_breakpoint_inserted_here): New function.
4246 * mem-break.h (software_breakpoint_inserted_here)
4247 (hardware_breakpoint_inserted_here): Declare.
4248 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4249 (cancel_breakpoints): Delete.
4250 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4251 (upload_fast_traceframes): Remove references to
4254 2015-01-09 Pedro Alves <palves@redhat.com>
4256 * thread-db.c (find_new_threads_callback): Ignore thread if the
4257 kernel thread ID is -1.
4259 2015-01-09 Pedro Alves <palves@redhat.com>
4261 * linux-low.c (linux_attach_fail_reason_string): Move to
4262 nat/linux-ptrace.c, and rename.
4263 (linux_attach_lwp): Update comment.
4264 (attach_proc_task_lwp_callback): New function.
4265 (linux_attach): Adjust to rename and use
4266 linux_proc_attach_tgid_threads.
4267 (linux_attach_fail_reason_string): Delete declaration.
4269 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4271 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4272 * server.c (gdbserver_version): Likewise.
4274 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4276 * remote-utils.c: Include ctype.h.
4277 (input_interrupt): Explicitly handle the case when the char
4278 received is the NUL byte. Improve the printing of non-ASCII
4281 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4283 * linux-low.c (linux_low_filter_event): Update call to
4284 linux_enable_event_reporting following the addition of
4285 a new parameter to that function.
4287 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4290 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4291 (AARCH64_FPCR_REGNO): Likewise.
4292 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4293 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4294 (aarch64_store_fpregset): Likewise.
4296 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4298 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4299 Remove FIXME comment about assumption about N.
4301 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4303 * configure.ac: If large-file support is disabled in GDBserver,
4304 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4305 * configure: Regenerate.
4307 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4309 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4310 warning upon ENODATA from ptrace.
4311 * linux-s390-low.c (s390_store_tdb): New.
4312 (s390_regsets): Add regset for NT_S390_TDB.
4314 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4316 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4317 without a fill_function.
4318 * linux-s390-low.c (s390_fill_last_break): Remove.
4319 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4320 (s390_arch_setup): Use regset's size instead of fill_function for
4323 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4325 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4326 the regset's store function when ptrace returned an error.
4327 * regcache.c (get_thread_regcache): Invalidate register cache
4328 before fetching inferior's registers.
4330 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4332 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4333 while-loop as for-loop.
4334 (regsets_store_inferior_registers): Likewise.
4336 2014-11-28 Yao Qi <yao@codesourcery.com>
4338 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4339 * config.in, configure: Re-generate.
4340 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4343 2014-11-21 Yao Qi <yao@codesourcery.com>
4345 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4346 (AC_CHECK_HEADERS): Remove malloc.h.
4347 * configure: Re-generated.
4348 * config.in: Re-generated.
4349 * server.h: Don't include alloca.h and malloc.h.
4350 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4351 Don't include malloc.h.
4353 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4355 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4356 corresponding ERRNO check in same block.
4358 2014-11-12 Pedro Alves <palves@redhat.com>
4360 * server.c (cont_thread): Update comment.
4361 (start_inferior, attach_inferior): No longer clear cont_thread.
4362 (handle_v_cont): No longer set cont_thread.
4363 (captured_main): Clear cont_thread each time a GDB connects.
4365 2014-11-12 Pedro Alves <palves@redhat.com>
4367 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4368 thread, and don't resume all threads if the Hc thread has exited.
4370 2014-11-12 Pedro Alves <palves@redhat.com>
4372 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4373 the process group instead of to a specific LWP.
4375 2014-10-15 Pedro Alves <palves@redhat.com>
4378 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4380 (arm_set_thread_context): Delete.
4381 (the_low_target): Adjust.
4382 * win32-i386-low.c (debug_registers_changed)
4383 (debug_registers_used): Delete.
4384 (update_debug_registers_callback): New function.
4385 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4386 needing to update their debug registers.
4387 (win32_get_current_dr): New function.
4388 (x86_dr_low_get_addr, x86_dr_low_get_control)
4389 (x86_dr_low_get_status): Fetch the debug register from the thread
4391 (i386_initial_stuff): Adjust.
4392 (i386_get_thread_context): Remove current_event parameter. Don't
4393 clear debug_registers_changed nor copy DR values to
4395 (i386_set_thread_context): Delete.
4396 (i386_prepare_to_resume): New function.
4397 (i386_thread_added): Mark the thread as needing to update irs
4399 (the_low_target): Remove i386_set_thread_context and install
4400 i386_prepare_to_resume.
4401 * win32-low.c (win32_get_thread_context): Adjust.
4402 (win32_set_thread_context): Use SetThreadContext
4404 (win32_prepare_to_resume): New function.
4405 (win32_require_context): New function, factored out from ...
4406 (thread_rec): ... this.
4407 (continue_one_thread): Call win32_prepare_to_resume on each thread
4408 we're about to continue.
4409 (win32_resume): Call win32_prepare_to_resume on the event thread.
4410 * win32-low.h (struct win32_thread_info)
4411 <debug_registers_changed>: New field.
4412 (struct win32_target_ops): Change prototype of set_thread_context,
4413 delete set_thread_context and add prepare_to_resume.
4414 (win32_require_context): New declaration.
4416 2014-10-08 Gary Benson <gbenson@redhat.com>
4418 * server.h: Do not include common-exceptions.h.
4420 2014-10-08 Gary Benson <gbenson@redhat.com>
4422 * server.h: Do not include cleanups.h.
4424 2014-09-30 James Hogan <james.hogan@imgtec.com>
4426 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4429 2014-09-23 Yao Qi <yao@codesourcery.com>
4431 * linux-low.c (lp_status_maybe_breakpoint): New function.
4432 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4433 (count_events_callback): Likewise.
4434 (select_event_lwp_callback): Likewise.
4435 (cancel_breakpoints_callback): Likewise.
4437 2014-09-19 Don Breazeal <donb@codesourcery.com>
4439 * linux-low.c (handle_extended_wait): Call
4440 linux_ptrace_get_extended_event.
4441 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4442 linux_is_extended_waitstatus.
4444 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4446 * Makefile.in (CPPFLAGS): Define.
4447 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4448 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4450 2014-09-16 Gary Benson <gbenson@redhat.com>
4452 * inferiors.h (current_inferior): Renamed as...
4453 (current_thread): New variable. All uses updated.
4454 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4455 (maybe_move_out_of_jump_pad): Likewise.
4456 (cancel_breakpoint): Likewise.
4457 (linux_low_filter_event): Likewise.
4458 (wait_for_sigstop): Likewise.
4459 (linux_resume_one_lwp): Likewise.
4460 (need_step_over_p): Likewise.
4461 (start_step_over): Likewise.
4462 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4463 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4464 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4465 and save_inferior as saved_thread.
4466 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4468 (regcache_invalidate_thread): Likewise.
4469 * remote-utils.c (prepare_resume_reply): Likewise.
4470 * thread-db.c (thread_db_get_tls_address): Likewise.
4471 (disable_thread_event_reporting): Likewise.
4472 (remove_thread_event_breakpoints): Likewise.
4473 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4475 * target.h (set_desired_inferior): Renamed as...
4476 (set_desired_thread): New declaration. All uses updated.
4477 * server.c (myresume): Updated comment to reference thread instead
4479 (handle_serial_event): Likewise.
4480 (handle_target_event): Likewise.
4482 2014-09-12 Tom Tromey <tromey@redhat.com>
4483 Gary Benson <gbenson@redhat.com>
4485 * regcache.h: Include common-regcache.h.
4486 (regcache_read_pc): Don't declare.
4487 * regcache.c (get_thread_regcache_for_ptid): New function.
4489 2014-09-11 Tom Tromey <tromey@redhat.com>
4490 Gary Benson <gbenson@redhat.com>
4492 * symbol.c: New file.
4493 * Makefile.in (SFILES): Add symbol.c.
4494 (OBS): Add symbol.o.
4496 2014-09-11 Gary Benson <gbenson@redhat.com>
4498 * target.c (target_stop_ptid, target_continue_ptid): New
4501 2014-09-11 Tom Tromey <tromey@redhat.com>
4502 Gary Benson <gbenson@redhat.com>
4504 * target.h: Include target/target.h.
4505 * target.c (target_read_memory, target_read_uint32)
4506 (target_write_memory): New functions.
4508 2014-09-11 Gary Benson <gbenson@redhat.com>
4510 * server.h (debug_hw_points): Don't declare.
4511 * server.c (debug_hw_points): Don't define. Replace all uses
4512 with show_debug_regs.
4513 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4514 all uses with show_debug_regs.
4516 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4518 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4519 endianness into account.
4520 (ppc_supply_ptrace_register): Likewise.
4522 2014-09-03 James Hogan <james.hogan@imgtec.com>
4524 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4525 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4527 2014-09-03 Gary Benson <gbenson@redhat.com>
4529 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4530 ALL_DEBUG_ADDRESS_REGISTERS.
4532 2014-09-02 Gary Benson <gbenson@redhat.com>
4534 * i386-low.h: Renamed as...
4535 * x86-low.h: New file. All type, function and variable name
4536 prefixes changed from "i386_" to "x86_". All references updated.
4537 * i386-low.c: Renamed as...
4538 * x86-low.c: New file. All type, function and variable name
4539 prefixes changed from "i386_" to "x86_". All references updated.
4541 2014-09-02 Gary Benson <gbenson@redhat.com>
4543 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4544 (x86_linux_new_thread): Likewise.
4546 2014-08-29 Gary Benson <gbenson@redhat.com>
4548 * server.h (setjmp.h): Do not include.
4549 (toplevel): Do not declare.
4550 (common-exceptions.h): Include.
4551 (cleanups.h): Likewise.
4552 * server.c (toplevel): Do not define.
4553 (exit_code): New static global.
4554 (detach_or_kill_for_exit_cleanup): New function.
4555 (main): New function. Original main renamed to...
4556 (captured_main): New function.
4557 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4559 2014-08-29 Gary Benson <gbenson@redhat.com>
4561 * Makefile.in (SFILES): Add common/common-exceptions.c.
4562 (OBS): Add common-exceptions.o.
4563 (common-exceptions.o): New rule.
4564 * utils.c (prepare_to_throw_exception): New function.
4566 2014-08-29 Gary Benson <gbenson@redhat.com>
4568 * config.in: Regenerate.
4569 * configure: Likewise.
4571 2014-08-29 Gary Benson <gbenson@redhat.com>
4573 * Makefile.in (SFILES): Add common/cleanups.c.
4575 (cleanups.o): New rule.
4577 2014-08-29 Gary Benson <gbenson@redhat.com>
4579 * utils.c (internal_vwarning): New function.
4581 2014-08-28 Gary Benson <gbenson@redhat.com>
4583 * utils.h (fatal): Remove declaration.
4584 * utils.c (fatal): Remove function.
4586 2014-08-28 Gary Benson <gbenson@redhat.com>
4588 * tracepoint.c (gdb_agent_init): Replace fatal with
4590 (initialize_tracepoint): Likewise.
4592 2014-08-28 Gary Benson <gbenson@redhat.com>
4594 * remote-utils.c (remote_prepare): Replace fatal with error.
4596 2014-08-28 Gary Benson <gbenson@redhat.com>
4598 * linux-low.c (linux_async): Replace fatal with warning.
4600 (linux_start_non_stop): Return -1 if linux_async failed.
4602 2014-08-28 Gary Benson <gbenson@redhat.com>
4604 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4606 (i386_dr_low_get_addr): Remove vague comment.
4607 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4610 2014-08-28 Gary Benson <gbenson@redhat.com>
4612 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4613 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4615 (linux_resume_one_lwp): Likewise.
4616 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4618 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4619 with internal_error.
4620 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4621 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4622 (find_register_by_name): Replace fatal with internal_error.
4623 (find_regno): Likewise.
4624 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4625 * thread-db.c (thread_db_create_event): Likewise.
4626 (thread_db_load_search): Likewise.
4627 (try_thread_db_load_1): Likewise.
4628 * tracepoint.c (get_jump_space_head): Replace fatal with
4630 (claim_trampoline_space): Likewise.
4631 (have_fast_tracepoint_trampoline_buffer): Likewise.
4632 (cmd_qtstart): Likewise.
4633 (stop_tracing): Likewise.
4634 (fast_tracepoint_collecting): Likewise.
4635 (target_malloc): Likewise.
4636 (download_tracepoint): Likewise.
4637 (download_trace_state_variables): Replace check with gdb_assert.
4638 (upload_fast_traceframes): Replace fatal with internal_error.
4640 2014-08-19 Tom Tromey <tromey@redhat.com>
4641 Gary Benson <gbenson@redhat.com>
4643 * Makefile.in (SFILES): Add common/common-debug.c.
4644 (OBS): Add common-debug.o.
4645 (common-debug.o): New rule.
4646 * debug.h (debug_printf): Don't declare.
4647 * debug.c (debug_printf): Renamed and rewritten as...
4648 (debug_vprintf): New function.
4650 2014-08-19 Gary Benson <gbenson@redhat.com>
4652 * utils.h: Do not include print-utils.h.
4654 2014-08-19 Tom Tromey <tromey@redhat.com>
4655 Gary Benson <gbenson@redhat.com>
4657 * server.h: Add static assertion.
4658 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4660 2014-08-19 Tom Tromey <tromey@redhat.com>
4661 Gary Benson <gbenson@redhat.com>
4663 * Makefile.in (SFILES): Add common/errors.c.
4664 (OBS): Add errors.o.
4665 (IPA_OBS): Add errors-ipa.o.
4666 (errors.o): New rule.
4667 (errors-ipa.o): Likewise.
4668 * utils.h (perror_with_name, error, warning): Don't declare.
4669 * utils.c (warning): Renamed and rewritten as...
4670 (vwarning): New function.
4671 (error): Renamed and rewritten as...
4672 (verror): New function.
4673 (internal_error): Renamed and rewritten as...
4674 (internal_verror): New function.
4676 2014-08-07 Gary Benson <gbenson@redhat.com>
4678 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4679 * configure: Regenerate.
4680 * config.in: Likewise.
4681 * server.h: Do not include errno.h.
4682 * event-loop.c: Likewise.
4683 * hostio-errno.c: Likewise.
4684 * linux-low.c: Likewise.
4685 * remote-utils.c: Likewise.
4686 * spu-low.c: Likewise.
4687 * utils.c: Likewise.
4688 * gdbreplay.c: Unconditionally include errno.h.
4690 2014-08-07 Gary Benson <gbenson@redhat.com>
4692 * server.h: Do not include string.h.
4693 * event-loop.c: Likewise.
4694 * linux-low.c: Likewise.
4695 * regcache.c: Likewise.
4696 * remote-utils.c: Likewise.
4697 * spu-low.c: Likewise.
4698 * utils.c: Likewise.
4700 2014-08-07 Gary Benson <gbenson@redhat.com>
4702 * server.h: Do not include gdb_assert.h.
4704 2014-08-07 Gary Benson <gbenson@redhat.com>
4706 * server.h: Do not include common-utils.h.
4708 2014-08-07 Gary Benson <gbenson@redhat.com>
4710 * server.h: Do not include ptid.h.
4711 * notif.h: Likewise.
4713 2014-08-07 Gary Benson <gbenson@redhat.com>
4715 * server.h: Do not include gdb_locale.h.
4717 2014-08-07 Gary Benson <gbenson@redhat.com>
4719 * server.h: Do not include gdb/signals.h.
4720 * win32-low.c: Likewise.
4722 2014-08-07 Gary Benson <gbenson@redhat.com>
4724 * server.h: Do not include pathmax.h.
4726 2014-08-07 Gary Benson <gbenson@redhat.com>
4728 * server.h: Do not include libiberty.h.
4729 * linux-bfin-low.c: Likewise.
4731 2014-08-07 Gary Benson <gbenson@redhat.com>
4733 * server.h: Do not include ansidecl.h.
4735 2014-08-07 Gary Benson <gbenson@redhat.com>
4737 * linux-x86-low.c: Do not include stddef.h.
4738 * lynx-ppc-low.c: Likewise.
4739 * tracepoint.c: Likewise.
4741 2014-08-07 Gary Benson <gbenson@redhat.com>
4743 * server.h: Do not include stdarg.h.
4744 * nto-low.c: Likewise.
4746 2014-08-07 Gary Benson <gbenson@redhat.com>
4748 * server.h: Do not include stdlib.h.
4749 * inferiors.c: Likewise.
4750 * linux-low.c: Likewise.
4751 * regcache.c: Likewise.
4752 * spu-low.c: Likewise.
4753 * tracepoint.c: Likewise.
4754 * utils.c: Likewise.
4756 2014-08-07 Gary Benson <gbenson@redhat.com>
4758 * server.h: Do not include stdio.h.
4759 * linux-low.c: Likewise.
4760 * remote-utils.c: Likewise.
4761 * spu-low.c: Likewise.
4762 * utils.c: Likewise.
4763 * wincecompat.c: Likewise.
4765 2014-08-06 Gary Benson <gbenson@redhat.com>
4767 * regcache.c (init_register_cache): Move conditionals inside if.
4769 2014-08-06 Gary Benson <gbenson@redhat.com>
4771 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4773 2014-07-31 Gary Benson <gbenson@redhat.com>
4775 * ax.h: Do not include server.h.
4776 * gdbthread.h: Likewise.
4777 * lynx-low.h: Likewise.
4778 * notif.h: Likewise.
4780 2014-07-30 Gary Benson <gbenson@redhat.com>
4782 * server.h: Include common-defs.h.
4783 Do not include config.h or build-gnulib-gdbserver/config.h.
4785 2014-07-30 Gary Benson <gbenson@redhat.com>
4787 * hostio-errno.c: Move server.h to top of includes list.
4788 * inferiors.c: Likewise.
4789 * linux-x86-low.c: Likewise.
4790 * notif.c: Include server.h.
4792 2014-07-24 Tom Tromey <tromey@redhat.com>
4793 Gary Benson <gbenson@redhat.com>
4795 * server.h (CORE_ADDR): Now unsigned.
4797 2014-07-16 Pedro Alves <palves@redhat.com>
4799 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4801 2014-07-15 Pedro Alves <palves@redhat.com>
4803 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4806 2014-07-11 Pedro Alves <palves@redhat.com>
4808 * linux-low.c (kill_wait_lwp): New function, based on
4809 kill_one_lwp_callback, but use my_waitpid directly.
4810 (kill_one_lwp_callback, linux_kill): Use it.
4812 2014-06-23 Pedro Alves <palves@redhat.com>
4814 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4815 before setting DR0..DR3.
4817 2014-06-20 Gary Benson <gbenson@redhat.com>
4819 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4820 * configure: Regenerated.
4821 * config.in: Likewise.
4823 2014-06-20 Gary Benson <gbenson@redhat.com>
4825 * Makefile.in (SFILES): Update locations for files moved
4827 (object file files): Reordered.
4829 2014-06-20 Gary Benson <gbenson@redhat.com>
4831 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4832 (i386_dr_low_set_addr): Likewise.
4833 (i386_dr_low_get_addr): Likewise.
4834 (i386_dr_low_can_set_control): Likewise.
4835 (i386_dr_low_set_control): Likewise.
4836 (i386_dr_low_get_control): Likewise.
4837 (i386_dr_low_get_status): Likewise.
4838 (i386_get_debug_register_length): Likewise.
4839 * linux-x86-low.c (i386_dr_low_set_addr):
4840 Changed signature. Made static.
4841 (i386_dr_low_get_addr): Likewise.
4842 (i386_dr_low_set_control): Likewise.
4843 (i386_dr_low_get_control): Likewise.
4844 (i386_dr_low_get_status): Likewise.
4845 (i386_dr_low): New global variable.
4846 * win32-i386-low.c (i386_dr_low_set_addr):
4847 Changed signature. Made static.
4848 (i386_dr_low_get_addr): Likewise.
4849 (i386_dr_low_set_control): Likewise.
4850 (i386_dr_low_get_control): Likewise.
4851 (i386_dr_low_get_status): Likewise.
4852 (i386_dr_low): New global variable.
4854 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4856 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4857 * Makefile.in (AR, AR_FLAGS): Define.
4858 * configure: Regenerate.
4860 2014-06-19 Gary Benson <gbenson@redhat.com>
4862 * Makefile.in (i386-dregs.o): New rule.
4863 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4864 * i386-low.c (target.h): Remove include.
4865 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4866 (DR_CONTROL_SHIFT): Likewise.
4867 (DR_CONTROL_SIZE): Likewise.
4868 (DR_RW_EXECUTE): Likewise.
4869 (DR_RW_WRITE): Likewise.
4870 (DR_RW_READ): Likewise.
4871 (DR_RW_IORW): Likewise.
4872 (DR_LEN_1): Likewise.
4873 (DR_LEN_2): Likewise.
4874 (DR_LEN_4): Likewise.
4875 (DR_LEN_8): Likewise.
4876 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4877 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4878 (DR_ENABLE_SIZE): Likewise.
4879 (DR_LOCAL_SLOWDOWN): Likewise.
4880 (DR_GLOBAL_SLOWDOWN): Likewise.
4881 (DR_CONTROL_RESERVED): Likewise.
4882 (I386_DR_CONTROL_MASK): Likewise.
4883 (I386_DR_VACANT): Likewise.
4884 (I386_DR_LOCAL_ENABLE): Likewise.
4885 (I386_DR_GLOBAL_ENABLE): Likewise.
4886 (I386_DR_DISABLE): Likewise.
4887 (I386_DR_SET_RW_LEN): Likewise.
4888 (I386_DR_GET_RW_LEN): Likewise.
4889 (I386_DR_WATCH_HIT): Likewise.
4890 (i386_wp_op_t): Likewise.
4891 (i386_show_dr): Likewise.
4892 (i386_length_and_rw_bits): Likewise.
4893 (i386_insert_aligned_watchpoint): Likewise.
4894 (i386_remove_aligned_watchpoint): Likewise.
4895 (i386_handle_nonaligned_watchpoint): Likewise.
4896 i386_update_inferior_debug_regs(): Likewise.
4897 (i386_dr_insert_watchpoint): Likewise.
4898 (i386_dr_remove_watchpoint): Likewise.
4899 (i386_dr_region_ok_for_watchpoint): Likewise.
4900 (i386_dr_stopped_data_address): Likewise.
4901 (i386_dr_stopped_by_watchpoint): Likewise.
4903 2014-06-19 Gary Benson <gbenson@redhat.com>
4905 * i386-low.c (i386_dr_show): Renamed to
4906 i386_show_dr and made static. All uses updated.
4907 (i386_dr_length_and_rw_bits): Renamed to
4908 i386_length_and_rw_bits and made static.
4910 (i386_dr_insert_aligned_watchpoint): Renamed to
4911 i386_insert_aligned_watchpoint and made static.
4913 (i386_dr_remove_aligned_watchpoint): Renamed to
4914 i386_remove_aligned_watchpoint and made static.
4916 (i386_dr_update_inferior_debug_regs): Renamed to
4917 i386_update_inferior_debug_regs and made static.
4920 2014-06-18 Gary Benson <gbenson@redhat.com>
4922 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4923 (i386_dr_low_can_set_control): Likewise.
4924 (i386_get_debug_register_length): Likewise.
4925 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4926 (i386_dr_low_can_set_control): Likewise.
4927 (i386_get_debug_register_length): Likewise.
4929 2014-06-17 Gary Benson <gbenson@redhat.com>
4931 * i386-low.h (i386-dregs.h): New include.
4932 (DR_FIRSTADDR): Now in i386-dregs.h.
4933 (DR_LASTADDR): Likewise.
4934 (DR_NADDR): Likewise.
4935 (DR_STATUS): Likewise.
4936 (DR_CONTROL): Likewise.
4937 (i386_debug_reg_state): Likewise.
4938 (i386_dr_insert_watchpoint): Likewise.
4939 (i386_dr_remove_watchpoint): Likewise.
4940 (i386_dr_region_ok_for_watchpoint): Likewise.
4941 (i386_dr_stopped_data_address): Likewise.
4942 (i386_dr_stopped_by_watchpoint): Likewise.
4943 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4945 2014-06-18 Gary Benson <gbenson@redhat.com>
4947 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4948 i386_dr_insert_watchpoint.
4949 (i386_low_remove_watchpoint): Renamed to
4950 i386_dr_remove_watchpoint.
4951 (i386_low_region_ok_for_watchpoint): Renamed to
4952 i386_dr_region_ok_for_watchpoint.
4953 (i386_low_stopped_data_address): Renamed to
4954 i386_dr_stopped_data_address.
4955 (i386_low_stopped_by_watchpoint): Renamed to
4956 i386_dr_stopped_by_watchpoint.
4957 * i386-low.c (i386_show_dr): Renamed to
4958 i386_dr_show and made nonstatic. All uses updated.
4959 (i386_length_and_rw_bits): Renamed to
4960 i386_dr_length_and_rw_bits and made nonstatic.
4962 (i386_insert_aligned_watchpoint): Renamed to
4963 i386_dr_insert_aligned_watchpoint and made nonstatic.
4965 (i386_remove_aligned_watchpoint): Renamed to
4966 i386_dr_remove_aligned_watchpoint and made nonstatic.
4968 (i386_update_inferior_debug_regs): Renamed to
4969 i386_dr_update_inferior_debug_regs and made nonstatic.
4971 (i386_low_insert_watchpoint): Renamed to
4972 i386_dr_insert_watchpoint. All uses updated.
4973 (i386_low_remove_watchpoint): Renamed to
4974 i386_dr_remove_watchpoint. All uses updated.
4975 (i386_low_region_ok_for_watchpoint): Renamed to
4976 i386_dr_region_ok_for_watchpoint. All uses updated.
4977 (i386_low_stopped_data_address): Renamed to
4978 i386_dr_stopped_data_address. All uses updated.
4979 (i386_low_stopped_by_watchpoint): Renamed to
4980 i386_dr_stopped_by_watchpoint. All uses updated.
4982 2014-06-18 Gary Benson <gbenson@redhat.com>
4984 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4985 (i386_dr_low_can_set_control): Likewise.
4986 (i386_insert_aligned_watchpoint): New check.
4988 2014-06-18 Gary Benson <gbenson@redhat.com>
4990 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4993 2014-06-18 Gary Benson <gbenson@redhat.com>
4995 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4996 instead of fatal and error.
4997 (i386_handle_nonaligned_watchpoint): Likewise.
4999 2014-06-18 Gary Benson <gbenson@redhat.com>
5001 * i386-low.c (i386_get_debug_register_length): New macro.
5002 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5003 (i386_show_dr): Use debug_printf instead of fprintf. Use
5004 phex to format values.
5006 2014-06-18 Gary Benson <gbenson@redhat.com>
5008 * i386-low.h: Comment changes.
5009 * i386-low.c: Likewise.
5011 2014-06-18 Gary Benson <gbenson@redhat.com>
5013 * i386-low.c: Whitespace changes.
5015 2014-06-12 Tom Tromey <tromey@redhat.com>
5017 * utils.c (freeargv): Remove.
5019 2014-06-12 Tom Tromey <tromey@redhat.com>
5021 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5022 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5023 (parse_debug_format_options): Likewise.
5024 (gdbserver_usage): Likewise.
5025 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5026 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5027 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5029 ($(LIBGNU)): Depend on libiberty.
5030 (all-lib): Recurse into all subdirs.
5031 (install-only): Invoke "install" target in subdirs.
5032 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5034 * configure: Rebuild.
5035 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5036 for vasprintf, vsnprintf, or gettimeofday.
5037 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5040 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5042 * development.sh: Delete.
5043 * Makefile.in (config.status): Adjust dependency on development.sh.
5044 * configure.ac: Adjust development.sh source call.
5045 * configure: Regenerate.
5047 2014-06-02 Pedro Alves <palves@redhat.com>
5049 * ax.c (gdb_free_agent_expr): New function.
5050 * ax.h (gdb_free_agent_expr): New declaration.
5051 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5053 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5055 (clear_breakpoint_conditions_and_commands): New function.
5056 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5057 (clear_breakpoint_conditions_and_commands): New declaration.
5059 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5061 * linux-aarch64-low.c (asm/ptrace.h): Include.
5063 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5065 Fix TLS access for -static -pthread.
5066 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5067 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5068 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5070 2014-05-20 Pedro Alves <palves@redhat.com>
5072 * linux-aarch64-low.c (aarch64_insert_point)
5073 (aarch64_remove_point): No longer check whether the type is
5074 supported here. Adjust to new interface.
5075 (the_low_target): Install aarch64_supports_z_point_type as
5076 supports_z_point_type method.
5077 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5078 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5079 instead of a Z packet char. Adjust.
5080 (arm_supports_z_point_type): New function.
5081 (arm_insert_point, arm_remove_point): Adjust to new interface.
5082 (the_low_target): Install arm_supports_z_point_type.
5083 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5084 (cris_insert_point, cris_remove_point): Adjust to new interface.
5085 Don't check whether the type is supported here.
5086 (the_low_target): Install cris_supports_z_point_type.
5087 * linux-low.c (linux_supports_z_point_type): New function.
5088 (linux_insert_point, linux_remove_point): Adjust to new interface.
5089 * linux-low.h (struct linux_target_ops) <insert_point,
5090 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5091 raw_breakpoint pointer parameter.
5092 <supports_z_point_type>: New method.
5093 * linux-mips-low.c (mips_supports_z_point_type): New function.
5094 (mips_insert_point, mips_remove_point): Adjust to new interface.
5095 Use mips_supports_z_point_type.
5096 (the_low_target): Install mips_supports_z_point_type.
5097 * linux-ppc-low.c (the_low_target): Install NULL as
5098 supports_z_point_type method.
5099 * linux-s390-low.c (the_low_target): Install NULL as
5100 supports_z_point_type method.
5101 * linux-sparc-low.c (the_low_target): Install NULL as
5102 supports_z_point_type method.
5103 * linux-x86-low.c (x86_supports_z_point_type): New function.
5104 (x86_insert_point): Adjust to new insert_point interface. Use
5105 insert_memory_breakpoint. Adjust to new
5106 i386_low_insert_watchpoint interface.
5107 (x86_remove_point): Adjust to remove_point interface. Use
5108 remove_memory_breakpoint. Adjust to new
5109 i386_low_remove_watchpoint interface.
5110 (the_low_target): Install x86_supports_z_point_type.
5111 * lynx-low.c (lynx_target_ops): Install NULL as
5112 supports_z_point_type callback.
5113 * nto-low.c (nto_supports_z_point_type): New.
5114 (nto_insert_point, nto_remove_point): Adjust to new interface.
5115 (nto_target_ops): Install nto_supports_z_point_type.
5116 * mem-break.c: Adjust intro comment.
5117 (struct raw_breakpoint) <raw_type, size>: New fields.
5118 <inserted>: Update comment.
5119 <shlib_disabled>: Delete field.
5120 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5121 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5122 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5123 (raw_bkpt_type_to_target_hw_bp_type): New function.
5124 (find_enabled_raw_code_breakpoint_at): New function.
5125 (find_raw_breakpoint_at): New type and size parameters. Use them.
5126 (insert_memory_breakpoint): New function, based off
5127 set_raw_breakpoint_at.
5128 (remove_memory_breakpoint): New function.
5129 (set_raw_breakpoint_at): Reimplement.
5130 (set_breakpoint): New, based on set_breakpoint_at.
5131 (set_breakpoint_at): Reimplement.
5132 (delete_raw_breakpoint): Go through the_target->remove_point
5133 instead of assuming memory breakpoints.
5134 (find_gdb_breakpoint_at): Delete.
5135 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5136 (find_gdb_breakpoint): New function.
5137 (set_gdb_breakpoint_at): Delete.
5138 (z_type_supported): New function.
5139 (set_gdb_breakpoint_1): New function, loosely based off
5140 set_gdb_breakpoint_at.
5141 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5142 (delete_gdb_breakpoint_at): Delete.
5143 (delete_gdb_breakpoint_1): New function, loosely based off
5144 delete_gdb_breakpoint_at.
5145 (delete_gdb_breakpoint): New function.
5146 (clear_gdb_breakpoint_conditions): Rename to ...
5147 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5149 (add_condition_to_breakpoint): Make static.
5150 (add_breakpoint_condition): Take a struct breakpoint pointer
5151 instead of an address. Adjust.
5152 (gdb_condition_true_at_breakpoint): Rename to ...
5153 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5155 (gdb_condition_true_at_breakpoint): Reimplement.
5156 (add_breakpoint_commands): Take a struct breakpoint pointer
5157 instead of an address. Adjust.
5158 (gdb_no_commands_at_breakpoint): Rename to ...
5159 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5160 parameter. Return true if no breakpoint was found. Change debug
5162 (gdb_no_commands_at_breakpoint): Reimplement.
5163 (run_breakpoint_commands): Rename to ...
5164 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5165 and change return type to boolean.
5166 (run_breakpoint_commands): New function.
5167 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5168 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5169 breakpoint. Go through the_target->remove_point instead of
5170 assuming memory breakpoint.
5171 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5172 software and hardware breakpoints.
5173 (reinsert_raw_breakpoint): Go through the_target->insert_point
5174 instead of assuming memory breakpoint.
5175 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5176 software and hardware breakpoints.
5177 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5178 Check both software and hardware breakpoints.
5179 (validate_inserted_breakpoint): Assert the breakpoint is a
5180 software breakpoint. Set the inserted flag to -1 instead of
5181 setting shlib_disabled.
5182 (delete_disabled_breakpoints): Adjust.
5183 (validate_breakpoints): Only validate software breakpoints.
5184 Adjust to inserted flag change.
5185 (check_mem_read, check_mem_write): Skip breakpoint types other
5186 than software breakpoints. Adjust to inserted flag change.
5187 * mem-break.h (enum raw_bkpt_type): New enum.
5188 (raw_breakpoint, struct process_info): Forward declare.
5189 (Z_packet_to_target_hw_bp_type): Delete declaration.
5190 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5191 (set_gdb_breakpoint, delete_gdb_breakpoint)
5192 (clear_breakpoint_conditions): New declarations.
5193 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5194 (breakpoint_inserted_here): Update comment.
5195 (add_breakpoint_condition, add_breakpoint_commands): Replace
5196 address parameter with a breakpoint pointer parameter.
5197 (gdb_breakpoint_here): Update comment.
5198 (delete_gdb_breakpoint_at): Delete.
5199 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5200 * server.c (process_point_options): Take a struct breakpoint
5201 pointer instead of an address. Adjust.
5202 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5203 delete_gdb_breakpoint.
5204 * spu-low.c (spu_target_ops): Install NULL as
5205 supports_z_point_type method.
5206 * target.h: Include mem-break.h.
5207 (struct target_ops) <prepare_to_access_memory>: Update comment.
5208 <supports_z_point_type>: New field.
5209 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5210 instead of a char. Also take a raw breakpoint pointer.
5211 * win32-arm-low.c (the_low_target): Install NULL as
5212 supports_z_point_type.
5213 * win32-i386-low.c (i386_supports_z_point_type): New function.
5214 (i386_insert_point, i386_remove_point): Adjust to new interface.
5215 (the_low_target): Install i386_supports_z_point_type.
5216 * win32-low.c (win32_supports_z_point_type): New function.
5217 (win32_insert_point, win32_remove_point): Adjust to new interface.
5218 (win32_target_ops): Install win32_supports_z_point_type.
5219 * win32-low.h (struct win32_target_ops):
5220 <supports_z_point_type>: New method.
5221 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5222 instead of a char. Also take a raw breakpoint pointer.
5224 2014-05-20 Pedro Alves <palves@redhat.com>
5226 * mem-break.h: Include break-common.h.
5227 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5228 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5229 (Z_packet_to_target_hw_bp_type): New declaration.
5230 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5231 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5232 (Z_PACKET_ACCESS_WP): Delete macros.
5233 (Z_packet_to_hw_type): Delete function.
5234 * i386-low.h: Don't include break-common.h here.
5235 (Z_packet_to_hw_type): Delete declaration.
5236 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5237 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5238 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5239 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5240 * linux-aarch64-low.c: Don't include break-common.h here.
5241 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5242 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5243 (Z_packet_to_target_hw_bp_type): Delete function.
5244 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5246 (mips_insert_point, mips_remove_point): Use
5247 Z_packet_to_target_hw_bp_type.
5249 2014-05-20 Pedro Alves <palves@redhat.com>
5251 * linux-aarch64-low.c: Include break-common.h.
5252 (enum target_point_type): Delete.
5253 (Z_packet_to_point_type): Rename to ...
5254 (Z_packet_to_target_hw_bp_type): ... this, and return a
5255 target_hw_bp_type instead.
5256 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5257 instead of an enum target_point_type.
5258 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5260 (aarch64_dr_state_insert_one_point)
5261 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5262 (aarch64_handle_aligned_watchpoint)
5263 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5264 Take an enum target_hw_bp_type instead of an enum
5266 (aarch64_supports_z_point_type): New function.
5267 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5268 use Z_packet_to_target_hw_bp_type.
5270 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5272 * configure.ac: Only use -Werror by default when DEVELOPMENT
5274 * configure: Regenerate.
5276 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5278 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5279 * linux-x86-low.c (X86_64_USER_REGS): New.
5280 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5282 2014-04-28 Yao Qi <yao@codesourcery.com>
5284 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5287 2014-04-25 Pedro Alves <palves@redhat.com>
5290 * linux-low.c (linux_attach_fail_reason_string): New function.
5291 (linux_attach_lwp): Delete.
5292 (linux_attach_lwp_1): Rename to ...
5293 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5294 argument. Remove "initial" parameter. Return int instead of
5295 void. Don't error or warn here.
5296 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5297 failure to attach to the tgid. Call warning when failing to
5299 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5300 argument. Remove "initial" parameter. Return int instead of
5301 void. Don't error or warn here.
5302 (linux_attach_fail_reason_string): New declaration.
5303 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5304 interface change. Use linux_attach_fail_reason_string.
5306 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5307 Walfred Tedeschi <walfred.tedeschi@intel.com>
5309 * Makefile.in: Added rules to handle new files
5310 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5311 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5312 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5313 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5314 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5315 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5317 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5318 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5319 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5320 i386/x32-avx512.xml.
5321 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5322 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5323 i386/x32-avx512-linux.xml.
5324 * i387-fp.c (num_avx512_k_registers): New constant for number
5326 (num_avx512_zmmh_low_registers): New constant for number of
5327 lower ZMM registers (0-15).
5328 (num_avx512_zmmh_high_registers): New constant for number of
5329 higher ZMM registers (16-31).
5330 (num_avx512_ymmh_registers): New contant for number of higher
5331 YMM registers (ymm16-31 added by avx521 on x86_64).
5332 (num_avx512_xmm_registers): New constant for number of higher
5333 XMM registers (xmm16-31 added by AVX512 on x86_64).
5334 (struct i387_xsave): Add space for AVX512 registers.
5335 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5336 Add code to handle AVX512 registers.
5337 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5338 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5339 prototypei from generated file.
5340 (tdesc_amd64_avx512_linux): Likewise.
5341 (init_registers_x32_avx512_linux): Likewise.
5342 (tdesc_x32_avx512_linux): Likewise.
5343 (init_registers_i386_avx512_linux): Likewise.
5344 (tdesc_i386_avx512_linux): Likewise.
5345 (x86_64_regmap): Add AVX512 registers.
5346 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5348 (initialize_low_arch): Add code to initialize AVX512 registers.
5350 2014-04-23 Pedro Alves <palves@redhat.com>
5352 * mem-break.c (find_gdb_breakpoint_at): Make static.
5353 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5355 2014-04-23 Pedro Alves <palves@redhat.com>
5357 * i386-low.c: Don't include break-common.h here.
5358 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5359 prototype to take target_hw_bp_type as argument instead of a Z
5361 * i386-low.h: Include break-common.h here.
5362 (Z_packet_to_hw_type): Declare.
5363 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5365 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5366 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5367 (x86_remove_point): Convert the packet number to a
5368 target_hw_bp_type before calling i386_low_remove_watchpoint.
5369 * win32-i386-low.c (i386_insert_point): Convert the packet number
5370 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5371 (i386_remove_point): Convert the packet number to a
5372 target_hw_bp_type before calling i386_low_remove_watchpoint.
5374 2014-04-23 Pedro Alves <palves@redhat.com>
5376 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5378 2014-04-10 Pedro Alves <palves@redhat.com>
5380 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5381 Check if the condition or command is NULL before checking if the
5382 breakpoint is known. On success, return true.
5383 * mem-break.h (add_breakpoint_condition): Document return.
5384 (add_breakpoint_commands): Add describing comment.
5385 * server.c (skip_to_semicolon): New function.
5386 (process_point_options): Use it.
5388 2014-04-09 Pedro Alves <palves@redhat.com>
5390 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5393 2014-02-27 Pedro Alves <palves@redhat.com>
5396 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5398 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5400 (last_thread_of_process_p): Take a PID argument instead of a
5402 (linux_wait_for_lwp): Delete.
5403 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5405 (linux_low_filter_event): New function, party factored out from
5406 linux_wait_for_event.
5407 (linux_wait_for_event): Rename to ...
5408 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5409 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5410 sigsuspend. Check for zombie leaders.
5411 (linux_wait_for_event): Reimplement as wrapper around
5412 linux_wait_for_event_filtered.
5413 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5414 a normal or signal exit is seen, it's the whole process exiting.
5415 (wait_for_sigstop): No longer a for_each_inferior callback.
5416 Rewrite on top of linux_wait_for_event_filtered.
5417 (stop_all_lwps): Call wait_for_sigstop directly.
5418 * server.c (resume, handle_target_event): Handle
5419 TARGET_WAITKIND_NO_RESUMED.
5421 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5423 * win32-low.c (psapi_get_dll_name,
5424 * win32_CreateToolhelp32Snapshot): Delete.
5425 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5426 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5428 (handle_load_dll): Add function description.
5429 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5431 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5433 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5435 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5436 base address when calling win32_add_one_solib.
5437 (handle_load_dll): Delete local variable load_addr.
5438 Remove 0x1000 offset applied to DLL base address when calling
5439 win32_add_one_solib.
5440 (handle_unload_dll): Add comment.
5442 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5444 * win32-low.c (win32_add_all_dlls): Renames
5445 win32_ensure_ntdll_loaded. Rewrite function documentation.
5446 Adjust implementation to always load all DLLs.
5447 Add 0x1000 offset to DLL base address when calling
5448 win32_add_one_solib.
5449 (child_initialization_done): New static global.
5450 (do_initial_child_stuff): Set child_initialization_done to
5451 zero during child initialization, and 1 after. Replace call
5452 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5454 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5455 (handle_unload_dll): Add function documentation.
5456 (get_child_debug_event): Ignore load and unload DLL events
5457 during child initialization.
5459 2014-02-20 Doug Evans <dje@google.com>
5461 Remove global all_lwps.
5462 * inferiors.h (ptid_of): Move here from linux-low.h.
5463 (pid_of, lwpid_of): Ditto.
5464 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5465 parameter is a struct thread_info * now.
5466 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5467 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5468 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5470 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5471 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5472 * linux-arm-low.c (update_registers_callback): Update, "entry"
5473 parameter is a struct thread_info * now.
5474 Fetch lwpid from current_inferior directly.
5475 (arm_insert_point): Pass &all_threads to find_inferior instead of
5477 (arm_remove_point): Ditto.
5478 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5479 (arm_prepare_to_resume): Fetch pid from thread.
5480 (arm_read_description): Fetch lwpid from current_inferior directly.
5481 * linux-low.c (all_lwps): Delete.
5482 (delete_lwp): Delete call to remove_inferior.
5483 (handle_extended_wait): Fetch lwpid from thread.
5484 (add_lwp): Don't set lwp->entry.id. Remove call to
5485 add_inferior_to_list.
5486 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5487 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5488 (kill_one_lwp_callback): Ditto.
5489 (linux_kill): Don't dereference NULL pointer.
5490 Fetch ptid,lwpid from thread.
5491 (get_detach_signal): Fetch ptid from thread.
5492 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5493 Simplify call to regcache_invalidate_thread.
5494 (delete_lwp_callback): Update, "entry" parameter is a
5495 struct thread_info * now. Fetch pid from thread.
5496 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5497 (status_pending_p_callback): Update, "entry" parameter is a
5498 struct thread_info * now. Fetch ptid from thread.
5499 (find_lwp_pid): Update, "entry" parameter is a
5500 struct thread_info * now.
5501 (linux_wait_for_lwp): Fetch pid from thread.
5502 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5503 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5504 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5505 (dequeue_one_deferred_signal): Ditto.
5506 (cancel_breakpoint): Fetch ptid from current_inferior.
5507 (linux_wait_for_event): Pass &all_threads to find_inferior,
5508 not &all_lwps. Fetch ptid, lwpid from thread.
5509 (count_events_callback): Update, "entry" parameter is a
5510 struct thread_info * now.
5511 (select_singlestep_lwp_callback): Ditto.
5512 (select_event_lwp_callback): Ditto.
5513 (cancel_breakpoints_callback): Ditto.
5514 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5516 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5517 (unsuspend_one_lwp): Update, "entry" parameter is a
5518 struct thread_info * now.
5519 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5521 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5522 Fetch lwpid from thread, not lwp.
5523 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5524 Pass &all_threads to find_inferior, not &all_lwps.
5525 (send_sigstop): Fetch lwpid from thread, not lwp.
5526 (send_sigstop_callback): Update, "entry" parameter is a
5527 struct thread_info * now.
5528 (suspend_and_send_sigstop_callback): Ditto.
5529 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5530 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5531 struct thread_info * now.
5532 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5534 (lwp_running): Update, "entry" parameter is a
5535 struct thread_info * now.
5536 (stop_all_lwps): Fetch ptid from thread.
5537 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5538 (linux_resume_one_lwp): Fetch lwpid from thread.
5539 (linux_set_resume_request): Update, "entry" parameter is a
5540 struct thread_info * now. Fetch pid, lwpid from thread.
5541 (resume_status_pending_p): Update, "entry" parameter is a
5542 struct thread_info * now.
5543 (need_step_over_p): Ditto. Fetch lwpid from thread.
5544 (start_step_over): Fetch lwpid from thread.
5545 (linux_resume_one_thread): Update, "entry" parameter is a
5546 struct thread_info * now. Fetch lwpid from thread.
5547 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5548 (proceed_one_lwp): Update, "entry" parameter is a
5549 struct thread_info * now. Fetch lwpid from thread.
5550 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5551 struct thread_info * now.
5552 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5553 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5554 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5556 (regsets_store_inferior_registers): Ditto.
5557 (fetch_register, store_register): Ditto.
5558 (linux_read_memory, linux_write_memory): Ditto.
5559 (linux_request_interrupt): Ditto.
5560 (linux_read_auxv): Ditto.
5561 (linux_xfer_siginfo): Ditto.
5562 (linux_qxfer_spu): Ditto.
5563 (linux_qxfer_libraries_svr4): Ditto.
5564 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5565 moved to inferiors.h.
5567 (get_thread_lwp): Update.
5568 (struct lwp_info): Delete member "entry". Simplify comment for
5571 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5572 current_inferior directly.
5573 (update_watch_registers_callback): Update, "entry" parameter is a
5574 struct thread_info * now. Fetch pid from thread.
5575 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5576 (mips_insert_point): Fetch lwpid from current_inferior.
5577 Pass &all_threads to find_inferior, not &all_lwps.
5578 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5579 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5581 (mips_stopped_data_address): Ditto.
5582 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5584 * linux-tile-low.c (tile_arch_setup): Ditto.
5585 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5586 (update_debug_registers_callback): Update, "entry" parameter is a
5587 struct thread_info * now. Fetch pid from thread.
5588 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5589 Pass &all_threads to find_inferior, not &all_lwps.
5590 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5591 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5592 Pass &all_threads to find_inferior, not &all_lwps.
5593 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5594 (i386_dr_low_get_status): Ditto.
5595 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5596 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5597 (x86_linux_read_description): Ditto.
5598 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5600 2014-02-20 Doug Evans <dje@google.com>
5602 * inferiors.c (get_first_inferior): Fix buglet.
5604 2014-02-19 Doug Evans <dje@google.com>
5606 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5607 * inferiors.c (add_thread): Change result type to struct thread_info *.
5608 All callers updated.
5609 (add_lwp): Call add_thread here instead of in callers.
5610 All callers updated.
5611 * linux-low.h (get_lwp_thread): Rewrite.
5612 (struct lwp_info): New member "thread".
5614 2014-02-19 Doug Evans <dje@google.com>
5616 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5617 All callers updated.
5619 2014-02-19 Doug Evans <dje@google.com>
5621 * inferiors.c (add_thread): Fix whitespace.
5623 2014-02-19 Doug Evans <dje@google.com>
5625 * dll.c (clear_dlls): Replace accessing list implemention details
5627 * gdbthread.h (get_first_thread): Declare.
5628 * inferiors.c (for_each_inferior_with_data): New function.
5629 (get_first_thread): New function.
5630 (find_thread_ptid): Simplify.
5631 (get_first_inferior): New function.
5632 (clear_list): Delete.
5633 (one_inferior_p): New function.
5634 (clear_inferior_list): New function.
5635 (clear_inferiors): Update.
5636 * inferiors.h (for_each_inferior_with_data): Declare.
5637 (clear_inferior_list): Declare.
5638 (one_inferior_p): Declare.
5639 (get_first_inferior): Declare.
5640 * linux-low.c (linux_wait_for_event): Replace accessing list
5641 implemention details with API function.
5642 * server.c (target_running): Ditto.
5643 (accumulate_file_name_length): New function.
5644 (emit_dll_description): New function.
5645 (handle_qxfer_libraries): Replace accessing list implemention
5646 details with API function.
5647 (handle_qxfer_threads_worker): New function.
5648 (handle_qxfer_threads_proper): Replace accessing list implemention
5649 details with API function.
5650 (handle_query): Ditto.
5651 (visit_actioned_threads_callback_ftype): New typedef.
5652 (visit_actioned_threads_data): New struct.
5653 (visit_actioned_threads): Rewrite to be find_inferior callback.
5654 (resume): Call find_inferior.
5655 (handle_status): Replace accessing list implemention
5656 details with API function.
5657 (process_serial_event): Replace accessing list implemention details
5659 * target.c (set_desired_inferior): Replace accessing list implemention
5660 details with API function.
5661 * tracepoint.c (same_process_p): New function.
5662 (gdb_agent_about_to_close): Replace accessing list implemention
5663 details with API function.
5664 * win32-low.c (child_delete_thread): Replace accessing list
5665 implemention details with API function.
5666 (match_dll_by_basename): New function.
5667 (dll_is_loaded_by_basename): New function.
5668 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5669 details call to dll_is_loaded_by_basename.
5671 2014-02-19 Doug Evans <dje@google.com>
5673 * dll.h (struct dll_info): Add comment.
5674 * gdbthread.h (struct thread_info): Add comment.
5675 (current_ptid): Simplify.
5676 * inferiors.c (add_process): Update.
5677 (remove_process): Update.
5678 * inferiors.h (struct process_info): Rename member "head" to "entry".
5679 * linux-low.c (delete_lwp): Update.
5681 (last_thread_of_process_p): Update.
5682 (kill_one_lwp_callback, linux_kill): Update.
5683 (status_pending_p_callback): Update.
5684 (wait_for_sigstop): Update. Simplify read of ptid.
5685 (start_step_over): Update.
5686 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5687 (get_lwp_thread): Update.
5688 (struct lwp_info): Rename member "head" to "entry".
5689 * regcache.h (inferior_list_entry): Delete.
5690 * server.c (kill_inferior_callback): Update.
5691 (detach_or_kill_inferior_callback): Update.
5692 (print_started_pid): Update.
5693 (print_attached_pid): Update.
5694 (process_serial_event): Simplify read of ptid.
5695 * thread-db.c (thread_db_create_event): Update.
5696 (thread_db_get_tls_address): Update.
5697 * win32-low.c (current_inferior_ptid): Simplify.
5699 2014-02-19 Tom Tromey <tromey@redhat.com>
5701 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5703 (target_supports_btrace): Update.
5705 2014-02-14 Yao Qi <yao@codesourcery.com>
5707 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5708 (rsp-low-ipa.o): New target.
5710 2014-02-12 Tom Tromey <tromey@redhat.com>
5712 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5713 convert_ascii_to_int.
5714 * regcache.c (registers_to_string): Likewise.
5715 * remote-utils.c (decode_M_packet): Likewise.
5716 * server.c (process_serial_event): Likewise.
5718 2014-02-12 Tom Tromey <tromey@redhat.com>
5720 * server.c (handle_query, handle_v_run): Use hex2bin, not
5722 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5724 2014-02-12 Tom Tromey <tromey@redhat.com>
5726 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5727 convert_int_to_ascii.
5728 * regcache.c (registers_to_string, collect_register_as_string):
5730 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5732 * server.c (process_serial_event): Likewise.
5733 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5734 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5736 2014-02-12 Tom Tromey <tromey@redhat.com>
5738 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5739 bin2hex, not hexify.
5740 * tracepoint.c (cmd_qtstatus): Likewise.
5742 2014-02-12 Tom Tromey <tromey@redhat.com>
5744 * remote-utils.c (monitor_output): Pass explicit length to
5747 2014-02-12 Tom Tromey <tromey@redhat.com>
5749 * tracepoint.c: Include rsp-low.h.
5750 * server.c: Include rsp-low.h.
5751 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5752 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5754 * remote-utils.c: Include rsp-low.h.
5755 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5756 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5757 (convert_int_to_ascii, convert_ascii_to_int): Move to
5759 * regcache.c: Include rsp-low.h.
5760 * ax.c: Include rsp-low.h.
5761 * Makefile.in (SFILES): Add common/rsp-low.c.
5762 (OBS): Add rsp-low.o.
5763 (rsp-low.o): New target.
5765 2014-02-12 Tom Tromey <tromey@redhat.com>
5767 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5768 Include print-utils.h.
5769 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5770 (plongest, thirty_two, phex_nz): Remove.
5771 * Makefile.in (SFILES): Add common/print-utils.c.
5772 (OBS): Add print-utils.o.
5773 (print-utils-ipa.o): New target.
5774 (print-utils.o): New target.
5775 (IPA_OBJS): Add print-utils-ipa.o.
5777 2014-02-06 Tom Tromey <tromey@redhat.com>
5779 * Makefile.in (SFILES): Fix indentation.
5781 2014-02-05 Doug Evans <dje@google.com>
5783 * linux-low.c (linux_wait_for_event): Improve comment.
5784 (linux_wait_1): Keep current_inferior in sync with event_child.
5786 2014-01-22 Doug Evans <dje@google.com>
5788 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5790 2014-01-22 Doug Evans <dje@google.com>
5792 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5793 * configure: Regenerate.
5794 * config.in: Regenerate.
5795 * Makefile.in (SFILES): Add debug.c.
5797 * debug.c: New file.
5798 * debug.h: New file.
5799 * linux-aarch64-low.c (*): Update all debugging printfs to use
5800 debug_printf instead of fprintf.
5801 * linux-arm-low.c (*): Ditto.
5802 * linux-cris-low.c (*): Ditto.
5803 * linux-crisv32-low.c (*): Ditto.
5804 * linux-m32r-low.c (*): Ditto.
5805 * linux-sparc-low.c (*): Ditto.
5806 * linux-x86.c (*): Ditto.
5807 * linux-low.c (*): Ditto.
5808 (linux_wait_1): Add calls to debug_enter, debug_exit.
5809 (linux_wait): Remove redundant debugging printf.
5810 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5811 (linux_resume, unstop_all_lwps): Ditto.
5812 * mem-break.c (*): Update all debugging printfs to use
5813 debug_printf instead of fprintf.
5814 * remote-utils.c (*): Ditto.
5815 * thread-db.c (*): Ditto.
5816 * server.c #include <ctype.h>, "gdb_vecs.h".
5817 (debug_threads): Moved to debug.c.
5818 (*): Update all debugging printfs to use debug_printf instead of
5820 (start_inferior): Replace call to fflush with call to debug_flush.
5821 (monitor_show_help): Mention set debug-format.
5822 (parse_debug_format_options): New function.
5823 (handle_monitor_command): Handle "monitor set debug-format".
5824 (gdbserver_usage): Mention --debug-format.
5825 (main): Parse --debug-format.
5826 * server.h (debug_threads): Declaration moved to debug.h.
5828 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5829 trace_debug_1 that uses debug_printf.
5830 (tracepoint_look_up_symbols): Update all debugging printfs to use
5831 debug_printf instead of fprintf.
5833 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5835 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5838 2014-01-17 Pedro Alves <palves@redhat.com>
5841 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5842 defined after including gdb_proc_service.h.
5844 2014-01-16 Doug Evans <dje@google.com>
5846 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5847 (match_dll): Use it.
5849 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5851 * target.h (target_ops) <read_btrace>: Change parameters and
5852 return type to allow error reporting.
5853 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5854 trace reading errors on.
5855 * linux-low.c (linux_low_read_btrace): Pass trace reading
5857 (linux_low_disable_btrace): New.
5859 2014-01-15 Doug Evans <dje@google.com>
5861 * inferiors.c (thread_id_to_gdb_id): Delete.
5862 * inferiors.h (thread_id_to_gdb_id): Delete.
5864 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5866 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5867 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5870 2014-01-08 Pedro Alves <palves@redhat.com>
5872 * server.c (handle_status): Don't discard previous queued stop
5873 replies or thread's pending status here.
5874 (main) <disconnection>: Do it here instead.
5876 2014-01-08 Pedro Alves <palves@redhat.com>
5878 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5879 * server.c (visit_actioned_threads, handle_pending_status): New
5881 (handle_v_cont): Factor out parts to ...
5882 (resume): ... this new function. If in all-stop, and a thread
5883 being resumed has a pending status, report it without actually
5885 (myresume): Adjust to use the new 'resume' function.
5886 (clear_pending_status_callback, set_pending_status_callback)
5887 (find_status_pending_thread_callback): New functions.
5888 (handle_status): Handle the case of multiple threads having
5889 interesting statuses to report. Report threads' real last signal
5890 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5891 with an interesting thread to report the status for, instead of
5892 always reporting the status of the first thread.
5894 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5896 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5897 * gdbreplay.c (gdbreplay_version): Likewise.
5899 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5901 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5902 iov.iov_len with the real length in use.
5904 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5906 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5907 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5908 for all targets that use win32-low.c.
5909 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5910 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5912 2013-12-13 Pedro Alves <palves@redhat.com>
5914 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5915 if equal to TARGET_WAITKIND_LOADED.
5916 * win32-low.c (cached_status): New static global.
5917 (win32_wait): Add declaration.
5918 (do_initial_child_stuff): Flush all initial pending debug events
5919 up to the initial breakpoint.
5920 (win32_wait): If CACHED_STATUS was set, return that instead
5921 of doing a real wait. Remove the code resuming the execution
5922 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5923 during the initial phase. Also remove the code changing
5924 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5925 TARGET_WAITKIND_STOPPED.
5927 2013-12-11 Yao Qi <yao@codesourcery.com>
5929 * notif.c (handle_notif_ack): Return 0 if no notification
5932 2013-11-20 Doug Evans <dje@google.com>
5934 * linux-low.c (linux_set_resume_request): Fix comment.
5936 2013-11-20 Doug Evans <dje@google.com>
5938 * linux-low.c (resume_status_pending_p): Tweak comment.
5940 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5942 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5943 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5944 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5945 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5946 (srv_amd64_regobj): Add amd64-mpx.o.
5947 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5948 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5949 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5950 * i387-fp.c (num_pl_bnd_register) Added constant.
5951 (num_pl_bnd_cfg_registers) Added constant.
5952 (struct i387_xsave) Added reserved area and MPX fields.
5953 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5954 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5956 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5957 (init_registers_amd64_mpx_linux): Declare new function.
5958 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5959 (x86_64_regmap): Add MPX registers.
5960 (x86_linux_read_description): Add MPX case.
5961 (initialize_low_arch): Initialize MPX targets.
5963 2013-11-18 Tom Tromey <tromey@redhat.com>
5965 * configure: Rebuild.
5966 * configure.ac: Don't check for stdlib.h.
5967 * gdbreplay.c: Unconditionally include stdlib.h.
5969 2013-11-18 Tom Tromey <tromey@redhat.com>
5971 * config.in: Rebuild.
5972 * configure: Rebuild.
5973 * configure.ac: Don't use AC_HEADER_DIRENT.
5975 2013-11-18 Tom Tromey <tromey@redhat.com>
5977 * server.h: Don't check HAVE_STRING_H.
5978 * gdbreplay.c: Don't check HAVE_STRING_H.
5979 * configure: Rebuild.
5981 2013-11-18 Tom Tromey <tromey@redhat.com>
5983 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5986 2013-11-08 Tom Tromey <tromey@redhat.com>
5988 * configure, config.in: Rebuild.
5989 * configure.ac: Remove unused configury.
5991 2013-11-08 Tom Tromey <tromey@redhat.com>
5993 * acinclude.m4: Include common.m4, codeset.m4.
5994 * configure, config.in: Rebuild.
5995 * configure.ac: Use GDB_AC_COMMON.
5997 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5999 * linux-s390-low.c (HWCAP_S390_TE): New define.
6000 (s390_arch_setup): Consider the TE field in the HWCAP for
6001 determining 'have_regset_tdb'.
6003 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6006 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6009 2013-10-02 Pedro Alves <palves@redhat.com>
6011 * server.c (process_serial_event): Don't output "GDBserver
6012 exiting" if GDB is connected through stdio.
6013 * target.c (mywait): Likewise, be silent if GDB is connected
6016 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6018 * lynx-low.c (lynx_add_threads_after_attach): New function.
6019 (lynx_attach): Remove call to add_thread. Add call to
6020 lynx_add_threads_after_attach instead.
6022 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6024 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6025 * config.in, configure: Regenerated.
6027 2013-09-18 Yao Qi <yao@codesourcery.com>
6030 * server.c (start_inferior): Clear 'resume_info'.
6032 2013-09-16 Jiong Wang <jiwang@tilera.com>
6034 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6037 2013-09-16 Jiong Wang <jiwang@tilera.com>
6039 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6040 linux-tile-low.o to srv_tgtobj.
6042 2013-09-16 Will Newton <will.newton@linaro.org>
6044 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6047 2013-09-06 Pedro Alves <palves@redhat.com>
6049 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6050 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6051 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6052 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6053 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6054 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6056 2013-09-06 Pedro Alves <palves@redhat.com>
6058 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6059 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6061 2013-09-06 Pedro Alves <palves@redhat.com>
6063 * linux-amd64-ipa.c: Include tracepoint.h.
6064 * linux-i386-ipa.c: Include tracepoint.h.
6066 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6068 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6069 (ps_get_thread_area): New function.
6071 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6073 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6074 (initialize_low_arch): Call init_registers_crisv32 rather than
6075 init_register_crisv32.
6077 2013-09-05 Pedro Alves <palves@redhat.com>
6079 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6081 * hostio.h: ... this new file.
6082 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6083 win32-low.c: Include hostio.h.
6085 2013-09-05 Pedro Alves <palves@redhat.com>
6087 * server.h (gdb_client_data, handler_func, callback_handler_func)
6088 (delete_file_handler, add_file_handler, append_callback_event)
6089 (delete_callback_event, start_event_loop, initialize_event_loop):
6090 Move to event-loop.h and include it.
6091 * event-loop.h: New file.
6093 2013-09-05 Pedro Alves <palves@redhat.com>
6095 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6096 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6097 (loaded_dll, unloaded_dll): Move to ...
6098 * dll.h: ... this new file.
6099 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6101 2013-09-05 Pedro Alves <palves@redhat.com>
6103 * server.h (current_process, get_thread_process, all_processes)
6104 (add_inferior_to_list, for_each_inferior, current_inferior)
6105 (remove_inferior, add_process, remove_process, find_process_pid)
6106 (have_started_inferiors_p, have_attached_inferiors_p)
6107 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6108 (clear_inferiors, find_inferior, find_inferior_id)
6109 (inferior_target_data, set_inferior_target_data)
6110 (inferior_regcache_data, set_inferior_regcache_data): Move to
6111 inferiors.h, and include it.
6112 * inferiors.h: New file.
6114 2013-09-05 Pedro Alves <palves@redhat.com>
6116 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6120 2013-09-05 Pedro Alves <palves@redhat.com>
6122 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6124 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6125 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6126 (handle_tracepoint_general_set, handle_tracepoint_query)
6127 (tracepoint_finished_step, tracepoint_was_hit)
6128 (release_while_stepping_state_list, current_traceframe)
6129 (in_readonly_region, traceframe_read_mem)
6130 (fetch_traceframe_registers, traceframe_read_sdata)
6131 (traceframe_read_info, struct fast_tpoint_collect_status)
6132 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6133 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6134 (supply_fast_tracepoint_registers)
6135 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6136 (ipa_tdesc, claim_trampoline_space)
6137 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6138 (agent_mem_read, agent_get_trace_state_variable_value)
6139 (agent_set_trace_state_variable_value, agent_tsv_read)
6140 (agent_mem_read_string, get_raw_reg_func_addr)
6141 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6142 * tracepoint.h: ... this new file.
6144 2013-09-05 Pedro Alves <palves@redhat.com>
6146 * server.h (perror_with_name, error, fatal, warning, paddress)
6147 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6149 * utils.h: New file.
6151 2013-09-05 Pedro Alves <palves@redhat.com>
6153 * server.h (remote_debug, noack_mode, transport_is_reliable)
6154 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6155 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6156 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6157 (write_enn, initialize_async_io, enable_async_io)
6158 (disable_async_io, check_remote_input_interrupt_request)
6159 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6160 (dead_thread_notify, prepare_resume_reply)
6161 (decode_address_to_semicolon, decode_address, decode_m_packet)
6162 (decode_M_packet, decode_X_packet, decode_xfer_write)
6163 (decode_search_memory_packet, unhexify, hexify)
6164 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6165 (look_up_one_symbol, relocate_instruction)
6166 (monitor_output): Move to remote-utils.h, and include it.
6167 * remote-utils.h: New file.
6169 2013-09-05 Pedro Alves <palves@redhat.com>
6171 * server.h (_): Delete.
6173 2013-09-02 Pedro Alves <palves@redhat.com>
6175 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6176 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6178 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6180 2013-09-02 Pierre Muller <muller@sourceware.org>
6182 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6183 or WriteProcessMemory complete successfully and handle
6184 ERROR_PARTIAL_COPY error.
6186 2013-09-02 Pedro Alves <palves@redhat.com>
6188 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6189 error instead of EIO.
6191 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6194 * linux-low.c: Include filestuff.h.
6195 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6196 * lynx-low.c: Include filestuff.h.
6197 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6198 * server.c: Include filestuff.h.
6199 (main): Call notice_open_fds.
6200 * spu-low.c: Include filestuff.h.
6201 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6203 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6205 * Makefile.in: Explain why ../target and ../nat are not
6206 listed as include file search paths.
6207 (linux-waitpid.o): New object file rule.
6208 * configure.srv (srv_native_linux_obj): New variable.
6209 Replace all occurrences of linux native object files with
6210 $srv_native_linux_obj.
6211 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6212 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6213 (linux_enable_event_reporting): Remove declaration.
6214 (my_waitpid): Moved to common/linux-waitpid.c.
6215 (linux_wait_for_event): Pass ptid when calling
6216 linux_enable_event_reporting.
6217 (linux_supports_tracefork_flag): Remove.
6218 (linux_enable_event_reporting): Likewise.
6219 (linux_tracefork_grandchild): Remove.
6220 (STACK_SIZE): Moved to common/linux-ptrace.c.
6221 (linux_tracefork_child): Remove.
6222 (linux_test_for_tracefork): Remove.
6223 (linux_look_up_symbols): Call linux_supports_traceclone.
6224 (initialize_low): Remove call to linux_test_for_tracefork.
6225 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6226 common/linux-ptrace.h.
6227 (PTRACE_TYPE_ARG4): Likewise.
6228 Include linux-ptrace.h.
6230 2013-08-21 Pedro Alves <palves@redhat.com>
6232 * config.in: Renegerate.
6234 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6236 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6237 (SFILES): Remove $(srcdir)/common/target-common.c and
6238 add $(srcdir)/target/waitstatus.c.
6239 (OBS): Remove target-common.o and add waitstatus.o.
6240 (server_h): Remove $(srcdir)/../common/target-common.h and
6241 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6242 and $(srcdir)/../target/waitstatus.h.
6243 (target-common.o): Remove.
6244 (waitstatus.o): New target object file.
6245 * target.h: Do not include target-common.h and
6246 include target/resume.h, target/wait.h and
6247 target/waitstatus.h.
6249 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6251 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6252 to PTRACE_TYPE_ARG3.
6253 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6254 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6256 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6257 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6259 2013-07-27 Jie Zhang <jie@codesourcery.com>
6260 Daniel Jacobowitz <dan@codesourcery.com>
6261 Yao Qi <yao@codesourcery.com>
6263 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6264 (mips-linux-watch.o): New rule.
6265 (mips_linux_watch_h): New variable.
6266 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6268 * linux-mips-low.c: Include mips-linux-watch.h.
6269 (struct arch_process_info, struct arch_lwp_info): New.
6270 (update_watch_registers_callback): New function.
6271 (mips_linux_new_process, mips_linux_new_thread) New functions.
6272 (mips_linux_prepare_to_resume, mips_insert_point): New
6274 (mips_remove_point, mips_stopped_by_watchpoint): New
6276 (rsp_bp_type_to_target_hw_bp_type): New function.
6277 (mips_stopped_data_address): New function.
6278 (the_low_target): Add watchpoint support functions.
6280 2013-07-27 Yao Qi <yao@codesourcery.com>
6282 * i386-low.c: Include break-common.h.
6283 (enum target_hw_bp_type): Remove.
6285 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6287 * Makefile.in (SFILES): /common/target-common.c.
6288 (OBS): Add target-common.o.
6289 (server_h): Add $(srcdir)/../common/target-common.h.
6290 (target-common.o): New target.
6291 * server.c (queue_stop_reply_callback): Free
6292 status string after use.
6293 * target.c (target_waitstatus_to_string): Remove.
6294 * target.h: Include target-common.h.
6295 (resume_kind): Likewise.
6296 (target_waitkind): Likewise.
6297 (target_waitstatus): Likewise.
6298 (TARGET_WNOHANG): Likewise.
6300 2013-07-04 Yao Qi <yao@codesourcery.com>
6302 * Makefile.in (host_alias): Use @host_noncanonical@.
6303 (target_alias): Use @target_noncanonical@.
6304 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6305 ACX_NONCANONICAL_HOST.
6306 * configure: Regenerated.
6309 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6311 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6312 * configure: Rebuild.
6313 * Makefile.in (version_host, version_target): Get from configure.
6314 (version.c): Use $(version_host) and $(version_target).
6316 2013-07-03 Pedro Alves <palves@redhat.com>
6318 * Makefile.in (config.status): Depend on development.sh.
6319 * acinclude.m4: Include libmcheck.m4.
6320 * configure: Regenerate.
6322 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6324 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6325 attribute inside the parentheses.
6326 (winapi_DebugSetProcessKillOnExit): Ditto.
6327 (winapi_DebugBreakProcess): Ditto.
6328 (winapi_GenerateConsoleCtrlEvent): Ditto.
6330 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6332 * notif.h (notif_event): Add a dummy member to avoid compiler
6335 2013-07-01 Pedro Alves <palves@redhat.com>
6337 * hostio.c (HOSTIO_PATH_MAX): Define.
6338 (require_filename, handle_open, handle_unlink, handle_readlink):
6341 2013-07-01 Pedro Alves <palves@redhat.com>
6343 * server.h: Include "pathmax.h".
6344 * linux-low.c: Don't include sys/param.h.
6345 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6347 * win32-low.c: Don't include sys/param.h.
6348 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6350 2013-07-01 Pedro Alves <palves@redhat.com>
6352 * event-loop.c: Don't check HAVE_UNISTD_H before including
6354 * gdbreplay.c: Likewise.
6355 * remote-utils.c: Likewise.
6356 * server.c: Likewise.
6357 * configure.ac: Don't check for unistd.h.
6358 * configure: Regenerate.
6360 2013-06-28 Tom Tromey <tromey@redhat.com>
6362 * Makefile.in (version.c): Use version.in, not
6365 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6367 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6368 * configure: Rebuild.
6369 * Makefile.in (version_host, version_target): Get from configure.
6370 (version.c): Use $(version_host) and $(version_target).
6372 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6374 Fix trace-status to output user name without trailing colon.
6375 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6377 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6379 Fix trace-status to output proper start-time and stop-time.
6380 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6381 output start time and stop time in hex as gdb expects.
6383 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6385 * tracepoint.c (build_traceframe_info_xml): Output trace state
6386 variables present in the trace buffer.
6388 2013-06-24 Tom Tromey <tromey@redhat.com>
6390 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6392 (version.o): Remove.
6393 * gdbreplay.c: Include version.h.
6394 (version, host_name): Don't declare.
6395 * server.h: Include version.h.
6396 (version, host_name): Don't declare.
6398 2013-06-12 Pedro Alves <palves@redhat.com>
6400 * linux-x86-low.c (linux_is_elf64): Delete global.
6401 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6402 with local linux_pid_exe_is_elf_64_file use.
6404 2013-06-11 Pedro Alves <palves@redhat.com>
6406 * linux-low.c (regset_disabled, disable_regset): New functions.
6407 (regsets_fetch_inferior_registers)
6408 (regsets_store_inferior_registers): Use them.
6409 (initialize_regsets_info); Don't allocate the disabled_regsets
6411 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6414 2013-06-11 Pedro Alves <palves@redhat.com>
6416 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6419 2013-06-11 Pedro Alves <palves@redhat.com>
6421 * linux-x86-low.c (initialize_low_arch): Call
6422 init_registers_x32_avx_linux.
6424 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6426 Fix compatibility with Android Bionic.
6427 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6430 2013-06-07 Pedro Alves <palves@redhat.com>
6433 * Makefile.in (OBS): Add tdesc.o.
6434 (IPA_OBJS): Add tdesc-ipa.o.
6435 (tdesc-ipa.o): New rule.
6436 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6438 * linux-low.c (new_inferior): Delete.
6439 (disabled_regsets, num_regsets): Delete.
6440 (linux_add_process): Adjust to set the new per-process
6442 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6443 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6444 was a stop. When calling arch_setup, switch the current inferior
6445 to the thread that got an event.
6446 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6447 (regsets_fetch_inferior_registers)
6448 (regsets_store_inferior_registers): New regsets_info parameter.
6450 (linux_register_in_regsets): New regs_info parameter. Adjust to
6452 (register_addr, fetch_register, store_register): New usrregs_info
6453 parameter. Adjust to use it.
6454 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6455 parameter regs_info. Adjust to use it.
6456 (linux_fetch_registers): Get the current inferior's regs_info, and
6458 (linux_store_registers): Ditto.
6459 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6460 (initialize_low): Don't initialize the target_regsets here. Call
6461 initialize_low_arch.
6462 * linux-low.h (target_regsets): Delete declaration.
6463 (struct regsets_info): New.
6464 (struct usrregs_info): New.
6465 (struct regs_info): New.
6466 (struct process_info_private) <new_inferior>: New field.
6467 (struct linux_target_ops): Delete the num_regs, regmap, and
6468 regset_bitmap fields. New field regs_info.
6469 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6470 * i387-fp.c (num_xmm_registers): Delete.
6471 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6472 calls to new interface.
6473 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6474 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6475 Infer the number of xmm registers from the regcache's target
6477 * i387-fp.h (num_xmm_registers): Delete.
6478 * inferiors.c (add_thread): Don't install the thread's regcache
6480 * proc-service.c (gregset_info): Fetch the current inferior's
6481 regs_info. Adjust to use it.
6482 * regcache.c: Include tdesc.h.
6483 (register_bytes, reg_defs, num_registers)
6484 (gdbserver_expedite_regs): Delete.
6485 (get_thread_regcache): If the thread doesn't have a regcache yet,
6486 create one, instead of aborting gdbserver.
6487 (regcache_invalidate_one): Rename to ...
6488 (regcache_invalidate_thread): ... this.
6489 (regcache_invalidate_one): New.
6490 (regcache_invalidate): Only invalidate registers of the current
6492 (init_register_cache): Add target_desc parameter, and use it.
6493 (new_register_cache): Ditto. Assert the target description has a
6494 non zero registers_size.
6495 (regcache_cpy): Add assertions. Adjust.
6496 (realloc_register_cache, set_register_cache): Delete.
6497 (registers_to_string, registers_from_string): Adjust.
6498 (find_register_by_name, find_regno, find_register_by_number)
6499 (register_cache_size): Add target_desc parameter, and use it.
6500 (free_register_cache_thread, free_register_cache_thread_one)
6501 (regcache_release, register_cache_size): New.
6502 (register_size): Add target_desc parameter, and use it.
6503 (register_data, supply_register, supply_register_zeroed)
6504 (supply_regblock, supply_register_by_name, collect_register)
6505 (collect_register_as_string, collect_register_by_name): Adjust.
6506 * regcache.h (struct target_desc): Forward declare.
6507 (struct regcache) <tdesc>: New field.
6508 (init_register_cache, new_register_cache): Add target_desc
6510 (regcache_invalidate_thread): Declare.
6511 (regcache_invalidate_one): Delete declaration.
6512 (regcache_release): Declare.
6513 (find_register_by_number, register_cache_size, register_size)
6514 (find_regno): Add target_desc parameter.
6515 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6517 * remote-utils.c: Include tdesc.h.
6518 (outreg, prepare_resume_reply): Adjust.
6519 * server.c: Include tdesc.h.
6520 (gdbserver_xmltarget): Delete declaration.
6521 (get_features_xml, process_serial_event): Adjust.
6522 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6524 (struct process_info) <tdesc>: New field.
6525 (ipa_tdesc): Declare.
6526 * tdesc.c: New file.
6527 * tdesc.h: New file.
6528 * tracepoint.c: Include tdesc.h.
6529 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6530 (get_context_regcache): Adjust to pass ipa_tdesc down.
6531 (do_action_at_tracepoint): Adjust to get the register cache size
6532 from the context regcache's description.
6533 (traceframe_walk_blocks): Adjust to get the register cache size
6534 from the current trace frame's description.
6535 (traceframe_get_pc): Adjust to get current trace frame's
6536 description and pass it down.
6537 (gdb_collect): Adjust to get the register cache size from the
6539 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6540 (gdbserver_xmltarget): Delete.
6541 (initialize_low_tracepoint): Set the ipa's target description.
6542 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6543 (initialize_low_tracepoint): Set the ipa's target description.
6544 * linux-x86-low.c: Include tdesc.h.
6545 [__x86_64__] (is_64bit_tdesc): New.
6546 (ps_get_thread_area, x86_get_thread_area): Use it.
6547 (i386_cannot_store_register): Rename to ...
6548 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6549 (i386_cannot_fetch_register): Rename to ...
6550 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6551 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6553 (target_regsets): Rename to ...
6554 (x86_regsets): ... this.
6555 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6557 (x86_siginfo_fixup): Use is_64bit_tdesc.
6558 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6559 (tdesc_x32_avx_linux, tdesc_x32_linux)
6560 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6562 (x86_linux_update_xmltarget): Delete.
6563 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6564 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6565 (AMD64_LINUX_USER64_CS): New.
6566 (x86_linux_read_description): New, based on
6567 x86_linux_update_xmltarget.
6568 (same_process_callback): New.
6569 (x86_arch_setup_process_callback): New.
6570 (x86_linux_update_xmltarget): New.
6571 (x86_regsets_info): New.
6572 (amd64_linux_regs_info): New.
6573 (i386_linux_usrregs_info): New.
6574 (i386_linux_regs_info): New.
6575 (x86_linux_regs_info): New.
6576 (x86_arch_setup): Reimplement.
6577 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6578 (x86_emit_ops): Ditto.
6579 (the_low_target): Adjust. Install x86_linux_regs_info,
6580 x86_cannot_fetch_register, and x86_cannot_store_register.
6581 (initialize_low_arch): New.
6582 * linux-ia64-low.c (tdesc_ia64): Declare.
6583 (ia64_fetch_register): Adjust.
6584 (ia64_usrregs_info, regs_info): New globals.
6585 (ia64_regs_info): New function.
6586 (the_low_target): Adjust.
6587 (initialize_low_arch): New function.
6588 * linux-sparc-low.c (tdesc_sparc64): Declare.
6589 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6591 (sparc_arch_setup): New function.
6592 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6593 (the_low_target): Adjust.
6594 (initialize_low_arch): New function.
6595 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6596 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6597 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6598 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6599 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6600 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6601 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6602 (tdesc_powerpc_isa205_vsx64l): Declare.
6603 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6604 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6605 (ppc_set_pc, ppc_get_hwcap): Adjust.
6606 (ppc_usrregs_info): Forward declare.
6607 (!__powerpc64__) ppc_regmap_adjusted: New global.
6608 (ppc_arch_setup): Adjust to the current process'es target
6610 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6611 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6612 (ppc_store_evrregset): Adjust.
6613 (target_regsets): Rename to ...
6614 (ppc_regsets): ... this, and make static.
6615 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6616 (ppc_regs_info): New function.
6617 (the_low_target): Adjust.
6618 (initialize_low_arch): New function.
6619 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6620 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6621 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6622 (tdesc_s390x_linux64v2): Declare.
6623 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6624 (s390_fill_gregset, s390_store_last_break): Adjust.
6625 (target_regsets): Rename to ...
6626 (s390_regsets): ... this, and make static.
6627 (s390_get_pc, s390_set_pc): Adjust.
6628 (s390_get_hwcap): New target_desc parameter, and use it.
6629 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6630 (s390_arch_setup): Adjust to set the current process'es target
6631 description. Don't adjust the regmap.
6632 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6633 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6634 (regs_info_3264): New globals.
6635 (s390_regs_info): New function.
6636 (the_low_target): Adjust.
6637 (initialize_low_arch): New function.
6638 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6639 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6640 [__mips64] (init_registers_mips_linux)
6641 (init_registers_mips_dsp_linux): Delete defines.
6642 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6643 (have_dsp): New global.
6644 (mips_read_description): New, based on mips_arch_setup.
6645 (mips_arch_setup): Reimplement.
6646 (get_usrregs_info): New function.
6647 (mips_cannot_fetch_register, mips_cannot_store_register)
6648 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6649 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6650 (target_regsets): Rename to ...
6651 (mips_regsets): ... this, and make static.
6652 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6653 (dsp_regs_info, regs_info): New globals.
6654 (mips_regs_info): New function.
6655 (the_low_target): Adjust.
6656 (initialize_low_arch): New function.
6657 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6658 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6660 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6661 (arm_read_description): New, with bits factored from
6663 (arm_arch_setup): Reimplement.
6664 (target_regsets): Rename to ...
6665 (arm_regsets): ... this, and make static.
6666 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6667 (arm_regs_info): New function.
6668 (the_low_target): Adjust.
6669 (initialize_low_arch): New function.
6670 * linux-m68k-low.c (tdesc_m68k): Declare.
6671 (target_regsets): Rename to ...
6672 (m68k_regsets): ... this, and make static.
6673 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6674 (m68k_regs_info): New function.
6675 (m68k_arch_setup): New function.
6676 (the_low_target): Adjust.
6677 (initialize_low_arch): New function.
6678 * linux-sh-low.c (tdesc_sharch): Declare.
6679 (target_regsets): Rename to ...
6680 (sh_regsets): ... this, and make static.
6681 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6682 (sh_regs_info, sh_arch_setup): New functions.
6683 (the_low_target): Adjust.
6684 (initialize_low_arch): New function.
6685 * linux-bfin-low.c (tdesc_bfin): Declare.
6686 (bfin_arch_setup): New function.
6687 (bfin_usrregs_info, regs_info): New globals.
6688 (bfin_regs_info): New function.
6689 (the_low_target): Adjust.
6690 (initialize_low_arch): New function.
6691 * linux-cris-low.c (tdesc_cris): Declare.
6692 (cris_arch_setup): New function.
6693 (cris_usrregs_info, regs_info): New globals.
6694 (cris_regs_info): New function.
6695 (the_low_target): Adjust.
6696 (initialize_low_arch): New function.
6697 * linux-cris-low.c (tdesc_crisv32): Declare.
6698 (cris_arch_setup): New function.
6699 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6700 (cris_regs_info): New function.
6701 (the_low_target): Adjust.
6702 (initialize_low_arch): New function.
6703 * linux-m32r-low.c (tdesc_m32r): Declare.
6704 (m32r_arch_setup): New function.
6705 (m32r_usrregs_info, regs_info): New globals.
6706 (m32r_regs_info): Adjust.
6707 (initialize_low_arch): New function.
6708 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6709 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6710 (tic6x_usrregs_info): Forward declare.
6711 (tic6x_read_description): New function, based on ...
6712 (tic6x_arch_setup): ... this. Reimplement.
6713 (target_regsets): Rename to ...
6714 (tic6x_regsets): ... this, and make static.
6715 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6716 (tic6x_regs_info): New function.
6717 (the_low_target): Adjust.
6718 (initialize_low_arch): New function.
6719 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6720 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6721 (target_regsets): Rename to ...
6722 (xtensa_regsets): ... this, and make static.
6723 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6725 (xtensa_arch_setup, xtensa_regs_info): New functions.
6726 (the_low_target): Adjust.
6727 (initialize_low_arch): New function.
6728 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6729 (nios2_arch_setup): Set the current process'es tdesc.
6730 (target_regsets): Rename to ...
6731 (nios2_regsets): ... this.
6732 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6733 (nios2_regs_info): New function.
6734 (the_low_target): Adjust.
6735 (initialize_low_arch): New function.
6736 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6737 (aarch64_arch_setup): Set the current process'es tdesc.
6738 (target_regsets): Rename to ...
6739 (aarch64_regsets): ... this.
6740 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6741 (aarch64_regs_info): New function.
6742 (the_low_target): Adjust.
6743 (initialize_low_arch): New function.
6744 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6746 (target_regsets): Rename to ...
6747 (tile_regsets): ... this.
6748 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6749 (tile_regs_info): New function.
6750 (tile_arch_setup): Set the current process'es tdesc.
6751 (the_low_target): Adjust.
6752 (initialize_low_arch): New function.
6753 * spu-low.c (tdesc_spu): Declare.
6754 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6755 * win32-arm-low.c (tdesc_arm): Declare.
6756 (arm_arch_setup): New function.
6757 (the_low_target): Install arm_arch_setup instead of
6759 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6760 (init_windows_x86): Rename to ...
6761 (i386_arch_setup): ... this. Set `win32_tdesc'.
6762 (the_low_target): Adjust.
6763 * win32-low.c (win32_tdesc): New global.
6764 (child_add_thread): Don't create the thread cache here.
6765 (do_initial_child_stuff): Set the new process'es tdesc.
6766 * win32-low.h (struct target_desc): Forward declare.
6767 (win32_tdesc): Declare.
6768 * lynx-i386-low.c (tdesc_i386): Declare global.
6769 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6770 * lynx-low.c (lynx_tdesc): New global.
6771 (lynx_add_process): Set the new process'es tdesc.
6772 * lynx-low.h (struct target_desc): Forward declare.
6773 (lynx_tdesc): Declare global.
6774 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6775 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6776 * nto-low.c (nto_tdesc): New global.
6777 (do_attach): Set the new process'es tdesc.
6778 * nto-low.h (struct target_desc): Forward declare.
6779 (nto_tdesc): Declare.
6780 * nto-x86-low.c (tdesc_i386): Declare.
6781 (nto_x86_arch_setup): Set `nto_tdesc'.
6783 2013-06-04 Gary Benson <gbenson@redhat.com>
6785 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6786 to qSupported response when appropriate.
6787 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6788 with nonzero-length annex.
6789 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6790 arguments supplied in annex.
6792 2013-05-31 Doug Evans <dje@google.com>
6795 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6796 64 bits in 64-cross-32 environment.
6798 2013-05-28 Pedro Alves <palves@redhat.com>
6800 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6801 (aarch64-without-fpu.c): Delete rule.
6802 * configure.srv (aarch64*-*-linux*): Remove references to
6803 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6804 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6807 2013-05-24 Pedro Alves <palves@redhat.com>
6809 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6810 instead of strchr/decode_address. Error if the range isn't split
6811 with a ','. Don't assume there's be a ':' in the action.
6813 2013-05-23 Yao Qi <yao@codesourcery.com>
6814 Pedro Alves <palves@redhat.com>
6816 * linux-low.c (lwp_in_step_range): New function.
6817 (linux_wait_1): If the thread was range stepping and stopped
6818 outside the stepping range, report the stop to GDB. Otherwise,
6819 continue stepping. Add range stepping debug output.
6820 (linux_set_resume_request): Copy the step range from the resume
6822 (linux_supports_range_stepping): New.
6823 (linux_target_ops) <supports_range_stepping>: Set to
6824 linux_supports_range_stepping.
6825 * linux-low.h (struct linux_target_ops)
6826 <supports_range_stepping>: New field.
6827 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6828 * linux-x86-low.c (x86_supports_range_stepping): New.
6829 (the_low_target) <supports_range_stepping>: Set to
6830 x86_supports_range_stepping.
6831 * server.c (handle_v_cont): Handle 'r' action.
6832 (handle_v_requests): Append ";r" if the target supports range
6834 * target.h (struct thread_resume) <step_range_start,
6835 step_range_end>: New fields.
6836 (struct target_ops) <supports_range_stepping>:
6838 (target_supports_range_stepping): New macro.
6840 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6842 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6843 confusion in comment.
6845 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6847 * lynx-low.c (struct process_info_private): New type.
6848 (lynx_add_process): New function.
6849 (lynx_create_inferior, lynx_attach): Replace calls to
6850 add_process by calls to lynx_add_process.
6851 (lynx_resume): If PTID is null, then try using
6852 current_process()->private->last_wait_event_ptid.
6854 (lynx_clear_inferiors): Delete. The contents of that function
6855 has been inlined in lynx_mourn;
6856 (lynx_wait_1): Save the ptid in the process's private data.
6857 (lynx_mourn): Free the process' private data. Replace call
6858 to lynx_clear_inferiors by call to clear_inferiors.
6860 2013-05-17 Yao Qi <yao@codesourcery.com>
6862 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6865 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6867 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6868 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6869 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6870 PT_TEXT_END_ADDR guards. Update comments.
6871 (linux_target_op) <read_offsets>: Conditionally define to
6872 linux_read_offsets if the target is UCLIBC and if it defines
6873 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6875 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6876 Andrew Jenner <andrew@codesourcery.com>
6878 * Makefile.in (SFILES): Add linux-nios2-low.c.
6879 (clean): Add action to delete nios2-linux.c.
6880 (nios2-linux.c): New rule.
6881 * configure.srv: Add nios2*-*-linux*.
6882 * linux-nios2-low.c: New.
6884 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6886 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6888 2013-04-25 Hui Zhu <hui@codesourcery.com>
6891 * ax.c (ax_printf): Add fflush.
6893 2013-04-22 Tom Tromey <tromey@redhat.com>
6895 * Makefile.in (SFILES): Add filestuff.c.
6896 (OBS): Add filestuff.o.
6897 (filestuff.o): New target.
6898 * config.in, configure: Rebuild.
6899 * configure.ac: Check for fdwalk, pipe2.
6901 2013-04-17 Pedro Alves <palves@redhat.com>
6903 * configure.ac (USE_THREAD_DB): Delete variable.
6904 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6905 Don't AC_SUBST USE_THREAD_DB.
6906 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6907 * config.in, configure: Regenerate.
6909 2013-04-16 Pedro Alves <palves@redhat.com>
6911 * linux-low.h (struct lwp_info) <thread_known>: Move under
6912 the USE_THREAD_DB #ifdef.
6914 2013-04-16 Pedro Alves <palves@redhat.com>
6916 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6917 (linux-low.o): Delete rule.
6918 * linux-low.h: Always include "gdb_thread_db.h" instead of
6919 conditionally including thread_db.h.
6920 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6923 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6925 * Makefile.in (install-only): Fix make install regression.
6927 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6929 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6930 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6932 * gdbserver.1: Remove.
6934 2013-03-22 Pedro Alves <palves@redhat.com>
6936 * linux-low.c (handle_extended_wait): Don't call
6937 linux_enable_event_reporting.
6939 2013-03-15 Tony Theodore <tonyt@logyst.com>
6942 * Makefile.in (SHELL): Use @SHELL@.
6944 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6946 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6949 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6951 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6952 Remove extraneous NULL element.
6954 2013-03-13 Yao Qi <yao@codesourcery.com>
6956 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6957 'V' block in trace frame.
6959 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6961 * target.h (struct target_ops): Add btrace ops.
6962 (target_supports_btrace): New macro.
6963 (target_enable_btrace): New macro.
6964 (target_disable_btrace): New macro.
6965 (target_read_btrace): New macro.
6966 * gdbthread.h (struct thread_info): Add btrace field.
6967 * server.c: Include btrace-common.h.
6968 (handle_btrace_general_set): New function.
6969 (handle_btrace_enable): New function.
6970 (handle_btrace_disable): New function.
6971 (handle_general_set): Call handle_btrace_general_set.
6972 (handle_qxfer_btrace): New function.
6973 (struct qxfer qxfer_packets[]): Add btrace entry.
6974 * inferiors.c (remove_thread): Disable btrace.
6975 * linux-low: Include linux-btrace.h.
6976 (linux_low_enable_btrace): New function.
6977 (linux_low_read_btrace): New function.
6978 (linux_target_ops): Add btrace ops.
6979 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6980 Add srv_linux_btrace=yes.
6981 (x86_64-*-linux*): Add linux-btrace.o.
6982 Add srv_linux_btrace=yes.
6983 * configure.ac: Define HAVE_LINUX_BTRACE.
6984 * config.in: Regenerated.
6985 * configure: Regenerated.
6987 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6989 * server.c (handle_qxfer): Preserve error message if -3 is
6991 (qxfer): Document the -3 return value.
6993 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6995 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6996 (linux_btrace_h): New variable.
6997 (linux-btrace.o): New rule.
6999 2013-03-08 Stan Shebs <stan@codesourcery.com>
7000 Hafiz Abid Qadeer <abidh@codesourcery.com>
7002 * tracepoint.c (trace_buffer_size): New global.
7003 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7004 (init_trace_buffer): Change to one-argument function. Allocate
7005 trace buffer memory.
7006 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7007 handle QTBuffer:size packet.
7008 (cmd_bigqtbuffer_size): New function.
7009 (initialize_tracepoint): Call init_trace_buffer with
7010 DEFAULT_TRACE_BUFFER_SIZE.
7011 * server.c (handle_query): Add QTBuffer:size in the
7014 2013-03-07 Yao Qi <yao@codesourcery.com>
7016 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7017 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7019 (cmd_qtsp): Adjust condition. Do post increment.
7020 Set cur_action and cur_step_action back to 0.
7022 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7025 * linux-low.c (linux_write_memory): Return early success if LEN is
7028 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7030 * configure.srv: Add x86_64-*-cygwin* as target.
7032 2013-02-28 Tom Tromey <tromey@redhat.com>
7034 * configure.ac: Invoke AC_SYS_LARGEFILE.
7035 * configure, config.in: Rebuild.
7037 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7039 * win32-low.c: Throughout, fix format strings and casts of
7040 printf-like functions to avoid type related warnings on all
7042 (get_child_debug_event): Print dwDebugEventCode as hex since
7043 that's how it's usually documented.
7045 2013-02-28 Yao Qi <yao@codesourcery.com>
7047 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7050 2013-02-27 Jiong Wang <jiwang@tilera.com>
7052 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7053 (reg-tilegx32.c): New rule.
7054 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7055 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7056 different register info initializer according to elf class.
7057 (init_registers_tilgx32): New function. The tilegx32 register info
7059 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7060 (tile_store_gregset): Likewise.
7062 2013-02-27 Yao Qi <yao@codesourcery.com>
7064 * server.c (process_point_options): Print debug message when
7065 debug_threads is true.
7067 2013-02-26 Yao Qi <yao@codesourcery.com>
7069 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7071 2013-02-19 Pedro Alves <palves@redhat.com>
7072 Kai Tietz <ktietz@redhat.com>
7076 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7077 instead of strtoul to extract address from packet.
7078 (process_serial_event) <'z'>: Likewise.
7080 2013-02-18 Yao Qi <yao@codesourcery.com>
7082 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7084 2013-02-14 Pedro Alves <palves@redhat.com>
7088 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7089 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7091 2013-02-14 Pedro Alves <palves@redhat.com>
7093 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7095 2013-02-14 Pedro Alves <palves@redhat.com>
7097 * tracepoint.c (save_string): Delete.
7098 (add_tracepoint_action): Use savestring instead of save_string.
7100 2013-02-12 Pedro Alves <palves@redhat.com>
7102 * linux-xtensa-low.c: Ditto.
7103 * xtensa-xtregs.c: Ditto.
7105 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7107 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7110 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7112 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7113 aarch64_num_wp_regs and aarch64_num_bp_regs to
7114 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7116 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7118 * linux-aarch64-low.c (ps_get_thread_area): Replace
7119 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7121 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7122 Marcus Shawcroft <marcus.shawcroft@arm.com>
7123 Nigel Stephens <nigel.stephens@arm.com>
7124 Yufeng Zhang <yufeng.zhang@arm.com>
7126 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7127 (aarch64.c, aarch64-without-fpu.c): New targets.
7128 * configure.srv (aarch64*-*-linux*): New.
7129 * linux-aarch64-low.c: New file.
7131 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7133 * linux-low.c (handle_extended_wait, linux_create_inferior)
7134 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7135 (dequeue_one_deferred_signal, linux_resume_one_thread)
7136 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7137 (linux_tracefork_grandchild, linux_test_for_tracefork)
7138 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7139 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7140 where the argument is 0.
7142 2013-01-25 Yao Qi <yao@codesourcery.com>
7144 * event-loop.c: Include "queue.h".
7145 (gdb_event_p): New typedef.
7146 (struct gdb_event) <next_event>: Remove.
7147 (event_queue): Change to QUEUE(gdb_event_p).
7148 (async_queue_event): Remove.
7149 (gdb_event_xfree): New.
7150 (initialize_event_loop): New.
7151 (process_event): Use API from QUEUE.
7152 (wait_for_event): Likewise.
7153 * server.c (main): Call initialize_event_loop.
7154 * server.h (initialize_event_loop): Declare.
7156 2013-01-18 Yao Qi <yao@codesourcery.com>
7158 * ax.h (struct eval_agent_expr_context): New.
7159 (gdb_eval_agent_expr): Update declaration.
7160 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7161 TFRAME. Add new argument CTX.
7162 * server.h (struct eval_agent_expr_context): Declare.
7163 (agent_mem_read, agent_tsv_read): Update declaration.
7164 (agent_mem_read_string): Likewise.
7165 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7166 (add_traceframe_block): Add new argument TPOINT.
7167 Increase TPOINT->traceframe_usage.
7168 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7169 eval_tracepoint_agent_expr.
7170 (condition_true_at_tracepoint): Likewise.
7171 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7172 (agent_mem_read_string, agent_tsv_read): Likewise.
7174 2013-01-16 Yao Qi <yao@codesourcery.com>
7176 * linux-low.c (linux_resume_one_lwp): Don't check
7177 'lwp->bp_reinsert != 0'.
7179 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7180 Pedro Alves <palves@redhat.com>
7182 * lynx-low.c (ptrace_request_to_str): Define a temporary
7183 macro and use it to simplify this function's implementation.
7185 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7187 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7190 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7192 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7194 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7196 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7198 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7200 * lynx-low.c (lynx_resume): Use the resume_info parameter
7201 to determine the ptid for the lynx_ptrace call, unless
7202 it is equal to minus_one_ptid, in which case we use the
7203 ptid of the current_inferior.
7204 (lynx_wait_1): After having received a thread create/exit
7205 event, resume the inferior's execution using the signaling
7206 thread's ptid, rather than the old ptid.
7208 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7210 * lynx-low.c (lynx_resume): Delete variable ret.
7212 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7214 * gdbreplay.c (gdbreplay_version): Update copyright year.
7215 * server.c (gdbserver_version): Likewise.
7217 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7219 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7222 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7224 * lynx-low.c (ptrace_request_to_str): Add handling for
7227 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7229 * lynx-low.c (lynx_attach): Delete variable new_process.
7231 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7233 * lynx-low.c (lynx_create_inferior): Delete variable
7236 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7238 * lynx-low.c (ptrace_request_to_str): Do not handle
7239 PTRACE_GETTHREADLIST if this macro does not exist.
7241 2012-12-15 Yao Qi <yao@codesourcery.com>
7243 * Makefile.in (OBS): Add notif.o.
7244 * notif.c, notif.h: New.
7245 * server.c: Include "notif.h".
7246 (struct vstop_notif) <next>: Remove.
7248 (queue_stop_reply): Update.
7249 (push_event, send_next_stop_reply): Remove.
7250 (discard_queued_stop_replies): Update.
7251 (notif_stop): New variable.
7252 (handle_v_stopped): Remove.
7253 (handle_v_requests): Don't call handle_v_stopped. Call
7254 handle_ack_notif instead.
7255 (queue_stop_reply_callback): Call notif_event_enque instead
7256 of queue_stop_reply.
7257 (handle_status): Don't call send_next_stop_reply, call
7258 notif_write_event instead.
7259 (kill_inferior_callback): Likewise.
7260 (detach_or_kill_inferior_callback): Likewise.
7261 (main): Call initialize_notif.
7262 (process_serial_event): Call QUEUE_is_empty.
7263 (handle_target_event): Call notif_push instead of push event.
7264 * server.h (push_event): Remove declaration.
7266 2012-12-10 Tom Tromey <tromey@redhat.com>
7268 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7269 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7272 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7273 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7274 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7275 (amd64-linux-ipa.o, ax.o): Rewrite.
7276 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7277 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7278 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7279 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7280 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7281 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7282 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7283 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7284 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7285 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7286 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7287 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7288 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7289 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7290 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7291 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7292 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7293 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7294 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7295 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7296 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7297 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7298 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7299 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7300 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7301 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7302 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7303 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7304 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7305 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7306 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7307 (reg-tilegx.o): Remove.
7308 (all_object_files): New macro.
7309 Include .deps files.
7310 * aclocal.m4, configure: Rebuild.
7311 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7312 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7313 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7315 2012-12-05 Tom Tromey <tromey@redhat.com>
7318 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7320 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7322 * configure.ac: Check for linux/perf_event.h.
7323 * config.in: Regenerated.
7324 * configure: Regenerated.
7326 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7328 * hostio.c (handle_readlink): Decrease buffer size
7329 parameter passed to readlink by one byte.
7331 2012-11-26 Yao Qi <yao@codesourcery.com>
7333 * configure.ac (build_warnings): Append '-Wempty-body'.
7334 * configure: Regenerated.
7335 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7338 2012-11-15 Pierre Muller <muller@sourceware.org>
7340 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7341 * config.in: Regenerate.
7342 * configure: Regenerate.
7343 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7344 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7345 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7346 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7348 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7349 instead of <sys/wait.h> header.
7350 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7352 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7354 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7355 (various make rules): Remove -DGDBSERVER
7357 2012-11-09 Yao Qi <yao@codesourcery.com>
7359 * spu-low.c (current_ptid): Move it to ..
7360 * gdbthread.h: ... here. New.
7361 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7362 * server.c (myresume, process_serial_event): Likewise.
7363 * thread-db.c (thread_db_find_new_threads): Likewise.
7364 * tracepoint.c (run_inferior_command): Likewise.
7366 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7368 * server.c (handle_search_memory_1): Include access length in
7371 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7373 * linux-crisv32-low.c: Fix compile errors.
7375 2012-09-04 Yao Qi <yao@codesourcery.com>
7377 * tracepoint.c (cmd_qtsv): Adjust debug message.
7378 Don't check CUR_TPOINT.
7380 2012-08-28 Yao Qi <yao@codesourcery.com>
7382 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7383 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7384 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7385 Remove declarations of xmalloc, xreallloc, xstrdup and
7387 * Makefile.in (libiberty_h): New.
7388 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7389 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7391 2012-08-23 Yao Qi <yao@codesourcery.com>
7393 * server.h: Remove declaration of 'xsnprintf'.
7395 2012-08-22 Keith Seitz <keiths@redhat.com>
7397 * server.h: Include build-gnulib-gbserver/config.h.
7398 * gdbreplay.c: Likewise.
7400 2012-08-08 Doug Evans <dje@google.com>
7402 * Makefile.in (SFILES): Add gdb_vecs.c.
7403 (OBS): Add gdb_vecs.o.
7404 (gdb_vecs_h, host_defs_h): New variables.
7405 (thread-db.o): Add $(gdb_vecs_h) dependency.
7406 (gdb_vecs.o): New rule.
7407 * thread-db.c: #include "gdb_vecs.h".
7408 (thread_db_load_search): Use a vector to iterate over path elements.
7409 Handle text appearing after "$pdir".
7411 * configure.ac: Add check for strstr.
7412 * config.in: Regenerate.
7413 * configure: Regenerate.
7415 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7417 * hostio.c (handle_pread): If pread fails, fall back to attempting
7419 (handle_pwrite): Likewise for pwrite.
7421 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7423 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7424 between unsupported TYPE and unimplementable ADDR/LEN combination.
7425 (arm_insert_point): Act on new return value.
7427 2012-07-31 Pedro Alves <palves@redhat.com>
7429 * server.c (process_point_options): Only skip tokens if we find
7430 one that is unrecognized. Don't treat 'X' specially while
7431 skipping unrecognized tokens.
7433 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7435 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7436 to 4-byte-align HW breakpoint addresses for Thumb.
7438 2012-07-27 Yao Qi <yao@codesourcery.com>
7442 * server.h: Declare gdb_agent_about_to_close.
7443 * target.c (kill_inferior): Include "agent.h".
7444 New. Send command 'kill'.
7445 * target.h (kill_inferior): Removed macro.
7446 * tracepoint.c (gdb_agent_about_to_close): New.
7447 (gdb_agent_helper_thread): Handle command 'close'.
7448 Wait endlessly until the inferior stops.
7449 Install gdb_agent_remove_socket to atexit hook.
7450 (agent_socket_name): New static variable.
7451 (gdb_agent_socket_init): Replace local variable 'name' with
7452 'agent_socket_name'.
7453 (gdb_agent_remove_socket): New.
7455 2012-07-27 Yao Qi <yao@codesourcery.com>
7457 * server.c (process_point_options): Stop at 'X' when parsing.
7459 2012-07-19 Michael Eager <eager@eagercon.com>
7461 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7463 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7464 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7465 hardware breakpoint.
7467 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7469 * gdbserver/linux-low.c (initialize_low): Call
7470 linux_ptrace_init_warnings.
7472 2012-07-02 Doug Evans <dje@google.com>
7474 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7477 2012-07-02 Stan Shebs <stan@codesourcery.com>
7479 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7480 (ax.o): Add it to build rule.
7482 (OBS): Add format.o.
7483 (IPA_OBS): Add format.o.
7484 * server.c (handle_query): Claim support for breakpoint commands.
7485 (process_point_options): Add command case.
7486 (process_serial_event): Leave running if there are printfs in
7488 * mem-break.h (any_persistent_commands): Declare.
7489 (add_breakpoint_commands): Declare.
7490 (gdb_no_commands_at_breakpoint): Declare.
7491 (run_breakpoint_commands): Declare.
7492 * mem-break.c (struct point_command_list): New struct.
7493 (struct breakpoint): New field command_list.
7494 (any_persistent_commands): New function.
7495 (add_commands_to_breakpoint): New function.
7496 (add_breakpoint_commands): New function.
7497 (gdb_no_commands_at_breakpoint): New function.
7498 (run_breakpoint_commands): New function.
7499 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7501 * ax.c: Include format.h.
7502 (ax_printf): New function.
7503 (gdb_eval_agent_expr): Add printf opcode.
7505 2012-06-13 Yao Qi <yao@codesourcery.com>
7507 * server.c (start_inferior): Remove duplicated writes to fields
7508 'last_resume_kind' and 'last_status' of 'current_inferior'.
7510 2012-06-12 Yao Qi <yao@codesourcery.com>
7511 Pedro Alves <palves@redhat.com>
7513 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7515 * server.c (handle_v_cont): Extend comment.
7517 2012-06-11 Yao Qi <yao@codesourcery.com>
7519 * linux-low.c (linux_attach): Add 'static'.
7521 2012-06-06 Yao Qi <yao@codesourcery.com>
7523 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7525 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7527 Fix gcc -flto compilation warning.
7528 * server.c (main): Make variable multi_mode and attach volatile.
7530 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7532 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7533 if the platform doesn't know about it.
7535 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7537 * Makefile.in (SFILES): Add linux-tile-low.c.
7538 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7539 * configure.srv: Handle tilegx-*-linux*.
7540 * linux-tile-low.c: New file.
7542 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7544 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7546 2012-05-24 Pedro Alves <palves@redhat.com>
7550 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7552 2012-05-24 Pedro Alves <palves@redhat.com>
7556 Replace target_signal with gdb_signal throughout.
7558 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7560 * linux-low.c (linux_store_registers): Avoid the copying sequence
7561 when no data has been retrieved by ptrace.
7563 2012-05-22 Will Deacon <will.deacon@arm.com>
7565 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7566 Include asm/ptrace.h.
7567 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7570 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7572 * linux-low.c (linux_store_registers): Don't re-retrieve data
7573 with ptrace that has already been obtained from /proc. Always
7574 copy any data retrieved with ptrace to the buffer supplied.
7576 2012-05-11 Yao Qi <yao@codesourcery.com>
7577 Pedro Alves <palves@redhat.com>
7579 * linux-low.c (enum stopping_threads_kind): New.
7580 (stopping_threads): Change type to `enum stopping_threads_kind'.
7581 (handle_extended_wait): If stopping and suspending threads, leave
7582 the new_lwp suspended too.
7583 (linux_wait_for_event): Adjust.
7584 (stop_all_lwps): Set `stopping_threads' to
7585 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7586 whether we're suspending threads or just stopping them. Assert no
7589 2012-04-29 Yao Qi <yao@codesourcery.com>
7591 * server.h: Move some code to ...
7592 * gdbthread.h: ... here. New.
7593 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7594 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7595 (nto-low.o, win32-low.o): Likewise.
7596 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7597 * regcache.c, remote-utils.c, server.c: Likewise.
7598 * target.c, tracepoint.c, win32-low.c: Likewise.
7600 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7602 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7603 (PTRACE_ARG4_TYPE): Likewise.
7604 (PTRACE_XFER_TYPE): Likewise.
7605 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7606 ptrace to PTRACE_ARG3_TYPE.
7607 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7608 (PTRACE_ARG4_TYPE): Likewise.
7609 (PTRACE_XFER_TYPE): Likewise.
7610 (linux_detach_one_lwp): Cast fourth argument of
7611 ptrace to long then PTRACE_ARG4_TYPE.
7612 (regsets_fetch_inferior_registers): Cast third argument of
7613 ptrace to long then PTRACE_ARG3_TYPE.
7614 (regsets_store_inferior_registers): Likewise.
7616 2012-04-20 Pedro Alves <palves@redhat.com>
7618 * configure: Regenerate.
7620 2012-04-19 Pedro Alves <palves@redhat.com>
7622 * Makefile.in (GNULIB_BUILDDIR): New.
7623 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7624 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7625 (all, install-only, uninstall, clean-info, all-lib, clean): No
7626 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7627 (maintainer-clean realclean distclean): Use subdir_do.
7629 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7630 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7631 * acinclude.m4: Include acx_configure_dir.m4.
7632 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7633 calls. Call AC_PROG_RANLIB. Configure gnulib using
7636 (GNULIB_STDINT_H): Adjust.
7637 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7638 * gdbreplay.c: Include build-gnulib/config.h.
7639 * server.h: Likewise.
7640 * aclocal.m4: Regenerate.
7641 * config.in: Regenerate.
7642 * configure: Regenerate.
7644 2012-04-19 Pedro Alves <palves@redhat.com>
7646 * Makefile.in (LIBGNU, INCGNU): Adjust.
7647 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7648 (all, install-only, uninstall, clean-info, all-lib, clean)
7649 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7650 * configure.ac: Adjust AC_OUTPUT output.
7651 * aclocal.m4: Regenerate.
7652 * configure: Regenerate.
7654 2012-04-19 Pedro Alves <palves@redhat.com>
7656 * Makefile.in (generated_files): New.
7657 (server_h): Remove the explicit dependency on config.h, and depend
7658 on $generated_files.
7660 2012-04-19 Pedro Alves <palves@redhat.com>
7662 * Makefile.in (INCGNU): Add -Ignulib.
7664 2012-04-19 Pedro Alves <palves@redhat.com>
7666 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7667 (INCGNU): ... this, and spell out -I here.
7668 (GNULIB_LIB): Rename to ...
7670 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7672 2012-04-19 Pedro Alves <palves@redhat.com>
7674 * config.in: Regenerate.
7676 2012-04-19 Pedro Alves <palves@redhat.com>
7678 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7679 * server.h (memmem): Remove declaration.
7680 * config.in: Regenerate.
7681 * configure: Regenerate.
7683 2012-04-19 Yao Qi <yao@codesourcery.com>
7685 * Makefile.in (SFILES): Add common/vec.c.
7689 2012-04-19 Yao Qi <yao@codesourcery.com>
7691 * remote-utils.c (prepare_resume_reply): Replace with macro
7692 target_core_of_thread.
7693 * server.c (handle_qxfer_threads_proper): Likewise.
7694 * target.h (traget_core_of_thread): New macro.
7696 2012-04-18 Pedro Alves <palves@redhat.com>
7698 * aclocal.m4: Regenerate.
7699 * configure: Regenerate.
7701 2012-04-16 Yao Qi <yao@codesourcery.com>
7703 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7704 duplicated on address.
7706 2012-04-16 Yao Qi <yao@codesourcery.com>
7708 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7709 (struct tracepoint_action_ops) <send>: New field.
7710 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7711 (agent_expr_send, x_tracepoint_action_send): New.
7712 (l_tracepoint_action_send): New.
7713 (cmd_qtdp): Download and install tracepoint
7714 according to `use_agent'.
7715 (run_inferior_command): Add one more parameter `len'.
7717 (tracepoint_send_agent): New.
7718 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7720 2012-04-16 Yao Qi <yao@codesourcery.com>
7722 * tracepoint.c (download_tracepoints): Moved to ...
7723 (cmd_qtstart): ... here.
7725 2012-04-14 Yao Qi <yao@codesourcery.com>
7727 * tracepoint.c: Include inttypes.h.
7728 (struct collect_memory_action): Use sized types.
7729 (struct tracepoint): Likewise.
7730 (cmd_qtdp, stop_tracing): Update print specifiers.
7731 (cmd_qtp, response_tracepoint): Likewise.
7732 (collect_data_at_tracepoint): Likewise.
7733 (collect_data_at_step): Likewise.
7735 2012-04-14 Yao Qi <yao@codesourcery.com>
7737 Import gnulib module inttypes.
7738 * aclocal.m4, config.in, configure: Regenerated.
7740 2012-04-14 Yao Qi <yao@codesourcery.com>
7742 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7743 Makefile and config.status at last.
7745 2012-04-13 Yao Qi <yao@codesourcery.com>
7747 * tracepoint.c: Include stdint.h unconditionally.
7749 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7751 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7752 on BFD_HAVE_SYS_PROCFS_TYPE.
7753 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7754 * configure: Regenerate.
7755 * config.in: Likewise.
7757 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7759 * Makefile.in (clean): Also remove x32.c x32-linux.c
7760 x32-avx.c x32-avx-linux.c.
7761 (x32.o): New target.
7763 (x32-linux.o): Likewise.
7764 (x32-linux.c): Likewise.
7765 (x32-avx.o): Likewise.
7766 (x32-avx.c): Likewise.
7767 (x32-avx-linux.o): Likewise.
7768 (x32-avx-linux.c): Likewise.
7770 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7771 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7772 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7773 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7774 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7775 i386/x32-avx-linux.xml.
7777 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7778 (init_registers_x32_avx_linux): Likwise.
7779 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7780 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7782 2012-04-13 Pedro Alves <palves@redhat.com>
7784 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7785 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7786 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7787 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7790 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7792 * linux-x86-low.c (compat_x32_clock_t): New.
7793 (compat_x32_siginfo_t): Likewise.
7794 (compat_x32_siginfo_from_siginfo): Likewise.
7795 (siginfo_from_compat_x32_siginfo): Likewise.
7796 (linux_is_elf64): Likewise.
7797 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7798 and siginfo_from_compat_x32_siginfo for x32.
7799 (x86_arch_setup): Set linux_is_elf64.
7801 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7804 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7806 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7807 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7808 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7809 compatible with process.
7811 2012-04-12 Yao Qi <yao@codesourcery.com>
7813 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7814 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7815 (install-only, install-info, clean): Handle sub dir gnulib.
7816 (all-lib, am--refresh): New targets.
7817 (memmem.o): Remove target.
7818 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7819 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7820 (AC_REPLACE_FUNCS): Remove memmem.
7821 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7822 (AC_OUTPUT): Generate Makefile in gnulib/.
7823 * aclocal.m4, config.in, configure: Regenerated.
7825 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7827 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7829 2012-04-05 Pedro Alves <palves@redhat.com>
7831 -Werror=strict-aliasing
7833 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7836 2012-04-04 Pedro Alves <palves@redhat.com>
7838 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7839 (sparc_store_gregset_from_stack, sparc_store_gregset)
7840 (sparc_breakpoint_at): Fix formatting.
7842 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7844 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7846 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7847 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7848 * config.in: Regenerate.
7849 * configure: Likewise.
7851 2012-03-29 Pedro Alves <palves@redhat.com>
7853 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7854 Correct ptrace arguments.
7856 2012-03-28 Pedro Alves <palves@redhat.com>
7858 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7859 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7860 (IA64_FR1_REGNUM): New defines.
7861 (ia64_fetch_register): New.
7862 (the_low_target): Install it.
7863 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7865 * linux-low.c (linux_fetch_registers): Try the
7866 the_low_target.fetch_register hook first.
7868 * linux-arm-low.c (the_low_target): Adjust.
7869 * linux-bfin-low.c (the_low_target): Adjust.
7870 * linux-cris-low.c (the_low_target): Adjust.
7871 * linux-crisv32-low.c (the_low_target): Adjust.
7872 * linux-m32r-low.c (the_low_target): Adjust.
7873 * linux-m68k-low.c (the_low_target): Adjust.
7874 * linux-mips-low.c (the_low_target): Adjust.
7875 * linux-ppc-low.c (the_low_target): Adjust.
7876 * linux-s390-low.c (the_low_target): Adjust.
7877 * linux-sh-low.c (the_low_target): Adjust.
7878 * linux-sparc-low.c (the_low_target): Adjust.
7879 * linux-tic6x-low.c (the_low_target): Adjust.
7880 * linux-x86-low.c (the_low_target): Adjust.
7881 * linux-xtensa-low.c (the_low_target): Adjust.
7883 2012-03-26 Pedro Alves <palves@redhat.com>
7885 * server.c (handle_qxfer_libraries): Don't bail early if
7886 the_target->qxfer_libraries_svr4 is not NULL.
7888 2012-03-26 Pedro Alves <palves@redhat.com>
7890 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7892 2012-03-23 Pedro Alves <palves@redhat.com>
7894 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7895 "library-list-svr4" element's start tag when the the DSO list is
7898 2012-03-23 Pedro Alves <palves@redhat.com>
7900 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7901 a variable whose type size is the same as the inferior's pointer
7904 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7906 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7908 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7909 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7910 * linux-low.h: Include <signal.h>.
7911 (struct siginfo): Remove forward declaration.
7912 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7915 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7917 * .gitignore: Ignore more files.
7919 2012-03-19 Pedro Alves <palves@redhat.com>
7920 Jan Kratochvil <jan.kratochvil@redhat.com>
7922 * server.c (cont_thread, general_thread): Add describing comments.
7923 (start_inferior): Clear `cont_thread'.
7924 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7927 2012-03-15 Yao Qi <yao@codesourcery.com>
7929 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7931 (cmd_qtdp): ... here.
7933 2012-03-15 Yao Qi <yao@codesourcery.com>
7935 * tracepoint.c (struct tracepoint_action_ops): New.
7936 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7937 (m_tracepoint_action_download): New.
7938 (r_tracepoint_action_download): New.
7939 (x_tracepoint_action_download): New.
7940 (l_tracepoint_action_download): New.
7941 (add_tracepoint_action): Install `action->ops' according type.
7942 (download_tracepoint_1): Move code `download' function pointer
7943 of various tracepoint_action_ops.
7945 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7947 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7948 linux_ptrace_attach_warnings.
7950 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7952 * Makefile.in (linux-ptrace.o): New.
7953 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7954 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7955 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7956 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7957 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7959 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7961 2012-03-08 Yao Qi <yao@codesourcery.com>
7962 Pedro Alves <palves@redhat.com>
7964 Fix PR server/13392.
7965 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7967 * tracepoint.c (remove_tracepoint): New.
7968 (cmd_qtdp): Call remove_tracepoint when failed to install.
7970 2012-03-07 Pedro Alves <palves@redhat.com>
7972 * linux-low.c (get_detach_signal): New.
7973 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7974 Pass on pending signals to PTRACE_DETACH. Check the result of the
7976 * server.c (program_signals, program_signals_p): New.
7977 (handle_general_set): Handle QProgramSignals.
7978 * server.h (program_signals, program_signals_p): Declare.
7980 2012-03-05 Pedro Alves <palves@redhat.com>
7981 Jan Kratochvil <jan.kratochvil@redhat.com>
7983 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7986 2012-03-03 Yao Qi <yao@codesourcery.com>
7988 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7989 agent_look_up_symbols.
7991 2012-03-03 Yao Qi <yao@codesourcery.com>
7993 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7994 (linux-x86-low.o): Likewise.
7995 * server.h: Remove in_process_agent_loaded.
7996 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8000 2012-03-03 Yao Qi <yao@codesourcery.com>
8002 * tracepoint.c (gdb_agent_capability): New global.
8003 (in_process_agent_loaded_ust): Renamed to
8004 `in_process_agent_supports_ust'.
8006 (in_process_agent_supports_ust): Call agent_capability_check.
8007 (clear_installed_tracepoints): Assert that agent supports
8010 2012-03-03 Yao Qi <yao@codesourcery.com>
8012 * linux-low.c (linux_supports_agent): New.
8013 (linux_target_ops): Initialize field `supports_agent' with
8014 linux_supports_agent.
8015 * target.h (struct target_ops) <supports_agent>: New.
8016 (target_supports_agent): New macro.
8017 * server.c (handle_general_set): Handle packet 'QAgent'.
8018 (handle_query): Send `QAgent+'.
8019 * Makefile.in (server.o): Depends on agent.h.
8021 2012-03-03 Yao Qi <yao@codesourcery.com>
8023 * Makefile.in (OBS): Add agent.o.
8024 Add new rule for agent.o.
8025 Track dependence of tracepoint.c on agent.h.
8026 * tracepoint.c (run_inferior_command_1):
8027 (run_inferior_command): Call agent_run_command.
8028 (gdb_ust_connect_sync_socket): Deleted. Move it to
8030 (resume_thread, stop_thread): Likewise.
8031 (gdb_ust_socket_init): Renamed to ...
8032 (gdb_agent_socket_init): ... New.
8033 (gdb_ust_thread): Renamed to ...
8034 (gdb_agent_helper_thread): ... New.
8035 (gdb_ust_init): Move some code to ...
8036 (gdb_agent_init): ... here. New.
8037 [HAVE_UST]: Call gdb_ust_init.
8038 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8039 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8040 * config.in, configure: Regenerated.
8042 2012-03-02 Pedro Alves <palves@redhat.com>
8044 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8045 * linux-low.c (struct simple_pid_list): New.
8046 (stopped_pids): New a struct simple_pid_list pointer.
8047 (add_to_pid_list, pull_pid_from_list): New.
8048 (handle_extended_wait): Don't assume the first signal new children
8049 report is SIGSTOP. Adjust call to pull_pid_from_list.
8050 (linux_wait_for_lwp): Adjust.
8052 2012-03-02 Yao Qi <yao@codesourcery.com>
8054 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8057 2012-03-02 Yao Qi <yao@codesourcery.com>
8059 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8060 `stop_pc' and `tpoint'. Update caller.
8062 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8064 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8065 * linux-low.c (use_linux_regsets): New macro.
8066 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8067 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8068 (linux_register_in_regsets): New function.
8069 (usr_fetch_inferior_registers): Skip registers covered by
8071 (usr_store_inferior_registers): Likewise.
8072 (usr_fetch_inferior_registers): New macro.
8073 (usr_store_inferior_registers): Likewise.
8074 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8075 (linux_store_registers): Likewise.
8076 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8078 (init_registers_mips64_dsp_linux): Likewise.
8079 (init_registers_mips_linux): New macro.
8080 (init_registers_mips_dsp_linux): Likewise.
8081 (mips_dsp_num_regs): Likewise.
8082 (DSP_BASE, DSP_CONTROL): New fallback macros.
8083 (mips_base_regs): New macro.
8084 (mips_regmap): Use it. Fix the size.
8085 (mips_dsp_regmap): New variable.
8086 (mips_dsp_regset_bitmap): Likewise.
8087 (mips_arch_setup): New function.
8088 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8090 (mips_cannot_store_register): Likewise.
8091 (the_low_target): Update .arch_setup, .num_regs and .regmap
8092 initializers. Add .regset_bitmap initializer.
8093 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8095 * linux-bfin-low.c (the_low_target): Likewise.
8096 * linux-cris-low.c (the_low_target): Likewise.
8097 * linux-crisv32-low.c (the_low_target): Likewise.
8098 * linux-ia64-low.c (the_low_target): Likewise.
8099 * linux-m32r-low.c (the_low_target): Likewise.
8100 * linux-m68k-low.c (the_low_target): Likewise.
8101 * linux-ppc-low.c (the_low_target): Likewise.
8102 * linux-s390-low.c (the_low_target): Likewise.
8103 * linux-sh-low.c (the_low_target): Likewise.
8104 * linux-sparc-low.c (the_low_target): Likewise.
8105 * linux-tic6x-low.c (the_low_target): Likewise.
8106 * linux-x86-low.c (the_low_target): Likewise.
8107 * linux-xtensa-low.c (the_low_target): Likewise.
8108 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8109 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8110 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8112 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8113 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8115 2012-02-29 Yao Qi <yao@codesourcery.com>
8116 Pedro Alves <palves@redhat.com>
8118 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8119 `step_over_finished' is true.
8121 2012-02-27 Pedro Alves <palves@redhat.com>
8123 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8124 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8126 2012-02-27 Pedro Alves <palves@redhat.com>
8129 * linux-low.c (pid_is_stopped): New.
8130 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8132 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8134 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8137 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8139 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8141 2012-02-24 Luis Machado <lgustavo@codesourcery>
8143 * server.c (handle_query): Advertise support for target-side
8144 breakpoint condition evaluation.
8145 (process_point_options): New function.
8146 (process_serial_event): When inserting a breakpoint, check for
8147 a target-side condition that should be evaluated.
8149 * mem-break.c: Include regcache.h and ax.h.
8150 (point_cond_list_t): New data structure.
8151 (breakpoint) <cond_list>: New field.
8152 (find_gdb_breakpoint_at): Make non-static.
8153 (delete_gdb_breakpoint_at): Clear any target-side
8155 (clear_gdb_breakpoint_conditions): New function.
8156 (add_condition_to_breakpoint): Likewise.
8157 (add_breakpoint_condition): Likewise.
8158 (gdb_condition_true_at_breakpoint): Likewise.
8159 (gdb_breakpoint_here): Return result directly instead
8160 of going through a local variable.
8162 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8163 (clear_gdb_breakpoint_conditions): Likewise.
8164 (add_breakpoint_condition): Likewise.
8165 (gdb_condition_true_at_breakpoint): Likewise.
8167 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8168 (need_step_over_p): Take target-side breakpoint condition into
8171 2012-02-24 Luis Machado <lgustavo@codesourcery>
8173 * server.h: Include tracepoint.h.
8174 (agent_mem_read, agent_get_trace_state_variable_value,
8175 agent_set_trace_state_variable_value,
8176 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8177 get_set_tsv_func_addr): New prototypes.
8179 * ax.h: New include file.
8180 * ax.c: New source file.
8182 * tracepoint.c: Include ax.h.
8183 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8184 agent_expr, eval_result_type): Move to ax.h.
8185 (parse_agent_expr): Rename to ...
8186 (gdb_parse_agent_expr): ... this, make it non-static and move
8188 (unparse_agent_expr) Rename to ...
8189 (gdb_unparse_agent_expr): ... this, make it non-static and move
8191 (eval_agent_expr): Rename to ...
8192 (eval_tracepoint_agent_expr): ... this.
8193 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8194 forward declarations.
8195 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8196 (agent_get_trace_state_variable_value): New function.
8197 (agent_set_trace_state_variable_value): New function.
8198 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8199 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8200 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8201 (condition_true_at_tracepoint): Likewise.
8202 (parse_agent_expr): Rename to ...
8203 (gdb_parse_agent_expr): ... this and move to ax.c.
8204 (unparse_agent_expr): Rename to ...
8205 (gdb_unparse_agent_expr): ... this and move to ax.c.
8206 (gdb_agent_op_name): Move to ax.c.
8207 (eval_agent_expr): Rename to ...
8208 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8210 (eval_tracepoint_agent_expr): New function.
8211 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8213 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8215 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8216 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8217 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8218 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8219 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8220 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8221 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8222 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8223 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8224 (compile_bytecodes): Remove forward declaration.
8225 (is_goto_target): Move to ax.c.
8226 (compile_bytecodes): Move to ax.c and call
8227 agent_get_trace_state_variable_value (...) and
8228 agent_set_trace_state_variable_value (...).
8230 * Makefile.in: Update ax.c and IPA dependencies.
8232 2012-02-24 Pedro Alves <palves@redhat.com>
8234 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8235 (cmd_bigqtbuffer_circular): ... this. Only handle
8236 'QTBuffer:circular:'.
8237 (handle_tracepoint_general_set): Adjust.
8239 2012-02-16 Yao Qi <yao@codesourcery.com>
8241 * inferiors.c: Move code to ...
8242 * dll.c: .... here. New.
8243 * server.h: Declare clear_dlls.
8244 * Makefile.in (SFILES): Add dll.c.
8248 2012-02-11 Yao Qi <yao@codesourcery.com>
8250 * server.c: (handle_monitor_command): Add a new parameter
8252 (handle_query): Update caller.
8254 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8256 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8257 * configure, config.in: Regenerate.
8258 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8261 2012-02-02 Pedro Alves <palves@redhat.com>
8263 Try SIGKILL first, then PTRACE_KILL.
8264 * linux-low.c (linux_kill_one_lwp): New.
8265 (linux_kill_one_lwp): Rename to ...
8266 (kill_one_lwp_callback): ... this. Use the new
8269 2012-02-02 Pedro Alves <palves@redhat.com>
8271 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8274 2012-01-27 Pedro Alves <palves@redhat.com>
8276 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8277 (elf_64_file_p): Make static.
8278 (linux_pid_exe_is_elf_64_file): New.
8279 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8280 Delete declarations.
8281 (linux_pid_exe_is_elf_64_file): Declare.
8282 * linux-x86-low.c (x86_arch_setup): Use
8283 linux_pid_exe_is_elf_64_file.
8285 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8287 * linux-low.c (linux_wait_for_event_1): Rename to ...
8288 (linux_wait_for_event): ... here and merge it with former
8289 linux_wait_for_event - new variable wait_ptid, use it.
8290 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8292 2012-01-23 Pedro Alves <palves@redhat.com>
8294 * server.c (main): Avoid yet another case of infinite loop while
8295 detaching/killing after a longjmp.
8297 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8300 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8302 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8304 * hostio.c (handle_readlink): New function.
8305 (handle_vFile): Call it to handle "vFile:readlink" packets.
8307 2012-01-20 Pedro Alves <palves@redhat.com>
8308 Ulrich Weigand <ulrich.weigand@linaro.org>
8310 * server.c (handle_v_requests): Only support vAttach and vRun to
8311 start multiple processes when in extended protocol mode.
8313 2012-01-17 Pedro Alves <palves@redhat.com>
8315 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8316 memalign plus mprotect to allocate the scratch buffer.
8318 2012-01-13 Pedro Alves <palves@redhat.com>
8320 * server.c (attach_inferior): Clear `cont_thread'.
8322 2012-01-13 Pedro Alves <palves@redhat.com>
8324 * server.c (main): Avoid infinite loop while detaching/killing
8327 2012-01-09 Doug Evans <dje@google.com>
8329 * server.c (start_inferior): Set last_ptid in --wrapper case.
8331 2012-01-06 Yao Qi <yao@codesourcery.com>
8333 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8335 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8337 2012-01-04 Yao Qi <yao@codesourcery.com>
8339 * tracepoint.c (cmd_qtdp): Print debug message
8340 for static tracepoint.
8342 2012-01-04 Yao Qi <yao@codesourcery.com>
8344 * tracepoint.c (trace_vdebug): Differentiate debug message
8345 between gdbserver and IPA.
8347 2012-01-03 Yao Qi <yao@codesourcery.com>
8349 * tracepoint.c (tracepoint_was_hit): Don't collect for
8352 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8354 * terminal.h: Reformat copyright header.
8356 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8358 * server.c (gdbserver_version): Update copyright year.
8359 * gdbreplay.c (gdbreplay_version): Likewise.
8361 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8363 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8366 2011-12-18 Hui Zhu <teawater@gmail.com>
8367 * linux-low.c (linux_create_inferior): Save return value to ret.
8369 2011-12-18 Hui Zhu <teawater@gmail.com>
8371 * linux-low.c (linux_create_inferior): Save return value to ret.
8373 2011-12-16 Doug Evans <dje@google.com>
8375 * linux-low.c (linux_create_inferior): If stdio connection,
8376 redirect stdin from /dev/null, stdout to stderr.
8377 * remote-utils.c (remote_is_stdio): New static global.
8378 (remote_connection_is_stdio): New function.
8379 (remote_prepare): Handle stdio connection.
8380 (remote_open): Ditto.
8381 (remote_close): Don't close stdin for stdio connections.
8382 (read_prim,write_prim): New functions. Replace all calls to
8383 read/write to these.
8384 * server.c (main): Watch for "-" argument. Move call to
8385 remote_prepare before start_inferior.
8386 * server.h (STDIO_CONNECTION_NAME): New macro.
8387 (remote_connection_is_stdio): Declare.
8389 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8390 in debugging output.
8392 2011-12-15 Yao Qi <yao@codesourcery.com>
8394 * tracepoint.c: Include sys/syscall.h.
8395 (gdb_ust_thread): Remove preprocessor conditional.
8397 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8399 * linux-low.c (linux_detach_one_lwp): Call
8400 the_low_target.prepare_to_resume before detaching.
8402 2011-12-14 Yao Qi <yao@codesourcery.com>
8404 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8407 2011-12-14 Yao Qi <yao@codesourcery.com>
8409 * i386-low.c (i386_low_stopped_data_address): Initialize local
8412 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8416 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8417 DR_CONTROL unless necessary. Extend comments.
8418 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8419 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8421 2011-12-13 Yao Qi <yao@codesourcery.com>
8423 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8425 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8427 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8429 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8430 Print new debug message for such case.
8432 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8434 Fix overlapping memcpy.
8435 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8436 the read_inferior_memory transfer.
8437 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8438 write_inferior_memory transfer.
8439 (set_fast_tracepoint_jump): New variable buf. Use it for the
8440 read_inferior_memory and write_inferior_memory transfers.
8441 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8442 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8443 Use it for the write_inferior_memory transfer.
8444 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8447 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8449 * linux-low.c (fetch_register, store_register): Make code
8450 consistent, fix formatting.
8452 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8454 * linux-low.c (usr_store_inferior_registers): Factor out code
8455 to handle individual registers into...
8456 (store_register): ... this new function.
8458 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8460 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8461 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8462 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8463 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8464 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8465 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8466 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8467 (srv_xmlfiles): Add new XML files.
8469 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8471 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8472 (init_registers_s390_linux32v1): Add prototype.
8473 (init_registers_s390_linux32v2): Likewise.
8474 (init_registers_s390_linux64v1): Likewise.
8475 (init_registers_s390_linux64v2): Likewise.
8476 (init_registers_s390x_linux64v1): Likewise.
8477 (init_registers_s390x_linux64v2): Likewise.
8478 (s390_num_regs): Increment to 52.
8479 (s390_regmap): Add orig_r2 register.
8480 (s390_num_regs_3264): Increment to 68.
8481 (s390_regmap_3264): Add orig_r2 register.
8482 (s390_collect_ptrace_register): Handle orig_r2 register.
8483 (s390_supply_ptrace_register): Likewise.
8484 (s390_fill_last_break): New function.
8485 (s390_store_last_break): Likewise.
8486 (s390_fill_system_call): New function.
8487 (s390_store_system_call): Likewise.
8488 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8490 (s390_check_regset): New function.
8491 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8492 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8493 Update target_regsets for available register sets.
8495 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8496 Jan Kratochvil <jan.kratochvil@redhat.com>
8498 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8499 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8501 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8502 * linux-low.h (struct process_info_private): New member r_debug.
8503 * server.c (handle_qxfer_libraries): Call
8504 the_target->qxfer_libraries_svr4.
8505 (handle_qxfer_libraries_svr4): New function.
8506 (qxfer_packets): New entry "libraries-svr4".
8507 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8508 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8509 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8510 PACKET_qXfer_libraries_svr4.
8512 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8514 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8515 PSW address/mask between 8-byte and 16-byte formats.
8516 (s390_supply_ptrace_register): Likewise.
8517 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8518 basic addressing mode bit.
8520 2011-11-24 Stan Shebs <stan@codesourcery.com>
8522 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8524 2011-11-17 Stan Shebs <stan@codesourcery.com>
8526 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8527 (tracing_start_time): New global.
8528 (tracing_stop_time): New global.
8529 (tracing_user_name): New global.
8530 (tracing_notes): New global.
8531 (tracing_stop_note): New global.
8532 (cmd_qtstart): Set traceframe_usage, start_time.
8533 (stop_tracing): Set stop_time.
8534 (cmd_qtstatus): Report additional status.
8535 (cmd_qtp): New function.
8536 (handle_tracepoint_query): Call it.
8537 (cmd_qtnotes): New function.
8538 (handle_tracepoint_general_set): Call it.
8539 (get_timestamp): Rename from tsv_get_timestamp.
8541 2011-11-14 Stan Shebs <stan@codesourcery.com>
8542 Kwok Cheung Yeung <kcy@codesourcery.com>
8544 * linux-x86-low.c (small_jump_insn): New.
8545 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8546 trampoline and error message, build a trampoline and issue a small
8547 jump instruction to it.
8548 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8549 trampoline and error message.
8550 (x86_get_min_fast_tracepoint_insn_len): New.
8551 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8552 * linux-low.h (struct linux_target_ops): Add arguments to
8553 install_fast_tracepoint_jump_pad operation, add new operation.
8554 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8556 (linux_get_min_fast_tracepoint_insn_len): New function.
8557 (linux_target_op): Add new operation.
8558 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8559 (gdb_trampoline_buffer_end): Ditto.
8560 (gdb_trampoline_buffer_error): Ditto.
8561 (struct ipa_sym_addresses): Add fields for new IPA variables.
8562 (symbol_list): Add entries for new IPA variables.
8563 (struct tracepoint): Add fields to hold the address range of the
8564 trampoline used by the tracepoint.
8565 (trampoline_buffer_head): New static variable.
8566 (trampoline_buffer_tail): Ditto.
8567 (claim_trampoline_space): New function.
8568 (have_fast_tracepoint_trampoline_buffer): New function.
8569 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8571 (install_fast_tracepoint): Ditto, also add error buffer argument.
8572 (cmd_qtminftpilen): New function.
8573 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8574 (fast_tracepoint_from_trampoline_address): New function.
8575 (fast_tracepoint_collecting): Handle trampoline as part of jump
8577 (set_trampoline_buffer_space): New function.
8578 (initialize_tracepoint): Initialize new IPA variables.
8579 * target.h (struct target_ops): Add arguments to
8580 install_fast_tracepoint_jump_pad operation, add new
8581 get_min_fast_tracepoint_insn_len operation.
8582 (target_get_min_fast_tracepoint_insn_len): New.
8583 (install_fast_tracepoint_jump_pad): Add arguments.
8584 * server.h (IPA_BUFSIZ): Define.
8585 * linux-i386-ipa.c: Include extra header files.
8586 (initialize_fast_tracepoint_trampoline_buffer): New function.
8587 (initialize_low_tracepoint): Call it.
8588 * server.h (set_trampoline_buffer_space): Declare.
8589 (claim_trampoline_space): Ditto.
8590 (have_fast_tracepoint_trampoline_buffer): Ditto.
8592 2011-11-14 Yao Qi <yao@codesourcery.com>
8594 * server.c (handle_query): Handle InstallInTrace for qSupported.
8595 * tracepoint.c (add_tracepoint): Sort list.
8596 (install_tracepoint, download_tracepoint): New.
8597 (cmd_qtdp): Call them to install and download tracepoints.
8598 (sort_tracepoints): Removed.
8599 (cmd_qtstart): Update.
8601 2011-11-14 Yao Qi <yao@codesourcery.com>
8603 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8604 * mem-break.h: Declare.
8605 * tracepoint.c (cmd_qtstart): Move some code to ...
8606 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8608 (download_tracepoints): Move some code to ...
8609 (download_tracepoint_1): ... here. New.
8611 2011-11-08 Yao Qi <yao@codesourcery.com>
8613 * remote-utils.c (relocate_instruction): A comment fix.
8615 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8618 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8619 dr_status_mirror and dr_control_mirror from debug_reg_state.
8620 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8621 (i386_initial_stuff): Remove use of deleted globals.
8622 (i386_get_thread_context, i386_set_thread_context,
8623 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8624 from debug_reg_state.
8626 2011-11-05 Yao Qi <yao@codesourcery.com>
8628 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8629 address as TPOINT's.
8631 2011-11-02 Stan Shebs <stan@codesourcery.com>
8633 * tracepoint.c (agent_mem_read_string): New function.
8634 (eval_agent_expr): Call it for tracenz.
8635 * server.c (handle_query): Report support for tracenz.
8637 2011-11-02 Yao Qi <yao@codesourcery.com>
8639 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8641 2011-11-02 Yao Qi <yao@codesourcery.com>
8643 * target.h: Fix a typo in comment.
8645 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8647 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8648 clobber the breakpoints' shadows with fast tracepoint jumps.
8649 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8650 * target.c (write_inferior_memory): Also pass MYADDR down to
8653 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8655 * configure.ac: Check support for personality routine.
8656 * configure: Regenerate.
8657 * config.in: Likewise.
8658 * linux-low.c: Include <sys/personality.h>.
8659 Define ADDR_NO_RANDOMIZE if necessary.
8660 (linux_create_inferior): Disable address space randomization when
8661 forking inferior, if requested.
8662 (linux_supports_disable_randomization): New function.
8663 (linux_target_ops): Install it.
8664 * server.h (disable_randomization): Declare.
8665 * server.c (disable_randomization): New global variable.
8666 (handle_general_set): Handle QDisableRandomization.
8667 (handle_query): Likewise for qSupported.
8668 (main): Support --disable-randomization and --no-disable-randomization
8669 command line arguments.
8670 * target.h (struct target_ops): Add supports_disable_randomization.
8671 (target_supports_disable_randomization): New macro.
8673 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8675 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8677 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8678 [!PT_GETDSBT] (target_loadmap): New definition.
8679 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8680 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8681 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8682 and PT_GETDSBT to LINUX_LOADMAP.
8683 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8684 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8686 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8688 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8689 (arm_linux_hwbp_cap): New static variable.
8690 (arm_linux_get_hwbp_cap): Replace by ...
8691 (arm_linux_init_hwbp_cap): ... this new function.
8692 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8693 (arm_linux_get_hw_watchpoint_count): Likewise.
8694 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8695 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8696 (arm_prepare_to_resume): Use perror_with_name instead of error.
8698 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8700 * linux-arm-low.c: Include <signal.h>.
8701 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8702 (struct arm_linux_hwbp_cap): New data type.
8703 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8704 (struct arm_linux_hw_breakpoint): New data type.
8705 (MAX_BPTS, MAX_WPTS): Define.
8706 (struct arch_process_info, struct arch_lwp_info): New data types.
8707 (arm_linux_get_hwbp_cap): New function.
8708 (arm_linux_get_hw_breakpoint_count): Likewise.
8709 (arm_linux_get_hw_watchpoint_count): Likewise.
8710 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8711 (arm_hwbp_control_initialize): Likewise.
8712 (arm_hwbp_control_is_enabled): Likewise.
8713 (arm_hwbp_control_is_initialized): Likewise.
8714 (arm_hwbp_control_disable): Likewise.
8715 (arm_linux_hw_breakpoint_equal): Likewise.
8716 (arm_linux_hw_point_initialize): Likewise.
8717 (struct update_registers_data): New data structure.
8718 (update_registers_callback: New function.
8719 (arm_insert_point): Likewise.
8720 (arm_remove_point): Likewise.
8721 (arm_stopped_by_watchpoint): Likewise.
8722 (arm_stopped_data_address): Likewise.
8723 (arm_new_process): Likewise.
8724 (arm_new_thread): Likewise.
8725 (arm_prepare_to_resume): Likewise.
8726 (the_low_target): Register arm_insert_point, arm_remove_point,
8727 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8728 arm_new_thread, and arm_prepare_to_resume.
8730 2011-09-15 Stan Shebs <stan@codesourcery.com>
8732 * server.h (struct emit_ops): Add compare-goto fields.
8733 * tracepoint.c (gdb_agent_op_sizes): New table.
8734 (emit_eq_goto): New function.
8735 (emit_ne_goto): New function.
8736 (emit_lt_goto): New function.
8737 (emit_le_goto): New function.
8738 (emit_gt_goto): New function.
8739 (emit_ge_goto): New function.
8740 (is_goto_target): New function.
8741 (compile_bytecodes): Recognize special cases of compare-goto
8742 combinations and call specialized emitters for them.
8743 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8744 (amd64_emit_ne_goto): New function.
8745 (amd64_emit_lt_goto): New function.
8746 (amd64_emit_le_goto): New function.
8747 (amd64_emit_gt_goto): New function.
8748 (amd64_emit_ge_goto): New function.
8749 (amd64_emit_ops): Add the new functions.
8750 (i386_emit_eq_goto): New function.
8751 (i386_emit_ne_goto): New function.
8752 (i386_emit_lt_goto): New function.
8753 (i386_emit_le_goto): New function.
8754 (i386_emit_gt_goto): New function.
8755 (i386_emit_ge_goto): New function.
8756 (i386_emit_ops): Add the new functions.
8758 2011-09-08 Stan Shebs <stan@codesourcery.com>
8760 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8761 (i386_emit_epilogue): Restore %ebx.
8763 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8765 * server.c (step_thread): Remove definition.
8766 (process_serial_event): Don't handle Hs.
8767 * server.h (step_thread): Remove declaration.
8768 * target.c (set_desired_inferior): Remove use of step_thread.
8770 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8772 * linux-low.c: Include linux-procfs.h.
8773 (linux_attach_lwp_1): Update comments.
8774 (linux_attach): Scan for existing threads when attaching to a
8775 process that is the tgid.
8776 * Makefile.in: Update dependencies.
8778 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8780 * configure.srv: Add linux-procfs.o dependencies.
8782 2011-08-14 Yao Qi <yao@codesourcery.com>
8784 * target.h (struct target_ops): Fix indent.
8785 * win32-low.c (win32_target_ops): Fix comment.
8787 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8788 Yao Qi <yao@codesourcery.com>
8790 * Makefile.in (clean): Remove tic6x-*.c files.
8791 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8792 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8793 (tic6x-c64xp-linux.c): Likewise.
8794 * configure.srv: Add support for tic6x-*-uclinux.
8795 * linux-tic6x-low.c: New.
8796 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8798 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8799 Yao Qi <yao@codesourcery.com>
8801 * target.h (struct target_ops): Add read_loadmap.
8802 * linux-low.c (struct target_loadseg): New type.
8803 (struct target_loadmap): New type.
8804 (linux_read_loadmap): New function.
8805 (linux_target_ops): Add linux_read_loadmap.
8806 * server.c (handle_query): Support qXfer:fdpic:read packet.
8807 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8810 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8812 * win32-low.c: Include <stdint.h>.
8814 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8816 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8817 to the inferior here.
8818 (i386_remove_aligned_watchpoint): Ditto.
8819 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8820 fit part of the watchpoint in the debug registers.
8821 (i386_update_inferior_debug_regs): New.
8822 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8823 registers, and only update the inferior on success.
8824 (i386_low_remove_watchpoint): Ditto.
8826 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8828 * linux-low.c (compare_ints, unique, list_threads, show_process,
8829 linux_core_of_thread): Delete.
8830 (linux_target_ops): Change linux_core_of_thread to
8831 linux_common_core_of_thread.
8832 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8833 * utils.c (malloc_failure): Change type of argument.
8834 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8835 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8836 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8837 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8838 (IPA_OBJS): Add common-utils-ipa.o.
8839 (ptid_h, linux_osdata_h): New macros.
8840 (server_h): Add common/common-utils.h, common/xml-utils.h,
8841 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8843 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8844 ptid.o, buffer.o): New rules.
8845 (linux-low.o): Add common/linux-osdata.h as a dependency.
8846 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8847 * configure.ac: Add AC_HEADER_DIRENT check.
8848 * config.in: Regenerate.
8849 * configure: Regenerate.
8850 * remote-utils.c (xml_escape_text): Delete.
8851 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8852 buffer_xml_printf): Move to common/buffer.c.
8853 * server.c (main): Remove call to initialize_inferiors.
8854 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8855 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8856 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8857 internal_error, gdb_assert, gdb_assert_fail): Delete.
8858 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8859 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8861 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8862 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8863 initialize_inferiors): Delete.
8865 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8867 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8870 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8872 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8874 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8876 2011-05-26 Yao Qi <yao@codesourcery.com>
8878 * Makefile.in (thread-db.o): Track dependence to
8879 common/gdb_thread_db.h.
8880 * thread-db.c: include gdb_thread_db.h from right place.
8882 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8884 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8885 __FILE__ and __LINE__ to internal_error.
8887 2011-05-13 Doug Evans <dje@google.com>
8889 * thread-db.c (try_thread_db_load_from_sdir): New function.
8890 (try_thread_db_load_from_dir): New function.
8891 (thread_db_load_search): Handle $sdir, ignore $pdir.
8892 Remove trying of system directories if search of
8893 libthread-db-search-path fails, that is now done via $sdir.
8895 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8897 * server.c (handle_query): Add EnableDisableTracepoints to the list
8898 of supported features.
8899 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8901 (cmd_qtenable_disable): New.
8902 (cmd_qtstart): Install tracepoints even if disabled.
8903 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8904 receiving a QTEnable or QTDisable packet.
8905 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8906 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8908 (gdb_probe): Skip data collection if static tracepoint is disabled.
8910 2011-05-10 Doug Evans <dje@google.com>
8912 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8914 2011-05-04 Doug Evans <dje@google.com>
8916 * linux-low.c (linux_join): Skip process lookup.
8917 * spu-low.c (spu_join): Ditto.
8918 * server.c (join_inferiors_callback): Delete.
8919 (process_serial_event): For 'D' packet (detach) call join_inferior
8922 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8924 * README: Don't mention xscale*-*-linux*.
8925 * configure.srv (xscale*-*-linux*): Don't handle target.
8927 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8929 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8931 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8932 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8933 (i386_emit_void_call_2): Likewise.
8935 2011-04-26 Yao Qi <yao@codesourcery.com>
8937 * linux-low.c: Move common macros to linux-ptrace.h.
8938 Include linux-ptrace.h.
8939 * Makefile.in (linux_ptrace_h): New.
8940 (linux-low.o): Depends on linux-ptrace.h.
8942 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8944 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8945 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8946 (remote_prepare): New function with most of the TCP code from ...
8947 (remote_open): ... here. Detect PORT here unconditionally. Move also
8948 setting transport_is_reliable.
8949 * server.c (run_once): New variable.
8950 (gdbserver_usage): Document it.
8951 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8952 the first run if RUN_ONCE.
8953 * server.h (run_once, remote_prepare): New declarations.
8955 2011-04-19 Tom Tromey <tromey@redhat.com>
8957 * win32-low.c (handle_load_dll): Remove duplicate "the".
8959 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8961 Remove support for old Cygwin 1.5 versions.
8962 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8963 function to avoid warning.
8964 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8967 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8969 * gdbserver/server.h (Macro _): Define it if not available.
8971 2011-03-14 Michael Snyder <msnyder@vmware.com>
8973 * hostio.c (handle_close): Remove unnecessary null test.
8975 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8977 * Makefile.in (maintainer-clean realclean distclean): Remove
8978 "make ... subdir_do" command.
8980 2011-03-10 Michael Snyder <msnyder@vmware.com>
8982 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8984 * server.c (handle_v_run): Free alloced buffer on early return.
8986 2011-03-09 Yao Qi <yao@codesourcery.com>
8989 2011-03-04 Yao Qi <yao@codesourcery.com>
8991 * Makefile.in: Remove GNU make feature --directory.
8993 2011-03-05 Yao Qi <yao@codesourcery.com>
8995 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8996 (subdir_do): New make target. Copied from gdb/Makefile.
8997 (maintainer-clean, realclean, distclean, clean): Call corresponding
8998 make targets in common/Makefile.
9000 2011-02-11 Yao Qi <yao@codesourcery.com>
9002 * configure.ac: Call AC_PROG_RANLIB.
9003 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9004 * configure: Regenerate.
9006 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9008 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9010 2011-03-06 Yao Qi <yao@codesourcery.com>
9012 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9014 2011-03-05 Yao Qi <yao@codesourcery.com>
9016 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9017 (subdir_do): New make target. Copied from gdb/Makefile.
9018 (maintainer-clean, realclean, distclean, clean): Call corresponding
9019 make targets in common/Makefile.
9021 2011-03-04 Yao Qi <yao@codesourcery.com>
9023 * Makefile.in: Remove GNU make feature --directory.
9025 2011-03-04 Michael Snyder <msnyder@vmware.com>
9027 * server.c (queue_stop_reply): Call xmalloc not malloc.
9029 2011-03-02 Michael Snyder <msnyder@vmware.com>
9031 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9033 2011-02-28 Michael Snyder <msnyder@vmware.com>
9035 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9036 (cmd_qtframe): Ditto.
9037 (cmd_qtbuffer): Ditto.
9038 (cmd_bigqtbuffer): Ditto.
9040 * utils.c (decimal2str): Initialize 'width' to nine, then
9043 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9045 * hostio.c (require_data): Free *data, not data.
9047 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9049 * hostio.c (require_data): Use free, not xfree.
9051 2011-02-27 Michael Snyder <msnyder@vmware.com>
9053 * server.c (handle_query): Discard unused value.
9055 * hostio.c (require_data): Free malloc memory before returning
9058 2011-02-26 Michael Snyder <msnyder@vmware.com>
9060 * linux-low.c (list_threads): Call closedir for dirent.
9062 2011-02-27 Michael Snyder <msnyder@vmware.com>
9064 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9065 a case statement falls through.
9067 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9069 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9072 2011-02-26 Michael Snyder <msnyder@vmware.com>
9074 * utils.c (decimal2str): Eliminate dead code and dead param.
9075 (pulongest): Drop dead param from call to decimal2str.
9078 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9080 Revert the following patch (not approved yet):
9081 2011-02-21 Hui Zhu <teawater@gmail.com>
9082 * tracepoint.c (tp_printf): New function.
9083 (eval_agent_expr): Handle gdb_agent_op_printf.
9085 2011-02-21 Hui Zhu <teawater@gmail.com>
9087 * tracepoint.c (tp_printf): New function.
9088 (eval_agent_expr): Handle gdb_agent_op_printf.
9090 2011-02-18 Tom Tromey <tromey@redhat.com>
9092 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9093 (tracepoint.o): Likewise.
9094 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9095 (gdb_agent_op_names): Likewise.
9097 2011-02-18 Tom Tromey <tromey@redhat.com>
9099 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9100 gdb_agent_op_rot>: New constants.
9101 (gdb_agent_op_names): Add pick and roll.
9102 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9105 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9107 * aclocal.m4: Regenerated with aclocal-1.11.1.
9109 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9111 * server.c (handle_qxfer_traceframe_info): New.
9112 (qxfer_packets): Register "traceframe-info".
9113 (handle_query): Report support for qXfer:traceframe-info:read+.
9114 * tracepoint.c (match_blocktype): New.
9115 (traceframe_find_block_type): Rename to ...
9116 (traceframe_walk_blocks): ... this. Add callback filter argument,
9118 (traceframe_find_block_type): New, reimplemented on top of
9119 traceframe_walk_blocks.
9120 (build_traceframe_info_xml): New.
9121 (traceframe_read_info): New.
9122 * server.h (traceframe_read_info): Declare.
9124 2011-02-11 Yao Qi <yao@codesourcery.com>
9126 * configure.ac: Call AC_PROG_RANLIB.
9127 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9128 * configure: Regenerate.
9130 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9132 * server.c (gdb_read_memory): Change return semantics to allow
9134 (handle_search_memory_1): Adjust.
9135 (process_serial_event) <'m' packet>: Handle partial transfers.
9136 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9138 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9140 * regcache.c (init_register_cache): Initialize
9141 regcache->register_status.
9142 (free_register_cache): Release regcache->register_status.
9143 (regcache_cpy): Copy register_status.
9144 (registers_to_string): Print 'x's for unavailable registers.
9145 (supply_register): Mark the register's status valid or
9146 unavailable, depending on whether a buffer was passed in or not.
9147 (supply_register_zeroed): New.
9148 (supply_regblock): Mark the registers' status valid or
9149 unavailable, depending on whether a buffer was passed in or not.
9150 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9151 (struct regcache): New `register_status' field.
9152 (supply_register_zeroed): Declare.
9153 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9154 supply_register_zeroed, rather than passing a NULL buffer to
9156 * tracepoint.c (fetch_traceframe_registers): Update comment.
9158 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9160 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9163 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9165 * server.h (decode_xfer_write): Change prototype.
9166 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9167 and don't extract the annex here.
9168 * server.c (decode_xfer_read): Remove `annex' parameter,
9169 and don't extract the annex here.
9171 (struct qxfer): New.
9172 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9173 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9174 (handle_qxfer_statictrace): New functions, abstracted out from
9175 handle_query, and made to use the struct qxfer interface.
9176 (handle_threads_qxfer_proper): Rename to ...
9177 (handle_qxfer_threads_proper): ... this.
9178 (handle_threads_qxfer): Rename to ...
9179 (handle_qxfer_threads): ... this. Adjust.
9180 (qxfer_packets): New array.
9181 (handle_qxfer): New function.
9182 (handle_query): Use handle_qxfer.
9184 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9186 * gdbreplay.c: Shorten lines of >= 80 columns.
9187 * linux-low.c: Ditto.
9188 * linux-ppc-low.c: Ditto.
9189 * linux-s390-low.c: Ditto.
9190 * linux-sparc-low.c: Ditto.
9191 * linux-x86-low.c: Ditto.
9192 * linux-xtensa-low.c: Ditto.
9193 * mem-break.c: Ditto.
9195 * regcache.h: Ditto.
9196 * remote-utils.c: Ditto.
9199 * thread-db.c: Ditto.
9200 * tracepoint.c: Ditto.
9202 * win32-low.h: Ditto.
9204 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9206 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9209 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9211 * server.c (gdbserver_version): Update copyright year in version
9213 * gdbreplay.c (gdbreplay_version): Ditto.
9215 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9217 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9218 * linux-bfin-low.c: New file.
9219 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9220 PT_DATA_ADDR for BFIN targets.
9221 * Makefile.in (SFILES): Add linux-bfin-low.c.
9222 (clean): Remove reg-bfin.c.
9223 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9224 * README: Mention supported Blackfin targets.
9226 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9228 * .gitignore: New file.
9230 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9232 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9234 2010-10-22 Jie Zhang <jie@codesourcery.com>
9236 * Makefile.in: Add FLAGS_TO_PASS variable.
9237 (install): Remove dependency of install-only and recursively
9238 invoke make for install-only.
9240 2010-10-04 Doug Evans <dje@google.com>
9242 * Makefile.in (uninstall): Use $(DESTDIR).
9244 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9248 * linux-x86-low.c (compat_siginfo_from_siginfo)
9249 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9250 si_code is < 0. Check for si_code == SI_TIMER before checking for
9253 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9255 * lynx-i386-low.c: New file.
9256 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9258 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9260 * lynx-low.c (ptrace_request_to_str): Remove handling for
9261 request values that have been removed in LynxOS 5.x.
9263 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9265 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9268 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9270 * configure.ac: Add --enable-inprocess-agent option.
9271 * configure: Rebuilt.
9273 2010-09-06 Yao Qi <yao@codesourcery.com>
9275 * linux-low.c (linux_kill): Remove unused variable.
9276 (linux_stabilize_threads): Likewise.
9277 * server.c (start_inferior): Likewise.
9278 (queue_stop_reply_callback): Likewise.
9279 * tracepoint.c (do_action_at_tracepoint): Likewise.
9281 2010-09-06 Yao Qi <yao@codesourcery.com>
9283 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9286 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9288 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9290 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9292 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9295 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9297 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9298 gdbserver/lynx-ppc-low.c: New files.
9299 * Makefile.in (lynx_low_h): New variable.
9300 (lynx-low.o, lynx-ppc-low.o): New rules.
9301 * configure.ac: On LynxOS, link with -lnetinet.
9302 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9303 * configure: regenerate.
9305 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9307 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9308 * configure.ac: Add check for vasprintf and vsnprintf.
9309 * configure, config.in: Regenerate.
9310 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9312 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9314 * gdbreplay.c: Move include of alloca.h up, next to include of
9316 * server.h: Add include of malloc.h.
9317 * mem-break.c: Remove include of malloc.h.
9318 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9320 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9322 * Makefile.in (memmem.o): Build with -Wno-error.
9324 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9326 * utils.c (xsnprintf): Make non-static.
9327 * server.h: Add xsnprintf declaration.
9328 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9329 replace calls to snprintf by calls to xsnprintf throughout.
9331 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9333 * configure.ac: Add configure check for alloca.
9334 * configure, config.in: Regenerate.
9335 * server.h: Include alloca.h if it exists.
9336 * gdbreplay.c: Include alloca.h if it exists.
9338 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9340 * linux-low.c (__SIGRTMIN): Define if not already defined.
9341 (linux_create_inferior): Check for __ANDROID__ rather than
9343 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9344 are already deferred.
9345 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9346 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9347 stopped and already has a pending signal to report.
9348 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9349 a pending signal to report or is moving out of a jump pad.
9350 (linux_init_signals): Check for __ANDROID__ rather than
9353 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9355 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9356 debug_threads check. Avoid a linear search when not doing debug
9359 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9361 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9362 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9363 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9364 (process_event): Change local fd's type to gdb_fildes_t.
9365 (create_file_handler): Adjust prototype.
9366 (delete_file_handler): Adjust prototype.
9367 (handle_file_event): Adjust prototype. Use pfildes.
9368 (create_file_event): Adjsut prototype.
9369 * remote-utils.c (remote_desc, listen_desc): Change type to
9371 * server.h: New gdb_fildes_t typedef.
9372 [USE_WIN32API]: Include winsock2.h.
9373 (delete_file_handler, add_file_handler): Adjust prototypes.
9375 * utils.c (pfildes): New.
9377 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9379 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9380 * configure: Regenerate.
9382 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9384 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9385 (linux_done_accessing_memory): ... this.
9386 (linux_target_ops): Adjust.
9387 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9388 * nto-low.c (nto_target_ops): Adjust comment.
9389 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9390 * spu-low.c (spu_target_ops): Adjust comment.
9391 * target.h (target_ops): Rename unprepare_to_access_memory field
9392 to done_accessing_memory.
9393 (unprepare_to_access_memory): Rename to ...
9394 (done_accessing_memory): ... this.
9396 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9398 * linux-low.c (linux_prepare_to_access_memory): New.
9399 (linux_unprepare_to_access_memory): New.
9400 (linux_target_ops): Install them.
9401 * server.c (read_memory): Rename to ...
9402 (gdb_read_memory): ... this. Use
9403 prepare_to_access_memory/prepare_to_access_memory.
9404 (write_memory): Rename to ...
9405 (gdb_write_memory): ... this. Use
9406 prepare_to_access_memory/prepare_to_access_memory.
9407 (handle_search_memory_1): Adjust.
9408 (process_serial_event): Adjust.
9409 * target.h (struct target_ops): New fields
9410 prepare_to_access_memory and unprepare_to_access_memory.
9411 (prepare_to_access_memory, unprepare_to_access_memory): New.
9412 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9413 prepare_to_access_memory/prepare_to_access_memory.
9414 * nto-low.c (nto_target_ops): Adjust.
9415 * spu-low.c (spu_target_ops): Adjust.
9416 * win32-low.c (win32_target_ops): Adjust.
9418 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9420 * Makefile.in (WARN_CFLAGS): Get it from configure.
9421 (WERROR_CFLAGS): New.
9422 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9423 * configure.ac: Introduce --enable-werror, which adds -Werror to
9424 the compiler command line. Enabled by default. Disable with
9425 --disable-werror. Add -Wdeclaration-after-statement
9426 Wpointer-arith and -Wformat-nonliteral to warning flags.
9427 * configure: Regenerate.
9429 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9431 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9433 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9435 * gdbreplay.c (remote_error): New.
9437 (expect): Use gdbchar. Check for error reading from GDB.
9438 Clarify sync error output.
9439 (play): Check for errors writing to GDB.
9440 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9441 * remote-utils.c (getpkt): Check for errors writing to the remote
9444 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9446 * linux-low.c (linux_wait_1): Move non-debugging code out of
9447 `debug_threads' control.
9449 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9451 * linux-low.c (linux_wait_1): Don't set last_status here.
9452 * server.c (push_event, queue_stop_reply_callback): Assert we're
9453 not pushing a TARGET_WAITKIND_IGNORE event.
9454 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9455 (myresume, handle_target_event): Set the thread's last_resume_kind
9456 and last_status from the target returned status.
9458 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9462 * linux-x86-low.c (update_debug_registers_callback): New.
9463 (i386_dr_low_set_addr): Use it.
9464 (i386_dr_low_get_addr): New.
9465 (i386_dr_low_set_control): Use update_debug_registers_callback.
9466 (i386_dr_low_get_control): New.
9467 (i386_dr_low_get_status): Adjust.
9468 * linux-low.c (linux_stop_lwp): New.
9469 * linux-low.h (linux_stop_lwp): Declare.
9471 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9472 argument instead of a i386_debug_reg_state.
9473 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9474 a i386_debug_reg_state.
9475 (i386_insert_aligned_watchpoint): Adjust.
9476 (i386_remove_aligned_watchpoint): Adjust.
9477 (i386_low_stopped_data_address): Read the debug registers from the
9478 inferior instead of from the mirrors.
9479 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9480 (i386_dr_low_get_addr): Declare.
9481 (i386_dr_low_get_control): Declare.
9482 (i386_dr_low_get_status): Change prototype.
9484 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9485 (i386_dr_low_get_addr): New.
9486 (i386_dr_low_get_control): New.
9487 (i386_dr_low_get_status): Adjust prototype. Return
9489 (i386_initial_stuff): Clear dr_status_mirror and
9491 (i386_get_thread_context): Adjust.
9492 (i386_set_thread_context): Adjust.
9493 (i386_thread_added): Adjust.
9495 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9497 * linux-low.h (linux_thread_area): Delete declaration.
9499 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9501 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9502 after its termination.
9504 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9506 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9507 (gdb_wants_all_stopped): Delete.
9508 (linux_wait_1): Don't call them.
9509 * server.c (handle_v_cont): Tag all threads as want-stopped.
9510 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9511 stopped as "client-wants-stopped".
9513 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9515 * Makefile.in (signals_h): New.
9516 (server_h): Depend on it.
9517 (server.o): Don't depend on $(signals_def).
9518 (signals.o): Depend on $(signals_def).
9520 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9522 * Makefile.in (signals_def): New.
9523 (server_h): Append include/gdb/signals.h and signals_def.
9524 (server.o): Append signals_def.
9526 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9528 * server.c (handle_target_event): Use target_signal_to_host for
9529 resume_info.sig initialization.
9530 * target.h (struct thread_resume) <sig>: New comment.
9532 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9534 * server.c (handle_query): strcpy() the returned string from paddress()
9535 instead of sprintf().
9536 * utils.c (paddress): Return phex_nz().
9538 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9540 * server.c (handle_v_cont): Call mourn_inferior if process
9542 (myresume): Likewise.
9544 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9546 Static tracepoints, and integration with UST.
9548 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9549 * mem-break.c (uninsert_all_breakpoints)
9550 (reinsert_all_breakpoints): New.
9551 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9552 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9553 (gdb_agent_ust_loaded, helper_thread_id)
9554 (gdb_agent_helper_thread_id): New macros.
9555 (struct ipa_sym_addresses): Add addr_ust_loaded,
9556 addr_helper_thread_id, addr_cmd_buf.
9557 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9558 (in_process_agent_loaded_ust): New.
9559 (write_e_ust_not_loaded): New.
9560 (maybe_write_ipa_ust_not_loaded): New.
9561 (struct collect_static_trace_data_action): New.
9562 (enum tracepoint_type) <static_tracepoint>: New.
9563 (struct tracepoint) <handle>: Mention static tracepoints.
9564 (struct static_tracepoint_ctx): New.
9565 (CMD_BUF_SIZE): New.
9566 (add_tracepoint_action): Handle static tracepoint actions.
9567 (unprobe_marker_at): New.
9568 (clear_installed_tracepoints): Handle static tracepoints.
9569 (cmd_qtdp): Handle static tracepoints.
9570 (probe_marker_at): New.
9571 (cmd_qtstart): Handle static tracepoints.
9572 (response_tracepoint): Handle static tracepoints.
9573 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9574 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9575 (get_context_regcache): Handle static tracepoints.
9576 (do_action_at_tracepoint): Handle static tracepoint actions.
9577 (traceframe_find_block_type): Handle static trace data blocks.
9578 (traceframe_read_sdata): New.
9579 (download_tracepoints): Download static tracepoint actions.
9580 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9581 (GDB_PROBE_NAME): New.
9586 (ust_marker_to_static_tracepoint): New.
9588 (collect_ust_data_at_tracepoint): New.
9589 (gdb_ust_probe): New.
9590 (UNIX_PATH_MAX, SOCK_DIR): New.
9591 (gdb_ust_connect_sync_socket): New.
9592 (resume_thread, stop_thread): New.
9593 (run_inferior_command): New.
9594 (init_named_socket): New.
9595 (gdb_ust_socket_init): New.
9596 (cstr_to_hexstr): New.
9598 (first_marker, next_marker): New.
9599 (response_ust_marker): New.
9600 (cmd_qtfstm, cmd_qtsstm): New.
9601 (unprobe_marker_at, probe_marker_at): New.
9602 (cmd_qtstmat, gdb_ust_thread): New.
9603 (gdb_ust_init): New.
9604 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9605 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9607 (x86_64_st_collect_regmap): New.
9608 (X86_64_NUM_ST_COLLECT_GREGS): New.
9609 (AMD64_RIP_REGNUM): New.
9610 (supply_static_tracepoint_registers): New.
9611 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9613 (i386_st_collect_regmap): New.
9614 (i386_NUM_ST_COLLECT_GREGS): New.
9615 (supply_static_tracepoint_registers): New.
9616 * server.c (handle_query): Handle qXfer:statictrace:read.
9617 <qSupported>: Report support for StaticTracepoints, and
9618 qXfer:statictrace:read features.
9619 * server.h (traceframe_read_sdata)
9620 (supply_static_tracepoint_registers): Declare.
9621 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9622 (unpack_varlen_hex): Include in IPA build.
9623 * Makefile.in (ustlibs, ustinc): New.
9624 (IPA_OBJS): Add remote-utils-ipa.o.
9625 ($(IPA_LIB)): Link -ldl and -lpthread.
9627 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9628 * config.in, configure: Regenerate.
9630 2010-06-20 Ian Lance Taylor <iant@google.com>
9631 Pedro Alves <pedro@codesourcery.com>
9633 * linux-x86-low.c (always_true): Delete.
9634 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9635 trying to fool the compiler with always_true.
9637 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9639 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9640 conditions in gdbserver.
9642 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9644 * spu-low.c (spu_read_memory): Wrap around local store limit.
9645 (spu_write_memory): Likewise.
9647 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9649 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9650 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9652 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9654 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9655 uses with LONGEST uses.
9657 2010-06-14 Stan Shebs <stan@codesourcery.com>
9658 Pedro Alves <pedro@codesourcery.com>
9662 * linux-x86-low.c: Include limits.h.
9667 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9668 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9669 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9670 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9671 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9672 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9673 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9674 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9675 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9676 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9677 (amd64_emit_void_call_2): New.
9678 (amd64_emit_ops): New.
9679 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9680 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9681 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9682 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9683 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9684 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9685 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9686 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9687 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9688 (i386_emit_stack_adjust, i386_emit_int_call_1)
9689 (i386_emit_void_call_2): New.
9690 (i386_emit_ops): New.
9691 (x86_emit_ops): New.
9692 (the_low_target): Install x86_emit_ops.
9693 * server.h (struct emit_ops): New.
9694 (get_raw_reg_func_addr): Declare.
9695 (current_insn_ptr, emit_error): Declare.
9696 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9697 (set_trace_state_variable_value): New defines.
9698 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9699 addr_get_trace_state_variable_value and
9700 addr_set_trace_state_variable_value.
9701 (symbol_list): New fields for get_raw_reg,
9702 get_trace_state_variable_value and set_trace_state_variable_value.
9703 (condfn): New typedef.
9704 (struct tracepoint): New field `compiled_cond'.
9705 (do_action_at_tracepoint): Clear compiled_cond.
9706 (get_trace_state_variable_value, set_trace_state_variable_value):
9708 (condition_true_at_tracepoint): If there's a compiled condition,
9710 (current_insn_ptr, emit_error): New globals.
9711 (struct bytecode_address): New.
9712 (get_raw_reg_func_addr): New.
9713 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9714 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9715 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9716 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9717 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9718 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9719 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9720 (compile_tracepoint_condition, compile_bytecodes): New.
9721 * target.h (emit_ops): Forward declare.
9722 (struct target_ops): New field emit_ops.
9723 (target_emit_ops): New.
9724 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9725 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9726 * linux-low.c (linux_emit_ops): New.
9727 (linux_target_ops): Install it.
9728 * linux-low.h (struct linux_target_ops): New field emit_ops.
9730 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9732 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9733 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9735 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9736 Stan Shebs <stan@codesourcery.com>
9738 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9739 (all): Depend on $(extra_libraries).
9740 (install-only): Install the IPA.
9741 (IPA_OBJS, IPA_LIB): New.
9742 (clean): Remove the IPA lib.
9743 (IPAGENT_CFLAGS): New.
9744 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9745 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9746 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9747 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9748 * configure.ac: Check for atomic builtins support in the compiler.
9749 (IPA_DEPFILES, extra_libraries): Define.
9750 * configure.srv (ipa_obj): Add description.
9751 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9752 (i[34567]86-*-linux*): Set ipa_obj.
9753 (x86_64-*-linux*): Set ipa_obj.
9754 * linux-low.c (stabilizing_threads): New.
9755 (supports_fast_tracepoints): New.
9756 (linux_detach): Stabilize threads before detaching.
9757 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9758 the lwp is either not stabilizing, or is moving out of a jump pad.
9759 (linux_fast_tracepoint_collecting): New.
9760 (maybe_move_out_of_jump_pad): New.
9761 (enqueue_one_deferred_signal): New.
9762 (dequeue_one_deferred_signal): New.
9763 (linux_wait_for_event_1): If moving out of a jump pad, defer
9764 pending signals to later.
9765 (linux_stabilize_threads): New.
9766 (linux_wait_1): Check if threads need moving out of jump pads, and
9768 (stuck_in_jump_pad_callback): New.
9769 (move_out_of_jump_pad_callback): New.
9771 (linux_resume_one_lwp): Handle moving out of jump pads.
9772 (linux_set_resume_request): Dequeue deferred signals.
9773 (need_step_over_p): Also step over fast tracepoint jumps.
9774 (start_step_over): Also uninsert fast tracepoint jumps.
9775 (finish_step_over): Also reinsert fast tracepoint jumps.
9776 (linux_install_fast_tracepoint_jump): New.
9777 (linux_target_ops): Install linux_stabilize_threads and
9778 linux_install_fast_tracepoint_jump_pad.
9779 * linux-low.h (linux_target_ops) <get_thread_area,
9780 install_fast_tracepoint_jump_pad>: New fields.
9781 (struct lwp_info) <collecting_fast_tracepoint,
9782 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9783 (linux_get_thread_area): Declare.
9784 * linux-x86-low.c (jump_insn): New.
9785 (x86_get_thread_area): New.
9786 (append_insns): New.
9788 (amd64_install_fast_tracepoint_jump_pad): New.
9789 (i386_install_fast_tracepoint_jump_pad): New.
9790 (x86_install_fast_tracepoint_jump_pad): New.
9791 (the_low_target): Install x86_get_thread_area and
9792 x86_install_fast_tracepoint_jump_pad.
9793 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9794 (struct fast_tracepoint_jump): New.
9795 (fast_tracepoint_jump_insn): New.
9796 (fast_tracepoint_jump_shadow): New.
9797 (find_fast_tracepoint_jump_at): New.
9798 (fast_tracepoint_jump_here): New.
9799 (delete_fast_tracepoint_jump): New.
9800 (set_fast_tracepoint_jump): New.
9801 (uninsert_fast_tracepoint_jumps_at): New.
9802 (reinsert_fast_tracepoint_jumps_at): New.
9803 (set_breakpoint_at): Use write_inferior_memory.
9804 (uninsert_raw_breakpoint): Use write_inferior_memory.
9805 (check_mem_read): Mask out fast tracepoint jumps.
9806 (check_mem_write): Mask out fast tracepoint jumps.
9807 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9808 (set_fast_tracepoint_jump): Declare.
9809 (delete_fast_tracepoint_jump)
9810 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9811 (reinsert_fast_tracepoint_jumps_at): Declare.
9812 * regcache.c: Don't compile many functions when building the
9813 in-process agent library.
9814 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9815 the register buffer in the heap.
9816 (free_register_cache): If the register buffer isn't owned by the
9817 regcache, don't free it.
9818 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9819 pre-existing register caches.
9820 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9822 (convert_ascii_to_int): : Constify `from' parameter type.
9823 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9824 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9825 the needed buffer in-place.
9826 (relocate_instruction): New.
9827 * server.c (handle_query) <qSymbols>: If the target supports
9828 tracepoints, give it a chance of looking up symbols. Report
9829 support for fast tracepoints.
9830 (handle_status): Stabilize threads.
9831 (process_serial_event): Adjust.
9832 * server.h (struct fast_tracepoint_jump): Forward declare.
9833 (struct process_info) <fast_tracepoint_jumps>: New field.
9834 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9835 (decode_X_packet, decode_M_packet): Adjust.
9836 (relocate_instruction): Declare.
9837 (in_process_agent_loaded): Declare.
9838 (tracepoint_look_up_symbols): Declare.
9839 (struct fast_tpoint_collect_status): Declare.
9840 (fast_tracepoint_collecting): Declare.
9841 (force_unlock_trace_buffer): Declare.
9842 (handle_tracepoint_bkpts): Declare.
9843 (initialize_low_tracepoint)
9844 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9845 * target.h (struct target_ops) <stabilize_threads,
9846 install_fast_tracepoint_jump_pad>: New fields.
9847 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9848 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9849 [HAVE_STDINT_H]: Include stdint.h.
9850 (trace_debug_1): Rename to ...
9851 (trace_vdebug): ... this.
9852 (trace_debug): Rename to ...
9853 (trace_debug_1): ... this. Add `level' parameter.
9855 (ATTR_USED, ATTR_NOINLINE): New.
9856 (IP_AGENT_EXPORT): New.
9857 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9858 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9859 (about_to_request_buffer_space, trace_buffer_is_full)
9860 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9861 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9862 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9863 (traceframe_write_count, traceframes_created)
9864 (trace_state_variables)
9865 New renaming defines.
9866 (struct ipa_sym_addresses): New.
9867 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9869 (ipa_sym_addrs): New.
9870 (all_tracepoint_symbols_looked_up): New.
9871 (in_process_agent_loaded): New.
9872 (write_e_ipa_not_loaded): New.
9873 (maybe_write_ipa_not_loaded): New.
9874 (tracepoint_look_up_symbols): New.
9875 (debug_threads) [IN_PROCESS_AGENT]: New.
9876 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9877 (UNKNOWN_SIDE_EFFECTS): New.
9878 (stop_tracing): New.
9879 (flush_trace_buffer): New.
9880 (stop_tracing_bkpt): New.
9881 (flush_trace_buffer_bkpt): New.
9882 (read_inferior_integer): New.
9883 (read_inferior_uinteger): New.
9884 (read_inferior_data_pointer): New.
9885 (write_inferior_data_pointer): New.
9886 (write_inferior_integer): New.
9887 (write_inferior_uinteger): New.
9888 (struct collect_static_trace_data_action): Delete.
9889 (enum tracepoint_type): New.
9890 (struct tracepoint) <type>: New field `type'.
9891 <actions_str, step_actions, step_actions_str>: Only include in
9893 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9894 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9895 (tracepoints): Use IP_AGENT_EXPORT.
9896 (last_tracepoint): Don't include in the IPA.
9897 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9898 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9899 (alloced_trace_state_variables): New.
9900 (trace_state_variables): Use IP_AGENT_EXPORT.
9901 (traceframe_t): Delete unused variable.
9902 (circular_trace_buffer): Don't include in the IPA.
9903 (trace_buffer_start): Delete.
9904 (struct trace_buffer_control): New.
9905 (trace_buffer_free): Delete.
9906 (struct ipa_trace_buffer_control): New.
9907 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9908 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9910 (trace_buffer_ctrl): New.
9911 (TRACE_BUFFER_CTRL_CURR): New.
9912 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9913 Reimplement as macros.
9914 (trace_buffer_wrap): Delete.
9915 (traceframe_write_count, traceframe_read_count)
9916 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9917 (struct tracepoint_hit_ctx) <type>: New field.
9918 (struct fast_tracepoint_ctx): New.
9919 (memory_barrier): New.
9921 (record_tracepoint_error): Update atomically in the IPA.
9922 (clear_inferior_trace_buffer): New.
9923 (about_to_request_buffer_space): New.
9924 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9925 updating the same buffer.
9926 (add_tracepoint): Default the tracepoint's type to trap
9927 tracepoint, and orig_size to -1.
9928 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9930 (create_trace_state_variable): New parameter `gdb'. Handle it.
9931 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9932 (cmd_qtdp): Handle fast tracepoints.
9934 (max_jump_pad_size): New.
9935 (gdb_jump_pad_head): New.
9936 (get_jump_space_head): New.
9937 (claim_jump_space): New.
9938 (sort_tracepoints): New.
9939 (MAX_JUMP_SIZE): New.
9940 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9942 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9943 support. Upload fast traceframes, and delete internal IPA
9945 (stop_tracing_handler): New.
9946 (flush_trace_buffer_handler): New.
9947 (cmd_qtstop): Upload fast tracepoints.
9948 (response_tracepoint): Handle fast tracepoints.
9949 (tracepoint_finished_step): Upload fast traceframes. Set the
9950 tracepoint hit context's tracepoint type.
9951 (handle_tracepoint_bkpts): New.
9952 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9953 type. Add comment about fast tracepoints.
9954 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9955 non-existing action_str field.
9956 (get_context_regcache): Handle fast tracepoints.
9957 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9959 (fast_tracepoint_from_jump_pad_address): New.
9960 (fast_tracepoint_from_ipa_tpoint_address): New.
9961 (collecting_t): New.
9962 (force_unlock_trace_buffer): New.
9963 (fast_tracepoint_collecting): New.
9966 (write_inferior_data_ptr): New.
9967 (target_tp_heap): New.
9968 (target_malloc): New.
9969 (download_agent_expr): New.
9971 (download_tracepoints): New.
9972 (download_trace_state_variables): New.
9973 (upload_fast_traceframes): New.
9974 (IPA_FIRST_TRACEFRAME): New.
9975 (IPA_NEXT_TRACEFRAME_1): New.
9976 (IPA_NEXT_TRACEFRAME): New.
9977 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9978 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9979 (gdb_jump_pad_buffer_end): New.
9980 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9981 (initialize_tracepoint): Adjust.
9982 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9983 buffer. Initialize the low module.
9984 * utils.c (PREFIX, TOOLNAME): New.
9985 (malloc_failure): Use PREFIX.
9986 (error): In the IPA, an error causes an exit.
9987 (fatal, warning): Use PREFIX.
9988 (internal_error): Use TOOLNAME.
9989 (NUMCELLS): Increase to 10.
9990 * configure, config.in: Regenerate.
9992 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9994 * server.c (handle_query) <qSupported>: Do two passes over the
9995 qSupported string to avoid nesting strtok.
9997 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9999 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10001 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10002 -Wl,--dynamic-list.
10003 * configure: Regenerate.
10004 * proc-service.list: New.
10006 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10008 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10011 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10013 * gdbreplay.c (remote_open): Check error return from socket() call by
10014 its equality to -1 not by it being negative.
10015 * remote-utils.c (remote_open): Likewise.
10017 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10019 * config.h: Regenerate.
10021 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10023 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10024 doesn't provide PTRACE_GET_THREAD_AREA.
10026 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10028 * linux-m68k-low.c: Include <asm/ptrace.h>
10029 (ps_get_thread_area): Implement.
10031 2010-05-03 Doug Evans <dje@google.com>
10033 * event-loop.c (struct callback_event): New struct.
10034 (callback_list): New global.
10035 (append_callback_event, delete_callback_event): New functions.
10036 (process_callback): New function.
10037 (start_event_loop): Call it.
10038 * remote-utils.c (NOT_SCHEDULED): Define.
10039 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10040 moved out of readchar.
10041 (readchar): Rewrite. Call reschedule before returning.
10042 (reset_readchar): New function.
10043 (remote_close): Call it.
10044 (process_remaining, reschedule): New functions.
10045 * server.h (callback_handler_func): New typedef.
10046 (append_callback_event, delete_callback_event): Declare.
10048 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10050 * proc-service.c (ps_pglobal_lookup): Use
10051 thread_db_look_up_one_symbol.
10052 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10053 parameter. Use it instead of all_symbols_looked_up.
10054 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10056 (all_symbols_looked_up): Don't declare.
10057 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10058 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10060 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10061 Set all_symbols_looked_up here.
10062 (thread_db_look_up_one_symbol): New.
10063 (thread_db_get_tls_address): Adjust.
10064 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10065 thread_db object on the heap, and tentatively set it in the
10067 (thread_db_init): Don't set all_symbols_looked_up here.
10068 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10070 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10072 * linux-low.c (linux_kill, linux_detach): Adjust.
10073 (status_pending_p_callback): Remove redundant statement. Check
10074 for !TARGET_WAITIKIND_IGNORE, instead of
10075 TARGET_WAITKIND_STOPPED.
10076 (handle_tracepoints): Make sure LWP is locked. Adjust.
10077 (linux_wait_for_event_1): Adjust.
10078 (linux_cancel_breakpoints): New.
10079 (unsuspend_one_lwp): New.
10080 (unsuspend_all_lwps): New.
10081 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10082 (send_sigstop_callback): Change return type to int, add new
10083 `except' parameter and handle it.
10084 (suspend_and_send_sigstop_callback): New.
10085 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10086 pass them down. If SUSPEND, also increment the lwp's suspend
10088 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10089 (need_step_over_p): Don't consider suspended LWPs.
10090 (start_step_over): Adjust.
10091 (proceed_one_lwp): Change return type to int, add new `except'
10092 parameter and handle it.
10093 (unsuspend_and_proceed_one_lwp): New.
10094 (proceed_all_lwps): Use find_inferior instead of
10096 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10097 also decrement the suspend count of LWPs. Pass `except' down,
10098 instead of hacking its suspend count.
10099 (linux_pause_all): Add `freeze' parameter. Adjust.
10100 (linux_unpause_all): New.
10101 (linux_target_ops): Install linux_unpause_all.
10102 * server.c (handle_status): Adjust.
10103 * target.h (struct target_ops): New fields `unpause_all' and
10104 `cancel_breakpoints'. Add new parameter to `pause_all'.
10105 (pause_all): Add new `freeze' parameter.
10106 (unpause_all): New.
10107 (cancel_breakpoints): New.
10108 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10109 cancel breakpoints.
10110 (cmd_qtstart): Pause threads.
10111 (stop_tracing): Pause threads, and cancel breakpoints.
10112 * win32-low.c (win32_target_ops): Adjust.
10114 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10116 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10117 the inferior right away from here...
10118 (linux_wait_1): ... to here, and adjust to check the thread's
10119 last_resume_kind instead of the lwp's step or stop_expected flags.
10121 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10123 * README: Use consistent `GDB' and `GDBserver' spellings.
10125 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10127 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10128 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10129 (linux_detach_one_lwp): Assume the lwp is stopped.
10130 (any_thread_of): Delete.
10131 (linux_detach): Stop all lwps here. Don't blindly delete all
10133 (delete_lwp_callback): New.
10134 (linux_mourn): Delete all lwps of the process that is gone.
10135 (linux_wait_1): Don't delete the last lwp of the process here.
10136 * mem-break.h (mark_breakpoints_out): Declare.
10137 * mem-break.c (mark_breakpoints_out): New.
10138 (free_all_breakpoints): Use it.
10139 * server.c (handle_target_event): If the process is gone, mark
10141 * thread-db.c (struct thread_db) <create_bp>: New field.
10142 (thread_db_enable_reporting): Fix prototype. Store a thread event
10143 breakpoint reference in the thread_db struct.
10144 (thread_db_load_search): Clear the thread_db object.
10145 (try_thread_db_load_1): Ditto.
10146 (switch_to_process): New.
10147 (disable_thread_event_reporting): Use it.
10148 (remove_thread_event_breakpoints): New.
10149 (thread_db_detach, thread_db_mourn): Use it.
10151 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10153 * linux-low.c (linux_enable_event_reporting): New.
10154 (linux_wait_for_event_1, handle_extended_wait): Use it.
10156 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10158 * linux-low.c (linux_kill_one_lwp, linux_kill)
10159 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10160 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10161 SIGSTOP even if the LWP is stopped.
10162 (send_sigstop_callback): New.
10163 (stop_all_lwps): Use send_sigstop_callback instead.
10164 (linux_resume_one_thread): Adjust.
10165 (proceed_one_lwp): Still proceed an LWP that the client has
10166 requested to stop, if we haven't reported it as stopped yet. Make
10167 sure that LWPs the client want stopped, have a pending SIGSTOP.
10169 2010-04-26 Doug Evans <dje@google.com>
10171 * server.c (handle_general_set): Make static.
10173 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10174 Print received char after testing for error/eof instead of before.
10175 (input_interrupt): Tweak comment.
10177 2010-04-23 Doug Evans <dje@google.com>
10179 * server.c (start_inferior): Print inferior argv if --debug.
10181 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10183 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10184 * nto-x86-low.c: Include server.h
10186 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10188 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10189 be consistent with other sources of this directory.
10190 (init_registers_amd64): Correct name of source file of this function
10193 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10195 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10196 64-bit executables.
10198 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10200 * win32-i386-low.c: Add 64-bit support.
10201 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10202 (init_registers_amd64): Declare.
10203 (mappings): Add 64-bit version of array.
10204 (init_windows_x86): New function.
10205 (the_low_target): Change init_arch field to init_windows_x86.
10207 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10209 * win32-low.c: Adapt to support also 64-bit architecture.
10210 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10211 (get_image_name): Use SIZE_T type for local variable `done'.
10212 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10213 (toolhelp_get_dll_name): Idem.
10214 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10215 Use uintptr_t typecast to avoid warning.
10216 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10217 (handle_exception): Use phex_nz to avoid warning.
10218 (win32_wait): Remove unused local variable `process'.
10220 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10222 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10225 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10227 * configure.ac: Use `ws2_32' library for srv_mingw.
10228 * configure: Regenerate.
10229 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10230 * remote-utils.c: Likewise.
10232 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10234 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10235 if __x86_64__ is defined.
10237 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10239 * configure: Regenerate.
10241 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10243 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10244 * target.h (target_ops): New get_tib_address field.
10245 * win32-low.h (win32_thread_info): Add thread_local_base field.
10246 * win32-low.c (child_add_thread): Add tlb argument.
10247 Set thread_local_base field to TLB.
10248 (get_child_debug_event): Adapt to child_add_thread change.
10249 (win32_get_tib_address): New function.
10250 (win32_target_ops): Set get_tib_address field to
10251 win32_get_tib_address.
10252 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10254 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10256 * linux-low.c (linux_mourn): Also remove the process.
10257 * server.c (handle_target_event): Don't remove the process here.
10258 * nto-low.c (nto_mourn): New.
10259 (nto_target_ops): Install it.
10260 * spu-low.c (spu_mourn): New.
10261 (spu_target_ops): Install it.
10262 * win32-low.c (win32_mourn): New.
10263 (win32_target_ops): Install it.
10265 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10267 * server.h (buffer_xml_printf): Remove redundant `;'.
10269 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10271 * regcache.c (set_register_cache): Invalidate regcaches before
10272 changing the register cache layout.
10273 (regcache_invalidate_one): Allow a NULL regcache.
10274 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10275 regcaches before changing the register cache layout or the target
10278 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10280 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10281 variable warning on Linux/x86-64.
10283 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10285 GDBserver disconnected tracing support.
10287 * linux-low.c (linux_remove_process): Delete.
10288 (add_lwp): Don't set last_resume_kind here.
10289 (linux_kill): Use `mourn'.
10290 (linux_detach): Use `thread_db_detach', and `mourn'.
10291 (linux_mourn): New.
10292 (linux_attach_lwp_1): Adjust comment.
10293 (linux_attach): last_resume_kind moved the thread_info; adjust.
10294 (status_pending_p_callback): Adjust.
10295 (linux_wait_for_event_1): Adjust.
10296 (count_events_callback, select_singlestep_lwp_callback)
10297 (select_event_lwp_callback, cancel_breakpoints_callback)
10298 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10299 (proceed_one_lwp): Adjust.
10300 (linux_async): Add debug output.
10301 (linux_thread_stopped): New.
10302 (linux_pause_all): New.
10303 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10305 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10306 (thread_db_free): Delete declaration.
10307 (thread_db_detach, thread_db_mourn): Declare.
10308 * thread-db.c (thread_db_init): Use thread_db_mourn.
10309 (thread_db_free): Delete, split in two.
10310 (disable_thread_event_reporting): New.
10311 (thread_db_detach): New.
10312 (thread_db_mourn): New.
10314 * server.h (struct thread_info) <last_resume_kind>: New field.
10315 <attached>: Add comment.
10316 <gdb_detached>: New field.
10317 (handler_func): Change return type to int.
10318 (handle_serial_event, handle_target_event): Ditto.
10319 (gdb_connected): Declare.
10321 (disconnected_tracing): Declare.
10322 (stop_tracing): Declare.
10324 * server.c (handle_query) <qSupported>: Report support for
10325 disconnected tracing.
10326 (queue_stop_reply_callback): Account for running threads.
10327 (gdb_wants_thread_stopped): New.
10328 (gdb_wants_all_threads_stopped): New.
10329 (gdb_reattached_process): New.
10330 (handle_status): Clear the `gdb_detached' flag of all processes.
10331 In all-stop, stop all threads.
10332 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10333 (process_serial_event): If the remote connection breaks, or if an
10334 exit was forced with "monitor exit", force an event loop exit.
10335 Handle disconnected tracing on detach.
10336 (handle_serial_event): Adjust.
10337 (handle_target_event): If GDB isn't connected, forward events back
10338 to the inferior, unless the last process exited, in which case,
10339 exit gdbserver. Adjust interface.
10341 * remote-utils.c (remote_open): Don't block in accept. Instead
10342 register an event loop source on the listen socket file
10343 descriptor. Refactor bits into ...
10344 (listen_desc): ... this new global.
10345 (gdb_connected): ... this new function.
10346 (enable_async_notification): ... this new function.
10347 (handle_accept_event): ... this new function.
10348 (remote_close): Clear remote_desc.
10350 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10352 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10354 (mourn_inferior): Define.
10355 (target_process_qsupported): Avoid the dangling else problem.
10356 (thread_stopped): Define.
10357 (pause_all): Define.
10358 (target_waitstatus_to_string): Declare.
10359 * target.c (target_waitstatus_to_string): New.
10361 * tracepoint.c (tracing): Make extern.
10362 (disconnected_tracing): New.
10363 (stop_tracing): Make extern. Handle tracing stops due to GDB
10365 (cmd_qtdisconnected): New.
10366 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10367 (handle_tracepoint_general_set): Handle QTDisconnected.
10369 * event-loop.c (event_handler_func): Change return type to int.
10370 (process_event): Bail out if the event handler wants the event
10372 (handle_file_event): Ditto.
10373 (start_event_loop): Bail out if the event handler wants the event
10376 * nto-low.c (nto_target_ops): Adjust.
10377 * spu-low.c (spu_wait): Don't remove the process here.
10378 (spu_target_ops): Adjust.
10379 * win32-low.c (win32_wait): Don't remove the process here.
10380 (win32_target_ops): Adjust.
10382 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10384 * regcache.c (realloc_register_cache): Invalidate inferior's
10385 regcache before recreating it.
10387 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10389 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10391 2010-04-09 Stan Shebs <stan@codesourcery.com>
10392 Pedro Alves <pedro@codesourcery.com>
10394 * server.h (LONGEST): New.
10395 (struct thread_info) <while_stepping>: New field.
10396 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10398 (initialize_tracepoint, handle_tracepoint_general_set)
10399 (handle_tracepoint_query, tracepoint_finished_step)
10400 (tracepoint_was_hit, release_while_stepping_state_list):
10401 (current_traceframe): Declare.
10402 * server.c (handle_general_set): Handle tracepoint packets.
10403 (read_memory): New.
10404 (write_memory): New.
10405 (handle_search_memory_1): Use read_memory.
10406 (handle_query): Report support for conditional tracepoints, trace
10407 state variables, and tracepoint sources. Handle tracepoint
10409 (main): Initialize the tracepoints module.
10410 (process_serial_event): Handle traceframe reads/writes.
10412 * linux-low.c (handle_tracepoints): New.
10413 (linux_wait_1): Call it.
10414 (linux_resume_one_lwp): Handle while-stepping.
10415 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10416 (linux_target_ops): Install them.
10417 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10419 * linux-x86-low.c (x86_supports_tracepoints): New.
10420 (the_low_target). Install it.
10422 * mem-break.h (delete_breakpoint): Declare.
10423 * mem-break.c (delete_breakpoint): Make external.
10425 * target.h (struct target_ops): Add `supports_tracepoints',
10426 `read_pc', and `write_pc' fields.
10427 (target_supports_tracepoints): Define.
10428 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10431 * regcache.h (struct regcache) <registers_owned>: New field.
10432 (init_register_cache, regcache_cpy): Declare.
10433 (regcache_read_pc, regcache_write_pc): Declare.
10434 (register_cache_size): Declare.
10435 (supply_regblock): Declare.
10436 * regcache.c (init_register_cache): New.
10437 (new_register_cache): Use it.
10438 (regcache_cpy): New.
10439 (register_cache_size): New.
10440 (supply_regblock): New.
10441 (regcache_read_pc, regcache_write_pc): New.
10443 * tracepoint.c: New.
10445 * Makefile.in (OBS): Add tracepoint.o.
10446 (tracepoint.o): New rule.
10448 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10450 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10452 (i386-mmx.c): Likewise.
10453 (i386-mmx-linux.o): Likewise.
10454 (i386-mmx-linux.c): Likewise.
10456 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10457 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10458 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10459 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10461 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10462 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10463 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10465 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10467 * Makefile.in (clean): Updated.
10469 (i386-avx.c): Likewise.
10470 (i386-avx-linux.o): Likewise.
10471 (i386-avx-linux.c): Likewise.
10472 (amd64-avx.o): Likewise.
10473 (amd64-avx.c): Likewise.
10474 (amd64-avx-linux.o): Likewise.
10475 (amd64-avx-linux.c): Likewise.
10477 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10478 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10479 (srv_amd64_regobj): Add amd64-avx.o.
10480 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10481 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10482 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10483 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10484 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10485 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10486 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10488 * i387-fp.c: Include "i386-xstate.h".
10490 (i387_cache_to_xsave): Likewise.
10491 (i387_xsave_to_cache): Likewise.
10492 (x86_xcr0): Likewise.
10494 * i387-fp.h (i387_cache_to_xsave): Likewise.
10495 (i387_xsave_to_cache): Likewise.
10496 (x86_xcr0): Likewise.
10498 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10499 * linux-crisv32-low.c (target_regsets): Likewise.
10500 * linux-m68k-low.c (target_regsets): Likewise.
10501 * linux-mips-low.c (target_regsets): Likewise.
10502 * linux-ppc-low.c (target_regsets): Likewise.
10503 * linux-s390-low.c (target_regsets): Likewise.
10504 * linux-sh-low.c (target_regsets): Likewise.
10505 * linux-sparc-low.c (target_regsets): Likewise.
10506 * linux-xtensa-low.c (target_regsets): Likewise.
10508 * linux-low.c: Include <sys/uio.h>.
10509 (regsets_fetch_inferior_registers): Support nt_type.
10510 (regsets_store_inferior_registers): Likewise.
10511 (linux_process_qsupported): New.
10512 (linux_target_ops): Add linux_process_qsupported.
10514 * linux-low.h (regset_info): Add nt_type.
10515 (linux_target_ops): Add process_qsupported.
10517 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10519 (init_registers_i386_avx_linux): New.
10520 (init_registers_amd64_avx_linux): Likewise.
10521 (xmltarget_i386_linux_no_xml): Likewise.
10522 (xmltarget_amd64_linux_no_xml): Likewise.
10523 (PTRACE_GETREGSET): Likewise.
10524 (PTRACE_SETREGSET): Likewise.
10525 (x86_fill_xstateregset): Likewise.
10526 (x86_store_xstateregset): Likewise.
10527 (use_xml): Likewise.
10528 (x86_linux_update_xmltarget): Likewise.
10529 (x86_linux_process_qsupported): Likewise.
10530 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10531 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10532 init_registers_i386_linux here. Call
10533 x86_linux_update_xmltarget.
10534 (the_low_target): Add x86_linux_process_qsupported.
10536 * server.c (handle_query): Call target_process_qsupported.
10538 * target.h (target_ops): Add process_qsupported.
10539 (target_process_qsupported): New.
10541 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10543 * inferiors.c (add_thread): Set last_status kind to
10544 TARGET_WAITKIND_IGNORE.
10545 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10546 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10547 (linux_wait_1): Move `thread' local definition to block that uses
10548 it. Don't NULL initialize `event_child'.
10549 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10550 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10551 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10553 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10555 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10556 an extended waitstatus, or by a watchpoint.
10557 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10558 thread was stepping or has been stopped by a watchpoint.
10560 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10562 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10563 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10564 of another, then delete the previous, and validate all
10566 (validate_inserted_breakpoint): New.
10567 (delete_disabled_breakpoints): New.
10568 (validate_breakpoints): New.
10569 (check_mem_read): Validate breakpoints before trusting their
10570 shadow. Delete disabled breakpoints.
10571 (check_mem_write): Validate breakpoints before trusting they
10572 should be inserted. Delete disabled breakpoints.
10573 * mem-break.h (validate_breakpoints):
10574 * server.c (handle_query): Validate breakpoints when we see a
10577 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10579 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10580 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10581 if we could tell there's a GDB breakpoint at stop_pc.
10582 (need_step_over_p): Don't do a step over if we find a GDB
10583 breakpoint at the resume PC.
10585 * mem-break.c (struct raw_breakpoint): New.
10586 (enum bkpt_type): New type `gdb_breakpoint'.
10587 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10588 fields. New field `raw'.
10589 (find_raw_breakpoint_at): New.
10590 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10591 breakpoint instead.
10592 (set_breakpoint_at): Adjust.
10593 (delete_raw_breakpoint): New.
10594 (release_breakpoint): New.
10595 (delete_breakpoint): Rename to...
10596 (delete_breakpoint_1): ... this. Add proc parameter. Use
10597 release_breakpoint. Return ENOENT.
10598 (delete_breakpoint): Reimplement.
10599 (find_breakpoint_at): Delete.
10600 (find_gdb_breakpoint_at): New.
10601 (delete_breakpoint_at): Delete.
10602 (set_gdb_breakpoint_at): New.
10603 (delete_gdb_breakpoint_at): New.
10604 (gdb_breakpoint_here): New.
10605 (set_reinsert_breakpoint): Use release_breakpoint.
10606 (uninsert_breakpoint): Rename to ...
10607 (uninsert_raw_breakpoint): ... this.
10608 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10609 (reinsert_raw_breakpoint): Change parameter type to
10611 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10613 (check_breakpoints): Adjust. Use release_breakpoint.
10614 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10615 (breakpoint_inserted_here): Ditto.
10616 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10617 Don't trust the breakpoint's shadow if it is not inserted.
10618 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10619 (delete_all_breakpoints): Adjust.
10620 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10621 use delete_breakpoint_1.
10623 * mem-break.h (breakpoints_supported): Delete declaration.
10624 (set_gdb_breakpoint_at): Declare.
10625 (gdb_breakpoint_here): Declare.
10626 (delete_breakpoint_at): Delete.
10627 (delete_gdb_breakpoint_at): Declare.
10629 * server.h (struct raw_breakpoint): Forward declare.
10630 (struct process_info): New field `raw_breakpoints'.
10632 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10635 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10637 * linux-low.c (status_pending_p_callback): Fix comment.
10638 (linux_wait_for_event_1): Move most of the internal breakpoint
10639 handling from here...
10640 (linux_wait_1): ... to here.
10641 (count_events_callback): New.
10642 (select_singlestep_lwp_callback): New.
10643 (select_event_lwp_callback): New.
10644 (cancel_breakpoints_callback): New.
10645 (select_event_lwp): New.
10646 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10647 priority to all LWPs that have had events that should be reported
10648 to the client. Cancel breakpoints when about to reporting the
10649 event to the client, not while stopping lwps. No longer cancel
10650 finished single-steps here.
10651 (cancel_finished_single_step): Delete.
10652 (cancel_finished_single_steps): Delete.
10654 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10656 * mem-break.c (enum bkpt_type): New.
10657 (struct breakpoint): New field `type'.
10658 (set_breakpoint_at): Change return type to struct breakpoint
10659 pointer. Set type to `other_breakpoint' by default.
10660 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10661 in the breakpoint list.
10662 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10663 (reinsert_breakpoint): Rename to ...
10664 (reinsert_raw_breakpoint): ... this.
10665 (reinsert_breakpoints_at): Adjust.
10666 * mem-break.h (struct breakpoint): Declare.
10667 (set_breakpoint_at): Change return type to struct breakpoint
10670 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10672 * server.c (handle_query): Assign, not compare.
10674 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10676 Teach linux gdbserver to step-over-breakpoints.
10678 * linux-low.c (can_hardware_single_step): New.
10679 (supports_breakpoints): New.
10680 (handle_extended_wait): If stopping threads, read the stop pc of
10681 the new cloned LWP.
10683 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10684 low target doesn't support retrieving the PC.
10685 (add_lwp): Set last_resume_kind to resume_continue.
10686 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10687 (linux_attach): Don't clear stop_expected. Set the lwp's
10688 last_resume_kind to resume_stop.
10689 (linux_detach_one_lwp): Don't check for removed breakpoints.
10690 (check_removed_breakpoint): Delete.
10691 (status_pending_p): Rename to ...
10692 (status_pending_p_callback): ... this. Don't check for removed
10693 breakpoints. Don't consider threads that are stopped from GDB's
10695 (linux_wait_for_lwp): Always read the stop_pc here.
10696 (cancel_breakpoint): New.
10697 (step_over_bkpt): New global.
10698 (linux_wait_for_event_1): Implement stepping over breakpoints.
10699 (gdb_wants_lwp_stopped): New.
10700 (gdb_wants_all_stopped): New.
10701 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10702 single-step traps here. Store the thread's last reported target
10704 (send_sigstop): Don't clear stop_expected. Always set it,
10706 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10707 (cancel_finished_single_step): New.
10708 (cancel_finished_single_steps): New.
10709 (wait_for_sigstop): Don't cancel finished single-step traps here.
10710 (linux_resume_one_lwp): Don't check for removed breakpoints.
10711 Don't set `step' on non-hardware step archs.
10712 (linux_set_resume_request): Ignore resume_stop requests if already
10713 stopping or stopped. Set the lwp's last_resume_kind.
10714 (resume_status_pending_p): Don't check for removed breakpoints.
10715 (need_step_over_p): New.
10716 (start_step_over): New.
10717 (finish_step_over): New.
10718 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10719 requests. Clear the thread's last reported target waitstatus.
10720 Don't use the `suspended' flag. Don't consider pending breakpoints.
10721 (linux_resume): Start a step-over if necessary.
10722 (proceed_one_lwp): New.
10723 (proceed_all_lwps): New.
10724 (unstop_all_lwps): New.
10725 * linux-low.h (struct lwp_info): Rewrite comment for the
10726 `suspended' flag. Add the `stop_pc' field. Delete the
10727 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10728 Add `'last_resume_kind' and `need_step_over' fields.
10729 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10730 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10731 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10732 (set_raw_breakpoint_at): New.
10733 (set_breakpoint_at): Rewrite to use it.
10734 (reinsert_breakpoint_handler): Delete.
10735 (set_reinsert_breakpoint): New.
10736 (reinsert_breakpoint_by_bp): Delete.
10737 (delete_reinsert_breakpoints): New.
10738 (uninsert_breakpoint): Rewrite.
10739 (uninsert_breakpoints_at): New.
10740 (reinsert_breakpoint): Rewrite.
10741 (reinsert_breakpoints_at): New.
10742 (check_breakpoints): Rewrite.
10743 (breakpoint_here): New.
10744 (breakpoint_inserted_here): New.
10745 (check_mem_read): Adjust.
10746 * mem-break.h (breakpoints_supported, breakpoint_here)
10747 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10748 (reinsert_breakpoint_by_bp): Delete declaration.
10749 (delete_reinsert_breakpoints): Declare.
10750 (reinsert_breakpoint): Delete declaration.
10751 (reinsert_breakpoints_at): Declare.
10752 (uninsert_breakpoint): Delete declaration.
10753 (uninsert_breakpoints_at): Declare.
10754 (check_breakpoints): Adjust prototype.
10755 * server.h: Adjust include order.
10756 (struct thread_info): Declare here. Add a `last_status' field.
10758 2010-03-23 Michael Snyder <msnyder@vmware.com>
10760 * server.c (crc32): New function.
10761 (handle_query): Add handling for 'qCRC:' request.
10763 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10765 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10766 lwp had been stopped by a watchpoint.
10768 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10770 * server.h (internal_error): Declare.
10771 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10772 * utils.c (internal_error): New function.
10774 2010-03-15 Andreas Schwab <schwab@redhat.com>
10776 * configure.srv: Fix typo setting srv_regobj.
10778 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10780 * linux-low.c (fetch_register): Avoid passing a non string literal
10782 (usr_store_inferior_registers): Ditto.
10784 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10786 * linux-low.c (linux_write_memory): Bail out early if peeking
10789 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10791 * linux-low.h (struct lwp_info): New fields
10792 `stopped_by_watchpoint' and `stopped_data_address'.
10793 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10794 here, and cache them in the lwp object.
10795 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10797 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10799 (linux_stopped_by_watchpoint): Rewrite.
10800 (linux_stopped_data_address): Rewrite.
10802 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10804 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10805 switching the current inferior, not before.
10807 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10809 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10810 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10811 i386-linux.c and amd64-linux.c.
10812 (reg-i386.o): Removed.
10813 (reg-i386.c): Likewise.
10814 (reg-i386-linux.o): Likewise.
10815 (reg-i386-linux.c): Likewise.
10816 (reg-x86-64.o): Likewise.
10817 (reg-x86-64.c): Likewise.
10818 (reg-x86-64-linux.o): Likewise.
10819 (reg-x86-64-linux.c): Likewise.
10821 (i386.c): Likewise.
10822 (i386-linux.o): Likewise.
10823 (i386-linux.c): Likewise.
10824 (amd64.o): Likewise.
10825 (amd64.c): Likewise.
10826 (amd64-linux.o): Likewise.
10827 (amd64-linux.c): Likewise.
10829 * configure.srv (srv_i386_regobj): New.
10830 (srv_i386_linux_regobj): Likewise.
10831 (srv_amd64_regobj): Likewise.
10832 (srv_amd64_linux_regobj): Likewise.
10833 (srv_i386_32bit_xmlfiles): Likewise.
10834 (srv_i386_64bit_xmlfiles): Likewise.
10835 (srv_i386_xmlfiles): Likewise.
10836 (srv_amd64_xmlfiles): Likewise.
10837 (srv_i386_linux_xmlfiles): Likewise.
10838 (srv_amd64_linux_xmlfiles): Likewise.
10839 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10840 srv_xmlfiles to $srv_i386_xmlfiles.
10841 (i[34567]86-*-mingw32ce*): Likewise.
10842 (i[34567]86-*-mingw*): Likewise.
10843 (i[34567]86-*-nto*): Likewise.
10844 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10845 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10846 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10847 (x86_64-*-linux*): Likewise.
10849 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10850 (init_registers_amd64_linux): New.
10851 (x86_arch_setup): Replace init_registers_x86_64_linux with
10852 init_registers_amd64_linux.
10854 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10856 * configure.ac: Check for libdl. If it is not available link against
10857 static libthread_db.
10858 * configure: Regenerate.
10860 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10864 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10865 handing a read watchpoint.
10866 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10868 2010-02-12 Doug Evans <dje@google.com>
10870 * linux-low.c (linux_supports_tracefork_flag): Document.
10871 (linux_look_up_symbols): Add comment.
10873 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10875 * regcache.c (supply_register): Clear regcache if buf is NULL.
10877 2010-02-02 Nicolas Roche <roche@sourceware.org>
10878 Joel Brobecker <brobecker@adacore.com>
10880 * inferiors.c (find_inferior): Add function documentation.
10881 (unloaded_dll): Handle the case where the unloaded dll has not
10882 been previously registered in the dll list.
10884 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10886 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10887 (thumb2_breakpoint): New.
10888 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10890 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10892 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10893 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10896 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10898 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10900 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10902 * linux-s390-low.c (s390_collect_ptrace_register)
10903 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10905 2010-01-21 Doug Evans <dje@google.com>
10907 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10908 (PTRACE_ARG4_TYPE): New macro.
10909 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10910 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10911 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10912 (usr_store_inferior_registers): Ditto.
10913 (linux_read_memory, linux_write_memory): Ditto.
10914 (linux_test_for_tracefork): Ditto.
10916 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10917 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10919 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10921 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10924 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10926 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10927 prototype to take a regcache. Adjust.
10929 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10931 * regcache.h (struct thread_info): Forward declare.
10932 (struct regcache): New.
10933 (new_register_cache): Adjust prototype.
10934 (get_thread_regcache): Declare.
10935 (free_register_cache): Adjust prototype.
10936 (registers_to_string, registers_from_string): Ditto.
10937 (supply_register, supply_register_by_name, collect_register)
10938 (collect_register_as_string, collect_register_by_name): Ditto.
10939 * regcache.c (struct inferior_regcache_data): Delete.
10940 (get_regcache): Rename to ...
10941 (get_thread_regcache): ... this. Adjust. Switch inferior before
10942 fetching registers.
10943 (regcache_invalidate_one): Adjust.
10944 (regcache_invalidate): Fix prototype.
10945 (new_register_cache): Return the new register cache.
10946 (free_register_cache): Change prototype.
10947 (realloc_register_cache): Adjust.
10948 (registers_to_string): Change prototype to take a regcache. Adjust.
10949 (registers_from_string): Ditto.
10950 (register_data): Ditto.
10951 (supply_register): Ditto.
10952 (supply_register_by_name): Ditto.
10953 (collect_register): Ditto.
10954 (collect_register_as_string): Ditto.
10955 (collect_register_by_name): Ditto.
10956 * server.c (process_serial_event): Adjust.
10957 * linux-low.h (regset_fill_func, regset_store_func): Change
10959 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10961 * linux-low.c (get_stop_pc): Adjust.
10962 (check_removed_breakpoint): Adjust.
10963 (linux_wait_for_event): Adjust.
10964 (linux_resume_one_lwp): Adjust.
10965 (fetch_register): Add regcache parameter. Adjust.
10966 (usr_store_inferior_registers): Ditto.
10967 (regsets_fetch_inferior_registers): Ditto.
10968 (regsets_store_inferior_registers): Ditto.
10969 (linux_fetch_registers, linux_store_registers): Ditto.
10970 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10972 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10974 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10975 prototype to take a regcache.
10976 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10977 * remote-utils.c (convert_ascii_to_int, outreg)
10978 (prepare_resume_reply): Change prototype to take a regcache.
10980 * target.h (struct target_ops) <fetch_registers, store_registers>:
10981 Change prototype to take a regcache.
10982 (fetch_inferior_registers, store_inferior_registers): Change
10983 prototype to take a regcache. Adjust.
10984 * proc-service.c (ps_lgetregs): Adjust.
10985 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10986 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10987 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10988 take a regcache. Adjust.
10989 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10990 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10991 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10992 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10993 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10994 (cris_cannot_fetch_register):
10995 (cris_breakpoint_at): Change prototype to take a regcache.
10997 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10998 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10999 to take a regcache. Adjust.
11000 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11002 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11003 take a regcache. Adjust.
11004 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11005 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11006 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11007 * linux-mips-low.c (mips_get_pc):
11008 (mips_set_pc): Change prototype to take a regcache. Adjust.
11009 (mips_reinsert_addr): Adjust.
11010 (mips_collect_register): Change prototype to take a regcache.
11012 (mips_supply_register):
11013 (mips_collect_register_32bit, mips_supply_register_32bit)
11014 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11015 (mips_store_fpregset): Ditto.
11016 * linux-ppc-low.c (ppc_supply_ptrace_register)
11017 (ppc_supply_ptrace_register): Ditto.
11018 (parse_spufs_run): Adjust.
11019 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11020 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11021 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11022 take a regcache. Adjust.
11023 * linux-s390-low.c (s390_collect_ptrace_register)
11024 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11025 (s390_set_pc): Change prototype to take a regcache. Adjust.
11026 (s390_arch_setup): Adjust.
11027 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11028 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11029 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11030 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11031 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11033 (sparc_breakpoint_at): Adjust.
11034 * linux-xtensa-low.c (xtensa_fill_gregset):
11035 (xtensa_store_gregset):
11036 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11037 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11038 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11039 prototype to take a regcache. Adjust.
11040 * win32-arm-low.c (arm_fetch_inferior_register)
11041 (arm_store_inferior_register): Change prototype to take a
11043 * win32-i386-low.c (i386_fetch_inferior_register)
11044 (i386_store_inferior_register): Change prototype to take a
11046 * win32-low.c (child_fetch_inferior_registers)
11047 (child_store_inferior_registers): Change prototype to take a
11049 (win32_wait): Adjust.
11050 (win32_fetch_inferior_registers): Change prototype to take a
11052 (win32_store_inferior_registers): Adjust.
11053 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11054 store_inferior_register>: Change prototype to take a regcache.
11056 2010-01-20 Doug Evans <dje@google.com>
11058 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11060 (linux_wait_for_event1, linux_init_signals): Ditto.
11061 (W_STOPCODE): Provide definition if missing.
11063 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11065 * linux-low.c (linux_core_of_thread): New.
11066 (compare_ints, show_process, list_threads): New.
11067 (linux_qxfer_osdata): Report threads and cores.
11068 (linux_target_op): Register linux_core_of_thread.
11069 * remote-utils.c (prepare_resume_reply): Report the core.
11070 (buffer_xml_printf): Support %d specifier.
11071 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11073 (handle_query): Handle qXfer:threads. Announce availability
11075 * target.h (struct target_ops): New field core_of_thread.
11077 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11079 * Makefile.in (clean): Remove new generated files.
11080 (reg-s390.o, reg-s390.c): Remove rules.
11081 (reg-s390x.o, reg-s390x.c): Likewise.
11082 (s390-linux32.o, s390-linux32.c): Add rules.
11083 (s390-linux64.o, s390-linux64.c): Likewise.
11084 (s390x-linux64.o, s390x-linux64.c): Likewise.
11085 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11086 * linux-s390-low.c: Include <elf.h>.
11087 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11088 (init_registers_s390): Remove prototype.
11089 (init_registers_s390x): Likewise.
11090 (init_registers_s390_linux32): Add prototype.
11091 (init_registers_s390_linux64): Likewise.
11092 (init_registers_s390x_linux64): Likewise.
11093 (s390_num_regs_3264): New define.
11094 (s390_regmap_3264): New global variable.
11095 (s390_cannot_fetch_register): Remove obsolete check.
11096 (s390_cannot_store_register): Likewise.
11097 (s390_collect_ptrace_register): Handle upper/lower register halves.
11098 (s390_supply_ptrace_register): Likewise.
11099 (s390_fill_gregset): Update to register number changes.
11100 (s390_get_hwcap): New routine.
11101 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11102 Install appropriate regmap and register set.
11104 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11106 * server.c (gdbserver_version): Update copyright year to 2010.
11107 * gdbreplay.c (gdbreplay_version): Likewise.
11109 2009-12-28 Doug Evans <dje@google.com>
11111 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11112 elf/external.h. Include <elf.h> instead but only if necessary.
11114 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11116 * linux-low.c (linux_remove_process): Remove `detaching'
11117 parameter. Don't release/detach from thread_db here.
11118 (linux_kill): Release/detach from thread_db here, ...
11119 (linux_detach): ... and here, before actually detaching.
11120 (linux_wait_1): ... and here, when a process exits.
11121 * thread-db.c (any_thread_of): New.
11122 (thread_db_free): Switch the current inferior to a thread of the
11125 2009-12-21 Doug Evans <dje@google.com>
11127 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11129 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11130 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11131 warning ifndef __NR_tkill. Move setting of errno there too.
11132 Delete unnecessary resetting of errno after syscall.
11133 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11135 * configure.ac: Check for dladdr.
11136 * config.in: Regenerate.
11137 * configure: Regenerate.
11138 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11139 (try_thread_db_load): Update.
11141 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11143 2009-12-18 Doug Evans <dje@google.com>
11145 * event-loop.c: Include unistd.h if it exists.
11147 * linux-low.c (my_waitpid): Move definition away from being in
11148 between linux_tracefork_child/linux_test_for_tracefork.
11150 * gdb_proc_service.h (psaddr_t): Fix type.
11151 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11152 signature to match glibc.
11154 2009-12-16 Doug Evans <dje@google.com>
11156 * linux-low.c (linux_read_memory): Fix argument to read.
11158 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11160 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11161 events, don't leave current_inferior pointing at null.
11163 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11165 * win32-low.c (LOG): Delete.
11166 (OUTMSG): Output to stderr.
11167 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11168 on compile time LOG macro.
11169 (win32_wait): Fix debug output.
11171 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11173 * win32-low.c (win32_add_one_solib): If the dll name is
11174 "ntdll.dll", prepend the system directory to the dll path.
11176 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11178 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11180 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11181 Vladimir Prus <vladimir@codesourcery.com>
11183 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11184 * configure.ac: Check for __mcoldfire__ and set
11185 gdb_cv_m68k_is_coldfire.
11186 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11187 reg-cf.o and reg-m68k.o.
11188 * configure: Regenerated.
11190 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11192 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11193 Pass it to thread_db_free.
11194 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11195 proper `detaching' argument to linux_remove_process.
11196 * linux-low.h (thread_db_free): Add `detaching' parameter.
11197 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11199 (thread_db_free): Add `detaching' parameter. Only
11200 call td_ta_clear_event if detaching from process.
11202 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11204 * thread-db.c (thread_db_free): Fix typo.
11206 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11209 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11211 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11213 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11214 with an i686 compiler.
11215 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11217 * configure: Rebuilt.
11219 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11223 * server.c (handle_search_memory_1): Correct read_addr initialization
11224 in loop for searching subsequent chunks.
11226 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11228 * configure.ac: New --with-libthread-db option.
11229 * thread-db.c: Allow direct dependence on libthread_db.
11230 (thread_db_free): Adjust.
11231 * config.in: Regenerate.
11232 * configure: Likewise.
11234 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11237 * thread-db.c (attach_thread): New function.
11238 (maybe_attach_thread): Return success/failure.
11239 (find_new_threads_callback): Adjust.
11240 (thread_db_find_new_threads): Loop until no new threads.
11242 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11244 * proc-service.c (ps_lgetregs): Formatting.
11246 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11248 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11249 * configure.ac: Adjust.
11250 * linux-low.h (struct process_info_private): Move members to struct
11252 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11253 * linux-low.c (linux_remove_process): Adjust.
11254 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11255 * server.c (handle_query): Move code ...
11256 (handle_monitor_command): ... here. New function.
11257 * target.h (struct target_ops): New member.
11258 * thread-db.c (struct thread_db): New.
11259 (libthread_db_search_path): New variable.
11260 (thread_db_create_event, thread_db_enable_reporting)
11261 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11262 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11263 (try_thread_db_load_1, dladdr_to_soname): New functions.
11264 (try_thread_db_load, thread_db_load_search): New functions.
11265 (thread_db_init): Search for libthread_db.
11266 (thread_db_free): New function.
11267 (thread_db_handle_monitor_command): Likewise.
11268 * config.in: Regenerate.
11269 * configure: Regenerate.
11271 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11273 * spu-low.c (spu_kill): Wait for inferior to terminate.
11274 Call clear_inferiors.
11275 (spu_detach): Call clear_inferiors.
11277 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11279 * aclocal.m4: Regenerate.
11280 * config.in: Likewise.
11281 * configure: Likewise.
11283 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11285 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11286 (parse_spufs_run): New function.
11287 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11288 (ppc_breakpoint_at): Handle SPU breakpoints.
11290 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11292 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11293 (SPUFS_MAGIC): Define.
11294 (spu_enumerate_spu_ids): New function.
11295 (linux_qxfer_spu): New function.
11296 (linux_target_ops): Install linux_qxfer_spu.
11298 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11300 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11301 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11302 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11303 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11304 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11305 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11306 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11307 (init_registers_powerpc_cell32l): Add prototype.
11308 (init_registers_powerpc_cell64l): Likewise.
11309 (ppc_arch_setup): Detect Cell/B.E. architecture.
11311 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11313 * Makefile.in (datarootdir): New variable.
11315 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11317 * linux-low.c (linux_write_memory): Update debugging output.
11318 * Makefile.in (clean): Add new descriptions.
11319 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11320 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11321 * configure.srv: Add new files for arm*-*-linux*.
11322 * linux-arm-low.c: Add new declarations.
11323 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11324 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11325 (HWCAP_VFPv3D16): New.
11326 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11327 instead of __IWMMXT__.
11328 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11329 (arm_arch_setup): New.
11330 (target_regsets): Remove #ifdef. Add VFP regset.
11331 (the_low_target): Use arm_arch_setup.
11333 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11335 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11336 the main thread again.
11338 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11340 Adding Neutrino gdbserver.
11341 * configure: Regenerated.
11342 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11343 * configure.srv (i[34567]86-*-nto*): New target.
11344 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11345 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11346 (nto_comctrl) [__QNX__]: New function.
11347 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11349 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11351 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11354 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11355 Pedro Alves <pedro@codesourcery.com>
11357 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11358 don't support CONTEXT_EXTENDED_REGISTERS.
11359 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11360 (the_low_target): Install them.
11361 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11362 failing with ERROR_PIPE_NOT_CONNECTED.
11364 2009-06-30 Doug Evans <dje@google.com>
11365 Pierre Muller <muller@ics.u-strasbg.fr>
11367 Add h/w watchpoint support to x86-linux, win32-i386.
11368 * Makefile.in (SFILES): Add i386-low.c
11369 (i386_low_h): Define.
11370 (i386-low.o): Add dependencies.
11371 (linux-x86-low.o): Add i386-low.h dependency.
11372 (win32-i386-low.o): Ditto.
11373 * i386-low.c: New file.
11374 * i386-low.h: New file.
11375 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11376 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11377 * linux-low.c (linux_add_process): Initialize arch_private.
11378 (linux_remove_process): Free arch_private.
11379 (add_lwp): Initialize arch_private.
11380 (delete_lwp): Free arch_private.
11381 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11383 * linux-low.h (process_info_private): New member arch_private.
11384 (lwp_info): New member arch_private.
11385 (linux_target_ops): New members new_process, new_thread,
11387 (ptid_of): New macro.
11388 * linux-x86-low.c: Include stddef.h, i386-low.h.
11389 (arch_process_info): New struct.
11390 (arch_lwp_info): New struct.
11391 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11392 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11393 (i386_dr_low_get_status): New function.
11394 (x86_insert_point, x86_remove_point): New functions.
11395 (x86_stopped_by_watchpoint): New function.
11396 (x86_stopped_data_address): New function.
11397 (x86_linux_new_process, x86_linux_new_thread): New functions.
11398 (x86_linux_prepare_to_resume): New function.
11399 (the_low_target): Add entries for insert_point, remove_point,
11400 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11402 * server.c (debug_hw_points): New global.
11403 (monitor_show_help): Document set debug-hw-points.
11404 (handle_query): Process "set debug-hw-points".
11405 * server.h (debug_hw_points): Declare.
11406 (paddress): Declare.
11407 * utils.c (NUMCELLS, CELLSIZE): New macros.
11408 (get_sell, xsnprintf, paddress): New functions.
11409 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11410 remove_point, stopped_by_watchpoint, stopped_data_address.
11411 * win32-i386-low.c: Include i386-low.h.
11412 (debug_reg_state): Replaces dr.
11413 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11414 (i386_dr_low_get_status): New function.
11415 (i386_insert_point, i386_remove_point): New functions.
11416 (i386_stopped_by_watchpoint): New function.
11417 (i386_stopped_data_address): New function.
11418 (i386_initial_stuff): Update.
11419 (get_thread_context,set_thread_context,i386_thread_added): Update.
11420 (the_low_target): Add entries for insert_point,
11421 remove_point, stopped_by_watchpoint, stopped_data_address.
11422 * win32-low.c (win32_insert_watchpoint): New function.
11423 (win32_remove_watchpoint): New function.
11424 (win32_stopped_by_watchpoint): New function.
11425 (win32_stopped_data_address): New function.
11426 (win32_target_ops): Add entries for insert_watchpoint,
11427 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11428 * win32-low.h (win32_target_ops): New members insert_point,
11429 remove_point, stopped_by_watchpoint, stopped_data_address.
11431 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11433 * server.c (process_serial_event): Re-return unsupported, not
11434 error, if the type isn't recognized. Re-allow supporting only
11435 insert or remove packets. Also call require_running for
11436 breakpoints. Add missing break statement to default case. Tidy.
11437 * target.h (struct target_ops): Rename insert_watchpoint to
11438 insert_point, and remove_watchpoint to remove_point.
11440 * linux-low.h (struct linux_target_ops): Likewise.
11441 * linux-low.c (linux_insert_watchpoint): Rename to ...
11442 (linux_insert_point): ... this. Adjust.
11443 (linux_remove_watchpoint): Rename to ...
11444 (linux_remove_point): ... this. Adjust.
11445 (linux_target_ops): Adjust.
11446 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11447 (cris_insert_point): ... this.
11448 (cris_remove_watchpoint): Rename to ...
11449 (cris_remove_point): ... this.
11450 (the_low_target): Adjust.
11452 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11454 * server.c (handle_v_kill): Pass signal_pid to
11455 kill_inferior if multi_process is zero.
11457 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11459 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11460 * target.h (target_ops): Comment for *_watchpoint to make it clear
11461 the functions can get types '0' and '1'.
11463 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11465 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11466 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11467 * regcache.c (get_regcache): Likewise.
11468 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11469 * win32-low.c (child_fetch_inferior_registers): Remove check for
11472 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11473 Pedro Alves <pedro@codesourcery.com>
11475 * target.h (struct target_ops) <supports_multi_process>: New
11477 (target_supports_multi_process): New.
11478 * server.c (handle_query): Even if GDB reports support, only
11479 enable multi-process if the target also supports it. Report
11480 multi-process support only if the target backend supports it.
11481 * linux-low.c (linux_supports_multi_process): New function.
11482 (linux_target_ops): Install it as target_supports_multi_process
11485 2009-05-24 Doug Evans <dje@google.com>
11487 Global renaming of find_thread_pid to find_thread_ptid.
11488 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11489 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11490 All callers updated.
11492 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11493 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11496 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11497 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11498 (linux_resume_one_lwp): Ditto.
11500 2009-05-23 Doug Evans <dje@google.com>
11502 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11503 from struct inferior_list_entry * to struct lwp_info *.
11504 All callers updated.
11506 2009-05-13 Doug Evans <dje@google.com>
11508 * linux-x86-low.c: Don't include assert.h.
11509 (x86_siginfo_fixup): Use fatal, not assert.
11510 (x86_arch_setup): Fix comment.
11512 2009-05-12 Doug Evans <dje@google.com>
11514 Biarch support for i386/amd64 gdbserver.
11515 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11516 Add linux-x86-low.c.
11517 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11518 (linux-x86-low.o): Add.
11519 * linux-x86-64-low.c: Delete.
11520 * linux-i386-low.c: Delete.
11521 * linux-x86-low.c: New file.
11522 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11524 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11526 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11527 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11528 (linux_child_pid_to_exec_file): New function.
11529 (elf_64_header_p, elf_64_file_p): New functions.
11530 (siginfo_fixup): New function.
11531 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11532 give target a chance to convert layout.
11533 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11534 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11536 2009-05-07 Doug Evans <dje@google.com>
11538 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11539 (regsets_store_inferior_registers): Ditto.
11541 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11545 * linux-low.c (must_set_ptrace_flags): Delete.
11546 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11548 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11549 `lwp->must_set_ptrace_flags' instead.
11550 (linux_wait_for_event_1): Set ptrace options here.
11551 (linux_wait_1): ... not here.
11553 2009-04-30 Doug Evans <dje@google.com>
11555 * inferiors.c (started_inferior_callback): New function.
11556 (attached_inferior_callback): New function.
11557 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11558 * server.c (print_started_pid, print_attached_pid): New functions.
11559 (detach_or_kill_for_exit): New function.
11560 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11561 * server.h (have_started_inferiors_p): Declare.
11562 (have_attached_inferiors_p): Declare.
11564 * inferiors.c (remove_process): Fix memory leak, free process.
11565 * linux-low.c (linux_remove_process): New function.
11566 (linux_kill): Call it instead of remove_process.
11567 (linux_detach, linux_wait_1): Ditto.
11569 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11571 * configure.srv: Add x86 Windows CE target.
11573 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11575 * inferiors.c (get_thread_process): Make global.
11576 * server.h (get_thread_process): Add prototype.
11577 * thread-db.c (find_one_thread): Use get_thread_process
11578 instead of current_process.
11579 (thread_db_get_tls_address): Do not crash if called when
11580 thread layer is not yet initialized.
11582 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11584 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11585 * spu-low.c (current_tid): Rename to ...
11586 (current_ptid): ... this.
11587 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11588 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11589 ptid_get_lwp (current_ptid) instead of current_tid.
11590 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11591 instead of current_tid. Use find_process_pid to verify pid
11592 argument is valid. Pass proper argument to remove_process.
11593 (spu_thread_alive): Compare current_ptid instead of current_tid.
11594 (spu_resume): Likewise.
11596 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11598 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11601 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11603 Implement the multiprocess extensions, and add linux multiprocess
11606 * server.h (ULONGEST): Declare.
11607 (struct ptid, ptid_t): New.
11608 (minus_one_ptid, null_ptid): Declare.
11609 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11610 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11611 (struct inferior_list_entry): Change `id' type from unsigned from
11613 (struct sym_cache, struct breakpoint, struct
11614 process_info_private): Forward declare.
11615 (struct process_info): Declare.
11616 (current_process): Declare.
11617 (all_processes): Declare.
11618 (initialize_inferiors): Declare.
11619 (add_thread): Adjust to use ptid_t.
11620 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11621 (add_process, remove_process, find_thread_pid): Declare.
11622 (find_inferior_id): Adjust to use ptid_t.
11623 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11624 (multi_process): Declare.
11625 (push_event): Adjust to use ptid_t.
11626 (read_ptid, write_ptid): Declare.
11627 (prepare_resume_reply): Adjust to use ptid_t.
11628 (clear_symbol_cache): Declare.
11629 * inferiors.c (all_processes): New.
11630 (null_ptid, minus_one_ptid): New.
11631 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11632 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11633 (add_thread): Change unsigned long to ptid. Remove gdb_id
11635 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11636 (gdb_id_to_thread): Rename to ...
11637 (find_thread_pid): ... this. Change unsigned long to ptid.
11638 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11639 (loaded_dll, pull_pid_from_list): Adjust.
11640 (add_process, remove_process, find_process_pid)
11641 (get_thread_process, current_process, initialize_inferiors): New.
11642 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11643 (struct target_waitstatus) <related_pid>: Ditto.
11644 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11645 return type to int.
11646 (struct target_ops) <join>: Add `pid' argument.
11647 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11648 (struct target_ops) <wait>: Add `ptid' field. Change return type
11650 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11651 (mywait): Add `ptid' argument. Change return type to ptid_t.
11652 (target_pid_to_str): Declare.
11653 * target.c (set_desired_inferior): Adjust to use ptids.
11654 (mywait): Add new `ptid' argument. Adjust.
11655 (target_pid_to_str): New.
11656 * mem-break.h (free_all_breakpoints): Declare.
11657 * mem-break.c (breakpoints): Delelete.
11658 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11659 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11660 to use per-process breakpoint list.
11661 (free_all_breakpoints): New.
11662 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11663 (symbol_cache, all_symbols_looked_up): Delete.
11665 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11667 (prepare_resume_reply): Change ptid argument's type from unsigned
11668 long to ptid_t. Adjust. Implement W;process and X;process.
11669 (free_sym_cache, clear_symbol_cache): New.
11670 (look_up_one_symbol): Adjust to per-process symbol cache. *
11671 * server.c (cont_thread, general_thread, step_thread): Change type
11673 (attached): Delete.
11674 (multi_process): New.
11675 (last_ptid): Change type to ptid_t.
11676 (struct vstop_notif) <ptid>: Change type to ptid_t.
11677 (queue_stop_reply, push_event): Change `ptid' argument's type to
11679 (discard_queued_stop_replies): Add `pid' argument.
11680 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11681 changes. Don't reference the `attached' global.
11682 (attach_inferior): Adjust to mywait interface changes.
11683 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11684 features. Handle and report "multiprocess+". Handle
11686 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11688 (handle_v_kill): New.
11689 (handle_v_stopped): Adjust to use target_pid_to_str.
11690 (handle_v_requests): Allow multiple attaches and runs when
11691 multiprocess extensions are in effect. Handle "vKill".
11692 (myresume): Adjust to use ptids.
11693 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11694 (handle_status): Adjust to discard_queued_stop_replies interface
11696 (first_thread_of, kill_inferior_callback)
11697 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11698 (main): Call initialize_inferiors. Adjust to use ptids, killing
11699 and detaching from all inferiors. Handle multiprocess packet
11701 * linux-low.h: Include gdb_proc_service.h.
11702 (struct process_info_private): New.
11703 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11704 <lwpid_of>: Use ptid_get_lwp.
11705 (get_lwp_thread): Adjust.
11706 (struct lwp_info): Add `dead' member.
11707 (find_lwp_pid): Declare.
11708 * linux-low.c (thread_db_active): Delete.
11709 (new_inferior): Adjust comment.
11710 (inferior_pid): Delete.
11711 (linux_add_process): New.
11712 (handle_extended_wait): Adjust.
11713 (add_lwp): Change unsigned long to ptid.
11714 (linux_create_inferior): Add process to processes table. Adjust
11715 to use ptids. Don't set new_inferior here.
11716 (linux_attach_lwp): Rename to ...
11717 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11718 it. Adjust to use ptids.
11719 (linux_attach_lwp): New.
11720 (linux_attach): Add process to processes table. Don't set
11722 (struct counter): New.
11723 (second_thread_of_pid_p, last_thread_of_process_p): New.
11724 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11725 multiple processes.
11726 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11727 processes. Remove process from process table.
11728 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11729 to multiple processes.
11730 (any_thread_of): New.
11731 (linux_detach): Add `pid' argument, and handle it. Remove process
11732 from processes table.
11733 (linux_join): Add `pid' argument. Handle it.
11734 (linux_thread_alive): Change unsighed long argument to ptid_t.
11735 Consider dead lwps as not being alive.
11736 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11737 threads we're not interested in.
11738 (same_lwp, find_lwp_pid): New.
11739 (linux_wait_for_lwp): Change `pid' argument's type from int to
11741 (linux_wait_for_event): Rename to ...
11742 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11743 from int to ptid_t. Adjust.
11744 (linux_wait_for_event): New.
11745 (linux_wait_1): Add `ptid' argument. Change return type to
11746 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11747 that exit from the process table.
11748 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11750 (mark_lwp_dead): New.
11751 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11752 stopping all threads, mark its main lwp as dead.
11753 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11755 (fetch_register, usr_store_inferior_registers)
11756 (regsets_fetch_inferior_registers)
11757 (regsets_store_inferior_registers, linux_read_memory)
11758 (linux_write_memory): Inline `inferior_pid'.
11759 (linux_look_up_symbols): Adjust to use per-process
11760 `thread_db_active'.
11761 (linux_request_interrupt): Adjust to use ptids.
11762 (linux_read_auxv): Inline `inferior_pid'.
11763 (initialize_low): Don't reference thread_db_active.
11764 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11765 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11766 (ps_getpid): Return the pid of the current inferior.
11767 * thread-db.c (proc_handle, thread_agent): Delete.
11768 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11770 (find_one_thread): Change argument type to ptid_t. Adjust to
11772 (maybe_attach_thread): Adjust to per-process data and ptids.
11773 (thread_db_find_new_threads): Ditto.
11774 (thread_db_init): Ditto.
11775 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11776 processes table. Adjust to use ptids.
11777 (spu_kill, spu_detach): Adjust interface. Remove process from
11779 (spu_join, spu_thread_alive): Adjust interface.
11780 (spu_wait): Adjust interface. Remove process from processes
11781 table. Adjust to use ptids.
11782 * win32-low.c (current_inferior_tid): Delete.
11783 (current_inferior_ptid): New.
11784 (debug_event_ptid): New.
11785 (thread_rec): Take a ptid. Adjust.
11786 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11787 (child_delete_thread): Ditto.
11788 (do_initial_child_stuff): Add `attached' argument. Add process to
11790 (child_fetch_inferior_registers, child_store_inferior_registers):
11792 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11793 (win32_attach): Pass 1 to do_initial_child_stuff.
11794 (win32_kill): Adjust interface. Remove process from processes
11796 (win32_detach): Ditto.
11797 (win32_join): Adjust interface.
11798 (win32_thread_alive): Take a ptid.
11799 (win32_resume): Adjust to use ptids.
11800 (get_child_debug_event): Ditto.
11801 (win32_wait): Adjust interface. Remove exiting process from
11804 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11806 Non-stop mode support.
11808 * server.h (non_stop): Declare.
11809 (gdb_client_data, handler_func): Declare.
11810 (delete_file_handler, add_file_handler, start_event_loop):
11812 (handle_serial_event, handle_target_event, push_event)
11813 (putpkt_notif): Declare.
11814 * target.h (enum resume_kind): New.
11815 (struct thread_resume): Replace `step' field by `kind' field.
11816 (TARGET_WNOHANG): Define.
11817 (struct target_ops) <wait>: Add `options' argument.
11818 <supports_non_stop, async, start_non_stop>: New fields.
11819 (target_supports_non_stop, target_async): New.
11820 (start_non_stop): Declare.
11821 (mywait): Add `options' argument.
11822 * target.c (mywait): Add `options' argument. Print child exit
11823 notifications here.
11824 (start_non_stop): New.
11825 * server.c (non_stop, own_buf, mem_buf): New globals.
11826 (struct vstop_notif): New.
11827 (notif_queue): New global.
11828 (queue_stop_reply, push_event, discard_queued_stop_replies)
11829 (send_next_stop_reply): New.
11830 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11832 (attach_inferior): In non-stop mode, don't wait for the target
11834 (handle_general_set): Handle QNonStop.
11835 (handle_query): When handling qC, return the current general
11836 thread, instead of the first thread of the list.
11837 (handle_query): If the backend supports non-stop mode, include
11838 QNonStop+ in the qSupported query response.
11839 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11841 (handle_v_attach, handle_v_run): Handle non-stop mode.
11842 (handle_v_stopped): New.
11843 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11844 (myresume): Adjust to use resume_kind. Handle non-stop.
11845 (queue_stop_reply_callback): New.
11846 (handle_status): Handle non-stop mode.
11847 (main): Clear non_stop flag on reconnection. Use the event-loop.
11848 Refactor serial protocol handling from here ...
11849 (process_serial_event): ... to this new function. When GDB
11850 selects any thread, select one here. In non-stop mode, wait until
11851 GDB acks all pending events before exiting.
11852 (handle_serial_event, handle_target_event): New.
11853 * remote-utils.c (remote_open): Install remote_desc in the event
11855 (remote_close): Remove remote_desc from the event loop.
11856 (putpkt_binary): Rename to...
11857 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11858 (putpkt_binary): New as wrapper around putpkt_binary_1.
11859 (putpkt_notif): New.
11860 (prepare_resume_reply): In non-stop mode, don't change the
11862 * event-loop.c: New.
11863 * Makefile.in (OBJ): Add event-loop.o.
11864 (event-loop.o): New rule.
11866 * linux-low.h (pid_of): Moved here.
11868 (get_lwp_thread): Use lwpid_of.
11869 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11870 * linux-low.c (pid_of): Delete.
11871 (inferior_pid): Use lwpid_of.
11872 (linux_event_pipe): New.
11873 (target_is_async_p): New.
11875 (handle_extended_wait): Use lwpid_of.
11876 (add_lwp): Don't set lwpid field.
11877 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11878 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11879 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11880 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11881 first. Adjust to linux_wait_for_event interface changes. Use
11883 (linux_detach): Don't delete the main lwp here.
11884 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11885 (status_pending_p): Don't consider explicitly suspended lwps.
11886 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11887 pointer. Add OPTIONS argument. Change return type to int. Use
11888 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11889 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11890 pointer. Add status pointer argument. Return a pid instead of a
11891 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11892 changes. In non-stop mode, don't switch to a random thread.
11893 (linux_wait): Rename to...
11894 (linux_wait_1): ... this. Add target_options argument, and handle
11895 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11896 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11897 clean exit and signal exit code. Don't stop all threads in
11898 non-stop mode. In all-stop mode, only stop all threads when
11899 reporting a stop to GDB. Handle explicit thread stop requests.
11900 (async_file_flush, async_file_mark): New.
11902 (send_sigstop): Use lwpid_of.
11903 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11904 interface changes. In non-stop mode, don't switch to a random
11906 (linux_resume_one_lwp): Use lwpid_of.
11907 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11908 (linux_resume_one_thread): ... this. Handle resume_stop. In
11909 non-stop mode, don't look for pending flag in all threads.
11910 (resume_status_pending_p): Don't consider explicitly suspended
11912 (my_waitpid): Reimplement. Emulate __WALL.
11913 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11915 (sigchld_handler, linux_supports_non_stop, linux_async)
11916 (linux_start_non_stop): New.
11917 (linux_target_ops): Register linux_supports_non_stop, linux_async
11918 and linux_start_non_stop.
11919 (initialize_low): Install SIGCHLD handler.
11920 * thread-db.c (thread_db_create_event, find_one_thread)
11921 (thread_db_get_tls_address): Use lwpid_of.
11922 * win32-low.c (win32_detach): Adjust to use resume_kind.
11923 (win32_wait): Add `options' argument.
11924 * spu-low.c (spu_resume): Adjust to use resume_kind.
11925 (spu_wait): Add `options' argument.
11927 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11929 Decouple target code from remote protocol.
11931 * target.h (enum target_waitkind): New.
11932 (struct target_waitstatus): New.
11933 (struct target_ops) <wait>: Return an unsigned long. Take a
11934 target_waitstatus pointer instead of a char pointer.
11935 (mywait): Likewise.
11936 * target.c (mywait): Change prototype to return an unsigned long.
11937 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11938 * server.h (thread_from_wait, old_thread_from_wait): Delete
11940 (prepare_resume_reply): Change prototype to take a
11942 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11943 (last_status, last_ptid): New.
11944 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11945 pid instead of a signal.
11946 (attach_inferior): Remove "status" and "signal" parameters.
11948 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11950 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11951 (handle_v_requests, myresume): Remove "status" and "signal"
11952 parameters. Adjust.
11953 (handle_status): New.
11954 (main): Delete local `status'. Adjust.
11955 * remote-utils.c: Include target.h.
11956 (prepare_resume_reply): Change prototype to take a
11957 target_waitstatus. Adjust.
11959 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11961 * spu-low.c (spu_wait): Adjust.
11962 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11964 (win32_wait): Adjust.
11966 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11968 * target.h (struct thread_resume): Delete leave_stopped member.
11969 (struct target_ops): Add a `n' argument to the `resume' callback.
11970 * server.c (start_inferior): Adjust.
11971 (handle_v_cont, myresume): Adjust.
11972 * linux-low.c (check_removed_breakpoint): Adjust to resume
11973 interface change, and to removed leave_stopped field.
11974 (resume_ptr): Delete.
11975 (struct thread_resume_array): New.
11976 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11977 resume interface change.
11978 (linux_continue_one_thread, linux_queue_one_thread)
11979 (resume_status_pending_p): Check if the resume field is NULL
11980 instead of checking the leave_stopped member.
11981 (linux_resume): Adjust to the target resume interface change.
11982 * spu-low.c (spu_resume): Adjust to the target resume interface
11984 * win32-low.c (win32_detach, win32_resume): Ditto.
11986 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11988 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11990 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11992 (linux_continue_one_thread): Only preserve the stepping flag if
11993 there's a pending breakpoint.
11995 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11997 * server.c (main): After the inferior having exited, call
11998 remote_close before exiting gdbserver.
12000 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12002 Fix size of FPSCR in Power 7 processors.
12003 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12004 (PPC_FEATURE_HAS_DFP): New #define.
12005 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12008 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12010 * server.c (handle_query) Whitespace and formatting.
12012 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12014 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12015 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12016 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12017 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12018 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12019 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12020 Makefile.in, configure.ac: Fix whitespace throughout.
12021 * configure: Regenerate.
12023 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12025 * inferiors.c (find_inferior): Make it safe for the callback
12026 function to delete the currently iterated inferior.
12028 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12030 * Makefile.in (linuw_low_h): Move higher.
12031 (thread-db.o): Depend on $(linux_low_h).
12033 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12035 Rename "process" to "lwp" throughout.
12037 * linux-low.c (all_processes): Rename to...
12038 (all_lwps): ... this.
12039 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12040 (add_process): Rename to ...
12041 (add_lwp): ... this. Adjust.
12042 (linux_create_inferior): Adjust.
12043 (linux_attach_lwp): Adjust.
12044 (linux_attach): Adjust.
12045 (linux_kill_one_process): Rename to ...
12046 (linux_kill_one_lwp): ... this. Adjust.
12047 (linux_kill): Adjust.
12048 (linux_detach_one_process): Rename to ...
12049 (linux_detach_one_lwp): ... this. Adjust.
12050 (linux_detach): Adjust.
12051 (check_removed_breakpoint): Adjust.
12052 (status_pending_p): Adjust.
12053 (linux_wait_for_process): Rename to ...
12054 (linux_wait_for_lwp): ... this. Adjust.
12055 (linux_wait_for_event): Adjust.
12056 (send_sigstop): Adjust.
12057 (wait_for_sigstop): Adjust.
12058 (stop_all_processes): Rename to ...
12059 (stop_all_lwps): ... this.
12060 (linux_resume_one_process): Rename to ...
12061 (linux_resume_one_lwp): ... this. Adjust.
12062 (linux_set_resume_request, linux_continue_one_thread)
12063 (linux_queue_one_thread, resume_status_pending_p)
12064 (usr_store_inferior_registers, regsets_store_inferior_registers)
12065 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12067 * linux-low.h (get_process): Rename to ...
12068 (get_lwp): ... this. Adjust.
12069 (get_thread_process): Rename to ...
12070 (get_thread_lwp): ... this. Adjust.
12071 (get_process_thread): Rename to ...
12072 (get_lwp_thread): ... this. Adjust.
12073 (struct process_info): Rename to ...
12074 (struct lwp_info): ... this.
12075 (all_processes): Rename to ...
12076 (all_lwps): ... this.
12077 * proc-service.c (ps_lgetregs): Adjust.
12078 * thread-db.c (thread_db_create_event, find_one_thread)
12079 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12081 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12083 * server.c (handle_query): Handle "qAttached".
12085 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12087 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12088 GPLv3, update license URL.
12090 2009-03-01 Doug Evans <dje@google.com>
12092 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12093 (server_h): Add gdb_signals.h.
12094 (signals.o): Update.
12095 * server.h (target_signal_from_host,target_signal_to_host_p)
12096 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12098 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12100 * remote-utils.c (getpkt): Also generate remote-debug
12101 information if noack_mode is set.
12103 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12105 * server.c (handle_query): Report qXfer:siginfo:read and
12106 qXfer:siginfo:write as supported and handle them.
12107 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12108 * linux-low.c (linux_xfer_siginfo): New.
12109 (linux_target_ops): Set it.
12111 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12113 * server.c (gdbserver_usage): Mention --remote-debug.
12114 (main): Accept '--remote-debug' switch.
12116 2009-01-18 Doug Evans <dje@google.com>
12118 * regcache.c (new_register_cache): No need to check result of xcalloc.
12119 * server.c (handle_search_memory): Back out calls to xmalloc,
12120 result is checked and error is returned to user upon failure.
12121 (handle_query): Ditto. Add more checks for result of malloc.
12122 (handle_v_cont): Check result of malloc, report error back to
12124 (handle_v_run): Ditto. Call freeargv.
12125 * server.h (freeargv): Declare.
12126 * utils.c (freeargv): New fn.
12128 2009-01-15 Doug Evans <dje@google.com>
12130 * gdbreplay.c (perror_with_name): Make arg const char *.
12131 * server.h (target_signal_to_name): Make return type const char *.
12132 * thread-db.c (thread_db_err_str): Make return type const char *.
12133 * utils.c (perror_with_name): Make arg const char *.
12135 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12137 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12138 when handling a EXIT_PROCESS_DEBUG_EVENT.
12140 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12142 * gdbreplay.c (gdbreplay_version): Update copyright year.
12143 * server.c (gdbserver_version): Likewise.
12145 2009-01-05 Doug Evans <dje@google.com>
12147 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12148 (handle_extended_wait): Improve comment.
12150 2008-12-13 Doug Evans <dje@google.com>
12152 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12153 * server.h (ATTR_MALLOC): New macro.
12154 (xmalloc,xcalloc,xstrdup): Declare.
12155 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12156 * inferiors.c: Ditto.
12157 * linux-low.c: Ditto.
12158 * mem-break.c: Ditto.
12159 * regcache.c: Ditto.
12160 * remote-utils.c: Ditto.
12163 * win32-low.c: Ditto.
12165 2008-12-12 Doug Evans <dje@google.com>
12167 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12168 in debugging printf.
12170 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12172 2008-12-09 Doug Evans <dje@google.com>
12174 * linux-low.h (struct process_info): Delete member tid, unused.
12175 * thread-db.c (find_one_thread): Update.
12176 (maybe_attach_thread): Update.
12178 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12180 * target.h (struct target_ops): Add qxfer_osdata member.
12181 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12183 (linux_qxfer_osdata): New functions.
12184 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12186 * server.c (handle_query): Handle "qXfer:osdata:read:".
12187 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12188 (buffer_xml_printf): New functions.
12189 * server.h (struct buffer): New.
12190 (buffer_grow_str, buffer_grow_str0): New macros.
12191 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12192 (buffer_xml_printf): Declare.
12194 2008-11-24 Doug Evans <dje@google.com>
12196 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12198 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12200 * server.c (handle_v_run): Always use the supplied argument list.
12202 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12204 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12205 (xtensa_regmap_table): Add entry for scompare1.
12207 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12209 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12210 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12211 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12212 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12213 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12214 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12215 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12216 XML target descriptions.
12217 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12218 when inferior is running on an ISA 2.05 or later processor. Add
12219 special case to return offset for full 64-bit slot of FPSCR when
12222 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12224 * Makefile.in (SFILES, clean): Added sparc64 files.
12225 (reg-sparc64.o, reg-sparc64.c): New.
12226 * configure.srv (sparc*-*-linux*): New configuration.
12227 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12228 syscall arguments for SPARC.
12229 (regsets_store_inferior_registers): Likewise.
12230 * linux-sparc-low.c: New file.
12232 2008-10-21 Doug Evans <dje@google.com>
12234 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12235 (READLINE_DIR,READLINE_DEP): Delete.
12236 (INTERNAL_CFLAGS): Update.
12237 (LINTFLAGS): Update.
12239 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12241 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12242 whole argv from the last run, not just argv[0].
12244 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12246 * regcache.c (new_register_cache): Return NULL if the register
12247 cache size isn't known yet.
12248 (free_register_cache): Avoid dereferencing a NULL regcache.
12250 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12252 * configure.srv: Merge MIPS and MIPS64.
12254 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12256 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12258 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12260 * Makefile.in: Add required vsx dependencies.
12262 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12263 Declare init_registers_powerpc_vsx32l.
12264 Declare init_registers_powerpc_vsx64l.
12265 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12266 (ppc_arch_setup): Check for VSX in hwcap.
12267 (ppc_fill_vsxregset): New function.
12268 (ppc_store_vsxregset): New function.
12269 Add new VSX entry in regset_info target_regsets.
12271 * configure.srv: Add new VSX dependencies.
12273 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12275 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12276 (remote_open): Set or clear transport_is_reliable.
12277 (putpkt_binary): Don't expect acks in noack mode.
12278 (getpkt): Don't send ack/nac in noack mode.
12279 * server.c (handle_general_set): Handle QStartNoAckMode.
12280 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12282 (main): Reset noack_mode on every connection.
12283 * server.h (noack_mode): Declare.
12285 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12287 * Makefile.in (GDBREPLAY_OBS): New variable.
12288 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12290 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12291 Daniel Jacobowitz <dan@codesourcery.com>
12293 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12294 (usr_store_inferior_registers): Likewise.
12295 (regsets_store_inferior_registers): Likewise.
12297 2008-07-31 Rolf Jansen <rj@surtec.com>
12298 Pedro Alves <pedro@codesourcery.com>
12300 * configure.ac: Check for memmem declaration.
12301 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12302 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12303 (disable_packet_qfThreadInfo): Unconditionally compile.
12304 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12305 * configure, config.in: Regenerate.
12307 2008-07-28 Doug Kwan <dougkwan@google.com>
12309 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12310 (linux_write_memory): Remove declaration of errno.
12312 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12314 * linux-low.c (handle_extended_wait): Do not use "status"
12315 variable uninitialized.
12317 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12319 * server.c (handle_v_attach): Inhibit reporting dll changes.
12321 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12323 * remote-utils.c (prepare_resume_reply): If requested, don't
12324 output "thread:TID" in the T stop reply.
12326 * server.c (disable_packet_vCont, disable_packet_Tthread)
12327 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12328 (handle_query): If requested, disable support for qC, qfThreadInfo
12330 (handle_v_requests): If requested, disable support for vCont.
12331 (gdbserver_show_disableable): New.
12332 (main): Handle --disable-packet and --disable-packet=LIST.
12334 * server.h (disable_packet_vCont, disable_packet_Tthread)
12335 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12337 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12339 * server.c (gdbserver_usage): Mention --version.
12341 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12343 * Makefile.in (gdbreplay.o): New rule.
12345 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12347 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12348 message, not gdbserver.
12350 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12351 Nathan Sidwell <nathan@codesourcery.com>
12352 Joseph Myers <joseph@codesourcery.com>
12354 * acinclude.m4: Include ../../config/acx.m4.
12355 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12356 * configure, config.in: Regenerate.
12357 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12358 * server.c (gdbserver_version): Print PKGVERSION.
12359 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12360 (main): Adjust gdbserver_usage calls.
12361 * gdbreplay.c (version, host_name): Add declarations.
12362 (gdbreplay_version, gdbreplay_usage): New.
12363 (main): Accept --version and --help options.
12365 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12367 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12368 (arm_breakpoint_at): Handle Thumb.
12369 (the_low_target): Add comment.
12371 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12373 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12375 2008-05-09 Doug Evans <dje@google.com>
12377 * server.h (decode_search_memory_packet): Declare.
12378 * remote-utils.c (decode_search_memory_packet): New fn.
12379 * server.c (handle_search_memory_1): New fn.
12380 (handle_search_memory): New fn.
12381 (handle_query): Process qSearch:memory packets.
12383 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12385 * regcache.c (registers_length): Remove.
12386 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12387 full register packet.
12388 * regcache.h (registers_length): Remove prototype.
12389 * server.h (PBUFSIZ): Define to 16384.
12391 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12393 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12394 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12395 powerpc-64l.o, and powerpc-altivec64l.o.
12396 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12397 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12398 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12399 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12400 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12403 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12404 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12405 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12406 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12407 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12408 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12409 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12410 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12411 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12412 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12415 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12416 (init_registers_powerpc_32l): ... this new prototype.
12417 (init_registers_powerpc_32): Remove, replace by ...
12418 (init_registers_powerpc_altivec32l): ... this new prototype.
12419 (init_registers_powerpc_e500): Remove, replace by ...
12420 (init_registers_powerpc_e500l): ... this new prototype.
12421 (init_registers_ppc64): Remove, replace by ...
12422 (init_registers_powerpc_64l): ... this new prototype.
12423 (init_registers_powerpc_64): Remove, replace by ...
12424 (init_registers_powerpc_altivec64l): ... this new prototype.
12425 (ppc_num_regs): Set to 73.
12426 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12427 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12428 (ppc_cannot_store_register): Handle orig_r3 and trap.
12429 (ppc_arch_setup): Update init_registers_... calls.
12430 (ppc_fill_gregset): Handle orig_r3 and trap.
12432 * inferiors.c (clear_inferiors): Reset current_inferior.
12434 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12436 * acinclude.m4: Add override.m4.
12437 * configure: Regenerate.
12439 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12441 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12442 initial call to init_register_ppc64.
12444 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12446 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12447 single powerpc*-*-linux* case.
12448 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12450 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12452 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12453 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12455 * linux-ppc-low.c: Include <elf.h>.
12456 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12457 (ppc_hwcap): New global variable.
12458 (ppc_regmap): Remove __SPE__ #ifdef sections.
12459 (ppc_regmap_e500): New global variable.
12460 (ppc_cannot_store_register): Update __SPE__ special case.
12461 (ppc_get_hwcap): New function.
12462 (ppc_arch_setup): Use it to determine whether inferior supports
12463 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12464 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12465 Do not access registers if target does not support AltiVec.
12466 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12467 Do not access registers if target does not support SPE.
12468 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12470 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12472 * linux-low.c (disabled_regsets, num_regsets): New.
12473 (use_regsets_p): Delete.
12474 (linux_wait_for_process): Clear disabled_regsets.
12475 (regsets_fetch_inferior_registers): Check and set it.
12476 (regsets_store_inferior_registers): Likewise.
12477 (linux_fetch_registers, linux_store_registers): Do not use
12479 (initialize_low): Allocate disabled_regsets.
12481 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12483 * Makefile.in (LIBOBJS): New.
12484 (OBS): Use LIBOBJS.
12485 (memmem.o): New rule.
12486 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12487 * configure: Regenerated.
12489 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12491 * server.c (handle_query): Never return "unsupported" for
12492 qXfer:features:read queries.
12494 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12496 * server.c (get_features_xml): Fix inverted condition.
12497 (handle_query): Always support qXfer:feature:read.
12499 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12501 * server.c (wrapper_argv): New.
12502 (start_inferior): Handle wrapper_argv. If set, expect an extra
12504 (gdbserver_usage): Document --wrapper.
12505 (main): Parse --wrapper.
12507 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12509 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12510 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12511 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12512 (ppc_set_pc): Likewise.
12513 (ppc_arch_setup): New function.
12514 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12515 of collect_register.
12516 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12518 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12520 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12521 instead of linux-ppc64-low.o.
12522 * linux-ppc64-low.c: Remove file.
12523 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12524 (linux-ppc64-low.o): Remove rule.
12526 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12527 (init_registers_powerpc_64): Likewise.
12528 (ppc_regmap): Conditionally define depending on __powerpc64__.
12529 (ppc_cannot_store_register): Do not special-case "fpscr" when
12530 compiled on __powerpc64__.
12531 (ppc_collect_ptrace_register): New function.
12532 (ppc_supply_ptrace_register): New function.
12533 (ppc_breakpoint): Change type to "unsigned int".
12534 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12535 (the_low_target): Conditionally provide initializers for the
12536 arch_setup member depending on __powerpc64__. Install
12537 collect_ptrace_register and supply_ptrace_register members.
12539 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12541 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12542 * server.c (gdbserver_xmltarget): Define.
12543 (get_features_xml): Use it to replace "target.xml" and arch_string.
12545 * configure.srv: Remove srv_xmltarget. Add XML files that were
12546 mentioned there to srv_xmlfiles instead. Remove conditional tests
12547 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12548 srv_xmlfiles and srv_regobj to include all possible choices.
12549 * configure.ac (srv_xmltarget): Remove.
12550 (srv_xmlfiles): Do not add "target.xml".
12551 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12552 checks for supplementary target information.
12553 * configure: Regenerate.
12554 * Makefile.in (XML_TARGET): Remove.
12555 (target.xml): Remove rule.
12556 (clean): Do not clean up target.xml.
12557 (.PRECIOUS): Do not mention target.xml.
12559 * target.h (struct target_ops): Remove arch_string member.
12560 * linux-low.c (linux_arch_string): Remove.
12561 (linux_target_ops): Remove arch_string initializer.
12562 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12563 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12564 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12565 * spu-low.c (spu_arch_string): Remove.
12566 (spu_target_ops): Remove arch_string initializer.
12567 * win32-low.c (win32_arch_string): Remove.
12568 (win32_target_ops): Remove arch_string initializer.
12569 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12570 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12571 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12573 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12575 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12576 by collect_ptrace_register and supply_ptrace_register hooks.
12577 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12578 instead of checking for the_low_target.left_pad_xfer.
12579 (usr_store_inferior_registers): Use collect_ptrace_register callback
12580 instead of checking for the_low_target.left_pad_xfer.
12582 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12583 (s390_supply_ptrace_register): Likewise.
12584 (s390_fill_gregset): Call s390_collect_ptrace_register.
12585 (the_low_target): Update.
12587 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12588 (ppc_supply_ptrace_register): Likewise.
12589 (the_low_target): Update.
12591 * linux-i386-low.c (the_low_target): Update.
12592 * linux-x86-64-low.c (the_low_target): Update.
12594 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12596 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12597 reg-s390.o and reg-s390x.o.
12599 * linux-low.c (new_inferior): New global variable.
12600 (linux_create_inferior, linux_attach): Set it.
12601 (linux_wait_for_process): Call the_low_target.arch_setup after the
12602 target has stopped for the first time.
12603 (initialize_low): Do not call the_low_target.arch_setup.
12605 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12606 (s390_set_pc): Likewise.
12607 (s390_arch_setup): New function.
12608 (the_low_target): Use s390_arch_setup as arch_setup routine.
12610 * regcache.c (realloc_register_cache): New function.
12611 (set_register_cache): Call it for each existing regcache.
12613 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12615 * server.h (init_registers): Remove prototype.
12617 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12618 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12619 instead of init_registers ().
12620 * linux-arm-low.c (init_registers_arm): Add prototype.
12621 (init_registers_arm_with_iwmmxt): Likewise.
12622 (the_low_target): Add initializer for arch_setup field.
12623 * linux-cris-low.c (init_registers_cris): Add prototype.
12624 (the_low_target): Add initializer for arch_setup field.
12625 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12626 (the_low_target): Add initializer for arch_setup field.
12627 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12628 (the_low_target): Add initializer for arch_setup field.
12629 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12630 (the_low_target): Add initializer for arch_setup field.
12631 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12632 (the_low_target): Add initializer for arch_setup field.
12633 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12634 (the_low_target): Add initializer for arch_setup field.
12635 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12636 (init_registers_mips64_linux): Likewise.
12637 (the_low_target): Add initializer for arch_setup field.
12638 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12639 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12640 (the_low_target): Add initializer for arch_setup field.
12641 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12642 (init_registers_powerpc_64): Likewise.
12643 (the_low_target): Add initializer for arch_setup field.
12644 * linux-s390-low.c (init_registers_s390): Add prototype.
12645 (init_registers_s390x): Likewise.
12646 (the_low_target): Add initializer for arch_setup field.
12647 * linux-sh-low.c (init_registers_sh): Add prototype.
12648 (the_low_target): Add initializer for arch_setup field.
12649 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12650 (the_low_target): Add initializer for arch_setup field.
12651 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12652 (the_low_target): Add initializer for arch_setup field.
12654 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12655 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12656 instead of init_registers ().
12657 * win32-arm-low.c (init_registers_arm): Add prototype.
12658 (the_low_target): Add initializer for arch_setup field.
12659 * win32-i386-low.c (init_registers_i386): Add prototype.
12660 (the_low_target): Add initializer for arch_setup field.
12662 * spu-low.c (init_registers_spu): Add prototype.
12663 (initialize_low): Call initialie_registers_spu () instead of
12664 initialize_registers ().
12666 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12668 * server.c (handle_v_requests): When handling the vRun and vAttach
12669 packets, if already debugging a process, don't kill it. Return an
12672 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12674 * server.c (handle_query): Correct length check.
12676 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12678 * win32-low.c (do_initial_child_stuff): Add process handle
12679 parameter. Set current_process_handle and current_process_id from the
12680 parameters. Clear globals.
12681 (win32_create_inferior): Don't set current_process_handle and
12682 current_process_id here. Instead pass them on the call to
12683 do_initial_child_stuff.
12684 (win32_attach): Likewise.
12685 (win32_clear_inferiors): New.
12686 (win32_kill): Don't close the current process handle or the
12687 current thread handle here. Instead call win32_clear_inferiors.
12688 (win32_detach): Don't open a new handle to the process. Call
12689 win32_clear_inferiors.
12690 (win32_join): Don't rely on current_process_handle; open a new
12691 handle using the process id.
12692 (win32_wait): Call win32_clear_inferiors when the inferior process
12695 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12697 * server.c (monitor_show_help): Add "exit".
12699 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12701 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12702 (clean): Add reg-xtensa.c.
12703 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12704 * configure.srv (xtensa*-*-linux*) New target.
12705 * linux-xtensa-low.c: New.
12706 * xtensa-xtregs.c: New.
12708 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12710 * hostio.c: Don't include errno.h.
12711 (errno_to_fileio_errno): Move to hostio-errno.
12712 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12713 error number outputting to the target->hostio_last_error callback.
12714 (hostio_packet_error): Use FILEIO_EINVAL directly.
12715 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12716 calls to hostio_error.
12717 * hostio-errno.c: New.
12718 * server.h (hostio_last_error_from_errno): Declare.
12719 * target.h (target_ops): Add hostio_last_error member.
12720 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12721 as hostio_last_error handler.
12722 * spu-low.c (spu_target_ops): Likewise.
12723 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12724 (wince_hostio_last_error): New functions.
12725 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12726 as hostio_last_error handler.
12727 (win32_target_ops) [!_WIN32_WCE]: Register
12728 hostio_last_error_from_errno as hostio_last_error handler.
12729 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12730 (hostio-errno.o): New rule.
12731 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12732 * configure.srv (srv_hostio_err_objs): New variable. Default to
12734 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12735 * configure: Regenerate.
12737 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12739 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12740 (linux_kill, linux_detach): Clean up the process list.
12741 * remote-utils.c (remote_open): Improve port number parsing.
12742 (putpkt_binary, input_interrupt): Only send interrupts if the target
12744 * server.c (extended_protocol): Make static.
12745 (attached): Define earlier.
12746 (exit_requested, response_needed, program_argv): New variables.
12747 (target_running): New.
12748 (start_inferior): Clear attached here.
12749 (attach_inferior): Set attached here.
12750 (require_running): Define.
12751 (handle_query): Use require_running and target_running. Implement
12753 (handle_v_attach, handle_v_run): New.
12754 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12755 (gdbserver_usage): Update.
12756 (main): Redo argument parsing. Handle --debug and --multi. Handle
12757 --attach along with other options or after the port. Save
12758 program_argv. Support no initial program. Resynchronize
12759 communication with GDB after an error. Handle "monitor exit".
12760 Use require_running and target_running. Always allow the extended
12761 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12762 restart in extended mode.
12763 * README: Refer to the GDB manual. Update --attach usage.
12765 2007-12-20 Andreas Schwab <schwab@suse.de>
12767 * linux-low.c (STACK_SIZE): Define.
12768 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12769 (linux_test_for_tracefork): Likewise.
12771 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12773 * linux-low.c (linux_wait_for_event): Update messages. Do not
12774 reinsert auto-delete breakpoints.
12775 * mem-break.c (struct breakpoint): Change return type of handler to
12777 (set_breakpoint_at): Update handler type.
12778 (reinsert_breakpoint_handler): Return 1 instead of calling
12780 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12782 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12783 * mem-break.h (set_breakpoint_at): Update handler type.
12784 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12785 * win32-low.c (auto_delete_breakpoint): New.
12786 (get_child_debug_event): Use it.
12788 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12790 * configure.ac: Check for pread and pwrite.
12791 * hostio.c (handle_pread): Fall back to lseek and read.
12792 (handle_pwrite): Fall back to lseek and write.
12793 * config.in, configure: Regenerated.
12795 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12797 * server.c (myresume): Add own_buf argument.
12798 (main): Update calls.
12800 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12802 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12803 * remote-utils.c (remote_open): Do not call disable_async_io.
12804 (block_async_io): Delete.
12805 (unblock_async_io): Make static.
12806 (initialize_async_io): New.
12807 * server.c (handle_v_cont): Handle async I/O here.
12808 (myresume): Likewise. Move other common resume tasks here...
12809 (main): ... from here. Call initialize_async_io. Disable async
12810 I/O before the main loop.
12811 * server.h (initialize_async_io): Declare.
12812 (block_async_io, unblock_async_io): Delete prototypes.
12813 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12815 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12817 * remote-utils.c (readchar): Allow binary data in received messages.
12819 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12821 * win32-low.c (attaching): New global.
12822 (win32_create_inferior): Clear the `attaching' global.
12823 (win32_attach): Set the `attaching' global.
12824 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12825 attaching. Only set a breakpoint at the entry point if not
12828 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12830 * server.c (main): Don't report dll events on the initial
12831 connection on attaches.
12833 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12835 * server.c (main): Relax numerical bases supported for the pid of
12836 the --attach command line argument.
12838 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12840 * win32-low.c (win32_attach): Call OpenProcess before
12841 DebugActiveProcess, not after. Add last error output to error
12844 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12846 * win32-low.c (win32_get_thread_context)
12847 (win32_set_thread_context): New functions.
12848 (thread_rec): Use win32_get_thread_context.
12849 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12850 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12853 2007-12-03 Leo Zayas
12854 Pedro Alves <pedro_alves@portugalmail.pt>
12856 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12858 (child_add_thread): Minor cleanup.
12859 (child_continue): Resume artificially suspended threads before
12860 calling ContinueDebugEvent.
12861 (suspend_one_thread): New.
12862 (fake_breakpoint_event): New.
12863 (get_child_debug_event): Change return type to int. Check here if
12864 gdb sent an interrupt request. If a soft interrupt was requested,
12865 fake a breakpoint event. Return 0 if there is no event to handle,
12867 (win32_wait): Don't check here if gdb sent an interrupt request.
12868 Ensure there is a valid event to handle.
12869 (win32_request_interrupt): Add soft interruption method as last
12872 2007-12-03 Leo Zayas
12873 Pedro Alves <pedro_alves@portugalmail.pt>
12875 * win32-low.h (win32_thread_info): Add descriptions to the
12876 structure members. Replace `suspend_count' counter by a
12878 * win32-low.c (thread_rec): Update condition of when to get the
12879 context from the inferior. Rely on ContextFlags being set if it
12880 has already been retrieved. Only suspend the inferior thread if
12881 we haven't already. Warn if that fails.
12882 (continue_one_thread): s/suspend_count/suspended/. Only call
12883 ResumeThread once. Warn if that fails.
12885 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12887 * win32-low.c (win32_wait): Don't read from the inferior when it
12888 has already exited.
12890 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12892 * Makefile.in (win32_low_h): New variable.
12893 (win32-low.o): Add dependency on $(win32_low_h).
12894 (win32-arm-low.o, win32-i386-low.o): New rules.
12896 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12898 * hostio.c: Correct copyright year.
12900 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12902 * Makefile.in (OBS): Add hostio.o.
12903 (hostio.o): New rule.
12904 * server.h (handle_vFile): Declare.
12905 * hostio.c: New file.
12906 * server.c (handle_v_requests): Take packet_len and new_packet_len
12907 for binary packets. Call handle_vFile.
12908 (main): Update call to handle_v_requests.
12910 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12912 * linux-low.c: Include <sched.h>.
12914 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12916 * linux-low.c (linux_tracefork_grandchild): New.
12917 (linux_tracefork_child): Use clone.
12918 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12920 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12922 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12924 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12926 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12928 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12930 * inferiors.c (change_inferior_id): Delete.
12931 (add_pid_to_list, pull_pid_from_list): New.
12932 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12933 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12934 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12935 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12936 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12937 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12938 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12939 (using_threads): Always set to 1.
12940 (handle_extended_wait): New.
12941 (add_process): Do not set TID.
12942 (linux_create_inferior): Set must_set_ptrace_flags.
12943 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12944 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12945 (linux_thread_alive): Rename TID argument to LWPID.
12946 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12947 (linux_wait_for_event): Do not use TID or check using_threads. Update
12948 call to dead_thread_notify. Call handle_extended_wait.
12949 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12950 (send_sigstop): Delete sigstop_sent.
12951 (wait_for_sigstop): Avoid TID.
12952 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12953 (linux_test_for_tracefork): New.
12954 (linux_lookup_signals): Use thread_db_active and
12955 linux_supports_tracefork_flag.
12956 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12957 * linux-low.h (get_process_thread): Avoid TID.
12958 (struct process_ifo): Move thread_known and tid to the end. Remove
12960 (linux_attach_lwp, thread_db_init): Update prototypes.
12961 * server.h (change_inferior_id): Delete prototype.
12962 (add_pid_to_list, pull_pid_from_list): New prototypes.
12963 * thread-db.c (thread_db_use_events): New.
12964 (find_first_thread): Rename to...
12965 (find_one_thread): ...this. Update callers and messages. Do not
12966 call fatal. Check thread_db_use_events. Do not call
12967 change_inferior_id or new_thread_notify.
12968 (maybe_attach_thread): Update. Do not call new_thread_notify.
12969 (thread_db_init): Set thread_db_use_events. Check use_events.
12970 * utils.c (fatal, warning): Correct message prefix.
12972 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12974 * Makefile.in (clean): Remove new files.
12975 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12976 (powerpc-64.o, powerpc-64.c): New rules.
12977 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12978 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12980 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12982 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12983 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12984 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12985 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12986 (target_regsets): Add AltiVec and SPE register sets.
12987 * configure.ac: Check for AltiVec and SPE.
12988 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12989 (ppc_fill_vrregset, ppc_store_vrregset): New.
12990 (target_regsets): Add AltiVec register set.
12991 * configure: Regenerated.
12993 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12995 * linux-low.c (O_LARGEFILE): Define.
12996 (linux_read_memory): Use /proc/PID/mem.
12997 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12998 * configure, config.in: Regenerated.
13000 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13002 * linux-low.c (linux_wait_for_event): Do not pass signals while
13005 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13007 * win32-low.c (create_process): New.
13008 (win32_create_inferior): Use create_process instead of
13009 CreateProcess. If create_process failed retry appending an ".exe"
13010 suffix. Store the GetLastError result immediatelly after
13011 create_process calls and use it on the call to error.
13013 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13015 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13017 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13019 * configure.ac: Switch license to GPLv3.
13021 2007-08-01 Michael Snyder <msnyder@access-company.com>
13023 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13025 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13027 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13029 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13030 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13031 CloseToolhelp32Snapshot.
13032 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13033 CloseToolhelp32Snapshot.
13035 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13037 * server.c (main): Check for inferior exit before main loop.
13039 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13041 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13042 instead of on tmp_desc.
13044 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13045 Daniel Jacobowitz <dan@codesourcery.com>
13047 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13048 (add_thread): Minor cleanups.
13049 (clear_inferiors): Move lower in the file. Clear the DLL
13051 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13052 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13053 (xml_escape_text): New.
13054 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13056 (handle_v_cont): Report errors.
13057 (gdbserver_version): Update.
13058 (main): Correct size of own_buf. Do not report initial DLL events.
13059 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13060 (unloaded_dll, xml_escape_text): New.
13061 * win32-low.c (enum target_waitkind): Update comments.
13062 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13063 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13064 (win32_EnumProcessModules, win32_GetModuleInformation)
13065 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13066 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13067 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13068 (win32_Module32First, win32_Module32Next, load_toolhelp)
13069 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13070 (get_child_debug_event): Handle DLL events.
13071 (win32_wait): Likewise.
13073 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13075 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13076 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13078 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13080 * win32-low.c (handle_output_debug_string): Ignore event if not
13083 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13085 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13087 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13089 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13091 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13093 * inferiors.c (change_inferior_id): Add comment.
13094 * linux-low.c (check_removed_breakpoint): Add an early
13095 prototype. Improve debug output.
13096 (linux_attach): Doc update.
13097 (linux_detach_one_process, linux_detach): Clean up before releasing
13099 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13100 * linux-low.h (struct process_info): Doc improvement.
13101 * mem-break.c (delete_all_breakpoints): New.
13102 * mem-break.h (delete_all_breakpoints): New prototype.
13103 * thread-db.c (find_first_thread): New.
13104 (thread_db_create_event): Call it instead of
13105 thread_db_find_new_threads. Clean up unused variables.
13106 (maybe_attach_thread): Remove first thread handling.
13107 (thread_db_find_new_threads): Use find_first_thread.
13108 (thread_db_get_tls_address): Likewise.
13110 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13112 * thread-db.c (thread_db_find_new_threads): Add prototype.
13113 (thread_db_create_event): Check for the main thread before adding
13115 (maybe_attach_thread): Only enable event reporting if TID == 0.
13116 (thread_db_get_tls_address): Check for new threads.
13118 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13120 * linux-low.c (linux_create_inferior): Try execv before execvp.
13121 * spu-low.c (spu_create_inferior): Likewise.
13123 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13125 * linux-low.c (linux_create_inferior): Change execv to execvp.
13126 * spu-low.c (spu_create_inferior): Likewies.
13128 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13130 * Makefile.in (clean): Clean new files instead of deleted ones.
13131 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13132 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13134 * configure.srv: Specify XML files and new regformats for MIPS and
13136 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13137 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13138 an entry for the restart register.
13139 (mips_cannot_fetch_register, mips_cannot_store_register)
13140 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13141 register names to match the XML descriptions.
13142 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13143 restart register instead of $0.
13145 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13146 Markus Deuling <deuling@de.ibm.com>
13148 * remote-utils.c (decode_xfer_write): New function.
13149 * server.h (decode_xfer_write): Add prototype.
13150 * server.c (handle_query): Add PACKET_LEN argument. Support
13151 qXfer:spu:read and qXfer:spu:write packets.
13152 (main): Pass packet_len to handle_query.
13153 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13154 * target.h (target_ops): Add qxfer_spu.
13156 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13158 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13159 accessing non-seekable spufs files.
13161 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13163 * server.c (handle_query): Add reply for qC packet.
13165 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13166 Leo Zayas <lerele@champenstudios@com>
13168 * server.h (check_remote_input_interrupt_request): New function.
13169 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13170 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13171 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13172 (check_remote_input_interrupt_request): New function.
13173 * server.h (check_remote_input_interrupt_request): Declare.
13174 * win32-low.c (winapi_DebugBreakProcess,
13175 winapi_GenerateConsoleCtrlEvent): New typedefs.
13176 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13178 (win32_wait): Check for remote interrupt request
13179 with check_remote_input_interrupt_request.
13180 (win32_request_interrupt): New function.
13181 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13183 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13185 * win32-low.c (debug_registers_changed,
13186 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13187 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13188 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13189 (thread_rec): Get context using the low target.
13190 (child_add_thread): Call thread_added on the low target,
13191 which does the same thing.
13193 (do_initial_child_stuff): Remove debug registers references.
13194 Set context using the low target. Resume threads after
13195 setting the contexts.
13196 (child_continue): Remove dead variable. Remove debug
13197 registers references.
13198 (child_fetch_inferior_registers): Go through the low target.
13199 (do_child_store_inferior_registers): Remove.
13200 (child_store_inferior_registers): Go through the low target.
13201 (win32_resume): Remove debug registers references.
13202 Set context using the low target.
13203 (handle_exception): Change return type to void. Don't record
13204 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13205 first chance exception.
13206 (get_child_debug_event): Change return type to void. Remove
13207 goto loop. Always return after waiting for debug event.
13208 (win32_wait): Convert to switch statement. Handle spurious
13211 * win32-i386-low.c (debug_registers_changed,
13212 debug_registers_used): New.
13213 (initial_stuff): Rename to ...
13214 (i386_initial_stuff): ... this. Clear debug registers
13216 (store_debug_registers): Delete.
13217 (i386_get_thread_context): New.
13218 (load_debug_registers): Delete.
13219 (i386_set_thread_context): New.
13220 (i386_thread_added): New.
13221 (single_step): Rename to ...
13222 (i386_single_step): ... this.
13223 (do_fetch_inferior_registers): Rename to ...
13224 (i386_fetch_inferior_register): ... this.
13225 (i386_store_inferior_register): New.
13226 (the_low_target): Adapt to new interface.
13228 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13229 (arm_get_thread_context): New.
13230 (arm_set_thread_context): New.
13232 (do_fetch_inferior_registers): Rename to ...
13233 (arm_fetch_inferior_register): ... this.
13234 (arm_store_inferior_register): New.
13235 (arm_wince_breakpoint): Reimplement as unsigned long.
13236 (arm_wince_breakpoint_len): Define.
13237 (the_low_target): Adapt to new interface.
13239 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13240 load_debug_registers. Add get_thread_context, set_thread_context,
13241 thread_added and store_inferior_register. Rename
13242 fetch_inferior_registers to fetch_inferior_register.
13243 (regptr): Remove declaration.
13245 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13247 * linux-low.c (linux_detach): Change return type to int. Return 0.
13248 * spu-low.c (spu_detach): Likewise.
13250 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13252 * target.h (target_ops): Change return type of detach to int.
13254 (join_inferior): New.
13255 * server.c (main): Don't skip detach support on mingw32.
13256 If the inferior doesn't support detaching return error.
13257 Call join_inferior instead of using waitpid.
13258 * linux-low.c (linux_join): New.
13259 (linux_target_op): Add linux_join.
13260 * spu-low.c (spu_join): New.
13261 (spu_target_ops): Add spu_join.
13262 * win32-low.c (win32_detach): Adapt to new interface.
13263 Reopen current_process_handle before detaching. Issue a child
13264 resume before detaching.
13266 (win32_target_op): Add win32_join.
13268 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13270 * win32-low.c (win32-attach): Fix return value.
13271 * target.h (target_ops): Describe ATTACH return values.
13273 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13275 * win32-low.c (GETPROCADDRESS): Define.
13276 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13277 (winapi_DebugSetProcessKillOnExit): Likewise.
13278 (win32_create_inferior): Force usage of ansi CreateProcessA.
13279 (win32_attach): Use GETPROCADDRESS.
13280 (win32_detach): Likewise.
13282 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13284 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13286 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13288 * win32-low.c: Commit leftover changes from 2007-03-29.
13290 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13292 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13293 fields short instead of int. Add explicit padding.
13294 (i387_cache_to_fsave): Remove unnecessary casts.
13295 (i387_fsave_to_cache): Doc fix.
13296 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13298 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13300 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13301 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13303 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13305 * configure.srv (arm*-*-mingw32ce*): Move near the other
13308 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13310 * configure.ac: Add errno checking.
13311 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13312 sys/file.h and malloc.h.
13313 (AC_CHECK_DECLS): Add perror.
13314 (srv_mingwce): Handle.
13315 * configure.srv (i[34567]86-*-cygwin*): Add
13316 win32-i386-low.o to srv_tgtobj.
13317 (i[34567]86-*-mingw*): Likewise.
13318 (arm*-*-mingw32ce*): Add case.
13319 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13320 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13321 [__MINGW32CE__] (strerror): New function.
13322 [__MINGW32CE__] (errno): Define to GetLastError.
13323 [__MINGW32CE__] (COUNTOF): New macro.
13324 (remote_open): Remove extra close call.
13325 * mem-break.c (delete_breakpoint_at): New function.
13326 * mem-break.h (delete_breakpoint_at): Declare.
13327 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13328 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13329 [USE_WIN32API] (read, write): Add char* casts.
13330 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13331 * server.h: Include wincecompat.h on Windows CE.
13332 [HAVE_ERRNO_H]: Check.
13333 (perror): Declare if not declared.
13334 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13335 (perror_with_name): Remove errno declaration.
13336 * wincecompat.h: New.
13337 * wincecompat.c: New.
13338 * win32-low.h: New.
13339 * win32-arm-low.c: New.
13340 * win32-i386-low.c: New.
13341 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13342 (OUTMSG2): Make it safe.
13344 (COUNTOF): New macro.
13345 (NUM_REGS): Get it from the low target.
13346 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13347 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13348 (thread_rec): Let low target handle debug registers.
13349 (child_add_thread): Likewise.
13350 (child_init_thread_list): Likewise.
13351 (continue_one_thread): Likewise.
13353 (do_child_fetch_inferior_registers): Move to ...
13354 * win32-i386-low.c: ... here, and rename to ...
13355 (do_fetch_inferior_registers): ... this.
13356 * win32-low.c (child_fetch_inferior_registers):
13357 Go through the low target.
13358 (do_child_store_inferior_registers): Use regptr.
13359 (strwinerror): New function.
13360 (win32_create_inferior): Handle Windows CE.
13361 Use strwinerror instead of strerror on Windows error
13362 codes. Add program to the error output.
13363 Don't close the main thread handle on Windows CE.
13364 (win32_attach): Use coredll.dll on Windows CE.
13365 (win32_kill): Close current process and current
13367 (win32_detach): Use coredll.dll on Windows CE.
13368 (win32_resume): Let low target handle debug registers, and
13370 (handle_exception): Add/Remove initial breakpoint. Avoid
13371 non-existant WSTOPSIG on Windows CE.
13372 (win32_read_inferior_memory): Cast to remove warning.
13373 (win32_arch_string): Go through the low target.
13374 (initialize_low): Call set_breakpoint_data with the low
13375 target's breakpoint.
13376 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13377 FOP_REGNUM, mappings): Move to ...
13378 * win32-i386-low.c: ... here.
13379 * win32-low.c (win32_thread_info): Move to ...
13380 * win32-low.h: ... here.
13381 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13382 win32-arm-low.c and wincecompat.c.
13383 (all:): Add $EXEEXT.
13384 (install-only:): Likewise.
13385 (gdbserver:): Likewise.
13386 (gdbreplay:): Likewise.
13387 * config.in: Regenerate.
13388 * configure: Regenerate.
13390 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13392 * win32-low.c: Rename typedef thread_info to
13393 win32_thread_info throughout.
13395 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13397 * win32-i386-low.c: Rename to ...
13398 * win32-low.c: ... this.
13399 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13400 * Makefile.in: Likewise.
13402 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13404 * remote-utils.c (monitor_output): Constify msg parameter.
13405 * server.h (monitor_output): Likewise.
13406 * win32-i386-low.c (handle_output_debug_string): New.
13407 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13408 handle_output_debug_string.
13409 (get_child_debug_event): Likewise.
13411 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13413 * server.c (main): Correct strtoul check.
13415 2007-03-27 Jon Ringle <jon@ringle.org>
13417 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13419 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13421 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13423 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13425 * terminal.h: Check HAVE_SGTTY_H.
13427 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13429 * remote-utils.c (remote_open): Print out the assigned port number.
13431 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13433 * remote-utils.c (monitor_output): New function.
13434 * server.c (debug_threads): Define here.
13435 (monitor_show_help): New function.
13436 (handle_query): Handle qRcmd.
13437 (main): Do not handle 'd' packet.
13438 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13439 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13442 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13444 * Makefile.in (EXEEXT): New.
13445 (clean): Use $(EXEEXT).
13447 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13449 * target.h (target_ops): Rename send_signal to request_interrupt,
13450 and remove enum target_signal parameter.
13451 * linux-low.c (linux_request_interrupt): Rename from
13452 linux_send_signal, and always send SIGINT.
13453 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13454 and always send SIGINT.
13455 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13457 (input_interrupt): Likewise.
13459 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13461 * server.c (get_features_xml): Check if target implemented
13463 * win32-i386-low.c (win32_arch_string): New.
13464 (win32_target_ops): Add win32_arch_string as arch_string member.
13466 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13468 * spu-low.c (spu_arch_string): New.
13469 (spu_target_ops): Add spu_arch_string.
13471 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13473 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13474 * configure.ac: Do not check for terminal.h.
13475 * configure, config.in: Regenerated.
13477 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13479 * Makefile.in (OBS): Add $(XML_BUILTIN).
13480 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13482 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13483 (arm-with-iwmmxt.c): New.
13484 * config.in, configure: Regenerate.
13485 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13486 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13487 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13488 (arm*-*-linux*): Add iWMMXt and regset support.
13489 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13490 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13491 (arm_store_wmmxregset, target_regsets): New.
13492 * server.c (get_features_xml): Take annex argument. Check builtin
13494 (handle_query): Handle multiple annexes.
13496 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13498 * remote-utils.c [USE_WIN32API] (read, write): Define.
13499 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13502 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13504 * linux-i386-low.c (the_low_target): Set arch_string.
13505 * linux-x86-64-low.c (the_low_target): Likewise.
13506 * linux-low.c (linux_arch_string): New.
13507 (linux_target_ops): Add it.
13508 * linux-low.h (struct linux_target_ops): Add arch_string.
13509 * server.c (write_qxfer_response): Use const void * for DATA.
13510 (get_features_xml): New.
13511 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13512 * target.h (struct target_ops): Add arch_string method.
13514 2007-01-03 Denis Pilat <denis.pilat@st.com>
13515 Daniel Jacobowitz <dan@codesourcery.com>
13517 * linux-low.c (linux_kill): Handle being called with no threads.
13518 * win32-i386-low.c (win32_kill): Likewise.
13519 (get_child_debug_event): Clear current_process_handle.
13521 2006-12-30 Denis PILAT <denis.pilat@st.com>
13522 Daniel Jacobowitz <dan@codesourcery.com>
13524 * remote-utils.c (remote_open): Check the type of specified
13525 serial port devices before opening them.
13526 * server.c (main): Kill the inferior if an error occurs during
13527 the first remote_open.
13529 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13531 * README: Update supported targets.
13533 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13535 * Makefile.in (clean): Remove reg-mips64.c.
13536 (reg-mips64.c, reg-mips64.o): New rules.
13537 * configure.srv: Handle mips64. Include regset support for mips.
13538 * linux-mips-low.c (union mips_register): New.
13539 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13540 (mips_breakpoint, mips_breakpoint_at): Use int.
13541 (mips_collect_register, mips_supply_register)
13542 (mips_collect_register_32bit, mips_supply_register_32bit)
13543 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13544 (mips_store_fpregset, target_regsets): New.
13545 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13547 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13549 * configure.srv: Add target "spu*-*-*".
13550 * Makefile.in (clean): Remove reg-spu.c.
13551 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13552 * spu-low.c: New file.
13554 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13556 * configure.ac: Correct td_thr_tls_get_addr test.
13557 * configure: Regenerated.
13559 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13561 * linux-low.c (linux_wait_for_event): Reformat. Use the
13562 pass_signals array.
13563 * remote-utils.c (decode_address_to_semicolon): New.
13564 * server.c (pass_signals, handle_general_set): New.
13565 (handle_query): Mention QPassSignals for qSupported.
13566 (main): Call handle_general_set.
13567 * server.h (pass_signals, decode_address_to_semicolon): New.
13569 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13571 * server.c (handle_query): Correct error handling for read_auxv.
13573 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13575 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13576 and srv_linux_thread_db to yes.
13577 * linux-s390-low.c (s390_fill_gregset): New function.
13578 (target_regsets): Define data structure.
13580 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13582 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13583 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13584 * config.in, configure: Regenerated.
13585 * inferiors.c (gdb_id_to_thread): New function.
13586 (gdb_id_to_thread_id): Use it.
13587 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13588 * linux-low.h (struct process_info): Add th member.
13589 (thread_db_get_tls_address): New prototype.
13590 * remote-utils.c (decode_address): Make non-static.
13591 * server.c (handle_query): Handle qGetTLSAddr.
13592 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13593 * target.h (struct target_ops): Add get_tls_address.
13594 * thread-db.c (maybe_attach_thread): Save the thread handle.
13595 (thread_db_get_tls_address): New.
13597 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13599 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13600 (linux_resume_one_process): Take a siginfo_t *. Update all
13601 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13602 (struct pending_signals): Add a siginfo_t.
13603 (linux_wait_for_process): Always set last_status.
13604 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13605 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13606 * linux-low.h (struct process_info): Add last_status.
13608 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13610 * remote-utils.c (try_rle): New function.
13611 (putpkt_binary): Use it.
13613 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13615 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13616 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13617 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13618 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13619 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13622 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13624 * server.c (terminal_fd): New variable.
13625 (old_foreground_pgrp): Likewise.
13626 (restore_old_foreground_pgrp): New function.
13627 (start_inferior): Record the terminal file descriptor in terminal_fd
13628 and its original foreground group in old_foreground_pgrp. Register
13629 restore_old_foreground_pgrp with atexit().
13631 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13633 * server.c (handle_query): Correct qPart to qXfer.
13635 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13637 * configure.ac: Check for more headers which are missing on
13638 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13639 * configure.srv: Add Cygwin and mingw32.
13640 * remote-utils.c: Don't include headers unconditionally which
13641 are missing on mingw32. Include <winsock.h> for mingw32.
13642 (remote_open): Adjust for mingw32 support. Flush
13643 standard error after writing to it.
13644 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13645 (unblock_async_io, enable_async_io, disable_async_io)
13646 (readchar, getpkt): Update for Winsock support.
13647 (prepare_resume_reply): Expect a protocol signal number.
13648 * server.c: Disable <sys/wait.h> on mingw32.
13649 (start_inferior): Adjust for mingw32 support. Flush
13650 standard error after writing to it.
13651 (attach_inferior): Likewise. Use protocol signal
13653 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13655 * win32-i386-low.c: New file.
13656 * Makefile.in (XM_CLIBS): Set.
13657 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13658 (win32-i386-low.o): New dependency rule.
13659 * linux-low.c (linux_wait): Use target signal numbers.
13660 * target.h (struct target_ops): Doc fix.
13661 * server.h (target_signal_to_name): New prototype.
13662 * gdbreplay.c: Don't include headers unconditionally which
13663 are missing on mingw32. Include <winsock.h> for mingw32.
13664 (remote_close, remote_open): Adjust for Winsock support.
13665 * configure, config.in: Regenerated.
13667 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13669 * server.c (decode_xfer_read, write_qxfer_response): New.
13670 (handle_query): Take a packet length argument. Handle
13671 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13672 the qSupported response.
13673 (main): Update call to handle_query.
13675 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13677 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13678 (putpkt_binary): Renamed from putpkt and adjusted for binary
13680 (putpkt): New wrapper for putpkt_binary.
13681 (readchar): Don't mask off the high bit.
13682 (decode_X_packet): New function.
13683 * server.c (main): Call putpkt_binary if a handler sets the packet
13684 length. Save the length of the incoming packet. Handle 'X'.
13685 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13687 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13689 * server.c (handle_query): Handle qSupported.
13691 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13693 * remote-utils.c (all_symbols_looked_up): New variable.
13694 (look_up_one_symbol): Check it.
13695 * server.h (look_up_one_symbol): New declaration.
13696 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13698 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13700 * Makefile.in (linux-arm-low.o): Update dependencies.
13701 * linux-arm-low.c: Include "gdb_proc_service.h".
13702 (PTRACE_GET_THREAD_AREA): Define.
13703 (ps_get_thread_area): New function.
13705 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13707 * configure.srv (m68k*-*-uclinux*): New target.
13708 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13709 (linux_resume_one_process): Remove extraneous cast.
13710 (linux_read_offsets): New.
13711 (linux_target_op): Add linux_read_offsets on mmuless systems.
13712 * server.c (handle_query): Add qOffsets logic.
13713 * target.h (struct target_ops): Add read_offsets.
13715 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13717 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13718 (PTRACE_GET_THREAD_AREA): Define.
13719 (ps_get_thread_area): New function.
13720 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13721 (linux-x86-64-low.o): Update.
13723 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13725 * configure.ac: Remove checks for prfpregset_t.
13726 * gdb_proc_service.h: New file.
13727 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13728 new "gdb_proc_service.h".
13729 * proc-service.c: Likewise.
13730 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13731 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13732 * Makefile.in (gdb_proc_service_h): Updated.
13733 * configure, config.in: Regenerated.
13735 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13737 * remote-utils.c (prepare_resume_reply): Move declaration
13738 of gdb_id_from_wait to the top of the block.
13740 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13742 * linux-low.c (regsets_store_inferior_registers): Read the regset
13743 from the target before filling it.
13745 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13747 * server.c (attach_inferior): Return SIGTRAP for a successful
13750 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13752 * Makefile.in (OBS): Add version.o.
13753 (STAGESTUFF): Delete.
13754 (version.o): Add dependencies.
13755 (version.c): Replace rule.
13756 (clean): Remove version.c.
13757 * server.c (gdbserver_version): New.
13758 (gdbserver_usage): Use printf.
13759 (main): Handle --version and --help.
13760 * server.h (version, host_name): Add declarations.
13762 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13774 * linux-x86-64-low.c:
13776 * linux-s390-low.c:
13777 * linux-ppc64-low.c:
13779 * linux-mips-low.c:
13780 * linux-m68k-low.c:
13781 * linux-m32r-low.c:
13784 * linux-ia64-low.c:
13785 * linux-i386-low.c:
13786 * linux-crisv32-low.c:
13798 * gdbserver.1: Add (C) after Copyright. Update the FSF
13801 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13803 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13804 (arm_breakpoint_at): Recognize both breakpoints.
13805 (the_low_target): Use the correct breakpoint instruction.
13807 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13809 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13810 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13811 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13812 (the_low_target): Update.
13814 2005-10-25 Andreas Schwab <schwab@suse.de>
13816 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13818 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13819 (ia64_num_regs): Reduce to 462.
13821 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13823 * acinclude.m4: Correct quoting.
13824 * aclocal.m4: Regenerated.
13826 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13827 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13828 (thread_db_init): Call thread_db_err_str.
13829 * configure.ac: Check for TD_VERSION.
13830 * config.in, configure: Regenerated.
13832 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13834 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13836 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13838 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13839 is not available. Define HAVE_PTRACE_GETREGS if it is.
13840 * config.in, configure: Regenerated.
13841 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13842 * linux-i386-low.c, linux-m68k-low.c: Update to use
13843 HAVE_PTRACE_GETREGS.
13844 * linux-low.c (regsets_fetch_inferior_registers)
13845 (regsets_store_inferior_registers): Only return 0 if we processed
13847 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13848 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13850 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13852 * inferiors.c (struct thread_info): Add gdb_id.
13853 (add_thread): Add gdb_id argument.
13854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13855 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13856 calls to add_thread.
13857 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13858 * server.c (handle_query): Use thread_to_gdb_id.
13859 (handle_v_cont, main): Use gdb_id_to_thread_id.
13860 * server.h (add_thread): Update prototype.
13861 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13864 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13866 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13867 left-padded registers.
13868 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13869 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13871 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13873 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13874 * configure: Regenerate.
13875 * config.in: Regenerate.
13876 * server.h (NEED_DECLARATION_STRERROR):
13877 Replace with !HAVE_DECL_STRERROR.
13879 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13881 * linux-low.c (linux_wait, linux_send_signal): Don't test
13882 an unsigned long variable for > 0 if it could be MAX_ULONG.
13883 * server.c (myresume): Likewise.
13884 * target.c (set_desired_inferior): Likewise.
13886 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13888 * configure.ac: Simplify and improve check for socklen_t.
13889 * configure, config.in: Regenerate.
13891 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13893 * acconfig.h: Remove.
13894 * configure.ac: Add a test for socklen_t. Use three-argument
13895 AC_DEFINE throughout.
13896 * config.in: Regenerated using autoheader 2.59.
13897 * configure: Regenerated.
13899 * gdbreplay.c (socklen_t): Provide a default.
13900 (remote_open): Use socklen_t.
13901 * remote-utils.c (socklen_t): Provide a default.
13902 (remote_open): Use socklen_t.
13903 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13906 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13908 * linux-low.c (linux_read_memory, linux_write_memory)
13909 (linux_read_auxv): Likewise.
13910 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13911 (check_mem_write): Likewise.
13912 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13914 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13915 (registers_from_string, register_data): Likewise.
13916 * server.c (handle_query, main): Likewise.
13917 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13918 (decode_M_packet): Likewise.
13919 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13920 * target.h (struct target_ops): Update read_memory, write_memory,
13922 (read_inferior_memory, write_inferior_memory): Update.
13923 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13924 to unsigned char *.
13925 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13926 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13927 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13928 linux-s390-low.c, linux-sh-low.c: Update for changes in
13929 read_inferior_memory and the_low_target->breakpoint.
13931 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13933 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13934 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13935 * configure.srv: Add powerpc64-*-linux*.
13936 * linux-ppc64-low.c: New file.
13938 2005-05-23 Orjan Friberg <orjanf@axis.com>
13940 * linux-cris-low.c: New file with support for CRIS.
13941 * linux-crisv32-low.c: Ditto for CRISv32.
13942 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13943 (clean): Add reg-cris.c and reg-crisv32.c.
13944 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13945 reg-crisv32.o, and reg-crisv32.c to make rules.
13946 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13947 recognized targets.
13949 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13951 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13952 of sizeof (PTRACE_XFER_TYPE).
13953 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13955 2005-05-12 Orjan Friberg <orjanf@axis.com>
13957 * target.h (struct target_ops): Add insert_watchpoint,
13958 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13959 pointers for hardware watchpoint support.
13960 * linux-low.h (struct linux_target_ops): Ditto.
13961 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13962 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13963 to linux_target_ops.
13964 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13966 * server.c (main): Recognize 'Z' and 'z' packets.
13968 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13970 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13971 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13972 (the_low_target): Add new members.
13974 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13976 * proc-service.c (ps_lgetregs): Search all_processes instead of
13979 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13981 * server.c (start_inferior): Change return type to int.
13982 (attach_inferior): Change sigptr to int *.
13983 (handle_v_cont, handle_v_requests): Change signal to int *.
13984 (main): Change signal to int.
13986 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13988 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13989 * configure.srv: Add m32r*-*-linux*.
13990 * linux-m32r-low.c: New file.
13992 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13994 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13996 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13998 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13999 Take unsigned long arguments for PIDs.
14000 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14001 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14002 (wait_for_sigstop, linux_resume_one_process)
14003 (regsets_fetch_inferior_registers, linux_send_signal)
14004 (linux_read_auxv): Likewise. Update the types of variables holding
14005 PIDs. Update format string specifiers.
14006 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14007 * remote-utils.c (prepare_resume_reply): Likewise.
14008 * server.c (cont_thread, general_thread, step_thread)
14009 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14011 (handle_query): Update format specifiers.
14012 (handle_v_cont, main): Use strtoul for thread IDs.
14013 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14014 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14015 (general_thread, step_thread, thread_from_wait)
14016 (old_thread_from_wait): Update.
14017 * target.h (struct thread_resume): Use unsigned long for THREAD.
14018 (struct target_ops): Use unsigned long for arguments to attach and
14021 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14023 * acinclude.m4: Include bfd/bfd.m4 directly.
14024 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14025 <agriffis@toolchain.org>.
14026 * aclocal.m4, configure: Regenerated.
14028 2005-01-07 Andrew Cagney <cagney@gnu.org>
14030 * configure.ac: Rename configure.in, require autoconf 2.59.
14031 * configure: Re-generate.
14033 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14035 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14036 LIBS when finished.
14037 * aclocal.m4: Regenerated.
14038 * configure: Regenerated.
14040 2004-11-21 Andreas Schwab <schwab@suse.de>
14042 * linux-m68k-low.c (m68k_num_gregs): Define.
14043 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14044 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14045 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14046 (m68k_breakpoint_at): New. Add to the_low_target.
14048 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14049 srv_linux_thread_db to yes.
14051 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14053 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14054 (ARCH_SET_FS): Likewise.
14055 (ARCH_GET_FS): Likewise.
14056 (ARCH_GET_GS): Likewise.
14058 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14060 * linux-i386-low.c (ps_get_thread_area): New.
14061 * linux-x86-64-low.c (ps_get_thread_area): New.
14062 * linux-low.c: Include <sys/syscall.h>.
14063 (linux_kill_one_process): Don't kill the first thread here.
14064 (linux_kill): Kill the first thread here.
14065 (kill_lwp): New function.
14066 (send_sigstop, linux_send_signal): Use it.
14067 * proc-service.c: Clean up #ifdefs.
14068 (fpregset_info): Delete.
14069 (ps_lgetregs): Update and enable implementation.
14070 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14072 * remote-utils.c (struct sym_cache, symbol_cache): New.
14073 (input_interrupt): Print a clearer message.
14074 (async_io_enabled): New variable.
14075 (enable_async_io, disable_async_io): Use it. Update comments.
14076 (look_up_one_symbol): Use the symbol cache.
14077 * thread-db.c (thread_db_look_up_symbols): New function.
14078 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14080 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14082 * configure.in: Test for -rdynamic.
14083 * configure: Regenerated.
14084 * Makefile (INTERNAL_LDFLAGS): New.
14085 (gdbserver, gdbreplay): Use it.
14087 2004-09-02 Andrew Cagney <cagney@gnu.org>
14089 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14091 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14093 * linux-low.c (linux_wait): Clear all_processes list also.
14095 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14097 * linux-low.c: Include <errno.h>. Remove extern declaration of
14100 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14102 * gdbreplay.c, server.h, utils.c: Update copyright years.
14104 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14106 * server.c (main): Print child status or termination signal from
14107 variable 'signal', not 'sig'.
14109 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14111 * linux-low.c (linux_read_memory): Change return type to
14112 int. Check for and return error from ptrace().
14113 * target.c (read_inferior_memory): Change return type to int. Pass
14114 back return status from the_target->read_memory().
14115 * target.h (struct target_ops): Adapt *read_memory() prototype.
14117 (read_inferior_memory): Adapt prototype.
14118 * server.c (main): Return an error packet if
14119 read_inferior_memory() returns an error.
14121 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14123 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14124 Unify with other clean targets.
14126 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14128 * server.c (handle_v_cont): Call set_desired_inferior.
14130 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14132 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14134 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14136 * linux-low.c (linux_wait): Unblock async I/O.
14137 (linux_resume): Block and enable async I/O.
14138 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14139 * server.h (block_async_io, unblock_async_io): Add prototypes.
14141 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14143 * remote-utils.c (remote_open): Print a status notice after
14144 opening a TCP port.
14145 * server.c (attach_inferior): Print a status notice after
14148 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14150 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14152 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14154 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14156 * server.c, target.h: Update copyright years.
14158 2004-02-25 Roland McGrath <roland@redhat.com>
14160 * target.h (struct target_ops): New member `read_auxv'.
14161 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14162 * linux-low.c (linux_read_auxv): New function.
14163 (linux_target_ops): Initialize `read_auxv' member to that.
14165 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14167 Committed by Jim Blandy <jimb@redhat.com>.
14169 * linux-s390-low.c (s390_num_regs): Update.
14170 (s390_regmap): Remove control registers. Use __s390x__ predefine
14171 instead of GPR_SIZE to distiguish s390 and s390x targets.
14173 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14175 * linux-low.c: Update copyright year.
14176 (check_removed_breakpoint): Clear pending_is_breakpoint.
14177 (linux_set_resume_request, linux_queue_one_thread)
14178 (resume_status_pending_p): New functions.
14179 (linux_continue_one_thread): Use process->resume.
14180 (linux_resume): Only resume threads if there are no pending events.
14181 * linux-low.h (struct process_info): Add resume request
14184 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14186 * regcache.c (new_register_cache): Clear the allocated register
14187 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14189 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14191 * linux-low.c (linux_resume): Take a struct thread_resume *
14193 (linux_wait): Update call.
14194 (resume_ptr): New static variable.
14195 (linux_continue_one_thread): Renamed from
14196 linux_continue_one_process. Use resume_ptr.
14197 (linux_resume): Use linux_continue_one_thread.
14198 * server.c (handle_v_cont, handle_v_requests): New functions.
14199 (myresume): New function.
14200 (main): Handle 'v' case.
14201 * target.h (struct thread_resume): New type.
14202 (struct target_ops): Change argument of "resume" to struct
14204 (myresume): Delete macro.
14206 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14208 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14209 (uninstall): Support DESTDIR.
14211 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14213 * configure.srv: Add xscale*linux copy of arm*linux entry.
14215 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14217 * linux-arm-low.c (arm_reinsert_addr): New function.
14218 (the_low_target): Add arm_reinsert_addr.
14220 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14222 * mem-break.c: Remove whitespace at end of file.
14224 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14226 * configure.in: Check whether we need to prototype strerror.
14227 * server.h: Optionally prototype strerror.
14228 * gdbreplay.c (perror_with_name): Use strerror.
14229 * linux-low.c (linux_attach_lwp): Use strerror.
14230 * utils.c (perror_with_name): Use strerror.
14231 * config.in, configure: Regenerated.
14233 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14235 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14236 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14238 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14240 * Makefile.in (SFILES): Update.
14241 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14242 low-sun3.c: Remove files.
14244 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14246 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14247 (linux_detach_one_process, linux_detach): New functions.
14248 (linux_target_ops): Add linux_detach.
14249 * server.c (main): Handle 'D' packet.
14250 * target.h (struct target_ops): Add "detach" member.
14251 (detach_inferior): Define.
14253 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14255 From Kelley Cook <kelleycook@wideopenwest.com>:
14256 * configure.srv: Accept i[34567]86 variants.
14258 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14260 * linux-low.c (linux_wait_for_event): Correct comment typos.
14261 (linux_resume_one_process): Call check_removed_breakpoint.
14262 (linux_send_signal): New function.
14263 (linux_target_ops): Add linux_send_signal.
14264 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14266 * target.h (struct target_ops): Add send_signal.
14268 2003-05-29 Jim Blandy <jimb@redhat.com>
14270 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14271 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14272 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14273 away part of the register's value.
14275 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14277 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14278 (linux_wait_for_event, linux_init_signals): Likewise.
14280 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14282 * configure.in: Check for stdlib.h.
14283 * configure: Regenerated.
14284 * config.in: Regenerated.
14286 2003-01-04 Andreas Schwab <schwab@suse.de>
14288 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14290 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14292 * Makefile.in: Remove obsolete code.
14294 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14296 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14297 defined(PT_FPR0_HI).
14299 2002-11-17 Stuart Hughes <seh@zee2.com>
14301 * linux-arm-low.c (arm_num_regs): Increase.
14302 (arm_regmap): Include status register.
14304 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14306 * linux-low.c (register_addr): Remove incorrect -1 check.
14308 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14310 * linux-low.c (linux_create_inferior): Call setpgid. Return
14312 (unstopped_p, linux_signal_pid): Remove.
14313 (linux_target_ops): Remove linux_signal_pid.
14314 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14315 global instead of target method.
14316 * target.h (struct target_ops): Remove signal_pid. Update comment
14317 for create_inferior.
14318 * server.c (signal_pid): New variable.
14319 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14320 gdbserver. Set the child to be the foreground process group.
14321 (attach_inferior): Set signal_pid.
14323 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14325 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14327 2002-08-20 Jim Blandy <jimb@redhat.com>
14329 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14332 2002-08-01 Andrew Cagney <cagney@redhat.com>
14334 * Makefile.in: Make chill references obsolete.
14336 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14338 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14339 * configure: Regenerate.
14340 * config.in: Regenerate.
14342 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14344 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14345 (perror_with_name, remote_close, remote_open, expect, play): Static.
14347 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14349 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14350 byte offsets instead of an array of indexes.
14351 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14353 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14355 * regcache.c: Add comment.
14357 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14359 * thread-db.c: New file.
14360 * proc-service.c: New file.
14361 * acinclude.m4: New file.
14362 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14363 proc-service.o, and thread-db.o.
14364 (linux-low.o): Add USE_THREAD_DB.
14365 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14366 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14367 * aclocal.m4: Regenerated.
14368 * config.in: Regenerated.
14369 * configure: Regenerated.
14370 * configure.in: Check for proc_service.h, sys/procfs.h,
14371 thread_db.h, and linux/elf.h headrs.
14372 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14373 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14374 Check for -lthread_db and thread support.
14375 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14376 PowerPC, and SuperH.
14377 * i387-fp.c: Constify arguments.
14378 * i387-fp.h: Likewise.
14379 * inferiors.c: (struct thread_info): Renamed from
14380 `struct inferior_info'. Remove PID member. Use generic inferior
14381 list header. All uses updated.
14382 (inferiors, signal_pid): Removed.
14383 (all_threads): New variable.
14384 (get_thread): Define.
14385 (add_inferior_to_list): New function.
14386 (for_each_inferior): New function.
14387 (change_inferior_id): New function.
14388 (add_inferior): Removed.
14389 (remove_inferior): New function.
14390 (add_thread): New function.
14391 (free_one_thread): New function.
14392 (remove_thread): New function.
14393 (clear_inferiors): Use for_each_inferior and free_one_thread.
14394 (find_inferior): New function.
14395 (find_inferior_id): New function.
14396 (inferior_target_data): Update argument type.
14397 (set_inferior_target_data): Likewise.
14398 (inferior_regcache_data): Likewise.
14399 (set_inferior_regcache_data): Likewise.
14400 * linux-low.c (linux_bp_reinsert): Remove.
14401 (all_processes, stopping_threads, using_thrads)
14402 (struct pending_signals, debug_threads, pid_of): New.
14403 (inferior_pid): Replace with macro.
14404 (struct inferior_linux_data): Remove.
14405 (get_stop_pc, add_process): New functions.
14406 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14407 Use add_process and add_thread.
14408 (linux_attach_lwp): New function, based on old linux_attach. Use
14409 add_process and add_thread. Set stop_expected for new threads.
14410 (linux_attach): New function.
14411 (linux_kill_one_process): New function.
14412 (linux_kill): Kill all LWPs.
14413 (linux_thread_alive): Use find_inferior_id.
14414 (check_removed_breakpoints, status_pending_p): New functions.
14415 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14416 Update. Use WNOHANG. Wait for cloned processes also. Update process
14417 struct for the found process.
14418 (linux_wait_for_event): New function.
14419 (linux_wait): Use it. Support LWPs.
14420 (send_sigstop, wait_for_sigstop, stop_all_processes)
14421 (linux_resume_one_process, linux_continue_one_process): New functions.
14422 (linux_resume): Support LWPs.
14423 (REGISTER_RAW_SIZE): Remove.
14424 (fetch_register): Use register_size instead. Call supply_register.
14425 (usr_store_inferior_registers): Likewise. Call collect_register.
14426 Fix recursive case.
14427 (regsets_fetch_inferior_registers): Improve error message.
14428 (regsets_store_inferior_registers): Add debugging.
14429 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14430 (unstopped_p, linux_signal_pid): New functions.
14431 (linux_target_ops): Add linux_signal_pid.
14432 (linux_init_signals): New function.
14433 (initialize_low): Call it. Initialize using_threads.
14434 * regcache.c (inferior_regcache_data): Add valid
14436 (get_regcache): Fetch registers lazily. Add fetch argument
14437 and update all callers.
14438 (regcache_invalidate_one, regcache_invalidate): New
14440 (new_register_cache): Renamed from create_register_cache.
14441 Return the new regcache.
14442 (free_register_cache): Change argument to a void *.
14443 (registers_to_string, registers_from_string): Call get_regcache
14444 with fetch flag set.
14445 (register_data): Make static. Pass fetch flag to get_regcache.
14446 (supply_register): Call get_regcache with fetch flag clear.
14447 (collect_register): Call get_regcache with fetch flag set.
14448 (collect_register_as_string): New function.
14449 * regcache.h: Update.
14450 * remote-utils.c (putpkt): Flush after debug output and use
14452 Handle input interrupts while waiting for an ACK.
14453 (input_interrupt): Use signal_pid method.
14454 (getpkt): Flush after debug output and use stderr.
14455 (outreg): Use collect_register_as_string.
14456 (new_thread_notify, dead_thread_notify): New functions.
14457 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14458 and general_thread.
14459 (look_up_one_symbol): Flush after debug output.
14460 * server.c (step_thread, server_waiting): New variables.
14461 (start_inferior): Don't use signal_pid. Update call to mywait.
14462 (attach_inferior): Update call to mywait.
14463 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14464 (main): Don't fetch/store registers explicitly. Use
14465 set_desired_inferior. Support proposed ``Hs'' packet. Update
14467 * server.h: Update.
14468 (struct inferior_list, struct_inferior_list_entry): New.
14469 * target.c (set_desired_inferior): New.
14470 (write_inferior_memory): Constify.
14471 (mywait): New function.
14472 * target.h: Update.
14473 (struct target_ops): New signal_pid method.
14474 (mywait): Removed macro, added prototype.
14476 * linux-low.h (regset_func): Removed.
14477 (regset_fill_func, regset_store_func): New.
14478 (enum regset_type): New.
14479 (struct regset_info): Add type field. Use new operation types.
14480 (struct linux_target_ops): stop_pc renamed to get_pc.
14481 Add decr_pc_after_break and breakpoint_at.
14482 (get_process, get_thread_proess, get_process_thread)
14483 (strut process_info, all_processes, linux_attach_lwp)
14484 (thread_db_init): New.
14486 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14487 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14488 (the_low_target): Add new members.
14489 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14490 (i386_store_fpxregset): Constify.
14491 (target_regsets): Add new kind identifier.
14492 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14493 (i386_set_pc): Add debugging.
14494 (i386_breakpoint_at): New function.
14495 (the_low_target): Add new members.
14496 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14497 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14498 (mips_breakpoint_at): New.
14499 (the_low_target): Add new members.
14500 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14501 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14502 (the_low_target): Add new members.
14503 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14504 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14505 (the_low_target): Add new members.
14506 * linux-x86-64-low.c (target_regsets): Add new kind
14509 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14511 From Martin Pool <mbp@samba.org>:
14512 * server.c (gdbserver_usage): New function.
14515 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14517 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14518 stop_at -> stop_pc.
14520 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14522 * Makefile.in: Remove obsolete code.
14524 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14526 * linux-low.c (regsets_fetch_inferior_registers),
14527 (regsets_store_inferior_registers): Removed cast to int from
14529 * regcache.h: Added declaration of struct inferior_info.
14531 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14533 * inferiors.c (struct inferior_info): Add regcache_data.
14534 (add_inferior): Call create_register_cache.
14535 (clear_inferiors): Call free_register_cache.
14536 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14537 * regcache.c (struct inferior_regcache_data): New.
14538 (registers): Remove.
14539 (get_regcache): New function.
14540 (create_register_cache, free_register_cache): New functions.
14541 (set_register_cache): Don't initialize the register cache here.
14542 (registers_to_string, registers_from_string, register_data): Call
14544 * regcache.h: Add prototypes.
14545 * server.h: Likewise.
14547 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14549 * mem-break.c: New file.
14550 * mem-break.h: New file.
14551 * Makefile.in: Add mem-break.o rule; update server.h
14553 * inferiors.c (struct inferior_info): Add target_data
14555 (clear_inferiors): Free target_data member if set.
14556 (inferior_target_data, set_inferior_target_data): New functions.
14557 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14558 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14559 * linux-low.c (linux_bp_reinsert): New variable.
14560 (struct inferior_linux_data): New.
14561 (linux_create_inferior): Use set_inferior_target_data.
14562 (linux_attach): Likewise. Call add_inferior.
14563 (linux_wait_for_one_inferior): New function.
14564 (linux_wait): Call it.
14565 (linux_write_memory): Add const.
14566 (initialize_low): Call set_breakpoint_data.
14567 * linux-low.h (struct linux_target_ops): Add breakpoint
14569 * server.c (attach_inferior): Remove extra add_inferior
14571 * server.h: Include mem-break.h. Update inferior.c
14573 * target.c (read_inferior_memory)
14574 (write_inferior_memory): New functions.
14575 * target.h (read_inferior_memory)
14576 (write_inferior_memory): Change macros to prototypes.
14577 (struct target_ops): Update comments. Add const to write_memory
14580 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14582 * linux-low.c (usr_store_inferior_registers): Support
14583 registers which are allowed to fail to store.
14584 * linux-low.h (linux_target_ops): Likewise.
14585 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14586 (ppc_cannot_store_register): FPSCR may not be storable.
14588 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14590 * server.h: Include <string.h> if HAVE_STRING_H.
14591 * ChangeLog: Correct paths in last ChangeLog entry.
14593 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14595 * linux-low.h: Remove obsolete prototypes.
14596 (struct linux_target_ops): New.
14597 (extern the_low_target): New.
14598 * linux-low.c (num_regs, regmap): Remove declarations.
14599 (register_addr): Use the_low_target explicitly.
14600 (fetch_register): Likewise.
14601 (usr_fetch_inferior_registers): Likewise.
14602 (usr_store_inferior_registers): Likewise.
14603 * linux-arm-low.c (num_regs): Remove.
14604 (arm_num_regs): Define.
14605 (arm_regmap): Renamed from regmap, made static.
14606 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14608 (arm_cannot_store_register): Renamed from cannot_store_register,
14610 (the_low_target): New.
14611 * linux-i386-low.c (num_regs): Remove.
14612 (i386_num_regs): Define.
14613 (i386_regmap): Renamed from regmap, made static.
14614 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14616 (i386_cannot_store_register): Renamed from cannot_store_register,
14618 (the_low_target): New.
14619 * linux-ia64-low.c (num_regs): Remove.
14620 (ia64_num_regs): Define.
14621 (ia64_regmap): Renamed from regmap, made static.
14622 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14624 (ia64_cannot_store_register): Renamed from cannot_store_register,
14626 (the_low_target): New.
14627 * linux-m68k-low.c (num_regs): Remove.
14628 (m68k_num_regs): Define.
14629 (m68k_regmap): Renamed from regmap, made static.
14630 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14632 (m68k_cannot_store_register): Renamed from cannot_store_register,
14634 (the_low_target): New.
14635 * linux-mips-low.c (num_regs): Remove.
14636 (mips_num_regs): Define.
14637 (mips_regmap): Renamed from regmap, made static.
14638 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14640 (mips_cannot_store_register): Renamed from cannot_store_register,
14642 (the_low_target): New.
14643 * linux-ppc-low.c (num_regs): Remove.
14644 (ppc_num_regs): Define.
14645 (ppc_regmap): Renamed from regmap, made static.
14646 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14648 (ppc_cannot_store_register): Renamed from cannot_store_register,
14650 (the_low_target): New.
14651 * linux-s390-low.c (num_regs): Remove.
14652 (s390_num_regs): Define.
14653 (s390_regmap): Renamed from regmap, made static.
14654 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14656 (s390_cannot_store_register): Renamed from cannot_store_register,
14658 (the_low_target): New.
14659 * linux-sh-low.c (num_regs): Remove.
14660 (sh_num_regs): Define.
14661 (sh_regmap): Renamed from regmap, made static.
14662 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14664 (sh_cannot_store_register): Renamed from cannot_store_register,
14666 (the_low_target): New.
14667 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14668 (the_low_target): New.
14670 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14672 * Makefile.in: Add stamp-h target.
14673 * configure.in: Create stamp-h.
14674 * configure: Regenerated.
14676 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14678 * inferiors.c: New file.
14679 * target.c: New file.
14680 * target.h: New file.
14681 * Makefile.in: Add target.o and inferiors.o. Update
14683 * linux-low.c (inferior_pid): New static variable,
14684 moved from server.c.
14685 (linux_create_inferior): Renamed from create_inferior.
14686 Call add_inferior. Return 0 on success instead of a PID.
14687 (linux_attach): Renamed from myattach.
14688 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14689 (linux_thread_alive): Renamed from mythread_alive.
14690 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14692 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14693 (regsets_store_inferior_registers): Correct error message.
14694 Add missing ``return 0''.
14695 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14696 (linux_store_registers): Renamed from store_inferior_registers.
14697 (linux_read_memory): Renamed from read_inferior_memory.
14698 (linux_write_memory): Renamed from write_inferior_memory.
14699 (linux_target_ops): New structure.
14700 (initialize_low): Call set_target_ops ().
14701 * remote-utils.c (unhexify): New function.
14702 (hexify): New function.
14703 (input_interrupt): Send signals to ``signal_pid''.
14704 * server.c (inferior_pid): Remove.
14705 (start_inferior): Update create_inferior call.
14706 (attach_inferior): Call add_inferior.
14707 (handle_query): New function.
14708 (main): Call handle_query for `q' packets.
14709 * server.h: Include "target.h". Remove obsolete prototypes.
14710 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14712 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14714 * Makefile.in: Add WARN_CFLAGS. Update configury
14716 * configure.in: Check for <string.h>
14717 * configure: Regenerate.
14718 * config.in: Regenerate.
14719 * gdbreplay.c: Include needed system headers.
14720 (remote_open): Remove strchr prototype.
14721 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14722 * regcache.c (supply_register): Change buf argument to const void *.
14723 (supply_register_by_name): Likewise.
14724 (collect_register): Change buf argument to void *.
14725 (collect_register_by_name): Likewise.
14726 * regcache.h: Add missing prototypes.
14727 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14728 * server.c (handle_query): New function.
14729 (attached): New static variable, moved out of main.
14730 (main): Quiet longjmp clobber warnings.
14731 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14732 * utils.c (error): Remove NORETURN.