1 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3 * Makefile.in (%.o: ../arch/%.c): New rule.
4 (arm.o: ../arch/arm.c): Remove.
5 (arm-linux.o: ../arch/arm-linux.c): Remove.
6 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
9 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11 * Makefile.in (%.o: ../nat/%.c): New rule.
12 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
13 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
14 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
15 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
16 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
17 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
18 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
19 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
20 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
21 (linux-personality.o: ../nat/linux-personality.c): Remove.
22 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
23 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
24 (x86-linux.o: ../nat/x86-linux.c): Remove.
25 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
26 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
28 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
30 * Makefile.in (%.o: ../common/%.c): New rule.
31 (signals.o: ../common/signals.c): Remove.
32 (print-utils.o: ../common/print-utils.c): Remove.
33 (rsp-low.o: ../common/rsp-low.c): Remove.
34 (common-utils.o: ../common/common-utils.c): Remove.
35 (posix-strerror.o: ../common/posix-strerror.c): Remove.
36 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
37 (vec.o: ../common/vec.c): Remove.
38 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
39 (xml-utils.o: ../common/xml-utils.c): Remove.
40 (ptid.o: ../common/ptid.c): Remove.
41 (buffer.o: ../common/buffer.c): Remove.
42 (format.o: ../common/format.c): Remove.
43 (filestuff.o: ../common/filestuff.c): Remove.
44 (agent.o: ../common/agent.c): Remove.
45 (errors.o: ../common/errors.c): Remove.
46 (environ.o: ../common/environ.c): Remove.
47 (common-debug.o: ../common/common-debug.c): Remove.
48 (cleanups.o: ../common/cleanups.c): Remove.
49 (common-exceptions.o: ../common/common-exceptions.c): Remove.
50 (fileio.o: ../common/fileio.c): Remove.
51 (common-regcache.o: ../common/common-regcache.c): Remove.
52 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
53 (new-op.o: ../common/new-op.c): Remove.
54 (btrace-common.o: ../common/btrace-common.c): Remove.
56 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
58 * Makefile.in (%.o: ../target/%.c): New rule.
59 (waitstatus.o: ../target/waitstatus.c): Remove.
61 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
64 (%.c: ../regformats/%.dat,
65 (%.c: ../regformats/arm/%.dat,
66 (%.c: ../regformats/i386/%.dat,
67 (%.c: ../regformats/rs6000/%.dat): New rules.
70 (arm-with-iwmmxt.c): Remove.
71 (arm-with-vfpv2.c): Remove.
72 (arm-with-vfpv3.c): Remove.
73 (arm-with-neon.c): Remove.
76 (reg-crisv32.c): Remove.
78 (i386-linux.c): Remove.
80 (i386-avx-linux.c): Remove.
81 (i386-avx-avx512.c): Remove.
82 (i386-avx-avx512-linux.c): Remove.
84 (i386-mpx-linux.c): Remove.
85 (i386-avx-mpx-avx512-pku.c): Remove.
86 (i386-avx-mpx-avx512-pku-linux.c): Remove.
87 (i386-avx-mpx.c): Remove.
88 (i386-avx-mpx-linux.c): Remove.
90 (i386-mmx-linux.c): Remove.
95 (mips-linux.c): Remove.
96 (mips-dsp-linux.c): Remove.
97 (mips64-linux.c): Remove.
98 (mips64-dsp-linux.c): Remove.
99 (nios2-linux.c): Remove.
100 (powerpc-32.c): Remove.
101 (powerpc-32l.c): Remove.
102 (powerpc-altivec32l.c): Remove.
103 (powerpc-cell32l.c): Remove.
104 (powerpc-vsx32l.c): Remove.
105 (powerpc-isa205-32l.c): Remove.
106 (powerpc-isa205-altivec32l.c): Remove.
107 (powerpc-isa205-vsx32l.c): Remove.
108 (powerpc-e500l.c): Remove.
109 (powerpc-64l.c): Remove.
110 (powerpc-altivec64l.c): Remove.
111 (powerpc-cell64l.c): Remove.
112 (powerpc-vsx64l.c): Remove.
113 (powerpc-isa205-64l.c): Remove.
114 (powerpc-isa205-altivec64l.c): Remove.
115 (powerpc-isa205-vsx64l.c): Remove.
116 (s390-linux32.c): Remove.
117 (s390-linux32v1.c): Remove.
118 (s390-linux32v2.c): Remove.
119 (s390-linux64.c): Remove.
120 (s390-linux64v1.c): Remove.
121 (s390-linux64v2.c): Remove.
122 (s390-te-linux64.c): Remove.
123 (s390-vx-linux64.c): Remove.
124 (s390-tevx-linux64.c): Remove.
125 (s390x-linux64.c): Remove.
126 (s390x-linux64v1.c): Remove.
127 (s390x-linux64v2.c): Remove.
128 (s390x-te-linux64.c): Remove.
129 (s390x-vx-linux64.c): Remove.
130 (s390x-tevx-linux64.c): Remove.
131 (tic6x-c64xp-linux.c): Remove.
132 (tic6x-c64x-linux.c): Remove.
133 (tic6x-c62x-linux.c): Remove.
135 (reg-sparc64.c): Remove.
138 (amd64-linux.c): Remove.
139 (amd64-avx.c): Remove.
140 (amd64-avx-linux.c): Remove.
141 (amd64-avx-avx512.c): Remove.
142 (amd64-avx-avx512-linux.c): Remove.
143 (amd64-mpx.c): Remove.
144 (amd64-mpx-linux.c): Remove.
145 (amd64-avx-mpx-avx512-pku.c): Remove.
146 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
147 (amd64-avx-mpx.c): Remove.
148 (amd64-avx-mpx-linux.c): Remove.
150 (x32-linux.c): Remove.
152 (x32-avx-linux.c): Remove.
153 (x32-avx-avx512.c): Remove.
154 (x32-avx-avx512-linux.c): Remove.
155 (reg-xtensa.c): Remove.
156 (reg-tilegx.c): Remove.
157 (reg-tilegx32.c): Remove.
159 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
161 * Makefile.in (SFILES): Add "common/environ.c".
162 (OBJS): Add "common/environ.h".
164 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
166 * configure.ac: Check if the fs_base and gs_base members of
167 `struct user_regs_struct' exist.
168 * config.in: Regenerated.
169 * configure: Likewise.
171 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
173 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
175 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
176 (get_next_pcs_syscall_next_pc): Likewise.
178 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
180 * win32-i386-low.c: Fix incorrect reference to a couple source files.
181 * nto-x86-low.c: Likewise.
183 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
185 * Makefile.in: Include disable-implicit-rules.mk.
187 2016-11-23 Pedro Alves <palves@redhat.com>
189 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
190 (debug_vprintf): Use std::chrono::steady_clock instead of
191 gettimeofday. Use '.' instead of ':'.
192 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
193 (get_timestamp): Use std::chrono::steady_clock instead of
196 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
198 * Makefile.in: Fix whitespace formatting.
200 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
202 * Makefile.in (SFILES, OBS): Flatten list and order
205 2016-11-23 Pedro Alves <palves@redhat.com>
207 * event-loop.c (handle_file_event): Use warning.
208 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
209 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
212 2016-11-23 Pedro Alves <palves@redhat.com>
214 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
216 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
217 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
218 debug_printf and debug_flush for debug output.
219 * server.c (handle_general_set): Likewise.
220 * thread-db.c (try_thread_db_load): Use debug_printf for debug
223 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
225 * Makefile.in (.c.o): Replace rule with ...
226 (%.o: %.c): ... this one.
228 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
230 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
231 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
233 * configure.ac: Remove checks for the make program.
234 * configure: Re-generate.
236 2016-10-28 Pedro Alves <palves@redhat.com>
238 * Makefile.in (CXX_DIALECT): Get from configure.
239 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
240 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
241 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
242 * config.in: Regenerate.
243 * configure: Regenerate.
245 2016-10-27 Yao Qi <yao.qi@linaro.org>
247 * linux-low.c (linux_supports_range_stepping): Return true if
248 can_software_single_step return true.
250 2016-10-27 Yao Qi <yao.qi@linaro.org>
252 * inferiors.c (find_inferior_in_random): New function.
253 * inferiors.h (find_inferior_in_random): Declare.
254 * linux-low.c (linux_wait_for_event_filtered): Call
255 find_inferior_in_random instead of find_inferior.
257 2016-10-27 Yao Qi <yao.qi@linaro.org>
259 * linux-low.c (linux_wait_1): If single-step breakpoints are
260 inserted, remove them.
262 2016-10-26 Pedro Alves <palves@redhat.com>
264 * linux-low.c (handle_extended_wait): Link parent/child fork
266 (linux_wait_1): Unlink them.
267 (linux_set_resume_request): Ignore resume requests for
268 already-resumed and unhandled fork child threads.
269 * linux-low.h (struct lwp_info) <fork_relative>: New field.
270 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
272 (handle_v_requests) <vCont>: Don't call require_running.
273 * server.h (in_queued_stop_replies): New declaration.
275 2016-10-24 Yao Qi <yao.qi@linaro.org>
278 * linux-aarch64-low.c (append_insns): Cast the return value to
281 2016-10-10 Yao Qi <yao.qi@linaro.org>
283 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
285 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
287 * target.c (target_supports_multi_process): New function, moved
289 * target.h (target_supports_multi_process): ... here. Remove
292 2016-10-05 Tom Tromey <tom@tromey.com>
295 * tracepoint.c (handle_tracepoint_bkpts): Check
296 ipa_error_tracepoint, not ipa_stopping_tracepoint.
298 2016-10-05 Yao Qi <yao.qi@linaro.org>
300 * configure.srv: Update the path of arm-*.xml files.
302 2016-10-05 Terry Guo <terry.guo@arm.com>
303 Yao Qi <yao.qi@linaro.org>
305 * Makefile.in: Adjust the path of rules.
306 * configure.srv: Update the path of xml files.
307 * regformats/arm-with-iwmmxt.dat: Regenerated.
308 * regformats/arm-with-neon.dat: Likewise.
309 * regformats/arm-with-vfpv2.dat: Likewise.
310 * regformats/arm-with-vfpv3.dat Likewise.
312 2016-09-30 Yao Qi <yao.qi@linaro.org>
315 * target.c (target_stop_and_wait): Don't call
316 target_continue_no_signal, use resume_stop instead.
318 2016-09-26 Yao Qi <yao.qi@linaro.org>
320 * linux-low.c (linux_wait_1): Call debug_exit.
322 2016-09-23 Pedro Alves <palves@redhat.com>
324 * Makefile.in (SFILES): Add common/new-op.c.
325 (OBS): Add common/new-op.o.
326 (new-op.o): New rule.
328 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
330 * .gitinore: Ignore more files.
332 2016-09-21 Yao Qi <yao.qi@linaro.org>
334 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
337 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
339 * server.c (start_inferior): Call target_mourn_inferior instead of
340 mourn_inferior; pass ptid_t argument to it.
342 (handle_target_event): Likewise.
343 * target.c (target_mourn_inferior): New function.
344 * target.h (mourn_inferior): Delete macro.
346 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
348 * linux-low.c (lwp_is_stepping): New function.
350 2016-09-06 Carl Love <cel@us.ibm.com>
352 * server.c (start_inferior): Fixed comment, requested comment change
353 didn't get updated correctly. Removed reference to ptrace () call as
354 it is only true on Linux systems.
356 2016-09-06 Carl Love <cel@us.ibm.com>
358 * server.c (start_inferior): Do not call
359 function target_post_create_inferior () if the
360 inferior process has already exited.
362 2016-09-05 Pedro Alves <palves@redhat.com>
364 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
365 (COMPILE.pre, CC_LD): Use CXX directly.
366 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
367 * acinclude.m4: Don't include build-with-cxx.m4.
368 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
369 * configure: Regenerate.
371 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
374 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
375 call writing data to own_buf.
377 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
379 * target.c (mywait): Call target_wait instead of
381 (target_wait): New function.
383 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
385 * server.c (start_inferior): New variable 'ptid'. Replace calls
386 to the_target->resume by target_continue{,_no_signal}, depending
388 * target.c (target_stop_and_wait): Call target_continue_no_signal
389 instead of the_target->resume.
390 (target_continue): New function.
392 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
394 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
396 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
399 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
401 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
402 * linux-arm-low.c (ps_get_thread_area): Likewise.
403 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
404 * linux-m68k-low.c (ps_get_thread_area): Likewise.
405 * linux-mips-low.c (ps_get_thread_area): Likewise.
406 * linux-nios2-low.c (ps_get_thread_area): Likewise.
407 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
408 * linux-x86-low.c (ps_get_thread_area): Likewise.
409 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
411 2016-08-19 Pedro Alves <palves@redhat.com>
413 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
415 2016-08-19 Pedro Alves <palves@redhat.com>
417 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
418 comment. Use memcpy instead of casting through unsigned long.
420 2016-08-19 Pedro Alves <palves@redhat.com>
422 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
423 allocating around 0x80000000.
425 2016-08-19 Pedro Alves <palves@redhat.com>
428 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
429 (x32-avx512-linux-ipa.o): New rules.
430 * configure.ac (x86_64-*-linux*): New x32 check.
431 * configure.srv (ipa_x32_linux_regobj): New.
432 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
433 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
435 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
437 * configure: Regenerate.
439 2016-08-09 Pedro Alves <palves@redhat.com>
442 * Makefile.in (OBS): Add signals-state-save-restore.o.
443 (signals-state-save-restore.o): New rule.
444 * config.in: Regenerate.
445 * configure: Regenerate.
446 * linux-low.c: Include "signals-state-save-restore.h".
447 (linux_create_inferior): Call
448 restore_original_signals_state.
449 * server.c: Include "dispositions-save-restore.h".
450 (captured_main): Call save_original_signals_state.
452 2016-08-05 Pedro Alves <palves@redhat.com>
454 * configure: Regenerate.
456 2016-08-04 Yao Qi <yao.qi@linaro.org>
458 * linux-low.c (regsets_fetch_inferior_registers): Check
459 errno is ESRCH or not.
461 2016-08-02 Yao Qi <yao.qi@linaro.org>
463 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
464 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
465 (thread_db_load_search): Update.
466 (try_thread_db_load_1): Don't look for td_ta_event_addr,
467 td_ta_set_event and td_ta_event_getmsg.
469 2016-07-26 Pedro Alves <palves@redhat.com>
472 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
473 of unsigned long for 64-bit registers and use uint32_t instead of
474 unsigned int for 32-bit registers.
476 2016-07-26 Pedro Alves <palves@redhat.com>
478 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
481 2016-07-21 Tom Tromey <tom@tromey.com>
483 * configure: Rebuild.
485 2016-07-21 Yao Qi <yao.qi@linaro.org>
487 * mem-break.c (find_gdb_breakpoint): Cast bp to
488 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
490 2016-07-21 Yao Qi <yao.qi@linaro.org>
492 * server.c (handle_v_requests): Support s and S actions
493 if target_supports_software_single_step return true.
495 2016-07-21 Yao Qi <yao.qi@linaro.org>
497 * linux-low.c (resume_stopped_resumed_lwps): If resume request
498 is resume_step, call maybe_hw_step.
499 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
501 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
503 (proceed_one_lwp): If resume request is resume_step, install
504 reinsert breakpoints and call maybe_hw_step.
506 2016-07-21 Yao Qi <yao.qi@linaro.org>
508 * linux-low.c (proceed_one_lwp): Declare.
509 (linux_resume_one_thread): Remove local variable 'step'.
510 Lift code enqueue signal. Call proceed_one_lwp instead of
511 linux_resume_one_lwp.
513 2016-07-21 Yao Qi <yao.qi@linaro.org>
515 * linux-low.c (linux_resume_one_thread): Call
516 enqueue_pending_signal.
518 2016-07-21 Yao Qi <yao.qi@linaro.org>
520 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
521 * inferiors.c (do_restore_current_thread_cleanup): New function.
522 (make_cleanup_restore_current_thread): Likewise.
523 * linux-low.c (install_software_single_step_breakpoints): Call
524 make_cleanup_restore_current_thread. Switch current_thread to
527 2016-07-21 Yao Qi <yao.qi@linaro.org>
529 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
530 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
531 (clone_one_breakpoint): Likewise.
532 (delete_reinsert_breakpoints): Change parameter to thread.
534 (has_reinsert_breakpoints): Likewise.
535 (uninsert_reinsert_breakpoints): Likewise.
536 (reinsert_reinsert_breakpoints): Likewise.
537 * mem-break.h (set_reinsert_breakpoint): Update declaration.
538 (delete_reinsert_breakpoints): Likewise.
539 (reinsert_reinsert_breakpoints): Likewise.
540 (uninsert_reinsert_breakpoints): Likewise.
541 (has_reinsert_breakpoints): Likewise.
543 2016-07-21 Yao Qi <yao.qi@linaro.org>
545 * inferiors.c (get_thread_process): Make parameter const.
546 * inferiors.h (get_thread_process): Update declaration.
547 * mem-break.c (clone_all_breakpoints): Remove all parameters.
548 Add new parameters child_thread and parent_thread. Callers
550 * mem-break.h (clone_all_breakpoints): Update declaration.
552 2016-07-21 Yao Qi <yao.qi@linaro.org>
554 * mem-break.c (struct breakpoint) <cond_list>: Remove.
555 <command_list, handler>: Remove.
556 (struct gdb_breakpoint): New.
557 (struct other_breakpoint): New.
558 (struct reinsert_breakpoint): New.
559 (is_gdb_breakpoint): New function.
560 (any_persistent_commands): Update command_list if
561 is_gdb_breakpoint returns true.
562 (set_breakpoint): Create breakpoints according to their types.
563 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
564 (set_gdb_breakpoint_1): Likewise.
565 (set_gdb_breakpoint): Likewise.
566 (clear_breakpoint_conditions): Change parameter type to
567 'struct gdb_breakpoint *'.
568 (clear_breakpoint_commands): Likewise.
569 (clear_breakpoint_conditions_and_commands): Likewise.
570 (add_condition_to_breakpoint): Likewise.
571 (add_breakpoint_condition): Likewise.
572 (add_commands_to_breakpoint): Likewise.
573 (check_breakpoints): Check other_breakpoint.
574 (clone_one_breakpoint): Clone breakpopint according to its type.
575 * mem-break.h (struct gdb_breakpoint): Declare.
576 (set_gdb_breakpoint): Update declaration.
577 (clear_breakpoint_conditions_and_commands): Likewise.
578 (add_breakpoint_condition): Likewise.
579 (add_breakpoint_commands): Likewise.
580 * server.c (process_point_options): Change parameter type to
581 'struct gdb_breakpoint *'.
583 2016-07-21 Yao Qi <yao.qi@linaro.org>
585 * mem-break.c (set_breakpoint_at): Rename it to ...
586 (set_breakpoint_type_at): ... it.
587 (set_breakpoint_at): Call set_breakpoint_type_at.
588 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
589 * mem-break.h (set_breakpoint_at): Update comments.
591 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
593 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
595 (nios2_store_gregset): Likewise.
597 2016-07-01 Pedro Alves <palves@redhat.com>
598 Antoine Tremblay <antoine.tremblay@ericsson.com>
600 * linux-low.c: Change interface to take the target lwp_info
601 pointer directly and return void. Handle detaching from a zombie
603 (linux_detach_lwp_callback): New function.
604 (linux_detach): Detach from the leader thread after detaching from
607 2016-06-28 Yao Qi <yao.qi@linaro.org>
609 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
610 for variable new_offset.
611 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
612 (aarch64_ftrace_insn_reloc_cb): Likewise.
613 (aarch64_ftrace_insn_reloc_tb): Likewise.
614 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
615 PRIx64 instead of PRIx32.
617 2016-06-28 Yao Qi <yao.qi@linaro.org>
619 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
620 (the_low_target): Install arm_get_syscall_trapinfo.
622 2016-06-28 Yao Qi <yao.qi@linaro.org>
624 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
626 (the_low_target): Install aarch64_get_syscall_trapinfo.
628 2016-06-28 Yao Qi <yao.qi@linaro.org>
630 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
632 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
633 Remove parameter sysno.
634 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
637 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
639 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
640 (s390_emit_ne_goto): Likewise.
641 (s390_emit_lt_goto): Likewise.
642 (s390_emit_le_goto): Likewise.
643 (s390_emit_gt_goto): Likewise.
644 (s390_emit_ge_goto): Likewise.
645 (s390x_emit_eq_goto): Likewise.
646 (s390x_emit_ne_goto): Likewise.
647 (s390x_emit_lt_goto): Likewise.
648 (s390x_emit_le_goto): Likewise.
649 (s390x_emit_gt_goto): Likewise.
650 (s390x_emit_ge_goto): Likewise.
651 (s390_emit_ops_impl): Mark variable static.
652 (s390x_emit_ops): Likewise.
654 2016-06-17 Yao Qi <yao.qi@linaro.org>
656 * linux-low.c (handle_extended_wait): Call
657 uninsert_reinsert_breakpoints for the parent process. Remove
658 reinsert breakpoints from the child process. Reinsert them to
659 the parent process when vfork is done.
660 * mem-break.c (uninsert_reinsert_breakpoints): New function.
661 (reinsert_reinsert_breakpoints): New function.
662 * mem-break.h (uninsert_reinsert_breakpoints): Declare
663 (reinsert_reinsert_breakpoints): Declare.
665 2016-06-17 Yao Qi <yao.qi@linaro.org>
667 * linux-low.c (handle_extended_wait): If the parent is doing
668 step-over, remove the reinsert breakpoints from the forked child.
670 2016-06-17 Yao Qi <yao.qi@linaro.org>
672 * linux-low.c (unsuspend_all_lwps): Declare.
673 (linux_low_filter_event): If thread exited, call finish_step_over.
674 If step-over is finished, unsuspend other threads.
676 2016-06-17 Yao Qi <yao.qi@linaro.org>
678 * linux-low.c (linux_resume_one_lwp_throw): Assert
679 has_reinsert_breakpoints returns false.
680 * mem-break.c (delete_disabled_breakpoints): Assert
681 bp type isn't reinsert_breakpoint.
683 2016-06-17 Yao Qi <yao.qi@linaro.org>
685 * linux-low.c (maybe_hw_step): New function.
686 (linux_resume_one_lwp_throw): Call maybe_hw_step.
687 (finish_step_over): Switch current_thread to lwp temporarily,
688 and assert has_reinsert_breakpoints returns true.
689 (proceed_one_lwp): Call maybe_hw_step.
690 * mem-break.c (has_reinsert_breakpoints): New function.
691 * mem-break.h (has_reinsert_breakpoints): Declare.
693 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
695 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
697 2016-05-17 Yao Qi <yao.qi@linaro.org>
699 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
700 instead of find_inferior.
702 2016-05-05 Yao Qi <yao.qi@linaro.org>
704 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
705 Initialize res to zero.
707 2016-05-05 Yao Qi <yao.qi@linaro.org>
709 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
712 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
714 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
715 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
716 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
718 2016-04-28 Par Olsson <par.olsson@windriver.com>
719 Simon Marchi <simon.marchi@ericsson.com>
721 * tracepoint.c (write_inferior_int8): New function.
722 (cmd_qtenable_disable): Write enable flag using
725 2016-04-25 Yao Qi <yao.qi@linaro.org>
727 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
728 (need_step_over_p): Return zero if the LWP has pending signals
729 can be delivered on software single step target.
731 2016-04-25 Yao Qi <yao.qi@linaro.org>
733 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
734 return instead of error.
736 2016-04-22 Yao Qi <yao.qi@linaro.org>
738 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
741 2016-04-22 Yao Qi <yao.qi@linaro.org>
743 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
744 signal when stepping over breakpoint with software single
747 2016-04-21 Pedro Alves <palves@redhat.com>
749 * linux-s390-low.c (s390_collect_ptrace_register)
750 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
752 (s390_check_regset): Use void * instead of gdb_byte *.
754 2016-04-20 Pedro Alves <palves@redhat.com>
756 * configure: Renegerate.
758 2016-04-20 Yao Qi <yao.qi@linaro.org>
760 * linux-aarch32-low.c: Include "arch/arm-linux.h".
761 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
763 (arm_store_gregset): Likewise.
765 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
767 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
768 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
769 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
770 (amd64-avx-mpx-linux.c): New rules.
771 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
772 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
773 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
774 (srv_amd64_regobj): Add amd64-avx-mpx.o.
775 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
776 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
777 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
778 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
779 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
780 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
781 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
782 * linux-x86-low.c (x86_linux_read_description): Add case for
783 X86_XSTATE_AVX_MPX_MASK.
784 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
785 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
786 init_registers_i386_avx_mpx_linux.
787 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
788 (initialize_low_tracepoint): Call
789 init_registers_i386_avx_mpx_linux.
790 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
791 (initialize_low_tracepoint): Call
792 init_registers_amd64_avx_mpx_linux.
793 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
794 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
795 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
798 2016-04-18 Pedro Alves <palves@redhat.com>
800 * configure: Regenerate.
802 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
804 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
805 (aarch64_emit_sub): Likewise.
807 2016-04-12 Pedro Alves <palves@redhat.com>
809 * utils.c (prepare_to_throw_exception): Delete.
811 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
813 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
815 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
817 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
819 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
821 * linux-aarch64-ipa.c: Add <elf.h> include.
822 * linux-ppc-ipa.c: Add <elf.h> include.
823 * linux-s390-ipa.c: Add <elf.h> include.
825 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
827 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
828 (get_raw_reg_ptr): Likewise.
829 (get_trace_state_variable_value_ptr): Likewise.
830 (set_trace_state_variable_value_ptr): Likewise.
831 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
834 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
835 Marcin Kościelnicki <koriakin@0x04.net>
838 * linux-ppc-low.c (emit_insns): New function.
839 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
840 (ppc_emit_prologue): New function.
841 (ppc_emit_epilogue): New function.
842 (ppc_emit_add): New function.
843 (ppc_emit_sub): New function.
844 (ppc_emit_mul): New function.
845 (ppc_emit_lsh): New function.
846 (ppc_emit_rsh_signed): New function.
847 (ppc_emit_rsh_unsigned): New function.
848 (ppc_emit_ext): New function.
849 (ppc_emit_zero_ext): New function.
850 (ppc_emit_log_not): New function.
851 (ppc_emit_bit_and): New function.
852 (ppc_emit_bit_or): New function.
853 (ppc_emit_bit_xor): New function.
854 (ppc_emit_bit_not): New function.
855 (ppc_emit_equal): New function.
856 (ppc_emit_less_signed): New function.
857 (ppc_emit_less_unsigned): New function.
858 (ppc_emit_ref): New function.
859 (ppc_emit_const): New function.
860 (ppc_emit_reg): New function.
861 (ppc_emit_pop): New function.
862 (ppc_emit_stack_flush): New function.
863 (ppc_emit_swap): New function.
864 (ppc_emit_stack_adjust): New function.
865 (ppc_emit_call): New function.
866 (ppc_emit_int_call_1): New function.
867 (ppc_emit_void_call_2): New function.
868 (ppc_emit_if_goto): New function.
869 (ppc_emit_goto): New function.
870 (ppc_emit_eq_goto): New function.
871 (ppc_emit_ne_goto): New function.
872 (ppc_emit_lt_goto): New function.
873 (ppc_emit_le_goto): New function.
874 (ppc_emit_gt_goto): New function.
875 (ppc_emit_ge_goto): New function.
876 (ppc_write_goto_address): New function.
877 (ppc_emit_ops_impl): New static variable.
878 (ppc64v1_emit_prologue): New function.
879 (ppc64v2_emit_prologue): New function.
880 (ppc64_emit_epilogue): New function.
881 (ppc64_emit_add): New function.
882 (ppc64_emit_sub): New function.
883 (ppc64_emit_mul): New function.
884 (ppc64_emit_lsh): New function.
885 (ppc64_emit_rsh_signed): New function.
886 (ppc64_emit_rsh_unsigned): New function.
887 (ppc64_emit_ext): New function.
888 (ppc64_emit_zero_ext): New function.
889 (ppc64_emit_log_not): New function.
890 (ppc64_emit_bit_and): New function.
891 (ppc64_emit_bit_or): New function.
892 (ppc64_emit_bit_xor): New function.
893 (ppc64_emit_bit_not): New function.
894 (ppc64_emit_equal): New function.
895 (ppc64_emit_less_signed): New function.
896 (ppc64_emit_less_unsigned): New function.
897 (ppc64_emit_ref): New function.
898 (ppc64_emit_const): New function.
899 (ppc64v1_emit_reg): New function.
900 (ppc64v2_emit_reg): New function.
901 (ppc64_emit_pop): New function.
902 (ppc64_emit_stack_flush): New function.
903 (ppc64_emit_swap): New function.
904 (ppc64v1_emit_call): New function.
905 (ppc64v2_emit_call): New function.
906 (ppc64v1_emit_int_call_1): New function.
907 (ppc64v2_emit_int_call_1): New function.
908 (ppc64v1_emit_void_call_2): New function.
909 (ppc64v2_emit_void_call_2): New function.
910 (ppc64_emit_if_goto): New function.
911 (ppc64_emit_eq_goto): New function.
912 (ppc64_emit_ne_goto): New function.
913 (ppc64_emit_lt_goto): New function.
914 (ppc64_emit_le_goto): New function.
915 (ppc64_emit_gt_goto): New function.
916 (ppc64_emit_ge_goto): New function.
917 (ppc64v1_emit_ops_impl): New static variable.
918 (ppc64v2_emit_ops_impl): New static variable.
919 (ppc_emit_ops): New function.
920 (linux_low_target): Wire in ppc_emit_ops.
922 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
923 Marcin Kościelnicki <koriakin@0x04.net>
926 * Makefile.in: Add powerpc-*-ipa.o
927 * configure.srv: Add ipa_obj for powerpc*-linux.
928 * linux-ppc-ipa.c: New file.
929 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
931 (PPC_FIELD): New macro.
932 (PPC_SEXT): New macro.
933 (PPC_OP6): New macro.
937 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
938 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
939 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
940 (ppc_get_thread_area): New function.
941 (is_elfv2_inferior): New function.
942 (gen_ds_form): New function.
943 (GEN_STD): New macro.
944 (GEN_STDU): New macro.
946 (GEN_LDU): New macro.
947 (gen_d_form): New function.
948 (GEN_ADDI): New macro.
949 (GEN_ADDIS): New macro.
951 (GEN_LIS): New macro.
952 (GEN_ORI): New macro.
953 (GEN_ORIS): New macro.
954 (GEN_LWZ): New macro.
955 (GEN_STW): New macro.
956 (GEN_STWU): New macro.
957 (gen_xfx_form): New function.
958 (GEN_MFSPR): New macro.
959 (GEN_MTSPR): New macro.
960 (GEN_MFCR): New macro.
961 (GEN_MTCR): New macro.
962 (GEN_SYNC): New macro.
963 (GEN_LWSYNC): New macro.
964 (gen_x_form): New function.
967 (GEN_LWARX): New macro.
968 (GEN_STWCX): New macro.
969 (GEN_CMPW): New macro.
970 (gen_md_form): New function.
971 (GEN_RLDICL): New macro.
972 (GEN_RLDICR): New macro.
973 (gen_i_form): New function.
976 (gen_b_form): New function.
977 (GEN_BNE): New macro.
978 (GEN_LOAD): New macro.
979 (GEN_STORE): New macro.
980 (gen_limm): New function.
981 (gen_atomic_xchg): New function.
982 (gen_call): New function.
983 (ppc_relocate_instruction): New function.
984 (ppc_install_fast_tracepoint_jump_pad): New function.
985 (ppc_get_min_fast_tracepoint_insn_len): New function.
986 (ppc_get_ipa_tdesc_idx): New function.
987 (the_low_target): Wire in the new functions.
988 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
990 * linux-ppc-tdesc.h: New file.
992 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
994 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
995 (alloc_jump_pad_buffer): New function.
996 * linux-amd64-ipa.c: Add <sys/mman.h> include.
997 (alloc_jump_pad_buffer): New function.
998 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
999 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1000 (alloc_jump_pad_buffer): New function.
1001 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1002 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1003 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1004 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1006 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1008 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1009 * linux-amd64-ipa.c: Likewise.
1010 * linux-i386-ipa.c: Likewise.
1011 * linux-s390-ipa.c: Likewise.
1012 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1013 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1014 set_trace_state_variable_value_ptr.
1015 (struct ipa_sym_addresses): Likewise.
1016 (symbol_list): Likewise.
1017 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1018 accessing gdb_collect directly.
1019 (gdb_collect_ptr_type): New typedef.
1020 (get_raw_reg_ptr_type): New typedef.
1021 (get_trace_state_variable_value_ptr_type): New typedef.
1022 (set_trace_state_variable_value_ptr_type): New typedef.
1023 (gdb_collect_ptr): New global.
1024 (get_raw_reg_ptr): New global.
1025 (get_trace_state_variable_value_ptr): New global.
1026 (set_trace_state_variable_value_ptr): New global.
1027 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1028 accessing get_raw_reg directly.
1029 (get_get_tsv_func_addr): Likewise for
1030 get_trace_state_variable_value_ptr.
1031 (get_set_tsv_func_addr): Likewise for
1032 set_trace_state_variable_value_ptr.
1033 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1035 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1037 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1039 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1041 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1043 (relocate_instruction): Remove own_buf.
1044 * server.c (own_buf): Make global.
1045 (handle_v_requests): Make global.
1046 * server.h (own_buf): New declaration.
1047 (handle_v_requests): New prototype.
1049 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1052 * linux-s390-low.c (add_insns): New function.
1053 (s390_emit_prologue): New function.
1054 (s390_emit_epilogue): New function.
1055 (s390_emit_add): New function.
1056 (s390_emit_sub): New function.
1057 (s390_emit_mul): New function.
1058 (s390_emit_lsh): New function.
1059 (s390_emit_rsh_signed): New function.
1060 (s390_emit_rsh_unsigned): New function.
1061 (s390_emit_ext): New function.
1062 (s390_emit_log_not): New function.
1063 (s390_emit_bit_and): New function.
1064 (s390_emit_bit_or): New function.
1065 (s390_emit_bit_xor): New function.
1066 (s390_emit_bit_not): New function.
1067 (s390_emit_equal): New function.
1068 (s390_emit_less_signed): New function.
1069 (s390_emit_less_unsigned): New function.
1070 (s390_emit_ref): New function.
1071 (s390_emit_if_goto): New function.
1072 (s390_emit_goto): New function.
1073 (s390_write_goto_address): New function.
1074 (s390_emit_litpool): New function.
1075 (s390_emit_const): New function.
1076 (s390_emit_call): New function.
1077 (s390_emit_reg): New function.
1078 (s390_emit_pop): New function.
1079 (s390_emit_stack_flush): New function.
1080 (s390_emit_zero_ext): New function.
1081 (s390_emit_swap): New function.
1082 (s390_emit_stack_adjust): New function.
1083 (s390_emit_set_r2): New function.
1084 (s390_emit_int_call_1): New function.
1085 (s390_emit_void_call_2): New function.
1086 (s390_emit_eq_goto): New function.
1087 (s390_emit_ne_goto): New function.
1088 (s390_emit_lt_goto): New function.
1089 (s390_emit_le_goto): New function.
1090 (s390_emit_gt_goto): New function.
1091 (s390_emit_ge_goto): New function.
1092 (s390x_emit_prologue): New function.
1093 (s390x_emit_epilogue): New function.
1094 (s390x_emit_add): New function.
1095 (s390x_emit_sub): New function.
1096 (s390x_emit_mul): New function.
1097 (s390x_emit_lsh): New function.
1098 (s390x_emit_rsh_signed): New function.
1099 (s390x_emit_rsh_unsigned): New function.
1100 (s390x_emit_ext): New function.
1101 (s390x_emit_log_not): New function.
1102 (s390x_emit_bit_and): New function.
1103 (s390x_emit_bit_or): New function.
1104 (s390x_emit_bit_xor): New function.
1105 (s390x_emit_bit_not): New function.
1106 (s390x_emit_equal): New function.
1107 (s390x_emit_less_signed): New function.
1108 (s390x_emit_less_unsigned): New function.
1109 (s390x_emit_ref): New function.
1110 (s390x_emit_if_goto): New function.
1111 (s390x_emit_const): New function.
1112 (s390x_emit_call): New function.
1113 (s390x_emit_reg): New function.
1114 (s390x_emit_pop): New function.
1115 (s390x_emit_stack_flush): New function.
1116 (s390x_emit_zero_ext): New function.
1117 (s390x_emit_swap): New function.
1118 (s390x_emit_stack_adjust): New function.
1119 (s390x_emit_int_call_1): New function.
1120 (s390x_emit_void_call_2): New function.
1121 (s390x_emit_eq_goto): New function.
1122 (s390x_emit_ne_goto): New function.
1123 (s390x_emit_lt_goto): New function.
1124 (s390x_emit_le_goto): New function.
1125 (s390x_emit_gt_goto): New function.
1126 (s390x_emit_ge_goto): New function.
1127 (s390_emit_ops): New function.
1128 (struct linux_target_ops): Fill in emit_ops hook.
1130 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1133 * Makefile.in: Add s390 IPA files.
1134 * configure.srv: Build IPA for s390.
1135 * linux-s390-ipa.c: New file.
1136 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1137 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1138 (tdesc_s390_linux32): Likewise.
1139 (init_registers_s390_linux32v1): Likewise.
1140 (tdesc_s390_linux32v1): Likewise.
1141 (init_registers_s390_linux32v2): Likewise.
1142 (tdesc_s390_linux32v2): Likewise.
1143 (init_registers_s390_linux64): Likewise.
1144 (tdesc_s390_linux64): Likewise.
1145 (init_registers_s390_linux64v1): Likewise.
1146 (tdesc_s390_linux64v1): Likewise.
1147 (init_registers_s390_linux64v2): Likewise.
1148 (tdesc_s390_linux64v2): Likewise.
1149 (init_registers_s390_te_linux64): Likewise.
1150 (tdesc_s390_te_linux64): Likewise.
1151 (init_registers_s390_vx_linux64): Likewise.
1152 (tdesc_s390_vx_linux64): Likewise.
1153 (init_registers_s390_tevx_linux64): Likewise.
1154 (tdesc_s390_tevx_linux64): Likewise.
1155 (init_registers_s390x_linux64): Likewise.
1156 (tdesc_s390x_linux64): Likewise.
1157 (init_registers_s390x_linux64v1): Likewise.
1158 (tdesc_s390x_linux64v1): Likewise.
1159 (init_registers_s390x_linux64v2): Likewise.
1160 (tdesc_s390x_linux64v2): Likewise.
1161 (init_registers_s390x_te_linux64): Likewise.
1162 (tdesc_s390x_te_linux64): Likewise.
1163 (init_registers_s390x_vx_linux64): Likewise.
1164 (tdesc_s390x_vx_linux64): Likewise.
1165 (init_registers_s390x_tevx_linux64): Likewise.
1166 (tdesc_s390x_tevx_linux64): Likewise.
1167 (have_hwcap_s390_vx): New static variable.
1168 (s390_arch_setup): Fill have_hwcap_s390_vx.
1169 (s390_get_thread_area): New function.
1170 (s390_ft_entry_gpr_esa): New const.
1171 (s390_ft_entry_gpr_zarch): New const.
1172 (s390_ft_entry_misc): New const.
1173 (s390_ft_entry_fr): New const.
1174 (s390_ft_entry_vr): New const.
1175 (s390_ft_main_31): New const.
1176 (s390_ft_main_64): New const.
1177 (s390_ft_exit_fr): New const.
1178 (s390_ft_exit_vr): New const.
1179 (s390_ft_exit_misc): New const.
1180 (s390_ft_exit_gpr_esa): New const.
1181 (s390_ft_exit_gpr_zarch): New const.
1182 (append_insns): New function.
1183 (s390_relocate_instruction): New function.
1184 (s390_install_fast_tracepoint_jump_pad): New function.
1185 (s390_get_min_fast_tracepoint_insn_len): New function.
1186 (s390_get_ipa_tdesc_idx): New function.
1187 (struct linux_target_ops): Wire in the above functions.
1188 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1189 * linux-s390-tdesc.h: New file.
1191 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1193 * linux-s390-low.c (s390_supports_tracepoints): New function.
1194 (struct linux_target_ops): Fill supports_tracepoints hook.
1196 2016-03-18 Yao Qi <yao.qi@linaro.org>
1198 * linux-low.c (lwp_signal_can_be_delivered): New function.
1199 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1201 2016-03-18 Yao Qi <yao.qi@linaro.org>
1203 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1204 0 if signal is enqueued. Remove 'signal' from one debugging
1205 message. Move one debugging message to some lines below.
1206 Remove code setting 'signal' to 0.
1208 2016-03-18 Yao Qi <yao.qi@linaro.org>
1210 * linux-low.c (linux_low_filter_event): Remove redundant
1211 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1213 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1215 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1216 (struct linux_target_ops): Wire in the above.
1218 2016-03-03 Yao Qi <yao.qi@linaro.org>
1220 * linux-low.c: Update comments to start_step_over.
1222 2016-03-03 Yao Qi <yao.qi@linaro.org>
1225 * linux-low.c (handle_extended_wait): Set child suspended
1226 if event_lwp->bp_reinsert isn't zero.
1228 2016-03-02 Yao Qi <yao.qi@linaro.org>
1230 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1231 enqueue_pending_signal.
1233 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1235 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1238 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1240 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1241 (s390_regmap_3264) [!__s390x__]: New global.
1242 (s390_collect_ptrace_register): Skip map entries containing -1.
1243 (s390_supply_ptrace_register): Ditto.
1244 (s390_fill_gprs_high): New function.
1245 (s390_store_gprs_high): New function.
1246 (s390_regsets): Add NT_S390_HIGH_GPRS.
1247 (s390_get_hwcap): Enable on 31-bit.
1248 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1249 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1250 Detect NT_S390_HIGH_GPRS.
1251 (s390_usrregs_info_3264): Enable on 31-bit.
1252 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1253 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1255 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1258 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1259 * configure.srv: Ditto.
1260 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1261 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1262 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1263 (init_registers_amd64_linux): Remove prototype.
1264 (tdesc_amd64_linux): Remove declaration.
1265 (get_ipa_tdesc): New function.
1266 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1267 initialize remaining tdescs.
1268 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1269 (init_registers_i386_linux): Remove prototype.
1270 (tdesc_i386_linux): Remove declaration.
1271 (get_ipa_tdesc): New function.
1272 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1273 initialize remaining tdescs.
1274 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1275 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1276 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1277 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1278 (x86_get_ipa_tdesc_idx): New function.
1279 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1280 * linux-x86-tdesc.h: New file.
1281 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1282 (target_get_ipa_tdesc_idx): New macro.
1283 * tracepoint.c (ipa_tdesc_idx): New macro.
1284 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1285 (symbol_list): Add ipa_tdesc_idx.
1286 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1287 (ipa_tdesc): Remove.
1288 (ipa_tdesc_idx): New variable.
1289 (get_context_regcache): Use get_ipa_tdesc.
1290 (gdb_collect): Ditto.
1292 * tracepoint.h (get_ipa_tdesc): New prototype.
1293 (ipa_tdesc): Remove.
1295 2016-02-24 Pedro Alves <palves@redhat.com>
1297 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1298 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1299 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1300 Factor out common code between the USE_SIGTRAP_SIGINFO and
1301 !USE_SIGTRAP_SIGINFO blocks.
1302 (linux_low_filter_event): Call save_stop_reason instead of
1303 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1305 (linux_wait_1): Update comments.
1307 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1309 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1310 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1311 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1312 ppc_insert_point, ppc_remove_point.
1314 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1316 * linux-s390-low.c (s390_supports_z_point_type): New function.
1317 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1319 2016-02-16 Yao Qi <yao.qi@linaro.org>
1321 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1322 PC. Get pc from regcache_read_pc.
1324 2016-02-12 Yao Qi <yao.qi@linaro.org>
1326 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1327 or linux_get_pc_32bit.
1328 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1330 2016-02-12 Yao Qi <yao.qi@linaro.org>
1332 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1333 arm_linux_get_next_pcs_fixup.
1335 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1337 * tracepoint.c (x_tracepoint_action_download): Change
1338 write_inferior_data_ptr to write_inferior_data_pointer.
1339 (cmd_qtstart): Likewise.
1340 (write_inferior_data_ptr): Remove.
1341 (download_agent_expr): Change write_inferior_data_ptr to
1342 write_inferior_data_pointer.
1343 (download_tracepoint_1): Likewise.
1344 (download_tracepoint): Likewise.
1345 (download_trace_state_variables): Likewise.
1347 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1348 Marcin Kościelnicki <koriakin@0x04.net>
1350 * tracepoint.c (struct tracepoint_action_ops): Remove.
1351 (struct tracepoint_action): Remove ops.
1352 (m_tracepoint_action_download, r_tracepoint_action_download)
1353 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1354 size and offset accordingly.
1355 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1356 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1357 (tracepoint_action_send, tracepoint_action_download): New functions.
1358 Helpers for trace action handlers.
1359 (add_tracepoint_action): Remove setup actions ops.
1360 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1362 2016-02-10 Yao Qi <yao.qi@linaro.org>
1364 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1366 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1368 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1370 * configure: Regenerate.
1372 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1374 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1375 void * to gdb_byte *.
1376 * linux-low.c (siginfo_fixup): Likewise.
1377 (linux_xfer_siginfo): Likewise.
1378 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1380 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1382 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1384 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1386 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1388 * linux-x86-low.c [__x86_64__]: Include
1389 "nat/amd64-linux-siginfo.h".
1390 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1391 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1392 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1393 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1394 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1395 (cpt_si_fd, si_timerid, si_overrun): Move from
1396 nat/amd64-linux-siginfo.c.
1397 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1399 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1401 * server.c (skip_to_semicolon): Remove.
1402 (process_point_options): Use strchrnul instead of
1405 2016-01-26 Yao Qi <yao.qi@linaro.org>
1407 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1408 * linux-low.c (install_software_single_step_breakpoints): Don't
1409 call regcache_read_pc.
1410 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1413 2016-01-26 Yao Qi <yao.qi@linaro.org>
1415 * linux-low.c (install_software_single_step_breakpoints): Call
1416 regcache_read_pc instead of get_pc.
1418 2016-01-26 Yao Qi <yao.qi@linaro.org>
1420 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1421 (unblock_async_io): Rename to ...
1422 (block_unblock_async_io): ... it. New function.
1423 (enable_async_io): Don't install SIGIO handler. Unblock it
1425 (disable_async_io): Don't ignore SIGIO. Block it instead.
1426 (initialize_async_io): Install SIGIO handler. Don't call
1429 2016-01-26 Yao Qi <yao.qi@linaro.org>
1431 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1432 first character is '\003', call *the_target->request_interrupt.
1434 2016-01-25 Yao Qi <yao.qi@linaro.org>
1436 * remote-utils.c (new_thread_notify): Remove.
1437 (dead_thread_notify): Likewise.
1438 * remote-utils.h (new_thread_notify): Remove declaration.
1439 (dead_thread_notify): Likewise.
1441 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1443 * gdb.trace/pending.exp: Fix expected message on continue.
1445 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1447 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1448 it works properly on big-endian machines where sizeof (CORE_ADDR)
1451 2016-01-21 Pedro Alves <palves@redhat.com>
1453 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1454 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1455 * configure: Regenerate.
1457 2016-01-21 Yao Qi <yao.qi@linaro.org>
1459 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1460 is_thumb and set it according to CPSR saved on the stack.
1461 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1462 arm_sigreturn_next_pc.
1464 2016-01-18 Yao Qi <yao.qi@linaro.org>
1466 * linux-low.c (linux_set_pc_64bit): New function.
1467 (linux_get_pc_64bit): New function.
1468 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1470 * linux-sparc-low.c (debug_threads): Remove declaration.
1471 (sparc_get_pc): Remove.
1472 (the_low_target): Use linux_get_pc_64bit instead of
1474 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1475 (the_low_target): Use linux_get_pc_64bit and
1478 2016-01-18 Yao Qi <yao.qi@linaro.org>
1480 * linux-arm-low.c (debug_threads): Remove declaration.
1481 (arm_get_pc, arm_set_pc): Remove.
1482 (the_low_target): Use linux_get_pc_32bit and
1484 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1485 (the_low_target): Use linux_get_pc_32bit and
1487 * linux-cris-low.c (debug_threads): Remove declaration.
1488 (cris_get_pc, cris_set_pc,): Remove.
1489 (the_low_target): Use linux_get_pc_32bit and
1491 * linux-crisv32-low.c (debug_threads): Remove declaration.
1492 (cris_get_pc, cris_set_pc): Remove.
1493 (the_low_target): Use linux_get_pc_32bit and
1495 * linux-low.c: Include inttypes.h.
1496 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1497 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1498 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1499 (the_low_target): Use linux_get_pc_32bit and
1501 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1502 (the_low_target): Use linux_get_pc_32bit and
1504 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1505 (the_low_target): Use linux_get_pc_32bit and
1507 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1508 (the_low_target): Use linux_get_pc_32bit and
1510 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1511 (the_low_target): Use linux_get_pc_32bit and
1514 2016-01-18 Gary Benson <gbenson@redhat.com>
1516 * configure.ac (AC_FUNC_FORK): New check.
1517 * config.in: Regenerate.
1518 * configure: Likewise.
1520 2016-01-14 Yao Qi <yao.qi@linaro.org>
1522 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1523 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1524 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1525 arm_get_next_pcs_ctor.
1527 2016-01-12 Josh Stone <jistone@redhat.com>
1528 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1530 * inferiors.h: Include "gdb_vecs.h".
1531 (struct process_info): Add syscalls_to_catch.
1532 * inferiors.c (remove_process): Free syscalls_to_catch.
1533 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1534 syscall_return stops.
1535 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1536 * server.c (handle_general_set): Handle QCatchSyscalls.
1537 (handle_query): Report support for QCatchSyscalls.
1538 * target.h (struct target_ops): Add supports_catch_syscall.
1539 (target_supports_catch_syscall): New macro.
1540 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1541 (struct lwp_info): Add syscall_state.
1542 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1543 Maintain syscall_state and syscalls_to_catch across exec.
1544 (get_syscall_trapinfo): New function, proxy to the_low_target.
1545 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1546 (linux_low_filter_event): Toggle syscall_state entry/return for
1547 syscall traps, and set it ignored for all others.
1548 (gdb_catching_syscalls_p): New function.
1549 (gdb_catch_this_syscall_p): New function.
1550 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1551 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1552 (linux_supports_catch_syscall): New function.
1553 (linux_target_ops): Install it.
1554 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1555 (the_low_target): Install it.
1557 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1559 * acinclude.m4: Include new ../warning.m4 file.
1560 * configure: Regenerated.
1561 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1563 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1565 * ax.c (is_goto_target): Mark static.
1566 * linux-low.c (register_addr): Likewise.
1567 (linux_fetch_registers, linux_store_registers): Likewise.
1568 * mem-break.c (any_persistent_commands): Fix old prototype.
1569 (add_commands_to_breakpoint): Mark static.
1570 * regcache.c (find_register_by_name): Delete unused func.
1571 * remote-utils.c (hex_or_minus_one): Mark static.
1572 * server.c (monitor_show_help): Mark static.
1573 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1574 handle_v_requests): Likewise.
1576 2016-01-12 Pedro Alves <palves@redhat.com>
1578 Remove use of the registered trademark symbol throughout.
1580 2016-01-08 Yao Qi <yao.qi@linaro.org>
1582 * remote-utils.c (getpkt): If c is '\003', call target hook
1585 2016-01-06 Yao Qi <yao.qi@linaro.org>
1587 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1588 linux-aarch32-low.c.
1589 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1590 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1591 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1592 (thumb2_breakpoint): Declare.
1593 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1594 linux-aarch32-low.h.
1595 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1596 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1597 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1599 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1601 * gdbreplay.c (gdbreplay_version): Change copyright year in
1603 * server.c (gdbserver_version): Likewise.
1605 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1607 * server.c (crc32_table): Delete.
1608 (crc32): Use libiberty's xcrc32 function.
1610 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1612 * lynx-low.c (lynx_delete_thread_callback): New function.
1613 (lynx_mourn): Properly delete our process and all of its
1614 threads. Remove call to clear_inferiors.
1616 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1618 * target.c (thread_search_callback): Add check that
1619 the thread_stopped target callback is not NULL before
1622 2015-12-21 Yao Qi <yao.qi@linaro.org>
1624 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1627 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1629 * server.c (handle_query): Call target_supports_software_single_step.
1631 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1633 * linux-low.c (single_step): New function.
1634 (linux_resume_one_lwp_throw): Call single_step.
1635 (start_step_over): Likewise.
1637 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1639 * Makefile.in (SFILES): Append arch/arm-linux.c,
1640 arch/arm-get-next-pcs.c.
1641 (arm-linux.o): New rule.
1642 (arm-get-next-pcs.o): New rule.
1643 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1645 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1646 to linux-aarch32-low.c.
1647 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1648 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1649 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1650 (thumb2_breakpoint_len): Likewise.
1651 (arm_is_thumb_mode): Make non-static.
1652 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1653 from linux-aarch32-low.c.
1654 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1655 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1656 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1657 (thumb2_breakpoint_len): Likewise.
1658 (arm_is_thumb_mode): New declaration.
1659 * linux-arm-low.c: Include arch/arm-linux.h
1660 aarch/arm-get-next-pcs.h, sys/syscall.h.
1661 (get_next_pcs_ops): New struct.
1662 (get_next_pcs_addr_bits_remove): New function.
1663 (get_next_pcs_is_thumb): New function.
1664 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1665 (arm_sigreturn_next_pc): Likewise.
1666 (get_next_pcs_syscall_next_pc): Likewise.
1667 (arm_gdbserver_get_next_pcs): Likewise.
1668 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1670 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1671 * server.h: Include gdb_vecs.h.
1673 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1675 * Makefile.in (SFILES): Append common/common-regcache.c.
1676 (OBS): Append common-regcache.o.
1677 (common-regcache.o): New rule.
1678 * regcache.c (init_register_cache): Initialize cache to
1680 (regcache_raw_read_unsigned): New function.
1681 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1682 register_status enum.
1684 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1686 * linux-aarch64-low.c (the_low_targets): Rename
1687 breakpoint_reinsert_addr to get_next_pcs.
1688 * linux-arm-low.c (the_low_targets): Likewise.
1689 * linux-bfin-low.c (the_low_targets): Likewise.
1690 * linux-cris-low.c (the_low_targets): Likewise.
1691 * linux-crisv32-low.c (the_low_targets): Likewise.
1692 * linux-low.c (can_software_single_step): Likewise.
1693 (install_software_single_step_breakpoints): New function.
1694 (start_step_over): Use install_software_single_step_breakpoints.
1695 * linux-low.h: New CORE_ADDR vector.
1696 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1698 * linux-mips-low.c (the_low_targets): Likewise.
1699 * linux-nios2-low.c (the_low_targets): Likewise.
1700 * linux-sparc-low.c (the_low_targets): Likewise.
1702 2015-12-17 Pedro Alves <palves@redhat.com>
1704 * linux-low.c (linux_kill_one_lwp): Remove references to
1706 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1708 (linux_init_signals): Delete.
1709 (initialize_low): Adjust.
1710 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1712 2015-12-16 Pedro Alves <palves@redhat.com>
1714 * configure.ac (compiler warning flags): When testing a
1715 -Wno-foo option, check whether -Wfoo works instead.
1716 * configure: Regenerate.
1718 2015-12-11 Don Breazeal <donb@codesourcery.com>
1720 * server.c (process_serial_event): Don't exit from gdbserver
1721 in remote mode if there are still active inferiors.
1723 2015-12-11 Yao Qi <yao.qi@linaro.org>
1725 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1726 arm_breakpoint_at if the process is 32-bit.
1728 2015-12-11 Yao Qi <yao.qi@linaro.org>
1730 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1733 2015-12-07 Yao Qi <yao.qi@linaro.org>
1735 * configure.srv: Append arm.o to srv_tgtobj for
1736 aarch64*-*-linux* target.
1737 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1738 from linux-arm-low.c.
1739 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1740 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1741 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1742 (thumb2_breakpoint_len): Likewise.
1743 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1744 (arm_breakpoint_kinds): Likewise.
1745 (arm_breakpoint_kind_from_pc): Likewise.
1746 (arm_sw_breakpoint_from_kind): Likewise.
1747 (arm_breakpoint_kind_from_current_state): Likewise.
1748 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1749 (arm_sw_breakpoint_from_kind): Declare.
1750 (arm_breakpoint_kind_from_current_state): Declare.
1751 (arm_breakpoint_at): Declare.
1752 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1753 arm_sw_breakpoint_from_kind if process is 32-bit.
1754 (aarch64_breakpoint_kind_from_pc): New function.
1755 (aarch64_breakpoint_kind_from_current_state): New function.
1756 (the_low_target): Initialize fields breakpoint_kind_from_pc
1757 and breakpoint_kind_from_current_state.
1758 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1759 linux-aarch32-low.c.
1760 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1761 (arm_breakpoint, arm_breakpoint_len): Likewise.
1762 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1763 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1764 (arm_is_thumb_mode): Likewise.
1765 (arm_breakpoint_at): Likewise.
1766 (arm_breakpoint_kind_from_pc): Likewise.
1767 (arm_sw_breakpoint_from_kind): Likewise.
1768 (arm_breakpoint_kind_from_current_state): Likewise.
1771 2015-08-04 Yao Qi <yao.qi@linaro.org>
1773 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1774 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1775 * server.c (extended_protocol): Remove "static".
1776 * server.h (extended_protocol): Declare it.
1778 2015-12-04 Josh Stone <jistone@redhat.com>
1780 * target.h (struct target_ops) <arch_setup>: Rename to ...
1781 (struct target_ops) <post_create_inferior>: ... this.
1782 (target_arch_setup): Rename to ...
1783 (target_post_create_inferior): ... this, calling post_create_inferior.
1784 * server.c (start_inferior): Update target_arch_setup calls to
1785 target_post_create_inferior.
1786 * linux-low.c (linux_low_ptrace_options): Forward declare.
1787 (linux_arch_setup): Update its comment for general use.
1788 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1789 (struct linux_target_ops): Use linux_post_create_inferior.
1790 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1791 to post_create_inferior.
1792 * nto-low.c (struct nto_target_ops): Likewise.
1793 * spu-low.c (struct spu_target_ops): Likewise.
1794 * win32-low.c (struct win32_target_ops): Likewise.
1796 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1798 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1800 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1802 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1803 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1804 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1805 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1806 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1807 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1808 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1809 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1810 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1811 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1812 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1813 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1815 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1817 * linux-low.c (linux_look_up_symbols): Don't call
1818 linux_supports_traceclone.
1819 * linux-low.h (thread_db_init): Remove use_events argument.
1820 * thread-db.c (thread_db_use_event): Remove global variable.
1821 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1822 (struct thread_db) <td_create_bp>: Remove field.
1823 (thread_db_create_event): Remove function.
1824 (thread_db_enable_reporting): Likewise.
1825 (find_one_thread): Don't check for thread_db_use_events.
1826 (attach_thread): Likewise.
1827 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1828 (try_thread_db_load_1): Don't check for thread_db_use_events.
1829 (thread_db_init): Remove use_events argument and thread events
1831 (remove_thread_event_breakpoints): Remove function.
1832 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1834 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1836 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1838 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1839 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1840 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1841 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1842 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1844 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1846 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1847 * linux-low.c (can_hardware_single_step): Use
1848 supports_hardware_single_step.
1849 (can_software_single_step): New function.
1850 (start_step_over): Call can_software_single_step.
1851 (linux_supports_hardware_single_step): New function.
1852 (struct target_ops) <supports_software_single_step>: Initialize.
1853 * linux-low.h (struct linux_target_ops)
1854 <supports_hardware_single_step>: Initialize.
1855 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1856 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1857 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1858 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1859 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1860 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1861 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1862 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1863 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1864 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1866 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1867 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1869 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1870 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1871 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1873 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1874 * target.h (struct target_ops): <supports_software_single_step>:
1876 (target_supports_software_single_step): New macro.
1878 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1880 * linux-low.c (linux_wait_1): Fix pc advance condition.
1881 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1882 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1884 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1886 * linux-arm-low.c (arm_is_thumb_mode): New function.
1887 (arm_breakpoint_at): Use arm_is_thumb_mode.
1888 (arm_breakpoint_kind_from_current_state): New function.
1889 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1891 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1892 (linux_breakpoint_kind_from_current_state): New function.
1893 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1894 * linux-low.h (struct linux_target_ops)
1895 <breakpoint_kind_from_current_state>: New field.
1896 * target.h (struct target_ops): Likewise.
1897 (target_breakpoint_kind_from_current_state): New macro.
1899 2015-11-30 Pedro Alves <palves@redhat.com>
1901 * linux-low.c (linux_resume): Wake up the event loop before
1904 2015-11-30 Pedro Alves <palves@redhat.com>
1906 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1908 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1910 * target.c (struct thread_search): New structure.
1911 (thread_search_callback): New function.
1912 (prev_general_thread): New global.
1913 (prepare_to_access_memory, done_accessing_memory): New functions.
1914 * target.h (prepare_to_access_memory, done_accessing_memory):
1915 Replace macros with function declarations.
1917 2015-11-30 Pedro Alves <palves@redhat.com>
1920 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1921 report TARGET_WAITKIND_NO_RESUMED.
1922 * remote-utils.c (prepare_resume_reply): Handle
1923 TARGET_WAITKIND_NO_RESUMED.
1924 * server.c (report_no_resumed): New global.
1925 (handle_query) <qSupported>: Handle "no-resumed+". Report
1926 "no-resumed+" support.
1927 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1928 return error if the client doesn't support no-resumed events.
1929 (push_stop_notification): New function.
1930 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1931 events if the client supports them.
1933 2015-11-30 Pedro Alves <palves@redhat.com>
1935 * linux-low.c (thread_still_has_status_pending_p): Don't check
1937 (lwp_resumed): New function.
1938 (status_pending_p_callback): Return early if the LWP is not
1939 supposed to be resumed.
1941 2015-11-30 Pedro Alves <palves@redhat.com>
1943 * linux-low.c (handle_extended_wait): Assert that the LWP's
1944 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1945 thread create events, leave the new child's status pending.
1946 (linux_low_filter_event): If GDB wants to hear about thread exit
1947 events, leave the LWP marked dead and don't delete it.
1948 (linux_wait_for_event_filtered): Don't check for thread exit.
1949 (filter_exit_event): New function.
1950 (linux_wait_1): Use it, when returning an exit event.
1951 (linux_resume_one_lwp_throw): Assert that the LWP's
1952 waitstatus is TARGET_WAITKIND_IGNORE.
1953 * remote-utils.c (prepare_resume_reply): Handle
1954 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1955 * server.c (report_thread_events): New global.
1956 (handle_general_set): Handle QThreadEvents.
1957 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1958 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1959 TARGET_WAITKIND_THREAD_EXITED.
1960 * server.h (report_thread_events): Declare.
1962 2015-11-30 Pedro Alves <palves@redhat.com>
1964 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1965 the thread's last_resume_kind was resume_stop.
1967 2015-11-30 Pedro Alves <palves@redhat.com>
1969 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1972 2015-11-30 Pedro Alves <palves@redhat.com>
1974 * server.c (handle_v_requests): Handle vCtrlC.
1976 2015-11-30 Pedro Alves <palves@redhat.com>
1978 * gdbthread.h (find_any_thread_of_pid): Declare.
1979 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1981 * server.c (handle_query): If current_thread is NULL, look for
1982 another thread of the selected process.
1984 2015-11-26 Daniel Colascione <dancol@dancol.org>
1985 Simon Marchi <simon.marchi@ericsson.com>
1987 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1988 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1990 * target.h (struct target_ops) <thread_name>: New field.
1991 (target_thread_name): New macro.
1993 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1995 * regcache.h (regcache_invalidate_pid): Add declaration.
1996 * regcache.c (regcache_invalidate_pid): New function, extracted
1997 from regcache_invalidate.
1998 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1999 Add trivial documentation comment.
2000 * lynx-low.c: Use regcache_invalidate_pid instead of
2001 regcache_invalidate.
2003 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2005 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2006 and Elf64_auxv_t if the target is Android.
2008 2015-11-22 Doug Evans <xdje42@gmail.com>
2010 * target.h: #include <sys/types.h>.
2012 2015-11-19 Pedro Alves <palves@redhat.com>
2014 * linux-low.c (linux_process_qsupported): Change prototype.
2016 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2018 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2019 and adjust to loop over all features.
2020 * server.c (handle_query) <qSupported>: Adjust to call
2021 target_process_qsupported once, passing it a vector of unprocessed
2023 * target.h (struct target_ops) <process_qsupported>: Change
2025 (target_process_qsupported): Adjust.
2027 2015-11-19 Pedro Alves <palves@redhat.com>
2029 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2031 * configure: Regenerate.
2033 2015-11-19 Pedro Alves <palves@redhat.com>
2035 * configure: Regenerate.
2037 2015-11-19 Yao Qi <yao.qi@linaro.org>
2039 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2042 2015-11-19 Yao Qi <yao.qi@linaro.org>
2044 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2045 (struct aarch64_operand): Move enum out.
2047 2015-11-19 Yao Qi <yao.qi@linaro.org>
2049 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2050 struct user_fpsimd_state *.
2051 (aarch64_store_fpregset): Likewise.
2053 2015-11-19 Yao Qi <yao.qi@linaro.org>
2055 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2056 struct user_pt_regs *.
2057 (aarch64_store_gregset): Likewise.
2059 2015-11-18 Pedro Alves <palves@redhat.com>
2061 * Makefile.in (all_object_files): Add $IPA_OBJS.
2063 2015-11-17 Pedro Alves <palves@redhat.com>
2065 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2066 GDB_SIGNAL_0 and gdb_signal_to_string.
2068 2015-11-17 Pedro Alves <palves@redhat.com>
2070 * win32-low.c (handle_output_debug_string): Remove parameter.
2071 (win32_kill): Remove our_status local and adjust call to
2072 handle_output_debug_string.
2073 (get_child_debug_event): Adjust call to
2074 handle_output_debug_string.
2076 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2078 * linux-mips-low.c (mips_fill_gregset): Add cast.
2079 (mips_store_gregset): Likewise.
2080 (mips_fill_fpregset): Likewise.
2081 (mips_store_fpregset): Likewise.
2083 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2085 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2088 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2090 * linux-mips-low.c (mips_linux_new_thread): Change type of
2091 watch_type to enum target_hw_bp_type.
2093 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2095 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2096 Change return type to arm_hwbp_type.
2098 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2100 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2101 (arm_store_gregset): Likewise.
2102 * linux-arm-low.c (arm_get_hwcap): Likewise.
2103 (arm_read_description): Likewise.
2105 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2107 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2109 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2111 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2112 (ppc_fill_vsxregset): Likewise.
2113 (ppc_store_vsxregset): Likewise.
2114 (ppc_fill_vrregset): Likewise.
2115 (ppc_store_vrregset): Likewise.
2116 (ppc_fill_evrregset): Likewise.
2117 (ppc_store_evrregset): Likewise.
2119 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2121 * linux-ppc-low.c (ppc_usrregs_info): Remove
2122 forward-declaration.
2123 (ppc_arch_setup): Move lower in file.
2125 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2127 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2128 (ps_pdwrite): Likewise.
2130 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2132 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2133 to after assert checks.
2135 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2137 * proc-service.c (ps_pdread): Add/adjust casts.
2138 (ps_pdwrite): Add/adjust casts.
2140 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2142 * server.c (handle_search_memory_1): Cast return value of
2145 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2147 * server.c (write_qxfer_response): Change type of data to
2150 2015-10-29 Pedro Alves <palves@redhat.com>
2152 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2154 2015-10-29 Pedro Alves <palves@redhat.com>
2156 * tracepoint.c (clear_installed_tracepoints): Add casts.
2158 2015-10-29 Pedro Alves <palves@redhat.com>
2160 * server.c (handle_v_cont, process_serial_event): Add enum
2161 gdb_signal casts to signal parsing code.
2163 2015-10-29 Pedro Alves <palves@redhat.com>
2165 * linux-low.h (NULL_REGSET): Define.
2166 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2167 * linux-arm-low.c (arm_regsets): Likewise.
2168 * linux-crisv32-low.c (cris_regsets): Likewise.
2169 * linux-m68k-low.c (m68k_regsets): Likewise.
2170 * linux-mips-low.c (mips_regsets): Likewise.
2171 * linux-nios2-low.c (nios2_regsets): Likewise.
2172 * linux-ppc-low.c (ppc_regsets): Likewise.
2173 * linux-s390-low.c (s390_regsets): Likewise.
2174 * linux-sh-low.c (sh_regsets): Likewise.
2175 * linux-sparc-low.c (sparc_regsets): Likewise.
2176 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2177 * linux-tile-low.c (tile_regsets): Likewise.
2178 * linux-x86-low.c (x86_regsets): Likewise.
2179 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2181 2015-10-29 Pedro Alves <palves@redhat.com>
2183 * linux-low.h (NULL_REGSET): Define.
2184 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2185 * linux-arm-low.c (arm_regsets): Likewise.
2186 * linux-crisv32-low.c (cris_regsets): Likewise.
2187 * linux-m68k-low.c (m68k_regsets): Likewise.
2188 * linux-mips-low.c (mips_regsets): Likewise.
2189 * linux-nios2-low.c (nios2_regsets): Likewise.
2190 * linux-ppc-low.c (ppc_regsets): Likewise.
2191 * linux-s390-low.c (s390_regsets): Likewise.
2192 * linux-sh-low.c (sh_regsets): Likewise.
2193 * linux-sparc-low.c (sparc_regsets): Likewise.
2194 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2195 * linux-tile-low.c (tile_regsets): Likewise.
2196 * linux-x86-low.c (x86_regsets): Likewise.
2197 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2199 2015-10-26 Doug Evans <dje@google.com>
2201 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2203 2015-10-26 Doug Evans <dje@google.com>
2205 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2207 2015-10-26 Doug Evans <dje@google.com>
2209 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2211 (attach_thread, find_new_threads_callback): Ditto.
2213 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2215 * mem-break.h (set_breakpoint_data): Remove.
2217 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2219 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2220 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2221 (initialize_low): Remove set_breakpoint_data call.
2222 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2223 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2224 (initialize_low): Remove set_breakpoint_data call.
2225 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2226 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2227 (initialize_low): Remove set_breakpoint_data call.
2229 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2231 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2232 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2233 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2234 * target.h (target_breakpoint_kind_from_pc): New macro.
2236 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2238 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2239 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2240 the default breakpoint kind.
2242 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2244 * linux-arm-low.c (arm_supports_z_point_type): Add software
2247 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2249 * linux-arm-low.c: Refactor breakpoint definitions.
2250 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2251 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2253 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2255 * Makefile.in: Add arm.c/o.
2256 * configure.srv: Likewise.
2257 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2258 (arm_breakpoint_kind_from_pc): New function.
2259 (arm_sw_breakpoint_from_kind): Return proper kind.
2260 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2262 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2264 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2266 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2267 (struct raw_breakpoint) <size>: Remove.
2268 (struct raw_breakpoint) <kind>: Add.
2269 (bp_size): New function.
2270 (bp_opcode): Likewise.
2271 (find_raw_breakpoint_at): Adjust for kind.
2272 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2273 (remove_memory_breakpoint): Adjust for kind call bp_size.
2274 (set_raw_breakpoint_at): Adjust for kind.
2275 (set_breakpoint): Likewise.
2276 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2277 (delete_raw_breakpoint): Adjust for kind.
2278 (delete_breakpoint): Likewise.
2279 (find_gdb_breakpoint): Likewise.
2280 (set_gdb_breakpoint_1): Likewise.
2281 (set_gdb_breakpoint): Likewise.
2282 (delete_gdb_breakpoint_1): Likewise.
2283 (delete_gdb_breakpoint): Likewise.
2284 (uninsert_raw_breakpoint): Likewise.
2285 (reinsert_raw_breakpoint): Likewise.
2286 (set_breakpoint_data): Remove.
2287 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2288 (check_mem_read): Adjust for kind call bp_size.
2289 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2290 (clone_one_breakpoint): Adjust for kind.
2291 * mem-break.h (set_gdb_breakpoint): Likewise.
2292 (delete_gdb_breakpoint): Likewise.
2293 * server.c (process_serial_event): Likewise.
2295 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2297 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2298 (struct linux_target_ops) <breakpoint>: Remove.
2299 (struct linux_target_ops) <breakpoint_len>: Remove.
2300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2302 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2303 (arm_sw_breakpoint_from_kind): New function.
2304 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2315 (struct linux_target_ops) <breakpoint>: Remove.
2316 (struct linux_target_ops) <breakpoint_len>: Remove.
2317 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2318 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2319 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2320 and sw_breakpoint_from_kind to increment the pc.
2321 (linux_breakpoint_kind_from_pc): New function.
2322 (linux_sw_breakpoint_from_kind): New function.
2323 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2324 (initialize_low): Call breakpoint_kind_from_pc and
2325 sw_breakpoint_from_kind to replace breakpoint_data/len.
2326 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2328 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2329 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2330 (struct linux_target_ops) <breakpoint>: Remove.
2331 (struct linux_target_ops) <breakpoint_len>: Remove.
2332 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2333 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2334 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2335 (struct linux_target_ops) <breakpoint>: Remove.
2336 (struct linux_target_ops) <breakpoint_len>: Remove.
2337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2338 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2339 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2340 (struct linux_target_ops) <breakpoint>: Remove.
2341 (struct linux_target_ops) <breakpoint_len>: Remove.
2342 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2344 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2345 (struct linux_target_ops) <breakpoint>: Remove.
2346 (struct linux_target_ops) <breakpoint_len>: Remove.
2347 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2348 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2349 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2350 (struct linux_target_ops) <breakpoint>: Remove.
2351 (struct linux_target_ops) <breakpoint_len>: Remove.
2352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2354 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2355 (struct linux_target_ops) <breakpoint>: Remove.
2356 (struct linux_target_ops) <breakpoint_len>: Remove.
2357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2359 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2360 (struct linux_target_ops) <breakpoint>: Remove.
2361 (struct linux_target_ops) <breakpoint_len>: Remove.
2362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2363 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2364 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2365 (struct linux_target_ops) <breakpoint>: Remove.
2366 (struct linux_target_ops) <breakpoint_len>: Remove.
2367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2369 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2370 (struct linux_target_ops) <breakpoint>: Remove.
2371 (struct linux_target_ops) <breakpoint_len>: Remove.
2372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2374 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2375 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2376 (struct linux_target_ops) <breakpoint>: Remove.
2377 (struct linux_target_ops) <breakpoint_len>: Remove.
2378 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2379 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2380 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2381 (struct linux_target_ops) <breakpoint>: Remove.
2382 (struct linux_target_ops) <breakpoint_len>: Remove.
2383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2386 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2388 * linux-cris-low.c (cris_get_pc): Remove void arg.
2390 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2392 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2395 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2397 * inferiors.c (thread_pid_matches_callback): New function.
2398 (find_thread_process): New function.
2399 (remove_thread): Reset current_thread.
2400 (remove_process): Assert threads have been removed first.
2402 2015-10-15 Yao Qi <yao.qi@linaro.org>
2404 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2406 (aarch64_remove_point): Likewise.
2407 * regcache.c (regcache_register_size): New function.
2409 2015-10-12 Yao Qi <yao.qi@linaro.org>
2411 * linux-aarch64-low.c: Update all callers as emit_load_store
2412 is renamed to aarch64_emit_load_store.
2414 2015-10-12 Yao Qi <yao.qi@linaro.org>
2416 * linux-aarch64-low.c: Update all callers of function renaming
2417 from emit_insn to aarch64_emit_insn.
2419 2015-10-12 Yao Qi <yao.qi@linaro.org>
2421 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2422 arch/aarch64-insn.h.
2423 (struct aarch64_memory_operand): Likewise.
2425 (emit_insn): Move to arch/aarch64-insn.c.
2426 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2427 (emit_load_store): Move to arch/aarch64-insn.c.
2428 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2429 (can_encode_int32): Remove.
2431 2015-10-12 Yao Qi <yao.qi@linaro.org>
2433 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2434 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2435 (aarch64_relocate_instruction): Likewise.
2436 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2437 (struct aarch64_insn_visitor): Likewise.
2439 2015-10-12 Yao Qi <yao.qi@linaro.org>
2441 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2442 (struct aarch64_insn_visitor): New.
2443 (struct aarch64_insn_relocation_data): New.
2444 (aarch64_ftrace_insn_reloc_b): New function.
2445 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2446 (aarch64_ftrace_insn_reloc_cb): Likewise.
2447 (aarch64_ftrace_insn_reloc_tb): Likewise.
2448 (aarch64_ftrace_insn_reloc_adr): Likewise.
2449 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2450 (aarch64_ftrace_insn_reloc_others): Likewise.
2452 (aarch64_relocate_instruction): Use visitor.
2454 2015-10-12 Yao Qi <yao.qi@linaro.org>
2456 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2457 int. Add argument buf.
2458 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2459 aarch64_relocate_instruction.
2461 2015-10-12 Yao Qi <yao.qi@linaro.org>
2463 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2464 argument insn. Remove local variable insn. Don't call
2466 (aarch64_install_fast_tracepoint_jump_pad): Call
2469 2015-09-30 Yao Qi <yao.qi@linaro.org>
2471 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2472 (emit_load_store_pair): Likewise.
2474 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2476 * dll.c (match_dll): Add cast(s).
2477 (unloaded_dll): Likewise.
2478 * linux-low.c (second_thread_of_pid_p): Likewise.
2479 (delete_lwp_callback): Likewise.
2480 (count_events_callback): Likewise.
2481 (select_event_lwp_callback): Likewise.
2482 (linux_set_resume_request): Likewise.
2483 * server.c (accumulate_file_name_length): Likewise.
2484 (emit_dll_description): Likewise.
2485 (handle_qxfer_threads_worker): Likewise.
2486 (visit_actioned_threads): Likewise.
2487 * thread-db.c (any_thread_of): Likewise.
2488 * tracepoint.c (same_process_p): Likewise.
2489 (match_blocktype): Likewise.
2490 (build_traceframe_info_xml): Likewise.
2492 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2494 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2496 (gdb_unparse_agent_expr): Likewise.
2497 * hostio.c (require_data): Likewise.
2498 (handle_pread): Likewise.
2499 * linux-low.c (disable_regset): Likewise.
2500 (fetch_register): Likewise.
2501 (store_register): Likewise.
2502 (get_dynamic): Likewise.
2503 (linux_qxfer_libraries_svr4): Likewise.
2504 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2505 (set_fast_tracepoint_jump): Likewise.
2506 (uninsert_fast_tracepoint_jumps_at): Likewise.
2507 (reinsert_fast_tracepoint_jumps_at): Likewise.
2508 (validate_inserted_breakpoint): Likewise.
2509 (clone_agent_expr): Likewise.
2510 * regcache.c (init_register_cache): Likewise.
2511 * remote-utils.c (putpkt_binary_1): Likewise.
2512 (decode_M_packet): Likewise.
2513 (decode_X_packet): Likewise.
2514 (look_up_one_symbol): Likewise.
2515 (relocate_instruction): Likewise.
2516 (monitor_output): Likewise.
2517 * server.c (handle_search_memory): Likewise.
2518 (handle_qxfer_exec_file): Likewise.
2519 (handle_qxfer_libraries): Likewise.
2520 (handle_qxfer): Likewise.
2521 (handle_query): Likewise.
2522 (handle_v_cont): Likewise.
2523 (handle_v_run): Likewise.
2524 (captured_main): Likewise.
2525 * target.c (write_inferior_memory): Likewise.
2526 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2527 * tracepoint.c (init_trace_buffer): Likewise.
2528 (add_tracepoint_action): Likewise.
2529 (add_traceframe): Likewise.
2530 (add_traceframe_block): Likewise.
2531 (cmd_qtdpsrc): Likewise.
2532 (cmd_qtdv): Likewise.
2533 (cmd_qtstatus): Likewise.
2534 (response_source): Likewise.
2535 (response_tsv): Likewise.
2536 (cmd_qtnotes): Likewise.
2537 (gdb_collect): Likewise.
2538 (initialize_tracepoint): Likewise.
2540 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2542 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2543 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2544 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2546 (enum aarch64_condition_codes): New enum.
2547 (w0): New static global.
2550 (struct aarch64_memory_operand) <type>: New
2551 MEMORY_OPERAND_POSTINDEX type.
2552 (postindex_memory_operand): New helper function.
2553 (emit_ret): New function.
2554 (emit_load_store_pair): New function, factored out of emit_stp
2555 with support for MEMORY_OPERAND_POSTINDEX.
2556 (emit_stp): Rewrite using emit_load_store_pair.
2557 (emit_ldp): New function.
2558 (emit_load_store): Likewise.
2559 (emit_ldr): Mention post-index instruction in comment.
2560 (emit_ldrh): New function.
2561 (emit_ldrb): New function.
2562 (emit_ldrsw): Mention post-index instruction in comment.
2563 (emit_str): Likewise.
2564 (emit_subs): New function.
2565 (emit_cmp): Likewise.
2566 (emit_and): Likewise.
2567 (emit_orr): Likewise.
2568 (emit_orn): Likewise.
2569 (emit_eor): Likewise.
2570 (emit_mvn): Likewise.
2571 (emit_lslv): Likewise.
2572 (emit_lsrv): Likewise.
2573 (emit_asrv): Likewise.
2574 (emit_mul): Likewise.
2575 (emit_sbfm): Likewise.
2576 (emit_sbfx): Likewise.
2577 (emit_ubfm): Likewise.
2578 (emit_ubfx): Likewise.
2579 (emit_csinc): Likewise.
2580 (emit_cset): Likewise.
2581 (emit_nop): Likewise.
2582 (emit_ops_insns): New helper function.
2583 (emit_pop): Likewise.
2584 (emit_push): Likewise.
2585 (aarch64_emit_prologue): New function.
2586 (aarch64_emit_epilogue): Likewise.
2587 (aarch64_emit_add): Likewise.
2588 (aarch64_emit_sub): Likewise.
2589 (aarch64_emit_mul): Likewise.
2590 (aarch64_emit_lsh): Likewise.
2591 (aarch64_emit_rsh_signed): Likewise.
2592 (aarch64_emit_rsh_unsigned): Likewise.
2593 (aarch64_emit_ext): Likewise.
2594 (aarch64_emit_log_not): Likewise.
2595 (aarch64_emit_bit_and): Likewise.
2596 (aarch64_emit_bit_or): Likewise.
2597 (aarch64_emit_bit_xor): Likewise.
2598 (aarch64_emit_bit_not): Likewise.
2599 (aarch64_emit_equal): Likewise.
2600 (aarch64_emit_less_signed): Likewise.
2601 (aarch64_emit_less_unsigned): Likewise.
2602 (aarch64_emit_ref): Likewise.
2603 (aarch64_emit_if_goto): Likewise.
2604 (aarch64_emit_goto): Likewise.
2605 (aarch64_write_goto_address): Likewise.
2606 (aarch64_emit_const): Likewise.
2607 (aarch64_emit_call): Likewise.
2608 (aarch64_emit_reg): Likewise.
2609 (aarch64_emit_pop): Likewise.
2610 (aarch64_emit_stack_flush): Likewise.
2611 (aarch64_emit_zero_ext): Likewise.
2612 (aarch64_emit_swap): Likewise.
2613 (aarch64_emit_stack_adjust): Likewise.
2614 (aarch64_emit_int_call_1): Likewise.
2615 (aarch64_emit_void_call_2): Likewise.
2616 (aarch64_emit_eq_goto): Likewise.
2617 (aarch64_emit_ne_goto): Likewise.
2618 (aarch64_emit_lt_goto): Likewise.
2619 (aarch64_emit_le_goto): Likewise.
2620 (aarch64_emit_gt_goto): Likewise.
2621 (aarch64_emit_ge_got): Likewise.
2622 (aarch64_emit_ops_impl): New static global variable.
2623 (aarch64_emit_ops): New target function, return
2624 &aarch64_emit_ops_impl.
2625 (struct linux_target_ops): Install it.
2627 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2629 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2630 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2632 * linux-aarch64-ipa.c: New file.
2633 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2635 (aarch64_get_thread_area): New target method.
2636 (extract_signed_bitfield): New helper function.
2637 (aarch64_decode_ldr_literal): New function.
2638 (enum aarch64_opcodes): New enum.
2639 (struct aarch64_register): New struct.
2640 (struct aarch64_operand): New struct.
2641 (x0): New static global.
2650 (aarch64_register): New helper function.
2651 (register_operand): Likewise.
2652 (immediate_operand): Likewise.
2653 (struct aarch64_memory_operand): New struct.
2654 (offset_memory_operand): New helper function.
2655 (preindex_memory_operand): Likewise.
2656 (enum aarch64_system_control_registers): New enum.
2657 (ENCODE): New macro.
2658 (emit_insn): New helper function.
2659 (emit_b): New function.
2660 (emit_bcond): Likewise.
2661 (emit_cb): Likewise.
2662 (emit_tb): Likewise.
2663 (emit_blr): Likewise.
2664 (emit_stp): Likewise.
2665 (emit_ldp_q_offset): Likewise.
2666 (emit_stp_q_offset): Likewise.
2667 (emit_load_store): Likewise.
2668 (emit_ldr): Likewise.
2669 (emit_ldrsw): Likewise.
2670 (emit_str): Likewise.
2671 (emit_ldaxr): Likewise.
2672 (emit_stxr): Likewise.
2673 (emit_stlr): Likewise.
2674 (emit_data_processing_reg): Likewise.
2675 (emit_data_processing): Likewise.
2676 (emit_add): Likewise.
2677 (emit_sub): Likewise.
2678 (emit_mov): Likewise.
2679 (emit_movk): Likewise.
2680 (emit_mov_addr): Likewise.
2681 (emit_mrs): Likewise.
2682 (emit_msr): Likewise.
2683 (emit_sevl): Likewise.
2684 (emit_wfe): Likewise.
2685 (append_insns): Likewise.
2686 (can_encode_int32_in): New helper function.
2687 (aarch64_relocate_instruction): New function.
2688 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2689 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2690 (struct linux_target_ops): Install aarch64_get_thread_area,
2691 aarch64_install_fast_tracepoint_jump_pad and
2692 aarch64_get_min_fast_tracepoint_insn_len.
2694 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2696 * Makefile.in (aarch64-insn.o): New rule.
2697 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2699 2015-09-21 Yao Qi <yao.qi@linaro.org>
2701 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2703 2015-09-21 Yao Qi <yao.qi@linaro.org>
2705 * tracepoint.c (max_jump_pad_size): Remove.
2707 2015-09-18 Yao Qi <yao.qi@linaro.org>
2709 * linux-aarch64-low.c: Don't include sys/uio.h.
2710 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2712 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2714 * tracepoint.c (eval_result_type): Change prototype.
2715 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2717 2015-09-15 Pedro Alves <palves@redhat.com>
2719 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2720 Check whether to report exec events instead of checking whether
2721 multiprocess is enabled.
2723 2015-09-15 Pedro Alves <palves@redhat.com>
2726 * remote-utils.c (prepare_resume_reply): Merge
2727 TARGET_WAITKIND_VFORK_DONE switch case with the
2728 TARGET_WAITKIND_FORKED case.
2730 2015-09-15 Yao Qi <yao.qi@linaro.org>
2732 * server.c (handle_query): Check string comparison using
2733 "else if" instead of "if".
2735 2015-09-15 Yao Qi <yao.qi@linaro.org>
2737 * server.c (vCont_supported): New global variable.
2738 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2739 matches. Append ";vContSupported+" to own_buf.
2740 (handle_v_requests): Append ";s;S" to own_buf if target supports
2741 hardware single step or vCont_supported is false.
2742 (capture_main): Set vCont_supported to zero.
2744 2015-09-15 Yao Qi <yao.qi@linaro.org>
2746 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2748 (linux_supports_hardware_single_step): ... New function.
2749 (linux_target_ops): Update.
2750 * lynx-low.c (lynx_target_ops): Set field
2751 supports_hardware_single_step to target_can_do_hardware_single_step.
2752 * nto-low.c (nto_target_ops): Likewise.
2753 * spu-low.c (spu_target_ops): Likewise.
2754 * win32-low.c (win32_target_ops): Likewise.
2755 * target.c (target_can_do_hardware_single_step): New function.
2756 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2757 Remove. <supports_hardware_single_step>: New field.
2758 (target_supports_conditional_breakpoints): Remove.
2759 (target_supports_hardware_single_step): New macro.
2760 (target_can_do_hardware_single_step): Declare.
2761 * server.c (handle_query): Use target_supports_hardware_single_step
2762 instead of target_supports_conditional_breakpoints.
2764 2015-09-15 Yao Qi <yao.qi@linaro.org>
2766 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2768 (struct linux_target_ops the_low_target): Install
2769 aarch64_linux_siginfo_fixup.
2771 2015-09-11 Don Breazeal <donb@codesourcery.com>
2772 Luis Machado <lgustavo@codesourcery.com>
2774 * linux-low.c (linux_mourn): Static declaration.
2775 (linux_arch_setup): Move in front of
2776 handle_extended_wait.
2777 (linux_arch_setup_thread): New function.
2778 (handle_extended_wait): Handle exec events. Call
2779 linux_arch_setup_thread. Make event_lwp argument a
2780 pointer-to-a-pointer.
2781 (check_zombie_leaders): Do not check stopped threads.
2782 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2783 (linux_low_filter_event): Add lwp and thread for exec'ing
2784 non-leader thread if leader thread has been deleted.
2785 Refactor code into linux_arch_setup_thread and call it.
2786 Pass child lwp pointer by reference to handle_extended_wait.
2787 (linux_wait_for_event_filtered): Update comment.
2788 (linux_wait_1): Prevent clobbering exec event status.
2789 (linux_supports_exec_events): New function.
2790 (linux_target_ops) <supports_exec_events>: Initialize new member.
2791 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2793 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2794 * server.c (report_exec_events): New global variable.
2795 (handle_query): Handle qSupported query for exec-events feature.
2796 (captured_main): Initialize report_exec_events.
2797 * server.h (report_exec_events): Declare new global variable.
2798 * target.h (struct target_ops) <supports_exec_events>: New
2800 (target_supports_exec_events): New macro.
2801 * win32-low.c (win32_target_ops) <supports_exec_events>:
2802 Initialize new member.
2804 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2806 * linux-low.c (linux_low_enable_btrace): Remove.
2807 (linux_target_ops): Replace linux_low_enable_btrace with
2808 linux_enable_btrace.
2810 2015-09-03 Yao Qi <yao.qi@linaro.org>
2812 * linux-aarch64-low.c (aarch64_insert_point): Call
2813 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2816 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2818 * linux-low.c (check_stopped_by_breakpoint): Use
2819 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2821 2015-08-27 Pedro Alves <palves@redhat.com>
2823 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2825 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2827 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2828 the XNEW-family equivalent.
2829 (compile_bytecodes): Likewise.
2830 * dll.c (loaded_dll): Likewise.
2831 * event-loop.c (append_callback_event): Likewise.
2832 (create_file_handler): Likewise.
2833 (create_file_event): Likewise.
2834 * hostio.c (handle_open): Likewise.
2835 * inferiors.c (add_thread): Likewise.
2836 (add_process): Likewise.
2837 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2838 * linux-arm-low.c (arm_new_process): Likewise.
2839 (arm_new_thread): Likewise.
2840 * linux-low.c (add_to_pid_list): Likewise.
2841 (linux_add_process): Likewise.
2842 (handle_extended_wait): Likewise.
2843 (add_lwp): Likewise.
2844 (enqueue_one_deferred_signal): Likewise.
2845 (enqueue_pending_signal): Likewise.
2846 (linux_resume_one_lwp_throw): Likewise.
2847 (linux_resume_one_thread): Likewise.
2848 (linux_read_memory): Likewise.
2849 (linux_write_memory): Likewise.
2850 * linux-mips-low.c (mips_linux_new_process): Likewise.
2851 (mips_linux_new_thread): Likewise.
2852 (mips_add_watchpoint): Likewise.
2853 * linux-x86-low.c (initialize_low_arch): Likewise.
2854 * lynx-low.c (lynx_add_process): Likewise.
2855 * mem-break.c (set_raw_breakpoint_at): Likewise.
2856 (set_breakpoint): Likewise.
2857 (add_condition_to_breakpoint): Likewise.
2858 (add_commands_to_breakpoint): Likewise.
2859 (clone_agent_expr): Likewise.
2860 (clone_one_breakpoint): Likewise.
2861 * regcache.c (new_register_cache): Likewise.
2862 * remote-utils.c (look_up_one_symbol): Likewise.
2863 * server.c (queue_stop_reply): Likewise.
2864 (start_inferior): Likewise.
2865 (queue_stop_reply_callback): Likewise.
2866 (handle_target_event): Likewise.
2867 * spu-low.c (fetch_ppc_memory): Likewise.
2868 (store_ppc_memory): Likewise.
2869 * target.c (set_target_ops): Likewise.
2870 * thread-db.c (thread_db_load_search): Likewise.
2871 (try_thread_db_load_1): Likewise.
2872 * tracepoint.c (add_tracepoint): Likewise.
2873 (add_tracepoint_action): Likewise.
2874 (create_trace_state_variable): Likewise.
2875 (cmd_qtdpsrc): Likewise.
2876 (cmd_qtro): Likewise.
2877 (add_while_stepping_state): Likewise.
2878 * win32-low.c (child_add_thread): Likewise.
2879 (get_image_name): Likewise.
2881 2015-08-25 Yao Qi <yao.qi@linaro.org>
2883 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2885 2015-08-25 Yao Qi <yao.qi@linaro.org>
2887 * Makefile.in (aarch64-linux.o): New rule.
2888 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2890 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2891 (aarch64_init_debug_reg_state): Make it extern.
2892 (aarch64_linux_prepare_to_resume): Remove.
2894 2015-08-25 Yao Qi <yao.qi@linaro.org>
2896 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2897 lwp_arch_private_info and ptid_of_lwp.
2899 2015-08-25 Yao Qi <yao.qi@linaro.org>
2901 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2902 Find proc_info by find_process_pid. All callers updated.
2904 2015-08-25 Yao Qi <yao.qi@linaro.org>
2906 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2908 (debug_reg_change_callback): Remove.
2909 (aarch64_notify_debug_reg_change): Remove.
2911 2015-08-25 Yao Qi <yao.qi@linaro.org>
2913 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2914 Call current_lwp_ptid.
2916 2015-08-25 Yao Qi <yao.qi@linaro.org>
2918 * linux-aarch64-low.c (debug_reg_change_callback): Use
2921 2015-08-25 Yao Qi <yao.qi@linaro.org>
2923 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2925 2015-08-25 Yao Qi <yao.qi@linaro.org>
2927 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2929 2015-08-25 Yao Qi <yao.qi@linaro.org>
2931 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2934 2015-08-25 Yao Qi <yao.qi@linaro.org>
2936 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2938 (debug_reg_change_callback): Remove argument entry and add argument
2939 lwp. Remove local variable thread. Don't print thread id in the
2940 debugging output. Don't check whether pid of thread equals to pid.
2941 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2942 iterate_over_lwps instead find_inferior.
2944 2015-08-24 Pedro Alves <palves@redhat.com>
2946 * inferiors.c (get_first_process): New function.
2947 * inferiors.h (get_first_process): New declaration.
2948 * remote-utils.c (read_ptid): Default to the first process in the
2949 list, instead of to the current thread's process.
2951 2015-08-24 Pedro Alves <palves@redhat.com>
2953 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2954 * event-loop.c: Likewise.
2955 * remote-utils.c: Likewise.
2956 * tracepoint.c: Likewise.
2958 2015-08-24 Pedro Alves <palves@redhat.com>
2960 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2963 2015-08-21 Pedro Alves <palves@redhat.com>
2965 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2966 instead of literal 1.
2968 2015-08-21 Pedro Alves <palves@redhat.com>
2970 * tdesc.c (default_description): Explicitly zero-initialize.
2972 2015-08-21 Pedro Alves <palves@redhat.com>
2975 * inferiors.c (remove_thread): Discard any pending stop reply for
2977 * server.c (remove_all_on_match_pid): Rename to ...
2978 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2980 (discard_queued_stop_replies): Change parameter to a ptid. Now
2982 (handle_v_kill, kill_inferior_callback, captured_main)
2983 (process_serial_event): Adjust.
2984 * server.h (discard_queued_stop_replies): Declare.
2986 2015-08-21 Pedro Alves <palves@redhat.com>
2988 * linux-low.c (wait_for_sigstop): Always switch to no thread
2989 selected if the previously current thread dies.
2990 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2991 process instead of the current thread's.
2992 * remote-utils.c (input_interrupt): Don't check if there's no
2994 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2995 current thread to the general thread fails, error out.
2996 (handle_qxfer_auxv, handle_qxfer_libraries)
2997 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2998 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2999 (handle_query): Check if there's a thread selected instead of
3000 checking whether there's any thread in the thread list.
3001 (handle_qxfer_threads, handle_qxfer_btrace)
3002 (handle_qxfer_btrace_conf): Don't error out early if there's no
3003 thread in the thread list.
3004 (handle_v_cont, myresume): Don't set the current thread to the
3006 (process_serial_event) <Hg handling>: Also set thread_id if the
3007 previous general thread is still alive.
3008 (process_serial_event) <g/G handling>: If setting the current
3009 thread to the general thread fails, error out.
3010 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3011 thread's lwp instead of the current thread's.
3012 * target.c (set_desired_thread): If the desired thread was not
3013 found, leave the current thread pointing to NULL. Return an int
3014 (boolean) indicating success.
3015 * target.h (set_desired_thread): Change return type to int.
3017 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3019 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3020 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3022 (ps_get_thread_area): New function.
3024 2015-08-19 Gary Benson <gbenson@redhat.com>
3026 * hostio.c (handle_pread): Do not attempt to read more data
3027 than hostio_reply_with_data can fit in a packet.
3029 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3031 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3033 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3035 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3037 2015-08-06 Pedro Alves <palves@redhat.com>
3039 * tracepoint.c (expr_eval_result): Now an int.
3041 2015-08-06 Pedro Alves <palves@redhat.com>
3043 * gdbthread.h (struct regcache): Forward declare.
3044 (struct thread_info) <regcache_data>: Now a struct regcache
3046 * inferiors.c (inferior_regcache_data)
3047 (set_inferior_regcache_data): Now work with struct regcache
3049 * inferiors.h (struct regcache): Forward declare.
3050 (inferior_regcache_data, set_inferior_regcache_data): Now work
3051 with struct regcache pointers.
3052 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3053 (free_register_cache_thread): Remove struct regcache pointer
3056 2015-08-06 Pedro Alves <palves@redhat.com>
3058 * server.c (captured_main): On error, print the exception message
3059 to stderr, and if run_once is set, throw a quit.
3061 2015-08-06 Pedro Alves <palves@redhat.com>
3063 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3066 2015-08-06 Pedro Alves <palves@redhat.com>
3068 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3069 reading beyond the passed in buffer length.
3071 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3073 * tracepoint.c (symbol_list) <required>: Remove.
3075 2015-08-06 Pedro Alves <palves@redhat.com>
3077 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3078 count if stopping and suspending threads.
3079 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3080 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3081 (linux_detach): Complete an ongoing step-over.
3082 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3084 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3085 (linux_wait_1): If passing a signal to the inferior after
3086 finishing a step-over, unsuspend and re-resume all lwps. If we
3087 see a single-step event but the thread should be continuing, don't
3088 pass the trap to gdb.
3089 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3090 internal_error instead of gdb_assert.
3091 (enqueue_pending_signal): New function.
3092 (check_ptrace_stopped_lwp_gone): Add debug output.
3093 (start_step_over): Use internal_error instead of gdb_assert.
3094 (complete_ongoing_step_over): New function.
3095 (linux_resume_one_thread): Don't resume a suspended thread.
3096 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3099 2015-08-06 Pedro Alves <palves@redhat.com>
3101 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3102 (linux_thread_alive): Use lwp_is_marked_dead.
3103 (extended_event_reported): Delete.
3104 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3105 instead of extended_event_reported.
3106 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3108 (lwp_is_marked_dead): New function.
3109 (lwp_running): Use lwp_is_marked_dead.
3110 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3113 2015-08-06 Pedro Alves <palves@redhat.com>
3115 * linux-low.c (linux_wait_1): Move fork event output out of the
3116 !report_to_gdb check. Pass event_child->waitstatus to
3117 target_waitstatus_to_string instead of ourstatus.
3119 2015-08-04 Yao Qi <yao.qi@linaro.org>
3121 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3122 if current_thread is 32 bit.
3124 2015-08-04 Yao Qi <yao.qi@linaro.org>
3126 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3127 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3128 * server.c (extended_protocol): Remove "static".
3129 * server.h (extended_protocol): Declare it.
3131 2015-08-04 Yao Qi <yao.qi@linaro.org>
3133 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3134 both aarch64 and aarch32.
3135 (aarch64_set_pc): Likewise.
3137 2015-08-04 Yao Qi <yao.qi@linaro.org>
3139 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3140 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3141 arm-with-neon.xml to srv_xmlfiles.
3142 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3143 (is_64bit_tdesc): New function.
3144 (aarch64_linux_read_description): New function.
3145 (aarch64_arch_setup): Call aarch64_linux_read_description.
3146 (regs_info): Rename to regs_info_aarch64.
3147 (aarch64_regs_info): Return right regs_info.
3148 (initialize_low_arch): Call initialize_low_arch_aarch32.
3150 2015-08-04 Yao Qi <yao.qi@linaro.org>
3152 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3153 * linux-aarch32-low.c: New file.
3154 * linux-aarch32-low.h: New file.
3155 * linux-arm-low.c (arm_fill_gregset): Move it to
3156 linux-aarch32-low.c.
3157 (arm_store_gregset): Likewise.
3158 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3159 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3160 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3161 (regs_info): Rename to regs_info_arm.
3162 (arm_regs_info): Return regs_info_aarch32 if
3163 have_ptrace_getregset is 1 and target description is
3164 arm_with_neon or arm_with_vfpv3.
3165 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3166 Call initialize_low_arch_aarch32 instead.
3168 2015-08-04 Yao Qi <yao.qi@linaro.org>
3170 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3171 * linux-low.c: ... here.
3172 * linux-low.h (have_ptrace_getregset): Declare it.
3174 2015-08-04 Pedro Alves <palves@redhat.com>
3176 * thread-db.c (struct thread_db): Use new typedefs.
3177 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3179 (disable_thread_event_reporting): Cast result of dlsym to
3180 destination function pointer type.
3181 (thread_db_mourn): Use td_ta_delete_ftype.
3183 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3185 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3187 (CDX_BREAKPOINT): Define for R2.
3188 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3189 (the_low_target): Add comments.
3191 2015-07-30 Yao Qi <yao.qi@linaro.org>
3193 * linux-arm-low.c (arm_hwcap): Remove it.
3194 (arm_read_description): New local variable arm_hwcap. Don't
3195 set arm_hwcap to zero.
3197 2015-07-30 Yao Qi <yao.qi@linaro.org>
3199 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3200 Use regcache->tdesc instead.
3201 (arm_store_wmmxregset): Likewise.
3202 (arm_fill_vfpregset): Likewise.
3203 (arm_store_vfpregset): Likewise.
3205 2015-07-30 Yao Qi <yao.qi@linaro.org>
3207 * linux-arm-low.c: Include arch/arm.h.
3208 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3209 (arm_store_gregset): Likewise.
3211 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3213 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3214 ptrace's 4th parameter.
3216 2015-07-27 Yao Qi <yao.qi@linaro.org>
3218 * configure.srv (case aarch64*-*-linux*): Don't set
3221 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3223 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3225 * linux-arm-low.c: Likewise.
3226 * linux-cris-low.c: Likewise.
3227 * linux-crisv32-low.c: Likewise.
3228 * linux-low.c: Likewise.
3229 * linux-m68k-low.c: Likewise.
3230 * linux-mips-low.c: Likewise.
3231 * linux-nios2-low.c: Likewise.
3232 * linux-s390-low.c: Likewise.
3233 * linux-sparc-low.c: Likewise.
3234 * linux-tic6x-low.c: Likewise.
3235 * linux-tile-low.c: Likewise.
3236 * linux-x86-low.c: Likewise.
3238 2015-07-24 Pedro Alves <palves@redhat.com>
3240 * config.in: Regenerate.
3241 * configure: Regenerate.
3243 2015-07-24 Pedro Alves <palves@redhat.com>
3245 * acinclude.m4: Include ../ptrace.m4.
3246 * configure.ac: Call GDB_AC_PTRACE.
3247 * config.in, configure: Regenerate.
3249 2015-07-24 Yao Qi <yao.qi@linaro.org>
3251 * linux-low.c (linux_create_inferior): Remove setting to
3252 proc->priv->new_inferior.
3253 (linux_attach): Likewise.
3254 (linux_low_filter_event): Likewise.
3255 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3257 2015-07-24 Yao Qi <yao.qi@linaro.org>
3259 * linux-low.c (linux_arch_setup): New function.
3260 (linux_low_filter_event): If proc->tdesc is NULL and
3261 proc->attached is true, call the_low_target.arch_setup.
3262 Otherwise, keep status pending, and return.
3263 (linux_resume_one_lwp_throw): Don't call get_pc if
3264 thread->while_stepping isn't NULL. Don't call
3265 get_thread_regcache if proc->tdesc is NULL.
3266 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3267 (linux_target_ops): Install arch_setup.
3268 * server.c (start_inferior): Call the_target->arch_setup.
3269 * target.h (struct target_ops) <arch_setup>: New field.
3270 (target_arch_setup): New marco.
3271 * lynx-low.c (lynx_target_ops): Update.
3272 * nto-low.c (nto_target_ops): Update.
3273 * spu-low.c (spu_target_ops): Update.
3274 * win32-low.c (win32_target_ops): Update.
3276 2015-07-24 Yao Qi <yao.qi@linaro.org>
3278 * linux-low.c (linux_add_process): Don't set
3279 proc->priv->new_inferior.
3280 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3281 (linux_attach): Likewise.
3283 2015-07-24 Yao Qi <yao.qi@linaro.org>
3285 * server.c (start_inferior): Code refactor.
3287 2015-07-24 Yao Qi <yao.qi@linaro.org>
3289 * server.c (process_serial_event): Set general_thread.
3291 2015-07-21 Yao Qi <yao.qi@linaro.org>
3293 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3294 aarch64_linux_get_debug_reg_capacity.
3296 2015-07-17 Yao Qi <yao.qi@linaro.org>
3298 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3299 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3300 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3301 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3302 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3303 (AARCH64_HWP_ALIGNMENT): Likewise.
3304 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3305 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3306 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3307 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3308 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3309 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3310 (struct aarch64_debug_reg_state): Likewise.
3311 (struct arch_lwp_info): Likewise.
3312 (aarch64_align_watchpoint): Likewise.
3313 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3314 (aarch64_watchpoint_length): Likewise.
3315 (aarch64_point_encode_ctrl_reg): Likewise
3316 (aarch64_point_is_aligned): Likewise.
3317 (aarch64_align_watchpoint): Likewise.
3318 (aarch64_linux_set_debug_regs):
3319 (aarch64_dr_state_insert_one_point): Likewise.
3320 (aarch64_dr_state_remove_one_point): Likewise.
3321 (aarch64_handle_breakpoint): Likewise.
3322 (aarch64_handle_aligned_watchpoint): Likewise.
3323 (aarch64_handle_unaligned_watchpoint): Likewise.
3324 (aarch64_handle_watchpoint): Likewise.
3326 2015-07-17 Yao Qi <yao.qi@linaro.org>
3328 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3329 and don't aarch64_get_debug_reg_state. All callers update.
3330 (aarch64_handle_aligned_watchpoint): Likewise.
3331 (aarch64_handle_unaligned_watchpoint): Likewise.
3332 (aarch64_handle_watchpoint): Likewise.
3333 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3334 (aarch64_remove_point): Likewise.
3336 2015-07-17 Yao Qi <yao.qi@linaro.org>
3338 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3340 (aarch64_handle_unaligned_watchpoint): Likewise.
3342 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3344 Revert the previous 3 commits:
3345 Move gdb_regex* to common/
3346 Move linux_find_memory_regions_full & co.
3347 gdbserver build-id attribute generator
3349 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3350 Jan Kratochvil <jan.kratochvil@redhat.com>
3352 gdbserver build-id attribute generator.
3353 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3354 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3355 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3357 (get_dynamic): Use find_pdhr to traverse program headers.
3358 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3359 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3360 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3361 (get_hex_build_id): New.
3362 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3363 to reply XML document.
3365 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3366 Jan Kratochvil <jan.kratochvil@redhat.com>
3368 * target.c: Include target/target-utils.h and fcntl.h.
3369 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3370 (target_fileio_read_stralloc): New functions.
3372 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3374 * Makefile.in (OBS): Add gdb_regex.o.
3376 * config.in: Rebuilt.
3377 * configure: Rebuilt.
3379 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3380 Jan Kratochvil <jan.kratochvil@redhat.com>
3382 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3383 * Makefile.in (OBS): Add target-utils.o.
3384 (linux-maps.o, target-utils.o): New.
3385 * configure.srv (srv_linux_obj): Add linux-maps.o.
3387 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3389 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3391 (the_low_target): Install it.
3393 2015-07-14 Pedro Alves <palves@redhat.com>
3395 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3396 Instead, ignore ECHILD, and throw an error for other errnos.
3398 2015-07-10 Pedro Alves <palves@redhat.com>
3400 * event-loop.c (struct callback_event) <data>: Change type to
3401 gdb_client_data instance instead of gdb_client_data pointer.
3402 (append_callback_event): Adjust.
3404 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3406 * linux-aarch64-low.c: Add comments for each linux_target_ops
3407 method. Remove comments already covered in target_ops and
3408 linux_target_ops definitions.
3409 (the_low_target): Add comments for each unimplemented method.
3411 2015-07-09 Yao Qi <yao.qi@linaro.org>
3413 * linux-aarch64-low.c (aarch64_regmap): Remove.
3414 (aarch64_usrregs_info): Remove.
3415 (regs_info): Set field usrregs to NULL.
3417 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3419 * linux-low.c: Include "rsp-low.h"
3420 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3421 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3422 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3423 (handle_btrace_enable_pt): New.
3424 (handle_btrace_general_set): Support "pt".
3425 (handle_btrace_conf_general_set): Support "pt:size".
3427 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3429 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3432 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3434 * linux-aarch64-low.c: Remove comment about endianness.
3435 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3436 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3439 2015-06-24 Gary Benson <gbenson@redhat.com>
3441 * linux-i386-ipa.c (stdint.h): Do not include.
3442 * lynx-i386-low.c (stdint.h): Likewise.
3443 * lynx-ppc-low.c (stdint.h): Likewise.
3444 * mem-break.c (stdint.h): Likewise.
3445 * thread-db.c (stdint.h): Likewise.
3446 * tracepoint.c (stdint.h): Likewise.
3447 * win32-low.c (stdint.h): Likewise.
3449 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3451 * server.c (write_qxfer_response): Update call to
3452 remote_escape_output.
3454 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3455 Jan Kratochvil <jan.kratochvil@redhat.com>
3457 Merge multiple hex conversions.
3458 * gdbreplay.c (tohex): Rename to 'fromhex'.
3459 (logchar): Use fromhex.
3461 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3463 * server.c (handle_qxfer_libraries): Set `version' attribute for
3466 2015-06-10 Gary Benson <gbenson@redhat.com>
3468 * target.h (struct target_ops) <multifs_open>: New field.
3469 <multifs_unlink>: Likewise.
3470 <multifs_readlink>: Likewise.
3471 * linux-low.c (nat/linux-namespaces.h): New include.
3472 (linux_target_ops): Initialize the_target->multifs_open,
3473 the_target->multifs_unlink and the_target->multifs_readlink.
3474 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3475 * hostio.c (hostio_fs_pid): New static variable.
3476 (hostio_handle_new_gdb_connection): New function.
3477 (handle_setfs): Likewise.
3478 (handle_open): Use the_target->multifs_open as appropriate.
3479 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3480 (handle_readlink): Use the_target->multifs_readlink as
3482 (handle_vFile): Handle vFile:setfs packets.
3483 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3484 after target_handle_new_gdb_connection.
3486 2015-06-10 Gary Benson <gbenson@redhat.com>
3488 * configure.ac (AC_CHECK_FUNCS): Add setns.
3489 * config.in: Regenerate.
3490 * configure: Likewise.
3491 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3492 (linux-namespaces.o): New rule.
3493 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3495 2015-06-09 Gary Benson <gbenson@redhat.com>
3497 * hostio.c (handle_open): Process mode argument with
3498 fileio_to_host_mode.
3500 2015-06-01 Yao Qi <yao.qi@linaro.org>
3502 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3503 * linux-x86-low.c: Likewise.
3505 2015-05-28 Don Breazeal <donb@codesourcery.com>
3507 * linux-low.c (handle_extended_wait): Initialize
3508 thread_info.last_resume_kind for new fork children.
3510 2015-05-15 Pedro Alves <palves@redhat.com>
3512 * target.h (target_handle_new_gdb_connection): Rewrite using if
3513 wrapped in do/while.
3515 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3517 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3518 * configure, config.in: Regenerate.
3519 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3522 2015-05-12 Don Breazeal <donb@codesourcery.com>
3524 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3525 PTRACE_EVENT_VFORK_DONE.
3526 (linux_low_ptrace_options, extended_event_reported): Add vfork
3528 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3529 and "vforkdone" for RSP 'T' Stop Reply Packet.
3530 * server.h (report_vfork_events): Declare
3533 2015-05-12 Don Breazeal <donb@codesourcery.com>
3535 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3536 (the_low_target) <new_fork>: Initialize new member.
3537 * linux-arm-low.c (arm_new_fork): New function.
3538 (the_low_target) <new_fork>: Initialize new member.
3539 * linux-low.c (handle_extended_wait): Call new target function
3541 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3542 * linux-mips-low.c (mips_add_watchpoint): New function
3543 extracted from mips_insert_point.
3544 (the_low_target) <new_fork>: Initialize new member.
3545 (mips_linux_new_fork): New function.
3546 (mips_insert_point): Call mips_add_watchpoint.
3547 * linux-x86-low.c (x86_linux_new_fork): New function.
3548 (the_low_target) <new_fork>: Initialize new member.
3550 2015-05-12 Don Breazeal <donb@codesourcery.com>
3552 * linux-low.c (handle_extended_wait): Implement return value,
3553 rename argument 'event_child' to 'event_lwp', handle
3554 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3555 (linux_low_ptrace_options): New function.
3556 (linux_low_filter_event): Call linux_low_ptrace_options,
3557 use different argument fo linux_enable_event_reporting,
3558 use return value from handle_extended_wait.
3559 (extended_event_reported): New function.
3560 (linux_wait_1): Call extended_event_reported and set
3561 status to report fork events.
3562 (linux_write_memory): Add pid to debug message.
3563 (reset_lwp_ptrace_options_callback): New function.
3564 (linux_handle_new_gdb_connection): New function.
3565 (linux_target_ops): Initialize new structure member.
3566 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3567 * lynx-low.c: Initialize new structure member.
3568 * remote-utils.c (prepare_resume_reply): Implement stop reason
3569 "fork" for "T" stop message.
3570 * server.c (handle_query): Call handle_new_gdb_connection.
3571 * server.h (report_fork_events): Declare global flag.
3572 * target.h (struct target_ops) <handle_new_gdb_connection>:
3574 (target_handle_new_gdb_connection): New macro.
3575 * win32-low.c: Initialize new structure member.
3577 2015-05-12 Don Breazeal <donb@codesourcery.com>
3579 * mem-break.c (APPEND_TO_LIST): Define macro.
3580 (clone_agent_expr): New function.
3581 (clone_one_breakpoint): New function.
3582 (clone_all_breakpoints): New function.
3583 * mem-break.h: Declare new functions.
3585 2015-05-12 Don Breazeal <donb@codesourcery.com>
3587 * linux-low.c (linux_supports_fork_events): New function.
3588 (linux_supports_vfork_events): New function.
3589 (linux_target_ops): Initialize new structure members.
3590 (initialize_low): Call linux_check_ptrace_features.
3591 * lynx-low.c (lynx_target_ops): Initialize new structure
3593 * server.c (report_fork_events, report_vfork_events):
3595 (handle_query): Add new features to qSupported packet and
3597 (captured_main): Initialize new global variables.
3598 * target.h (struct target_ops) <supports_fork_events>:
3600 <supports_vfork_events>: New member.
3601 (target_supports_fork_events): New macro.
3602 (target_supports_vfork_events): New macro.
3603 * win32-low.c (win32_target_ops): Initialize new structure
3606 2015-05-12 Gary Benson <gbenson@redhat.com>
3608 * server.c (handle_qxfer_exec_file): Use current process
3611 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3613 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3614 Remove HAVE_PTRACE_GETREGS conditionals.
3615 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3616 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3618 2015-05-08 Yao Qi <yao.qi@linaro.org>
3620 * linux-low.c (linux_supports_conditional_breakpoints): New
3622 (linux_target_ops): Install new target method.
3623 * lynx-low.c (lynx_target_ops): Install NULL hook for
3624 supports_conditional_breakpoints.
3625 * nto-low.c (nto_target_ops): Likewise.
3626 * spu-low.c (spu_target_ops): Likewise.
3627 * win32-low.c (win32_target_ops): Likewise.
3628 * server.c (handle_query): Check
3629 target_supports_conditional_breakpoints.
3630 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3632 (target_supports_conditional_breakpoints): New macro.
3634 2015-05-06 Pedro Alves <palves@redhat.com>
3637 * server.c (start_inferior): If the process exits, mourn it.
3639 2015-04-21 Gary Benson <gbenson@redhat.com>
3641 * hostio.c (fileio_open_flags_to_host): Factored out to
3642 fileio_to_host_openflags in common/fileio.c. Single use
3645 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3647 * linux-xtensa-low.c (xtensa_fill_gregset)
3648 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3651 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3653 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3654 (regs_info): Replace usrregs pointer with NULL.
3656 2015-04-17 Gary Benson <gbenson@redhat.com>
3658 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3659 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3660 * server.c (handle_qxfer_exec_file): New function.
3661 (qxfer_packets): Add exec-file entry.
3662 (handle_query): Report qXfer:exec-file:read as supported packet.
3664 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3666 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3668 2015-04-09 Gary Benson <gbenson@redhat.com>
3670 * hostio-errno.c (errno_to_fileio_error): Remove function.
3671 Update caller to use remote_fileio_to_fio_error.
3673 2015-04-09 Yao Qi <yao.qi@linaro.org>
3675 * linux-low.c (linux_insert_point): Call
3676 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3677 (linux_remove_point): Call remove_memory_breakpoint if type is
3679 * linux-x86-low.c (x86_insert_point): Don't call
3680 insert_memory_breakpoint.
3681 (x86_remove_point): Don't call remove_memory_breakpoint.
3683 2015-04-01 Pedro Alves <palves@redhat.com>
3684 Cleber Rosa <crosa@redhat.com>
3686 * server.c (gdbserver_usage): Reorganize and extend the usage
3689 2015-03-24 Pedro Alves <palves@redhat.com>
3691 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3692 output. Also dump TRAP_TRACE.
3693 (linux_low_filter_event): In debug output, distinguish a
3694 resume_stop SIGSTOP from a delayed SIGSTOP.
3696 2015-03-24 Gary Benson <gbenson@redhat.com>
3698 * linux-x86-low.c (x86_linux_new_thread): Moved to
3700 (x86_linux_prepare_to_resume): Likewise.
3702 2015-03-24 Gary Benson <gbenson@redhat.com>
3704 * Makefile.in (x86-linux-dregs.o): New rule.
3705 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3706 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3707 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3708 (x86_linux_dr_get): Likewise.
3709 (x86_linux_dr_set): Likewise.
3710 (update_debug_registers_callback): Likewise.
3711 (x86_linux_dr_set_addr): Likewise.
3712 (x86_linux_dr_get_addr): Likewise.
3713 (x86_linux_dr_set_control): Likewise.
3714 (x86_linux_dr_get_control): Likewise.
3715 (x86_linux_dr_get_status): Likewise.
3716 (x86_linux_update_debug_registers): Likewise.
3718 2015-03-24 Gary Benson <gbenson@redhat.com>
3720 * linux-x86-low.c (x86_linux_update_debug_registers):
3721 New function, factored out from...
3722 (x86_linux_prepare_to_resume): ...this.
3724 2015-03-24 Gary Benson <gbenson@redhat.com>
3726 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3727 (x86_linux_dr_set): Likewise.
3728 (update_debug_registers_callback): Likewise.
3729 (x86_linux_dr_set_addr): Likewise.
3730 (x86_linux_dr_get_addr): Likewise.
3731 (x86_linux_dr_set_control): Likewise.
3732 (x86_linux_dr_get_control): Likewise.
3733 (x86_linux_dr_get_status): Likewise.
3734 (x86_linux_prepare_to_resume): Likewise.
3736 2015-03-24 Gary Benson <gbenson@redhat.com>
3738 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3739 Use perror_with_name. Pass string through gettext.
3740 (x86_linux_dr_set): Likewise.
3742 2015-03-24 Gary Benson <gbenson@redhat.com>
3744 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3745 (x86_linux_dr_set_addr): ...this.
3746 (x86_dr_low_get_addr): Rename to...
3747 (x86_linux_dr_get_addr): ...this.
3748 (x86_dr_low_set_control): Rename to...
3749 (x86_linux_dr_set_control): ...this.
3750 (x86_dr_low_get_control): Rename to...
3751 (x86_linux_dr_get_control): ...this.
3752 (x86_dr_low_get_status): Rename to...
3753 (x86_linux_dr_get_status): ...this.
3754 (x86_dr_low): Update with new function names.
3756 2015-03-24 Gary Benson <gbenson@redhat.com>
3758 * Makefile.in (x86-linux.o): New rule.
3759 * configure.srv: Add x86-linux.o to relevant targets.
3760 * linux-low.c (lwp_set_arch_private_info): New function.
3761 (lwp_arch_private_info): Likewise.
3762 * linux-x86-low.c: Include nat/x86-linux.h.
3763 (arch_lwp_info): Removed structure.
3764 (update_debug_registers_callback):
3765 Use lwp_set_debug_registers_changed.
3766 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3767 and lwp_set_debug_registers_changed.
3768 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3770 2015-03-24 Gary Benson <gbenson@redhat.com>
3772 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3773 * linux-arm-low.c (arm_new_thread): Likewise.
3774 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3775 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3776 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3777 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3779 2015-03-24 Gary Benson <gbenson@redhat.com>
3781 * linux-low.c (ptid_of_lwp): New function.
3782 (lwp_is_stopped): Likewise.
3783 (lwp_stop_reason): Likewise.
3784 * linux-x86-low.c (update_debug_registers_callback):
3786 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3789 2015-03-24 Gary Benson <gbenson@redhat.com>
3791 * linux-low.h (linux_stop_lwp): Remove declaration.
3793 2015-03-24 Gary Benson <gbenson@redhat.com>
3795 * linux-low.h: Include nat/linux-nat.h.
3796 * linux-low.c (iterate_over_lwps_args): New structure.
3797 (iterate_over_lwps_filter): New function.
3798 (iterate_over_lwps): Likewise.
3799 * linux-x86-low.c (update_debug_registers_callback):
3800 Update signature to what iterate_over_lwps expects.
3801 Remove PID check that iterate_over_lwps now performs.
3802 (x86_dr_low_set_addr): Use iterate_over_lwps.
3803 (x86_dr_low_set_control): Likewise.
3805 2015-03-24 Gary Benson <gbenson@redhat.com>
3807 * linux-x86-low.c (x86_debug_reg_state): New function.
3808 (x86_linux_prepare_to_resume): Use the above.
3810 2015-03-24 Gary Benson <gbenson@redhat.com>
3812 * linux-low.c (current_lwp_ptid): New function.
3813 * linux-x86-low.c: Include nat/linux-nat.h.
3814 (x86_dr_low_get_addr): Use current_lwp_ptid.
3815 (x86_dr_low_get_control): Likewise.
3816 (x86_dr_low_get_status): Likewise.
3818 2015-03-20 Pedro Alves <palves@redhat.com>
3820 * tracepoint.c (cmd_qtstatus): Make "str" const.
3822 2015-03-20 Pedro Alves <palves@redhat.com>
3824 * server.c (handle_general_set): Make "req_str" const.
3826 2015-03-19 Pedro Alves <palves@redhat.com>
3828 * linux-low.c (linux_resume_one_lwp): Rename to ...
3829 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3830 instead call perror_with_name.
3831 (check_ptrace_stopped_lwp_gone): New function.
3832 (linux_resume_one_lwp): Reimplement as wrapper around
3833 linux_resume_one_lwp_throw that swallows errors if the LWP is
3836 2015-03-19 Pedro Alves <palves@redhat.com>
3838 * linux-low.c (count_events_callback, select_event_lwp_callback):
3839 No longer check whether the thread has resume_stop as last resume
3842 2015-03-19 Pedro Alves <palves@redhat.com>
3844 * linux-low.c (count_events_callback, select_event_lwp_callback):
3845 Use the lwp's status_pending_p field, not the thread's.
3847 2015-03-19 Pedro Alves <palves@redhat.com>
3849 * linux-low.c (select_event_lwp_callback): Update comments to
3850 no longer mention SIGTRAP.
3852 2015-03-18 Gary Benson <gbenson@redhat.com>
3854 * server.c (handle_query): Do not report vFile:fstat as supported.
3856 2015-03-11 Gary Benson <gbenson@redhat.com>
3858 * hostio.c (sys/types.h): New include.
3859 (sys/stat.h): Likewise.
3860 (common-remote-fileio.h): Likewise.
3861 (handle_fstat): New function.
3862 (handle_vFile): Handle vFile:fstat packets.
3864 2015-03-11 Gary Benson <gbenson@redhat.com>
3866 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3867 struct stat.st_blocks and struct stat.st_blksize.
3868 * configure: Regenerate.
3869 * config.in: Likewise.
3870 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3871 (OBS): Add common-remote-fileio.o.
3872 (common-remote-fileio.o): New rule.
3874 2015-03-09 Pedro Alves <palves@redhat.com>
3876 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3877 'struct sockaddr' pointer in 'accept' call.
3879 2015-03-09 Pedro Alves <palves@redhat.com>
3882 2015-03-07 Pedro Alves <palves@redhat.com>
3883 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3884 or <winsock2.h> here. Instead include "gdb_socket.h".
3885 (remote_open): Use union gdb_sockaddr_u.
3886 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3887 or <winsock2.h> here. Instead include "gdb_socket.h".
3888 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3889 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3891 (init_named_socket, gdb_agent_helper_thread): Use union
3894 2015-03-07 Pedro Alves <palves@redhat.com>
3896 * configure.ac (build_warnings): Move
3897 -Wdeclaration-after-statement to the C-specific set.
3898 * configure: Regenerate.
3900 2015-03-07 Pedro Alves <palves@redhat.com>
3902 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3903 or <winsock2.h> here. Instead include "gdb_socket.h".
3904 (remote_open): Use union gdb_sockaddr_u.
3905 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3906 or <winsock2.h> here. Instead include "gdb_socket.h".
3907 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3908 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3910 (init_named_socket, gdb_agent_helper_thread): Use union
3913 2015-03-07 Pedro Alves <palves@redhat.com>
3915 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3918 2015-03-06 Yao Qi <yao.qi@linaro.org>
3920 * linux-aarch64-low.c (aarch64_insert_point): Use
3921 show_debug_regs as a boolean.
3922 (aarch64_remove_point): Likewise.
3924 2015-03-05 Pedro Alves <palves@redhat.com>
3926 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3927 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3928 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3929 * nto-low.c (nto_target_ops): Likewise.
3930 * spu-low.c (spu_target_ops): Likewise.
3931 * win32-low.c (win32_target_ops): Likewise.
3933 2015-03-04 Pedro Alves <palves@redhat.com>
3935 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3936 Decide whether a breakpoint triggered based on the SIGTRAP's
3938 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3939 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3940 (linux_low_filter_event): Check for breakpoints before checking
3942 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3944 (linux_stopped_by_sw_breakpoint)
3945 (linux_supports_stopped_by_sw_breakpoint)
3946 (linux_stopped_by_hw_breakpoint)
3947 (linux_supports_stopped_by_hw_breakpoint): New functions.
3948 (linux_target_ops): Install new target methods.
3950 2015-03-04 Pedro Alves <palves@redhat.com>
3952 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3953 * server.c (swbreak_feature, hwbreak_feature): New globals.
3954 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3955 (captured_main): Clear swbreak_feature and hwbreak_feature.
3956 * server.h (swbreak_feature, hwbreak_feature): Declare.
3957 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3958 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3959 supports_stopped_by_hw_breakpoint>: New fields.
3960 (target_supports_stopped_by_sw_breakpoint)
3961 (target_stopped_by_sw_breakpoint)
3962 (target_supports_stopped_by_hw_breakpoint)
3963 (target_stopped_by_hw_breakpoint): Declare.
3965 2015-03-04 Pedro Alves <palves@redhat.com>
3967 enum lwp_stop_reason -> enum target_stop_reason
3968 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3969 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3970 (linux_wait_1, stuck_in_jump_pad_callback)
3971 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3972 (linux_stopped_by_watchpoint):
3973 * linux-low.h (enum lwp_stop_reason): Delete.
3974 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3975 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3977 2015-03-04 Yao Qi <yao.qi@linaro.org>
3979 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3981 2015-03-03 Gary Benson <gbenson@redhat.com>
3983 * hostio.c (handle_vFile): Fix prefix lengths.
3985 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3987 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3990 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3992 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3993 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3994 (clean): Add "rm -f" for above C files.
3995 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3996 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3997 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3998 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3999 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4000 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4001 (init_registers_s390x_vx_linux64)
4002 (init_registers_s390x_tevx_linux64)
4003 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4004 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4006 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4007 (s390_store_vxrs_high): New functions.
4008 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4010 (s390_arch_setup): Add logic for selecting one of the new target
4011 descriptions. Activate the new vector regsets if applicable.
4012 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4013 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4014 and init_registers_s390x_tevx_linux64.
4016 2015-03-01 Pedro Alves <palves@redhat.com>
4018 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4021 2015-02-27 Pedro Alves <palves@redhat.com>
4023 * linux-x86-low.c (u_debugreg_offset): New function.
4024 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4026 2015-02-27 Pedro Alves <palves@redhat.com>
4028 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4029 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4030 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4031 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4032 (ps_lsetfpregs, ps_getpid)
4033 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4034 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4035 (ps_lsetxregs, ps_plog): Declare.
4037 2015-02-27 Pedro Alves <palves@redhat.com>
4039 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4040 IP_AGENT_EXPORT_FUNC.
4041 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4042 IP_AGENT_EXPORT_FUNC.
4043 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4044 (IP_AGENT_EXPORT): Delete.
4045 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4046 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4047 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4048 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4049 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4050 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4051 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4052 (traceframe_read_count, traceframe_write_count)
4053 (traceframes_created, trace_state_variables, get_raw_reg)
4054 (get_trace_state_variable_value, set_trace_state_variable_value)
4055 (ust_loaded, helper_thread_id, cmd_buf): Use
4056 IPA_SYM_EXPORTED_NAME.
4057 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4058 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4059 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4060 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4061 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4062 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4063 EXTERN_C_PUSH/EXTERN_C_POP.
4064 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4065 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4066 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4067 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4068 (traceframe_write_count, traceframe_read_count)
4069 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4070 (about_to_request_buffer_space, get_trace_state_variable_value)
4071 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4072 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4073 EXTERN_C_PUSH/EXTERN_C_POP.
4074 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4075 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4076 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4077 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4078 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4079 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4080 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4081 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4083 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4084 (IP_AGENT_EXPORT_VAR_DECL): Define.
4086 (gdb_agent_get_raw_reg): Declare.
4088 2015-02-27 Tom Tromey <tromey@redhat.com>
4089 Pedro Alves <palves@redhat.com>
4091 Rename symbols whose names are reserved C++ keywords throughout.
4093 2015-02-27 Pedro Alves <palves@redhat.com>
4095 * Makefile.in (COMPILER): New, get it from autoconf.
4096 (CXX): Get from autoconf instead.
4097 (COMPILE.pre): Use COMPILER.
4098 (CC-LD): Rename to ...
4099 (CC_LD): ... this. Use COMPILER.
4100 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4101 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4102 * acinclude.m4: Include build-with-cxx.m4.
4103 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4104 Disable -Werror by default if building in C++ mode.
4105 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4106 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4107 the C++ compiler. Save/restore CXXFLAGS too.
4108 * configure: Regenerate.
4110 2015-02-27 Pedro Alves <palves@redhat.com>
4112 * acinclude.m4: Include libiberty.m4.
4113 * configure.ac: Call libiberty_INIT.
4114 * config.in, configure: Regenerate.
4116 2015-02-26 Pedro Alves <palves@redhat.com>
4118 * linux-low.c (linux_wait_1): When incrementing the PC past a
4119 program breakpoint always use the_low_target.breakpoint_len as
4120 increment, rather than the maximum between that and
4121 the_low_target.decr_pc_after_break.
4123 2015-02-23 Pedro Alves <palves@redhat.com>
4125 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4126 thread was doing a step-over; always adjust the PC if
4127 we stepped over a permanent breakpoint.
4128 (linux_wait_1): If we stepped over breakpoint that was on top of a
4129 permanent breakpoint, manually advance the PC past it.
4131 2015-02-23 Pedro Alves <palves@redhat.com>
4133 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4135 (x86_fill_gregset, x86_store_gregset): Use it when handling
4138 2015-02-20 Pedro Alves <palves@redhat.com>
4140 * thread-db.c: Include "nat/linux-procfs.h".
4141 (thread_db_init): Skip listing new threads if the kernel supports
4142 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4144 2015-02-20 Pedro Alves <palves@redhat.com>
4146 * linux-low.c (status_pending_p_callback): Use ptid_match.
4148 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4150 PR breakpoints/16812
4151 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4152 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4153 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4155 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4157 PR breakpoints/15956
4158 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4160 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4162 * linux-low.c (linux_low_btrace_conf): Print size.
4163 * server.c (handle_btrace_conf_general_set): New.
4164 (hanle_general_set): Call handle_btrace_conf_general_set.
4165 (handle_query): Report Qbtrace-conf:bts:size as supported.
4167 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4169 * linux-low.c (linux_low_enable_btrace): Update parameters.
4170 (linux_low_btrace_conf): New.
4171 (linux_target_ops)<to_btrace_conf>: Initialize.
4172 * server.c (current_btrace_conf): New.
4173 (handle_btrace_enable): Rename to ...
4174 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4175 to target_enable_btrace. Update comment. Update users.
4176 (handle_qxfer_btrace_conf): New.
4177 (qxfer_packets): Add btrace-conf entry.
4178 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4179 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4180 (target_ops)<read_btrace_conf>: New.
4181 (target_enable_btrace): Update parameters.
4182 (target_read_btrace_conf): New.
4184 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4186 * server.c (handle_btrace_general_set): Remove call to
4187 target_supports_btrace.
4188 (supported_btrace_packets): New.
4189 (handle_query): Call supported_btrace_packets.
4190 * target.h: include btrace-common.h.
4191 (btrace_target_info): Removed.
4192 (supports_btrace, target_supports_btrace): Update parameters.
4194 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4196 * Makefile.in (SFILES): Add common/btrace-common.c.
4197 (OBS): Add common/btrace-common.o.
4198 (btrace-common.o): Add build rules.
4199 * linux-low: Include btrace-common.h.
4200 (linux_low_read_btrace): Use struct btrace_data. Call
4201 btrace_data_init and btrace_data_fini.
4203 2015-02-06 Pedro Alves <palves@redhat.com>
4205 * thread-db.c (find_new_threads_callback): Add debug output.
4207 2015-02-04 Pedro Alves <palves@redhat.com>
4209 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4210 (resume_stopped_resumed_lwps): New function.
4211 (linux_wait_for_event_filtered): Use it.
4213 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4215 * Makefile.in (SFILES): Add linux-personality.c.
4216 (linux-personality.o): New rule.
4217 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4218 list of objects to be built.
4219 * linux-low.c: Include nat/linux-personality.h.
4220 (linux_create_inferior): Remove code to disable address space
4221 randomization (moved to ../nat/linux-personality.c). Create
4222 cleanup to disable address space randomization.
4224 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4226 * Makefile.in (posix-strerror.o): New rule.
4227 (mingw-strerror.o): Likewise.
4228 * configure: Regenerated.
4229 * configure.ac: Source file ../common/common.host. Initialize new
4230 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4232 2015-01-14 Yao Qi <yao@codesourcery.com>
4234 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4235 (ppc-linux.o): New rule.
4236 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4237 * configure.ac: AC_CHECK_FUNCS(getauxval).
4238 * config.in: Re-generated.
4239 * configure: Re-generated.
4240 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4241 ppc64_64bit_inferior_p
4243 2015-01-14 Yao Qi <yao@codesourcery.com>
4245 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4246 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4247 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4248 (PT_ORIG_R3, PT_TRAP): Likewise.
4249 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4250 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4251 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4253 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4255 * i387-fp.c (i387_cache_to_xsave): In look over
4256 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4257 zmmh_low_space field by use of zmmh_high_space.
4259 2015-01-09 Pedro Alves <palves@redhat.com>
4261 * linux-low.c (step_over_bkpt): Move higher up in the file.
4262 (handle_extended_wait): Don't store the stop_pc here.
4263 (get_stop_pc): Adjust comments and rename to ...
4264 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4265 stopped for a software breakpoint or hardware breakpoint.
4266 (thread_still_has_status_pending_p): New function.
4267 (status_pending_p_callback): Use
4268 thread_still_has_status_pending_p. If the event is no longer
4269 interesting, resume the LWP.
4270 (handle_tracepoints): Add assert.
4271 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4272 (wstatus_maybe_breakpoint): New function.
4273 (cancel_breakpoint): Delete function.
4274 (check_stopped_by_watchpoint): New function, factored out from
4275 linux_low_filter_event.
4276 (lp_status_maybe_breakpoint): Delete function.
4277 (linux_low_filter_event): Remove filter_ptid argument.
4278 Leave thread group exits pending here. Store the LWP's stop PC.
4279 Always leave events pending.
4280 (linux_wait_for_event_filtered): Pull all events out of the
4281 kernel, and leave them all pending.
4282 (count_events_callback, select_event_lwp_callback): Consider all
4284 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4285 (select_event_lwp): Only give preference to the stepping LWP in
4286 all-stop mode. Adjust comments.
4287 (ignore_event): New function.
4288 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4289 references to cancel_breakpoints. Adjust to renames. Also give
4290 equal priority to all LWPs that have had events in non-stop mode.
4291 If reporting a software breakpoint event, unadjust the LWP's PC.
4292 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4293 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4295 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4296 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4297 (linux_stopped_by_watchpoint): Adjust.
4298 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4299 * linux-low.h (enum lwp_stop_reason): New.
4300 (struct lwp_info) <stop_pc>: Adjust comment.
4301 <stopped_by_watchpoint>: Delete field.
4302 <stop_reason>: New field.
4303 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4304 * mem-break.c (software_breakpoint_inserted_here)
4305 (hardware_breakpoint_inserted_here): New function.
4306 * mem-break.h (software_breakpoint_inserted_here)
4307 (hardware_breakpoint_inserted_here): Declare.
4308 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4309 (cancel_breakpoints): Delete.
4310 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4311 (upload_fast_traceframes): Remove references to
4314 2015-01-09 Pedro Alves <palves@redhat.com>
4316 * thread-db.c (find_new_threads_callback): Ignore thread if the
4317 kernel thread ID is -1.
4319 2015-01-09 Pedro Alves <palves@redhat.com>
4321 * linux-low.c (linux_attach_fail_reason_string): Move to
4322 nat/linux-ptrace.c, and rename.
4323 (linux_attach_lwp): Update comment.
4324 (attach_proc_task_lwp_callback): New function.
4325 (linux_attach): Adjust to rename and use
4326 linux_proc_attach_tgid_threads.
4327 (linux_attach_fail_reason_string): Delete declaration.
4329 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4331 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4332 * server.c (gdbserver_version): Likewise.
4334 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4336 * remote-utils.c: Include ctype.h.
4337 (input_interrupt): Explicitly handle the case when the char
4338 received is the NUL byte. Improve the printing of non-ASCII
4341 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4343 * linux-low.c (linux_low_filter_event): Update call to
4344 linux_enable_event_reporting following the addition of
4345 a new parameter to that function.
4347 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4350 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4351 (AARCH64_FPCR_REGNO): Likewise.
4352 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4353 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4354 (aarch64_store_fpregset): Likewise.
4356 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4358 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4359 Remove FIXME comment about assumption about N.
4361 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4363 * configure.ac: If large-file support is disabled in GDBserver,
4364 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4365 * configure: Regenerate.
4367 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4369 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4370 warning upon ENODATA from ptrace.
4371 * linux-s390-low.c (s390_store_tdb): New.
4372 (s390_regsets): Add regset for NT_S390_TDB.
4374 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4376 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4377 without a fill_function.
4378 * linux-s390-low.c (s390_fill_last_break): Remove.
4379 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4380 (s390_arch_setup): Use regset's size instead of fill_function for
4383 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4385 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4386 the regset's store function when ptrace returned an error.
4387 * regcache.c (get_thread_regcache): Invalidate register cache
4388 before fetching inferior's registers.
4390 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4392 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4393 while-loop as for-loop.
4394 (regsets_store_inferior_registers): Likewise.
4396 2014-11-28 Yao Qi <yao@codesourcery.com>
4398 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4399 * config.in, configure: Re-generate.
4400 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4403 2014-11-21 Yao Qi <yao@codesourcery.com>
4405 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4406 (AC_CHECK_HEADERS): Remove malloc.h.
4407 * configure: Re-generated.
4408 * config.in: Re-generated.
4409 * server.h: Don't include alloca.h and malloc.h.
4410 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4411 Don't include malloc.h.
4413 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4415 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4416 corresponding ERRNO check in same block.
4418 2014-11-12 Pedro Alves <palves@redhat.com>
4420 * server.c (cont_thread): Update comment.
4421 (start_inferior, attach_inferior): No longer clear cont_thread.
4422 (handle_v_cont): No longer set cont_thread.
4423 (captured_main): Clear cont_thread each time a GDB connects.
4425 2014-11-12 Pedro Alves <palves@redhat.com>
4427 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4428 thread, and don't resume all threads if the Hc thread has exited.
4430 2014-11-12 Pedro Alves <palves@redhat.com>
4432 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4433 the process group instead of to a specific LWP.
4435 2014-10-15 Pedro Alves <palves@redhat.com>
4438 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4440 (arm_set_thread_context): Delete.
4441 (the_low_target): Adjust.
4442 * win32-i386-low.c (debug_registers_changed)
4443 (debug_registers_used): Delete.
4444 (update_debug_registers_callback): New function.
4445 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4446 needing to update their debug registers.
4447 (win32_get_current_dr): New function.
4448 (x86_dr_low_get_addr, x86_dr_low_get_control)
4449 (x86_dr_low_get_status): Fetch the debug register from the thread
4451 (i386_initial_stuff): Adjust.
4452 (i386_get_thread_context): Remove current_event parameter. Don't
4453 clear debug_registers_changed nor copy DR values to
4455 (i386_set_thread_context): Delete.
4456 (i386_prepare_to_resume): New function.
4457 (i386_thread_added): Mark the thread as needing to update irs
4459 (the_low_target): Remove i386_set_thread_context and install
4460 i386_prepare_to_resume.
4461 * win32-low.c (win32_get_thread_context): Adjust.
4462 (win32_set_thread_context): Use SetThreadContext
4464 (win32_prepare_to_resume): New function.
4465 (win32_require_context): New function, factored out from ...
4466 (thread_rec): ... this.
4467 (continue_one_thread): Call win32_prepare_to_resume on each thread
4468 we're about to continue.
4469 (win32_resume): Call win32_prepare_to_resume on the event thread.
4470 * win32-low.h (struct win32_thread_info)
4471 <debug_registers_changed>: New field.
4472 (struct win32_target_ops): Change prototype of set_thread_context,
4473 delete set_thread_context and add prepare_to_resume.
4474 (win32_require_context): New declaration.
4476 2014-10-08 Gary Benson <gbenson@redhat.com>
4478 * server.h: Do not include common-exceptions.h.
4480 2014-10-08 Gary Benson <gbenson@redhat.com>
4482 * server.h: Do not include cleanups.h.
4484 2014-09-30 James Hogan <james.hogan@imgtec.com>
4486 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4489 2014-09-23 Yao Qi <yao@codesourcery.com>
4491 * linux-low.c (lp_status_maybe_breakpoint): New function.
4492 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4493 (count_events_callback): Likewise.
4494 (select_event_lwp_callback): Likewise.
4495 (cancel_breakpoints_callback): Likewise.
4497 2014-09-19 Don Breazeal <donb@codesourcery.com>
4499 * linux-low.c (handle_extended_wait): Call
4500 linux_ptrace_get_extended_event.
4501 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4502 linux_is_extended_waitstatus.
4504 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4506 * Makefile.in (CPPFLAGS): Define.
4507 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4508 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4510 2014-09-16 Gary Benson <gbenson@redhat.com>
4512 * inferiors.h (current_inferior): Renamed as...
4513 (current_thread): New variable. All uses updated.
4514 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4515 (maybe_move_out_of_jump_pad): Likewise.
4516 (cancel_breakpoint): Likewise.
4517 (linux_low_filter_event): Likewise.
4518 (wait_for_sigstop): Likewise.
4519 (linux_resume_one_lwp): Likewise.
4520 (need_step_over_p): Likewise.
4521 (start_step_over): Likewise.
4522 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4523 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4524 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4525 and save_inferior as saved_thread.
4526 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4528 (regcache_invalidate_thread): Likewise.
4529 * remote-utils.c (prepare_resume_reply): Likewise.
4530 * thread-db.c (thread_db_get_tls_address): Likewise.
4531 (disable_thread_event_reporting): Likewise.
4532 (remove_thread_event_breakpoints): Likewise.
4533 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4535 * target.h (set_desired_inferior): Renamed as...
4536 (set_desired_thread): New declaration. All uses updated.
4537 * server.c (myresume): Updated comment to reference thread instead
4539 (handle_serial_event): Likewise.
4540 (handle_target_event): Likewise.
4542 2014-09-12 Tom Tromey <tromey@redhat.com>
4543 Gary Benson <gbenson@redhat.com>
4545 * regcache.h: Include common-regcache.h.
4546 (regcache_read_pc): Don't declare.
4547 * regcache.c (get_thread_regcache_for_ptid): New function.
4549 2014-09-11 Tom Tromey <tromey@redhat.com>
4550 Gary Benson <gbenson@redhat.com>
4552 * symbol.c: New file.
4553 * Makefile.in (SFILES): Add symbol.c.
4554 (OBS): Add symbol.o.
4556 2014-09-11 Gary Benson <gbenson@redhat.com>
4558 * target.c (target_stop_ptid, target_continue_ptid): New
4561 2014-09-11 Tom Tromey <tromey@redhat.com>
4562 Gary Benson <gbenson@redhat.com>
4564 * target.h: Include target/target.h.
4565 * target.c (target_read_memory, target_read_uint32)
4566 (target_write_memory): New functions.
4568 2014-09-11 Gary Benson <gbenson@redhat.com>
4570 * server.h (debug_hw_points): Don't declare.
4571 * server.c (debug_hw_points): Don't define. Replace all uses
4572 with show_debug_regs.
4573 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4574 all uses with show_debug_regs.
4576 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4578 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4579 endianness into account.
4580 (ppc_supply_ptrace_register): Likewise.
4582 2014-09-03 James Hogan <james.hogan@imgtec.com>
4584 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4585 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4587 2014-09-03 Gary Benson <gbenson@redhat.com>
4589 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4590 ALL_DEBUG_ADDRESS_REGISTERS.
4592 2014-09-02 Gary Benson <gbenson@redhat.com>
4594 * i386-low.h: Renamed as...
4595 * x86-low.h: New file. All type, function and variable name
4596 prefixes changed from "i386_" to "x86_". All references updated.
4597 * i386-low.c: Renamed as...
4598 * x86-low.c: New file. All type, function and variable name
4599 prefixes changed from "i386_" to "x86_". All references updated.
4601 2014-09-02 Gary Benson <gbenson@redhat.com>
4603 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4604 (x86_linux_new_thread): Likewise.
4606 2014-08-29 Gary Benson <gbenson@redhat.com>
4608 * server.h (setjmp.h): Do not include.
4609 (toplevel): Do not declare.
4610 (common-exceptions.h): Include.
4611 (cleanups.h): Likewise.
4612 * server.c (toplevel): Do not define.
4613 (exit_code): New static global.
4614 (detach_or_kill_for_exit_cleanup): New function.
4615 (main): New function. Original main renamed to...
4616 (captured_main): New function.
4617 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4619 2014-08-29 Gary Benson <gbenson@redhat.com>
4621 * Makefile.in (SFILES): Add common/common-exceptions.c.
4622 (OBS): Add common-exceptions.o.
4623 (common-exceptions.o): New rule.
4624 * utils.c (prepare_to_throw_exception): New function.
4626 2014-08-29 Gary Benson <gbenson@redhat.com>
4628 * config.in: Regenerate.
4629 * configure: Likewise.
4631 2014-08-29 Gary Benson <gbenson@redhat.com>
4633 * Makefile.in (SFILES): Add common/cleanups.c.
4635 (cleanups.o): New rule.
4637 2014-08-29 Gary Benson <gbenson@redhat.com>
4639 * utils.c (internal_vwarning): New function.
4641 2014-08-28 Gary Benson <gbenson@redhat.com>
4643 * utils.h (fatal): Remove declaration.
4644 * utils.c (fatal): Remove function.
4646 2014-08-28 Gary Benson <gbenson@redhat.com>
4648 * tracepoint.c (gdb_agent_init): Replace fatal with
4650 (initialize_tracepoint): Likewise.
4652 2014-08-28 Gary Benson <gbenson@redhat.com>
4654 * remote-utils.c (remote_prepare): Replace fatal with error.
4656 2014-08-28 Gary Benson <gbenson@redhat.com>
4658 * linux-low.c (linux_async): Replace fatal with warning.
4660 (linux_start_non_stop): Return -1 if linux_async failed.
4662 2014-08-28 Gary Benson <gbenson@redhat.com>
4664 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4666 (i386_dr_low_get_addr): Remove vague comment.
4667 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4670 2014-08-28 Gary Benson <gbenson@redhat.com>
4672 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4673 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4675 (linux_resume_one_lwp): Likewise.
4676 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4678 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4679 with internal_error.
4680 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4681 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4682 (find_register_by_name): Replace fatal with internal_error.
4683 (find_regno): Likewise.
4684 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4685 * thread-db.c (thread_db_create_event): Likewise.
4686 (thread_db_load_search): Likewise.
4687 (try_thread_db_load_1): Likewise.
4688 * tracepoint.c (get_jump_space_head): Replace fatal with
4690 (claim_trampoline_space): Likewise.
4691 (have_fast_tracepoint_trampoline_buffer): Likewise.
4692 (cmd_qtstart): Likewise.
4693 (stop_tracing): Likewise.
4694 (fast_tracepoint_collecting): Likewise.
4695 (target_malloc): Likewise.
4696 (download_tracepoint): Likewise.
4697 (download_trace_state_variables): Replace check with gdb_assert.
4698 (upload_fast_traceframes): Replace fatal with internal_error.
4700 2014-08-19 Tom Tromey <tromey@redhat.com>
4701 Gary Benson <gbenson@redhat.com>
4703 * Makefile.in (SFILES): Add common/common-debug.c.
4704 (OBS): Add common-debug.o.
4705 (common-debug.o): New rule.
4706 * debug.h (debug_printf): Don't declare.
4707 * debug.c (debug_printf): Renamed and rewritten as...
4708 (debug_vprintf): New function.
4710 2014-08-19 Gary Benson <gbenson@redhat.com>
4712 * utils.h: Do not include print-utils.h.
4714 2014-08-19 Tom Tromey <tromey@redhat.com>
4715 Gary Benson <gbenson@redhat.com>
4717 * server.h: Add static assertion.
4718 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4720 2014-08-19 Tom Tromey <tromey@redhat.com>
4721 Gary Benson <gbenson@redhat.com>
4723 * Makefile.in (SFILES): Add common/errors.c.
4724 (OBS): Add errors.o.
4725 (IPA_OBS): Add errors-ipa.o.
4726 (errors.o): New rule.
4727 (errors-ipa.o): Likewise.
4728 * utils.h (perror_with_name, error, warning): Don't declare.
4729 * utils.c (warning): Renamed and rewritten as...
4730 (vwarning): New function.
4731 (error): Renamed and rewritten as...
4732 (verror): New function.
4733 (internal_error): Renamed and rewritten as...
4734 (internal_verror): New function.
4736 2014-08-07 Gary Benson <gbenson@redhat.com>
4738 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4739 * configure: Regenerate.
4740 * config.in: Likewise.
4741 * server.h: Do not include errno.h.
4742 * event-loop.c: Likewise.
4743 * hostio-errno.c: Likewise.
4744 * linux-low.c: Likewise.
4745 * remote-utils.c: Likewise.
4746 * spu-low.c: Likewise.
4747 * utils.c: Likewise.
4748 * gdbreplay.c: Unconditionally include errno.h.
4750 2014-08-07 Gary Benson <gbenson@redhat.com>
4752 * server.h: Do not include string.h.
4753 * event-loop.c: Likewise.
4754 * linux-low.c: Likewise.
4755 * regcache.c: Likewise.
4756 * remote-utils.c: Likewise.
4757 * spu-low.c: Likewise.
4758 * utils.c: Likewise.
4760 2014-08-07 Gary Benson <gbenson@redhat.com>
4762 * server.h: Do not include gdb_assert.h.
4764 2014-08-07 Gary Benson <gbenson@redhat.com>
4766 * server.h: Do not include common-utils.h.
4768 2014-08-07 Gary Benson <gbenson@redhat.com>
4770 * server.h: Do not include ptid.h.
4771 * notif.h: Likewise.
4773 2014-08-07 Gary Benson <gbenson@redhat.com>
4775 * server.h: Do not include gdb_locale.h.
4777 2014-08-07 Gary Benson <gbenson@redhat.com>
4779 * server.h: Do not include gdb/signals.h.
4780 * win32-low.c: Likewise.
4782 2014-08-07 Gary Benson <gbenson@redhat.com>
4784 * server.h: Do not include pathmax.h.
4786 2014-08-07 Gary Benson <gbenson@redhat.com>
4788 * server.h: Do not include libiberty.h.
4789 * linux-bfin-low.c: Likewise.
4791 2014-08-07 Gary Benson <gbenson@redhat.com>
4793 * server.h: Do not include ansidecl.h.
4795 2014-08-07 Gary Benson <gbenson@redhat.com>
4797 * linux-x86-low.c: Do not include stddef.h.
4798 * lynx-ppc-low.c: Likewise.
4799 * tracepoint.c: Likewise.
4801 2014-08-07 Gary Benson <gbenson@redhat.com>
4803 * server.h: Do not include stdarg.h.
4804 * nto-low.c: Likewise.
4806 2014-08-07 Gary Benson <gbenson@redhat.com>
4808 * server.h: Do not include stdlib.h.
4809 * inferiors.c: Likewise.
4810 * linux-low.c: Likewise.
4811 * regcache.c: Likewise.
4812 * spu-low.c: Likewise.
4813 * tracepoint.c: Likewise.
4814 * utils.c: Likewise.
4816 2014-08-07 Gary Benson <gbenson@redhat.com>
4818 * server.h: Do not include stdio.h.
4819 * linux-low.c: Likewise.
4820 * remote-utils.c: Likewise.
4821 * spu-low.c: Likewise.
4822 * utils.c: Likewise.
4823 * wincecompat.c: Likewise.
4825 2014-08-06 Gary Benson <gbenson@redhat.com>
4827 * regcache.c (init_register_cache): Move conditionals inside if.
4829 2014-08-06 Gary Benson <gbenson@redhat.com>
4831 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4833 2014-07-31 Gary Benson <gbenson@redhat.com>
4835 * ax.h: Do not include server.h.
4836 * gdbthread.h: Likewise.
4837 * lynx-low.h: Likewise.
4838 * notif.h: Likewise.
4840 2014-07-30 Gary Benson <gbenson@redhat.com>
4842 * server.h: Include common-defs.h.
4843 Do not include config.h or build-gnulib-gdbserver/config.h.
4845 2014-07-30 Gary Benson <gbenson@redhat.com>
4847 * hostio-errno.c: Move server.h to top of includes list.
4848 * inferiors.c: Likewise.
4849 * linux-x86-low.c: Likewise.
4850 * notif.c: Include server.h.
4852 2014-07-24 Tom Tromey <tromey@redhat.com>
4853 Gary Benson <gbenson@redhat.com>
4855 * server.h (CORE_ADDR): Now unsigned.
4857 2014-07-16 Pedro Alves <palves@redhat.com>
4859 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4861 2014-07-15 Pedro Alves <palves@redhat.com>
4863 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4866 2014-07-11 Pedro Alves <palves@redhat.com>
4868 * linux-low.c (kill_wait_lwp): New function, based on
4869 kill_one_lwp_callback, but use my_waitpid directly.
4870 (kill_one_lwp_callback, linux_kill): Use it.
4872 2014-06-23 Pedro Alves <palves@redhat.com>
4874 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4875 before setting DR0..DR3.
4877 2014-06-20 Gary Benson <gbenson@redhat.com>
4879 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4880 * configure: Regenerated.
4881 * config.in: Likewise.
4883 2014-06-20 Gary Benson <gbenson@redhat.com>
4885 * Makefile.in (SFILES): Update locations for files moved
4887 (object file files): Reordered.
4889 2014-06-20 Gary Benson <gbenson@redhat.com>
4891 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4892 (i386_dr_low_set_addr): Likewise.
4893 (i386_dr_low_get_addr): Likewise.
4894 (i386_dr_low_can_set_control): Likewise.
4895 (i386_dr_low_set_control): Likewise.
4896 (i386_dr_low_get_control): Likewise.
4897 (i386_dr_low_get_status): Likewise.
4898 (i386_get_debug_register_length): Likewise.
4899 * linux-x86-low.c (i386_dr_low_set_addr):
4900 Changed signature. Made static.
4901 (i386_dr_low_get_addr): Likewise.
4902 (i386_dr_low_set_control): Likewise.
4903 (i386_dr_low_get_control): Likewise.
4904 (i386_dr_low_get_status): Likewise.
4905 (i386_dr_low): New global variable.
4906 * win32-i386-low.c (i386_dr_low_set_addr):
4907 Changed signature. Made static.
4908 (i386_dr_low_get_addr): Likewise.
4909 (i386_dr_low_set_control): Likewise.
4910 (i386_dr_low_get_control): Likewise.
4911 (i386_dr_low_get_status): Likewise.
4912 (i386_dr_low): New global variable.
4914 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4916 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4917 * Makefile.in (AR, AR_FLAGS): Define.
4918 * configure: Regenerate.
4920 2014-06-19 Gary Benson <gbenson@redhat.com>
4922 * Makefile.in (i386-dregs.o): New rule.
4923 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4924 * i386-low.c (target.h): Remove include.
4925 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4926 (DR_CONTROL_SHIFT): Likewise.
4927 (DR_CONTROL_SIZE): Likewise.
4928 (DR_RW_EXECUTE): Likewise.
4929 (DR_RW_WRITE): Likewise.
4930 (DR_RW_READ): Likewise.
4931 (DR_RW_IORW): Likewise.
4932 (DR_LEN_1): Likewise.
4933 (DR_LEN_2): Likewise.
4934 (DR_LEN_4): Likewise.
4935 (DR_LEN_8): Likewise.
4936 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4937 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4938 (DR_ENABLE_SIZE): Likewise.
4939 (DR_LOCAL_SLOWDOWN): Likewise.
4940 (DR_GLOBAL_SLOWDOWN): Likewise.
4941 (DR_CONTROL_RESERVED): Likewise.
4942 (I386_DR_CONTROL_MASK): Likewise.
4943 (I386_DR_VACANT): Likewise.
4944 (I386_DR_LOCAL_ENABLE): Likewise.
4945 (I386_DR_GLOBAL_ENABLE): Likewise.
4946 (I386_DR_DISABLE): Likewise.
4947 (I386_DR_SET_RW_LEN): Likewise.
4948 (I386_DR_GET_RW_LEN): Likewise.
4949 (I386_DR_WATCH_HIT): Likewise.
4950 (i386_wp_op_t): Likewise.
4951 (i386_show_dr): Likewise.
4952 (i386_length_and_rw_bits): Likewise.
4953 (i386_insert_aligned_watchpoint): Likewise.
4954 (i386_remove_aligned_watchpoint): Likewise.
4955 (i386_handle_nonaligned_watchpoint): Likewise.
4956 i386_update_inferior_debug_regs(): Likewise.
4957 (i386_dr_insert_watchpoint): Likewise.
4958 (i386_dr_remove_watchpoint): Likewise.
4959 (i386_dr_region_ok_for_watchpoint): Likewise.
4960 (i386_dr_stopped_data_address): Likewise.
4961 (i386_dr_stopped_by_watchpoint): Likewise.
4963 2014-06-19 Gary Benson <gbenson@redhat.com>
4965 * i386-low.c (i386_dr_show): Renamed to
4966 i386_show_dr and made static. All uses updated.
4967 (i386_dr_length_and_rw_bits): Renamed to
4968 i386_length_and_rw_bits and made static.
4970 (i386_dr_insert_aligned_watchpoint): Renamed to
4971 i386_insert_aligned_watchpoint and made static.
4973 (i386_dr_remove_aligned_watchpoint): Renamed to
4974 i386_remove_aligned_watchpoint and made static.
4976 (i386_dr_update_inferior_debug_regs): Renamed to
4977 i386_update_inferior_debug_regs and made static.
4980 2014-06-18 Gary Benson <gbenson@redhat.com>
4982 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4983 (i386_dr_low_can_set_control): Likewise.
4984 (i386_get_debug_register_length): Likewise.
4985 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4986 (i386_dr_low_can_set_control): Likewise.
4987 (i386_get_debug_register_length): Likewise.
4989 2014-06-17 Gary Benson <gbenson@redhat.com>
4991 * i386-low.h (i386-dregs.h): New include.
4992 (DR_FIRSTADDR): Now in i386-dregs.h.
4993 (DR_LASTADDR): Likewise.
4994 (DR_NADDR): Likewise.
4995 (DR_STATUS): Likewise.
4996 (DR_CONTROL): Likewise.
4997 (i386_debug_reg_state): Likewise.
4998 (i386_dr_insert_watchpoint): Likewise.
4999 (i386_dr_remove_watchpoint): Likewise.
5000 (i386_dr_region_ok_for_watchpoint): Likewise.
5001 (i386_dr_stopped_data_address): Likewise.
5002 (i386_dr_stopped_by_watchpoint): Likewise.
5003 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5005 2014-06-18 Gary Benson <gbenson@redhat.com>
5007 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5008 i386_dr_insert_watchpoint.
5009 (i386_low_remove_watchpoint): Renamed to
5010 i386_dr_remove_watchpoint.
5011 (i386_low_region_ok_for_watchpoint): Renamed to
5012 i386_dr_region_ok_for_watchpoint.
5013 (i386_low_stopped_data_address): Renamed to
5014 i386_dr_stopped_data_address.
5015 (i386_low_stopped_by_watchpoint): Renamed to
5016 i386_dr_stopped_by_watchpoint.
5017 * i386-low.c (i386_show_dr): Renamed to
5018 i386_dr_show and made nonstatic. All uses updated.
5019 (i386_length_and_rw_bits): Renamed to
5020 i386_dr_length_and_rw_bits and made nonstatic.
5022 (i386_insert_aligned_watchpoint): Renamed to
5023 i386_dr_insert_aligned_watchpoint and made nonstatic.
5025 (i386_remove_aligned_watchpoint): Renamed to
5026 i386_dr_remove_aligned_watchpoint and made nonstatic.
5028 (i386_update_inferior_debug_regs): Renamed to
5029 i386_dr_update_inferior_debug_regs and made nonstatic.
5031 (i386_low_insert_watchpoint): Renamed to
5032 i386_dr_insert_watchpoint. All uses updated.
5033 (i386_low_remove_watchpoint): Renamed to
5034 i386_dr_remove_watchpoint. All uses updated.
5035 (i386_low_region_ok_for_watchpoint): Renamed to
5036 i386_dr_region_ok_for_watchpoint. All uses updated.
5037 (i386_low_stopped_data_address): Renamed to
5038 i386_dr_stopped_data_address. All uses updated.
5039 (i386_low_stopped_by_watchpoint): Renamed to
5040 i386_dr_stopped_by_watchpoint. All uses updated.
5042 2014-06-18 Gary Benson <gbenson@redhat.com>
5044 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5045 (i386_dr_low_can_set_control): Likewise.
5046 (i386_insert_aligned_watchpoint): New check.
5048 2014-06-18 Gary Benson <gbenson@redhat.com>
5050 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5053 2014-06-18 Gary Benson <gbenson@redhat.com>
5055 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5056 instead of fatal and error.
5057 (i386_handle_nonaligned_watchpoint): Likewise.
5059 2014-06-18 Gary Benson <gbenson@redhat.com>
5061 * i386-low.c (i386_get_debug_register_length): New macro.
5062 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5063 (i386_show_dr): Use debug_printf instead of fprintf. Use
5064 phex to format values.
5066 2014-06-18 Gary Benson <gbenson@redhat.com>
5068 * i386-low.h: Comment changes.
5069 * i386-low.c: Likewise.
5071 2014-06-18 Gary Benson <gbenson@redhat.com>
5073 * i386-low.c: Whitespace changes.
5075 2014-06-12 Tom Tromey <tromey@redhat.com>
5077 * utils.c (freeargv): Remove.
5079 2014-06-12 Tom Tromey <tromey@redhat.com>
5081 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5082 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5083 (parse_debug_format_options): Likewise.
5084 (gdbserver_usage): Likewise.
5085 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5086 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5087 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5089 ($(LIBGNU)): Depend on libiberty.
5090 (all-lib): Recurse into all subdirs.
5091 (install-only): Invoke "install" target in subdirs.
5092 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5094 * configure: Rebuild.
5095 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5096 for vasprintf, vsnprintf, or gettimeofday.
5097 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5100 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5102 * development.sh: Delete.
5103 * Makefile.in (config.status): Adjust dependency on development.sh.
5104 * configure.ac: Adjust development.sh source call.
5105 * configure: Regenerate.
5107 2014-06-02 Pedro Alves <palves@redhat.com>
5109 * ax.c (gdb_free_agent_expr): New function.
5110 * ax.h (gdb_free_agent_expr): New declaration.
5111 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5113 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5115 (clear_breakpoint_conditions_and_commands): New function.
5116 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5117 (clear_breakpoint_conditions_and_commands): New declaration.
5119 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5121 * linux-aarch64-low.c (asm/ptrace.h): Include.
5123 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5125 Fix TLS access for -static -pthread.
5126 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5127 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5128 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5130 2014-05-20 Pedro Alves <palves@redhat.com>
5132 * linux-aarch64-low.c (aarch64_insert_point)
5133 (aarch64_remove_point): No longer check whether the type is
5134 supported here. Adjust to new interface.
5135 (the_low_target): Install aarch64_supports_z_point_type as
5136 supports_z_point_type method.
5137 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5138 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5139 instead of a Z packet char. Adjust.
5140 (arm_supports_z_point_type): New function.
5141 (arm_insert_point, arm_remove_point): Adjust to new interface.
5142 (the_low_target): Install arm_supports_z_point_type.
5143 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5144 (cris_insert_point, cris_remove_point): Adjust to new interface.
5145 Don't check whether the type is supported here.
5146 (the_low_target): Install cris_supports_z_point_type.
5147 * linux-low.c (linux_supports_z_point_type): New function.
5148 (linux_insert_point, linux_remove_point): Adjust to new interface.
5149 * linux-low.h (struct linux_target_ops) <insert_point,
5150 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5151 raw_breakpoint pointer parameter.
5152 <supports_z_point_type>: New method.
5153 * linux-mips-low.c (mips_supports_z_point_type): New function.
5154 (mips_insert_point, mips_remove_point): Adjust to new interface.
5155 Use mips_supports_z_point_type.
5156 (the_low_target): Install mips_supports_z_point_type.
5157 * linux-ppc-low.c (the_low_target): Install NULL as
5158 supports_z_point_type method.
5159 * linux-s390-low.c (the_low_target): Install NULL as
5160 supports_z_point_type method.
5161 * linux-sparc-low.c (the_low_target): Install NULL as
5162 supports_z_point_type method.
5163 * linux-x86-low.c (x86_supports_z_point_type): New function.
5164 (x86_insert_point): Adjust to new insert_point interface. Use
5165 insert_memory_breakpoint. Adjust to new
5166 i386_low_insert_watchpoint interface.
5167 (x86_remove_point): Adjust to remove_point interface. Use
5168 remove_memory_breakpoint. Adjust to new
5169 i386_low_remove_watchpoint interface.
5170 (the_low_target): Install x86_supports_z_point_type.
5171 * lynx-low.c (lynx_target_ops): Install NULL as
5172 supports_z_point_type callback.
5173 * nto-low.c (nto_supports_z_point_type): New.
5174 (nto_insert_point, nto_remove_point): Adjust to new interface.
5175 (nto_target_ops): Install nto_supports_z_point_type.
5176 * mem-break.c: Adjust intro comment.
5177 (struct raw_breakpoint) <raw_type, size>: New fields.
5178 <inserted>: Update comment.
5179 <shlib_disabled>: Delete field.
5180 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5181 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5182 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5183 (raw_bkpt_type_to_target_hw_bp_type): New function.
5184 (find_enabled_raw_code_breakpoint_at): New function.
5185 (find_raw_breakpoint_at): New type and size parameters. Use them.
5186 (insert_memory_breakpoint): New function, based off
5187 set_raw_breakpoint_at.
5188 (remove_memory_breakpoint): New function.
5189 (set_raw_breakpoint_at): Reimplement.
5190 (set_breakpoint): New, based on set_breakpoint_at.
5191 (set_breakpoint_at): Reimplement.
5192 (delete_raw_breakpoint): Go through the_target->remove_point
5193 instead of assuming memory breakpoints.
5194 (find_gdb_breakpoint_at): Delete.
5195 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5196 (find_gdb_breakpoint): New function.
5197 (set_gdb_breakpoint_at): Delete.
5198 (z_type_supported): New function.
5199 (set_gdb_breakpoint_1): New function, loosely based off
5200 set_gdb_breakpoint_at.
5201 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5202 (delete_gdb_breakpoint_at): Delete.
5203 (delete_gdb_breakpoint_1): New function, loosely based off
5204 delete_gdb_breakpoint_at.
5205 (delete_gdb_breakpoint): New function.
5206 (clear_gdb_breakpoint_conditions): Rename to ...
5207 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5209 (add_condition_to_breakpoint): Make static.
5210 (add_breakpoint_condition): Take a struct breakpoint pointer
5211 instead of an address. Adjust.
5212 (gdb_condition_true_at_breakpoint): Rename to ...
5213 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5215 (gdb_condition_true_at_breakpoint): Reimplement.
5216 (add_breakpoint_commands): Take a struct breakpoint pointer
5217 instead of an address. Adjust.
5218 (gdb_no_commands_at_breakpoint): Rename to ...
5219 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5220 parameter. Return true if no breakpoint was found. Change debug
5222 (gdb_no_commands_at_breakpoint): Reimplement.
5223 (run_breakpoint_commands): Rename to ...
5224 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5225 and change return type to boolean.
5226 (run_breakpoint_commands): New function.
5227 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5228 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5229 breakpoint. Go through the_target->remove_point instead of
5230 assuming memory breakpoint.
5231 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5232 software and hardware breakpoints.
5233 (reinsert_raw_breakpoint): Go through the_target->insert_point
5234 instead of assuming memory breakpoint.
5235 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5236 software and hardware breakpoints.
5237 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5238 Check both software and hardware breakpoints.
5239 (validate_inserted_breakpoint): Assert the breakpoint is a
5240 software breakpoint. Set the inserted flag to -1 instead of
5241 setting shlib_disabled.
5242 (delete_disabled_breakpoints): Adjust.
5243 (validate_breakpoints): Only validate software breakpoints.
5244 Adjust to inserted flag change.
5245 (check_mem_read, check_mem_write): Skip breakpoint types other
5246 than software breakpoints. Adjust to inserted flag change.
5247 * mem-break.h (enum raw_bkpt_type): New enum.
5248 (raw_breakpoint, struct process_info): Forward declare.
5249 (Z_packet_to_target_hw_bp_type): Delete declaration.
5250 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5251 (set_gdb_breakpoint, delete_gdb_breakpoint)
5252 (clear_breakpoint_conditions): New declarations.
5253 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5254 (breakpoint_inserted_here): Update comment.
5255 (add_breakpoint_condition, add_breakpoint_commands): Replace
5256 address parameter with a breakpoint pointer parameter.
5257 (gdb_breakpoint_here): Update comment.
5258 (delete_gdb_breakpoint_at): Delete.
5259 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5260 * server.c (process_point_options): Take a struct breakpoint
5261 pointer instead of an address. Adjust.
5262 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5263 delete_gdb_breakpoint.
5264 * spu-low.c (spu_target_ops): Install NULL as
5265 supports_z_point_type method.
5266 * target.h: Include mem-break.h.
5267 (struct target_ops) <prepare_to_access_memory>: Update comment.
5268 <supports_z_point_type>: New field.
5269 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5270 instead of a char. Also take a raw breakpoint pointer.
5271 * win32-arm-low.c (the_low_target): Install NULL as
5272 supports_z_point_type.
5273 * win32-i386-low.c (i386_supports_z_point_type): New function.
5274 (i386_insert_point, i386_remove_point): Adjust to new interface.
5275 (the_low_target): Install i386_supports_z_point_type.
5276 * win32-low.c (win32_supports_z_point_type): New function.
5277 (win32_insert_point, win32_remove_point): Adjust to new interface.
5278 (win32_target_ops): Install win32_supports_z_point_type.
5279 * win32-low.h (struct win32_target_ops):
5280 <supports_z_point_type>: New method.
5281 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5282 instead of a char. Also take a raw breakpoint pointer.
5284 2014-05-20 Pedro Alves <palves@redhat.com>
5286 * mem-break.h: Include break-common.h.
5287 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5288 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5289 (Z_packet_to_target_hw_bp_type): New declaration.
5290 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5291 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5292 (Z_PACKET_ACCESS_WP): Delete macros.
5293 (Z_packet_to_hw_type): Delete function.
5294 * i386-low.h: Don't include break-common.h here.
5295 (Z_packet_to_hw_type): Delete declaration.
5296 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5297 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5298 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5299 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5300 * linux-aarch64-low.c: Don't include break-common.h here.
5301 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5302 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5303 (Z_packet_to_target_hw_bp_type): Delete function.
5304 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5306 (mips_insert_point, mips_remove_point): Use
5307 Z_packet_to_target_hw_bp_type.
5309 2014-05-20 Pedro Alves <palves@redhat.com>
5311 * linux-aarch64-low.c: Include break-common.h.
5312 (enum target_point_type): Delete.
5313 (Z_packet_to_point_type): Rename to ...
5314 (Z_packet_to_target_hw_bp_type): ... this, and return a
5315 target_hw_bp_type instead.
5316 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5317 instead of an enum target_point_type.
5318 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5320 (aarch64_dr_state_insert_one_point)
5321 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5322 (aarch64_handle_aligned_watchpoint)
5323 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5324 Take an enum target_hw_bp_type instead of an enum
5326 (aarch64_supports_z_point_type): New function.
5327 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5328 use Z_packet_to_target_hw_bp_type.
5330 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5332 * configure.ac: Only use -Werror by default when DEVELOPMENT
5334 * configure: Regenerate.
5336 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5338 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5339 * linux-x86-low.c (X86_64_USER_REGS): New.
5340 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5342 2014-04-28 Yao Qi <yao@codesourcery.com>
5344 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5347 2014-04-25 Pedro Alves <palves@redhat.com>
5350 * linux-low.c (linux_attach_fail_reason_string): New function.
5351 (linux_attach_lwp): Delete.
5352 (linux_attach_lwp_1): Rename to ...
5353 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5354 argument. Remove "initial" parameter. Return int instead of
5355 void. Don't error or warn here.
5356 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5357 failure to attach to the tgid. Call warning when failing to
5359 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5360 argument. Remove "initial" parameter. Return int instead of
5361 void. Don't error or warn here.
5362 (linux_attach_fail_reason_string): New declaration.
5363 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5364 interface change. Use linux_attach_fail_reason_string.
5366 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5367 Walfred Tedeschi <walfred.tedeschi@intel.com>
5369 * Makefile.in: Added rules to handle new files
5370 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5371 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5372 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5373 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5374 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5375 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5377 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5378 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5379 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5380 i386/x32-avx512.xml.
5381 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5382 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5383 i386/x32-avx512-linux.xml.
5384 * i387-fp.c (num_avx512_k_registers): New constant for number
5386 (num_avx512_zmmh_low_registers): New constant for number of
5387 lower ZMM registers (0-15).
5388 (num_avx512_zmmh_high_registers): New constant for number of
5389 higher ZMM registers (16-31).
5390 (num_avx512_ymmh_registers): New contant for number of higher
5391 YMM registers (ymm16-31 added by avx521 on x86_64).
5392 (num_avx512_xmm_registers): New constant for number of higher
5393 XMM registers (xmm16-31 added by AVX512 on x86_64).
5394 (struct i387_xsave): Add space for AVX512 registers.
5395 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5396 Add code to handle AVX512 registers.
5397 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5398 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5399 prototypei from generated file.
5400 (tdesc_amd64_avx512_linux): Likewise.
5401 (init_registers_x32_avx512_linux): Likewise.
5402 (tdesc_x32_avx512_linux): Likewise.
5403 (init_registers_i386_avx512_linux): Likewise.
5404 (tdesc_i386_avx512_linux): Likewise.
5405 (x86_64_regmap): Add AVX512 registers.
5406 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5408 (initialize_low_arch): Add code to initialize AVX512 registers.
5410 2014-04-23 Pedro Alves <palves@redhat.com>
5412 * mem-break.c (find_gdb_breakpoint_at): Make static.
5413 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5415 2014-04-23 Pedro Alves <palves@redhat.com>
5417 * i386-low.c: Don't include break-common.h here.
5418 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5419 prototype to take target_hw_bp_type as argument instead of a Z
5421 * i386-low.h: Include break-common.h here.
5422 (Z_packet_to_hw_type): Declare.
5423 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5425 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5426 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5427 (x86_remove_point): Convert the packet number to a
5428 target_hw_bp_type before calling i386_low_remove_watchpoint.
5429 * win32-i386-low.c (i386_insert_point): Convert the packet number
5430 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5431 (i386_remove_point): Convert the packet number to a
5432 target_hw_bp_type before calling i386_low_remove_watchpoint.
5434 2014-04-23 Pedro Alves <palves@redhat.com>
5436 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5438 2014-04-10 Pedro Alves <palves@redhat.com>
5440 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5441 Check if the condition or command is NULL before checking if the
5442 breakpoint is known. On success, return true.
5443 * mem-break.h (add_breakpoint_condition): Document return.
5444 (add_breakpoint_commands): Add describing comment.
5445 * server.c (skip_to_semicolon): New function.
5446 (process_point_options): Use it.
5448 2014-04-09 Pedro Alves <palves@redhat.com>
5450 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5453 2014-02-27 Pedro Alves <palves@redhat.com>
5456 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5458 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5460 (last_thread_of_process_p): Take a PID argument instead of a
5462 (linux_wait_for_lwp): Delete.
5463 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5465 (linux_low_filter_event): New function, party factored out from
5466 linux_wait_for_event.
5467 (linux_wait_for_event): Rename to ...
5468 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5469 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5470 sigsuspend. Check for zombie leaders.
5471 (linux_wait_for_event): Reimplement as wrapper around
5472 linux_wait_for_event_filtered.
5473 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5474 a normal or signal exit is seen, it's the whole process exiting.
5475 (wait_for_sigstop): No longer a for_each_inferior callback.
5476 Rewrite on top of linux_wait_for_event_filtered.
5477 (stop_all_lwps): Call wait_for_sigstop directly.
5478 * server.c (resume, handle_target_event): Handle
5479 TARGET_WAITKIND_NO_RESUMED.
5481 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5483 * win32-low.c (psapi_get_dll_name,
5484 * win32_CreateToolhelp32Snapshot): Delete.
5485 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5486 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5488 (handle_load_dll): Add function description.
5489 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5491 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5493 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5495 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5496 base address when calling win32_add_one_solib.
5497 (handle_load_dll): Delete local variable load_addr.
5498 Remove 0x1000 offset applied to DLL base address when calling
5499 win32_add_one_solib.
5500 (handle_unload_dll): Add comment.
5502 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5504 * win32-low.c (win32_add_all_dlls): Renames
5505 win32_ensure_ntdll_loaded. Rewrite function documentation.
5506 Adjust implementation to always load all DLLs.
5507 Add 0x1000 offset to DLL base address when calling
5508 win32_add_one_solib.
5509 (child_initialization_done): New static global.
5510 (do_initial_child_stuff): Set child_initialization_done to
5511 zero during child initialization, and 1 after. Replace call
5512 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5514 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5515 (handle_unload_dll): Add function documentation.
5516 (get_child_debug_event): Ignore load and unload DLL events
5517 during child initialization.
5519 2014-02-20 Doug Evans <dje@google.com>
5521 Remove global all_lwps.
5522 * inferiors.h (ptid_of): Move here from linux-low.h.
5523 (pid_of, lwpid_of): Ditto.
5524 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5525 parameter is a struct thread_info * now.
5526 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5527 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5528 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5530 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5531 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5532 * linux-arm-low.c (update_registers_callback): Update, "entry"
5533 parameter is a struct thread_info * now.
5534 Fetch lwpid from current_inferior directly.
5535 (arm_insert_point): Pass &all_threads to find_inferior instead of
5537 (arm_remove_point): Ditto.
5538 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5539 (arm_prepare_to_resume): Fetch pid from thread.
5540 (arm_read_description): Fetch lwpid from current_inferior directly.
5541 * linux-low.c (all_lwps): Delete.
5542 (delete_lwp): Delete call to remove_inferior.
5543 (handle_extended_wait): Fetch lwpid from thread.
5544 (add_lwp): Don't set lwp->entry.id. Remove call to
5545 add_inferior_to_list.
5546 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5547 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5548 (kill_one_lwp_callback): Ditto.
5549 (linux_kill): Don't dereference NULL pointer.
5550 Fetch ptid,lwpid from thread.
5551 (get_detach_signal): Fetch ptid from thread.
5552 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5553 Simplify call to regcache_invalidate_thread.
5554 (delete_lwp_callback): Update, "entry" parameter is a
5555 struct thread_info * now. Fetch pid from thread.
5556 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5557 (status_pending_p_callback): Update, "entry" parameter is a
5558 struct thread_info * now. Fetch ptid from thread.
5559 (find_lwp_pid): Update, "entry" parameter is a
5560 struct thread_info * now.
5561 (linux_wait_for_lwp): Fetch pid from thread.
5562 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5563 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5564 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5565 (dequeue_one_deferred_signal): Ditto.
5566 (cancel_breakpoint): Fetch ptid from current_inferior.
5567 (linux_wait_for_event): Pass &all_threads to find_inferior,
5568 not &all_lwps. Fetch ptid, lwpid from thread.
5569 (count_events_callback): Update, "entry" parameter is a
5570 struct thread_info * now.
5571 (select_singlestep_lwp_callback): Ditto.
5572 (select_event_lwp_callback): Ditto.
5573 (cancel_breakpoints_callback): Ditto.
5574 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5576 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5577 (unsuspend_one_lwp): Update, "entry" parameter is a
5578 struct thread_info * now.
5579 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5581 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5582 Fetch lwpid from thread, not lwp.
5583 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5584 Pass &all_threads to find_inferior, not &all_lwps.
5585 (send_sigstop): Fetch lwpid from thread, not lwp.
5586 (send_sigstop_callback): Update, "entry" parameter is a
5587 struct thread_info * now.
5588 (suspend_and_send_sigstop_callback): Ditto.
5589 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5590 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5591 struct thread_info * now.
5592 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5594 (lwp_running): Update, "entry" parameter is a
5595 struct thread_info * now.
5596 (stop_all_lwps): Fetch ptid from thread.
5597 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5598 (linux_resume_one_lwp): Fetch lwpid from thread.
5599 (linux_set_resume_request): Update, "entry" parameter is a
5600 struct thread_info * now. Fetch pid, lwpid from thread.
5601 (resume_status_pending_p): Update, "entry" parameter is a
5602 struct thread_info * now.
5603 (need_step_over_p): Ditto. Fetch lwpid from thread.
5604 (start_step_over): Fetch lwpid from thread.
5605 (linux_resume_one_thread): Update, "entry" parameter is a
5606 struct thread_info * now. Fetch lwpid from thread.
5607 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5608 (proceed_one_lwp): Update, "entry" parameter is a
5609 struct thread_info * now. Fetch lwpid from thread.
5610 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5611 struct thread_info * now.
5612 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5613 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5614 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5616 (regsets_store_inferior_registers): Ditto.
5617 (fetch_register, store_register): Ditto.
5618 (linux_read_memory, linux_write_memory): Ditto.
5619 (linux_request_interrupt): Ditto.
5620 (linux_read_auxv): Ditto.
5621 (linux_xfer_siginfo): Ditto.
5622 (linux_qxfer_spu): Ditto.
5623 (linux_qxfer_libraries_svr4): Ditto.
5624 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5625 moved to inferiors.h.
5627 (get_thread_lwp): Update.
5628 (struct lwp_info): Delete member "entry". Simplify comment for
5631 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5632 current_inferior directly.
5633 (update_watch_registers_callback): Update, "entry" parameter is a
5634 struct thread_info * now. Fetch pid from thread.
5635 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5636 (mips_insert_point): Fetch lwpid from current_inferior.
5637 Pass &all_threads to find_inferior, not &all_lwps.
5638 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5639 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5641 (mips_stopped_data_address): Ditto.
5642 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5644 * linux-tile-low.c (tile_arch_setup): Ditto.
5645 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5646 (update_debug_registers_callback): Update, "entry" parameter is a
5647 struct thread_info * now. Fetch pid from thread.
5648 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5649 Pass &all_threads to find_inferior, not &all_lwps.
5650 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5651 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5652 Pass &all_threads to find_inferior, not &all_lwps.
5653 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5654 (i386_dr_low_get_status): Ditto.
5655 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5656 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5657 (x86_linux_read_description): Ditto.
5658 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5660 2014-02-20 Doug Evans <dje@google.com>
5662 * inferiors.c (get_first_inferior): Fix buglet.
5664 2014-02-19 Doug Evans <dje@google.com>
5666 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5667 * inferiors.c (add_thread): Change result type to struct thread_info *.
5668 All callers updated.
5669 (add_lwp): Call add_thread here instead of in callers.
5670 All callers updated.
5671 * linux-low.h (get_lwp_thread): Rewrite.
5672 (struct lwp_info): New member "thread".
5674 2014-02-19 Doug Evans <dje@google.com>
5676 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5677 All callers updated.
5679 2014-02-19 Doug Evans <dje@google.com>
5681 * inferiors.c (add_thread): Fix whitespace.
5683 2014-02-19 Doug Evans <dje@google.com>
5685 * dll.c (clear_dlls): Replace accessing list implemention details
5687 * gdbthread.h (get_first_thread): Declare.
5688 * inferiors.c (for_each_inferior_with_data): New function.
5689 (get_first_thread): New function.
5690 (find_thread_ptid): Simplify.
5691 (get_first_inferior): New function.
5692 (clear_list): Delete.
5693 (one_inferior_p): New function.
5694 (clear_inferior_list): New function.
5695 (clear_inferiors): Update.
5696 * inferiors.h (for_each_inferior_with_data): Declare.
5697 (clear_inferior_list): Declare.
5698 (one_inferior_p): Declare.
5699 (get_first_inferior): Declare.
5700 * linux-low.c (linux_wait_for_event): Replace accessing list
5701 implemention details with API function.
5702 * server.c (target_running): Ditto.
5703 (accumulate_file_name_length): New function.
5704 (emit_dll_description): New function.
5705 (handle_qxfer_libraries): Replace accessing list implemention
5706 details with API function.
5707 (handle_qxfer_threads_worker): New function.
5708 (handle_qxfer_threads_proper): Replace accessing list implemention
5709 details with API function.
5710 (handle_query): Ditto.
5711 (visit_actioned_threads_callback_ftype): New typedef.
5712 (visit_actioned_threads_data): New struct.
5713 (visit_actioned_threads): Rewrite to be find_inferior callback.
5714 (resume): Call find_inferior.
5715 (handle_status): Replace accessing list implemention
5716 details with API function.
5717 (process_serial_event): Replace accessing list implemention details
5719 * target.c (set_desired_inferior): Replace accessing list implemention
5720 details with API function.
5721 * tracepoint.c (same_process_p): New function.
5722 (gdb_agent_about_to_close): Replace accessing list implemention
5723 details with API function.
5724 * win32-low.c (child_delete_thread): Replace accessing list
5725 implemention details with API function.
5726 (match_dll_by_basename): New function.
5727 (dll_is_loaded_by_basename): New function.
5728 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5729 details call to dll_is_loaded_by_basename.
5731 2014-02-19 Doug Evans <dje@google.com>
5733 * dll.h (struct dll_info): Add comment.
5734 * gdbthread.h (struct thread_info): Add comment.
5735 (current_ptid): Simplify.
5736 * inferiors.c (add_process): Update.
5737 (remove_process): Update.
5738 * inferiors.h (struct process_info): Rename member "head" to "entry".
5739 * linux-low.c (delete_lwp): Update.
5741 (last_thread_of_process_p): Update.
5742 (kill_one_lwp_callback, linux_kill): Update.
5743 (status_pending_p_callback): Update.
5744 (wait_for_sigstop): Update. Simplify read of ptid.
5745 (start_step_over): Update.
5746 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5747 (get_lwp_thread): Update.
5748 (struct lwp_info): Rename member "head" to "entry".
5749 * regcache.h (inferior_list_entry): Delete.
5750 * server.c (kill_inferior_callback): Update.
5751 (detach_or_kill_inferior_callback): Update.
5752 (print_started_pid): Update.
5753 (print_attached_pid): Update.
5754 (process_serial_event): Simplify read of ptid.
5755 * thread-db.c (thread_db_create_event): Update.
5756 (thread_db_get_tls_address): Update.
5757 * win32-low.c (current_inferior_ptid): Simplify.
5759 2014-02-19 Tom Tromey <tromey@redhat.com>
5761 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5763 (target_supports_btrace): Update.
5765 2014-02-14 Yao Qi <yao@codesourcery.com>
5767 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5768 (rsp-low-ipa.o): New target.
5770 2014-02-12 Tom Tromey <tromey@redhat.com>
5772 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5773 convert_ascii_to_int.
5774 * regcache.c (registers_to_string): Likewise.
5775 * remote-utils.c (decode_M_packet): Likewise.
5776 * server.c (process_serial_event): Likewise.
5778 2014-02-12 Tom Tromey <tromey@redhat.com>
5780 * server.c (handle_query, handle_v_run): Use hex2bin, not
5782 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5784 2014-02-12 Tom Tromey <tromey@redhat.com>
5786 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5787 convert_int_to_ascii.
5788 * regcache.c (registers_to_string, collect_register_as_string):
5790 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5792 * server.c (process_serial_event): Likewise.
5793 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5794 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5796 2014-02-12 Tom Tromey <tromey@redhat.com>
5798 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5799 bin2hex, not hexify.
5800 * tracepoint.c (cmd_qtstatus): Likewise.
5802 2014-02-12 Tom Tromey <tromey@redhat.com>
5804 * remote-utils.c (monitor_output): Pass explicit length to
5807 2014-02-12 Tom Tromey <tromey@redhat.com>
5809 * tracepoint.c: Include rsp-low.h.
5810 * server.c: Include rsp-low.h.
5811 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5812 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5814 * remote-utils.c: Include rsp-low.h.
5815 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5816 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5817 (convert_int_to_ascii, convert_ascii_to_int): Move to
5819 * regcache.c: Include rsp-low.h.
5820 * ax.c: Include rsp-low.h.
5821 * Makefile.in (SFILES): Add common/rsp-low.c.
5822 (OBS): Add rsp-low.o.
5823 (rsp-low.o): New target.
5825 2014-02-12 Tom Tromey <tromey@redhat.com>
5827 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5828 Include print-utils.h.
5829 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5830 (plongest, thirty_two, phex_nz): Remove.
5831 * Makefile.in (SFILES): Add common/print-utils.c.
5832 (OBS): Add print-utils.o.
5833 (print-utils-ipa.o): New target.
5834 (print-utils.o): New target.
5835 (IPA_OBJS): Add print-utils-ipa.o.
5837 2014-02-06 Tom Tromey <tromey@redhat.com>
5839 * Makefile.in (SFILES): Fix indentation.
5841 2014-02-05 Doug Evans <dje@google.com>
5843 * linux-low.c (linux_wait_for_event): Improve comment.
5844 (linux_wait_1): Keep current_inferior in sync with event_child.
5846 2014-01-22 Doug Evans <dje@google.com>
5848 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5850 2014-01-22 Doug Evans <dje@google.com>
5852 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5853 * configure: Regenerate.
5854 * config.in: Regenerate.
5855 * Makefile.in (SFILES): Add debug.c.
5857 * debug.c: New file.
5858 * debug.h: New file.
5859 * linux-aarch64-low.c (*): Update all debugging printfs to use
5860 debug_printf instead of fprintf.
5861 * linux-arm-low.c (*): Ditto.
5862 * linux-cris-low.c (*): Ditto.
5863 * linux-crisv32-low.c (*): Ditto.
5864 * linux-m32r-low.c (*): Ditto.
5865 * linux-sparc-low.c (*): Ditto.
5866 * linux-x86.c (*): Ditto.
5867 * linux-low.c (*): Ditto.
5868 (linux_wait_1): Add calls to debug_enter, debug_exit.
5869 (linux_wait): Remove redundant debugging printf.
5870 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5871 (linux_resume, unstop_all_lwps): Ditto.
5872 * mem-break.c (*): Update all debugging printfs to use
5873 debug_printf instead of fprintf.
5874 * remote-utils.c (*): Ditto.
5875 * thread-db.c (*): Ditto.
5876 * server.c #include <ctype.h>, "gdb_vecs.h".
5877 (debug_threads): Moved to debug.c.
5878 (*): Update all debugging printfs to use debug_printf instead of
5880 (start_inferior): Replace call to fflush with call to debug_flush.
5881 (monitor_show_help): Mention set debug-format.
5882 (parse_debug_format_options): New function.
5883 (handle_monitor_command): Handle "monitor set debug-format".
5884 (gdbserver_usage): Mention --debug-format.
5885 (main): Parse --debug-format.
5886 * server.h (debug_threads): Declaration moved to debug.h.
5888 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5889 trace_debug_1 that uses debug_printf.
5890 (tracepoint_look_up_symbols): Update all debugging printfs to use
5891 debug_printf instead of fprintf.
5893 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5895 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5898 2014-01-17 Pedro Alves <palves@redhat.com>
5901 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5902 defined after including gdb_proc_service.h.
5904 2014-01-16 Doug Evans <dje@google.com>
5906 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5907 (match_dll): Use it.
5909 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5911 * target.h (target_ops) <read_btrace>: Change parameters and
5912 return type to allow error reporting.
5913 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5914 trace reading errors on.
5915 * linux-low.c (linux_low_read_btrace): Pass trace reading
5917 (linux_low_disable_btrace): New.
5919 2014-01-15 Doug Evans <dje@google.com>
5921 * inferiors.c (thread_id_to_gdb_id): Delete.
5922 * inferiors.h (thread_id_to_gdb_id): Delete.
5924 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5926 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5927 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5930 2014-01-08 Pedro Alves <palves@redhat.com>
5932 * server.c (handle_status): Don't discard previous queued stop
5933 replies or thread's pending status here.
5934 (main) <disconnection>: Do it here instead.
5936 2014-01-08 Pedro Alves <palves@redhat.com>
5938 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5939 * server.c (visit_actioned_threads, handle_pending_status): New
5941 (handle_v_cont): Factor out parts to ...
5942 (resume): ... this new function. If in all-stop, and a thread
5943 being resumed has a pending status, report it without actually
5945 (myresume): Adjust to use the new 'resume' function.
5946 (clear_pending_status_callback, set_pending_status_callback)
5947 (find_status_pending_thread_callback): New functions.
5948 (handle_status): Handle the case of multiple threads having
5949 interesting statuses to report. Report threads' real last signal
5950 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5951 with an interesting thread to report the status for, instead of
5952 always reporting the status of the first thread.
5954 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5956 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5957 * gdbreplay.c (gdbreplay_version): Likewise.
5959 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5961 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5962 iov.iov_len with the real length in use.
5964 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5966 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5967 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5968 for all targets that use win32-low.c.
5969 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5970 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5972 2013-12-13 Pedro Alves <palves@redhat.com>
5974 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5975 if equal to TARGET_WAITKIND_LOADED.
5976 * win32-low.c (cached_status): New static global.
5977 (win32_wait): Add declaration.
5978 (do_initial_child_stuff): Flush all initial pending debug events
5979 up to the initial breakpoint.
5980 (win32_wait): If CACHED_STATUS was set, return that instead
5981 of doing a real wait. Remove the code resuming the execution
5982 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5983 during the initial phase. Also remove the code changing
5984 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5985 TARGET_WAITKIND_STOPPED.
5987 2013-12-11 Yao Qi <yao@codesourcery.com>
5989 * notif.c (handle_notif_ack): Return 0 if no notification
5992 2013-11-20 Doug Evans <dje@google.com>
5994 * linux-low.c (linux_set_resume_request): Fix comment.
5996 2013-11-20 Doug Evans <dje@google.com>
5998 * linux-low.c (resume_status_pending_p): Tweak comment.
6000 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6002 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6003 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6004 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6005 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6006 (srv_amd64_regobj): Add amd64-mpx.o.
6007 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6008 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6009 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6010 * i387-fp.c (num_pl_bnd_register) Added constant.
6011 (num_pl_bnd_cfg_registers) Added constant.
6012 (struct i387_xsave) Added reserved area and MPX fields.
6013 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6014 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6016 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6017 (init_registers_amd64_mpx_linux): Declare new function.
6018 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6019 (x86_64_regmap): Add MPX registers.
6020 (x86_linux_read_description): Add MPX case.
6021 (initialize_low_arch): Initialize MPX targets.
6023 2013-11-18 Tom Tromey <tromey@redhat.com>
6025 * configure: Rebuild.
6026 * configure.ac: Don't check for stdlib.h.
6027 * gdbreplay.c: Unconditionally include stdlib.h.
6029 2013-11-18 Tom Tromey <tromey@redhat.com>
6031 * config.in: Rebuild.
6032 * configure: Rebuild.
6033 * configure.ac: Don't use AC_HEADER_DIRENT.
6035 2013-11-18 Tom Tromey <tromey@redhat.com>
6037 * server.h: Don't check HAVE_STRING_H.
6038 * gdbreplay.c: Don't check HAVE_STRING_H.
6039 * configure: Rebuild.
6041 2013-11-18 Tom Tromey <tromey@redhat.com>
6043 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6046 2013-11-08 Tom Tromey <tromey@redhat.com>
6048 * configure, config.in: Rebuild.
6049 * configure.ac: Remove unused configury.
6051 2013-11-08 Tom Tromey <tromey@redhat.com>
6053 * acinclude.m4: Include common.m4, codeset.m4.
6054 * configure, config.in: Rebuild.
6055 * configure.ac: Use GDB_AC_COMMON.
6057 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6059 * linux-s390-low.c (HWCAP_S390_TE): New define.
6060 (s390_arch_setup): Consider the TE field in the HWCAP for
6061 determining 'have_regset_tdb'.
6063 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6066 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6069 2013-10-02 Pedro Alves <palves@redhat.com>
6071 * server.c (process_serial_event): Don't output "GDBserver
6072 exiting" if GDB is connected through stdio.
6073 * target.c (mywait): Likewise, be silent if GDB is connected
6076 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6078 * lynx-low.c (lynx_add_threads_after_attach): New function.
6079 (lynx_attach): Remove call to add_thread. Add call to
6080 lynx_add_threads_after_attach instead.
6082 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6084 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6085 * config.in, configure: Regenerated.
6087 2013-09-18 Yao Qi <yao@codesourcery.com>
6090 * server.c (start_inferior): Clear 'resume_info'.
6092 2013-09-16 Jiong Wang <jiwang@tilera.com>
6094 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6097 2013-09-16 Jiong Wang <jiwang@tilera.com>
6099 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6100 linux-tile-low.o to srv_tgtobj.
6102 2013-09-16 Will Newton <will.newton@linaro.org>
6104 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6107 2013-09-06 Pedro Alves <palves@redhat.com>
6109 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6110 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6111 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6112 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6113 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6114 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6116 2013-09-06 Pedro Alves <palves@redhat.com>
6118 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6119 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6121 2013-09-06 Pedro Alves <palves@redhat.com>
6123 * linux-amd64-ipa.c: Include tracepoint.h.
6124 * linux-i386-ipa.c: Include tracepoint.h.
6126 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6128 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6129 (ps_get_thread_area): New function.
6131 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6133 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6134 (initialize_low_arch): Call init_registers_crisv32 rather than
6135 init_register_crisv32.
6137 2013-09-05 Pedro Alves <palves@redhat.com>
6139 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6141 * hostio.h: ... this new file.
6142 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6143 win32-low.c: Include hostio.h.
6145 2013-09-05 Pedro Alves <palves@redhat.com>
6147 * server.h (gdb_client_data, handler_func, callback_handler_func)
6148 (delete_file_handler, add_file_handler, append_callback_event)
6149 (delete_callback_event, start_event_loop, initialize_event_loop):
6150 Move to event-loop.h and include it.
6151 * event-loop.h: New file.
6153 2013-09-05 Pedro Alves <palves@redhat.com>
6155 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6156 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6157 (loaded_dll, unloaded_dll): Move to ...
6158 * dll.h: ... this new file.
6159 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6161 2013-09-05 Pedro Alves <palves@redhat.com>
6163 * server.h (current_process, get_thread_process, all_processes)
6164 (add_inferior_to_list, for_each_inferior, current_inferior)
6165 (remove_inferior, add_process, remove_process, find_process_pid)
6166 (have_started_inferiors_p, have_attached_inferiors_p)
6167 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6168 (clear_inferiors, find_inferior, find_inferior_id)
6169 (inferior_target_data, set_inferior_target_data)
6170 (inferior_regcache_data, set_inferior_regcache_data): Move to
6171 inferiors.h, and include it.
6172 * inferiors.h: New file.
6174 2013-09-05 Pedro Alves <palves@redhat.com>
6176 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6180 2013-09-05 Pedro Alves <palves@redhat.com>
6182 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6184 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6185 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6186 (handle_tracepoint_general_set, handle_tracepoint_query)
6187 (tracepoint_finished_step, tracepoint_was_hit)
6188 (release_while_stepping_state_list, current_traceframe)
6189 (in_readonly_region, traceframe_read_mem)
6190 (fetch_traceframe_registers, traceframe_read_sdata)
6191 (traceframe_read_info, struct fast_tpoint_collect_status)
6192 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6193 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6194 (supply_fast_tracepoint_registers)
6195 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6196 (ipa_tdesc, claim_trampoline_space)
6197 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6198 (agent_mem_read, agent_get_trace_state_variable_value)
6199 (agent_set_trace_state_variable_value, agent_tsv_read)
6200 (agent_mem_read_string, get_raw_reg_func_addr)
6201 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6202 * tracepoint.h: ... this new file.
6204 2013-09-05 Pedro Alves <palves@redhat.com>
6206 * server.h (perror_with_name, error, fatal, warning, paddress)
6207 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6209 * utils.h: New file.
6211 2013-09-05 Pedro Alves <palves@redhat.com>
6213 * server.h (remote_debug, noack_mode, transport_is_reliable)
6214 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6215 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6216 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6217 (write_enn, initialize_async_io, enable_async_io)
6218 (disable_async_io, check_remote_input_interrupt_request)
6219 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6220 (dead_thread_notify, prepare_resume_reply)
6221 (decode_address_to_semicolon, decode_address, decode_m_packet)
6222 (decode_M_packet, decode_X_packet, decode_xfer_write)
6223 (decode_search_memory_packet, unhexify, hexify)
6224 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6225 (look_up_one_symbol, relocate_instruction)
6226 (monitor_output): Move to remote-utils.h, and include it.
6227 * remote-utils.h: New file.
6229 2013-09-05 Pedro Alves <palves@redhat.com>
6231 * server.h (_): Delete.
6233 2013-09-02 Pedro Alves <palves@redhat.com>
6235 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6236 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6238 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6240 2013-09-02 Pierre Muller <muller@sourceware.org>
6242 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6243 or WriteProcessMemory complete successfully and handle
6244 ERROR_PARTIAL_COPY error.
6246 2013-09-02 Pedro Alves <palves@redhat.com>
6248 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6249 error instead of EIO.
6251 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6254 * linux-low.c: Include filestuff.h.
6255 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6256 * lynx-low.c: Include filestuff.h.
6257 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6258 * server.c: Include filestuff.h.
6259 (main): Call notice_open_fds.
6260 * spu-low.c: Include filestuff.h.
6261 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6263 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6265 * Makefile.in: Explain why ../target and ../nat are not
6266 listed as include file search paths.
6267 (linux-waitpid.o): New object file rule.
6268 * configure.srv (srv_native_linux_obj): New variable.
6269 Replace all occurrences of linux native object files with
6270 $srv_native_linux_obj.
6271 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6272 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6273 (linux_enable_event_reporting): Remove declaration.
6274 (my_waitpid): Moved to common/linux-waitpid.c.
6275 (linux_wait_for_event): Pass ptid when calling
6276 linux_enable_event_reporting.
6277 (linux_supports_tracefork_flag): Remove.
6278 (linux_enable_event_reporting): Likewise.
6279 (linux_tracefork_grandchild): Remove.
6280 (STACK_SIZE): Moved to common/linux-ptrace.c.
6281 (linux_tracefork_child): Remove.
6282 (linux_test_for_tracefork): Remove.
6283 (linux_look_up_symbols): Call linux_supports_traceclone.
6284 (initialize_low): Remove call to linux_test_for_tracefork.
6285 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6286 common/linux-ptrace.h.
6287 (PTRACE_TYPE_ARG4): Likewise.
6288 Include linux-ptrace.h.
6290 2013-08-21 Pedro Alves <palves@redhat.com>
6292 * config.in: Renegerate.
6294 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6296 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6297 (SFILES): Remove $(srcdir)/common/target-common.c and
6298 add $(srcdir)/target/waitstatus.c.
6299 (OBS): Remove target-common.o and add waitstatus.o.
6300 (server_h): Remove $(srcdir)/../common/target-common.h and
6301 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6302 and $(srcdir)/../target/waitstatus.h.
6303 (target-common.o): Remove.
6304 (waitstatus.o): New target object file.
6305 * target.h: Do not include target-common.h and
6306 include target/resume.h, target/wait.h and
6307 target/waitstatus.h.
6309 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6311 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6312 to PTRACE_TYPE_ARG3.
6313 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6314 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6316 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6317 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6319 2013-07-27 Jie Zhang <jie@codesourcery.com>
6320 Daniel Jacobowitz <dan@codesourcery.com>
6321 Yao Qi <yao@codesourcery.com>
6323 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6324 (mips-linux-watch.o): New rule.
6325 (mips_linux_watch_h): New variable.
6326 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6328 * linux-mips-low.c: Include mips-linux-watch.h.
6329 (struct arch_process_info, struct arch_lwp_info): New.
6330 (update_watch_registers_callback): New function.
6331 (mips_linux_new_process, mips_linux_new_thread) New functions.
6332 (mips_linux_prepare_to_resume, mips_insert_point): New
6334 (mips_remove_point, mips_stopped_by_watchpoint): New
6336 (rsp_bp_type_to_target_hw_bp_type): New function.
6337 (mips_stopped_data_address): New function.
6338 (the_low_target): Add watchpoint support functions.
6340 2013-07-27 Yao Qi <yao@codesourcery.com>
6342 * i386-low.c: Include break-common.h.
6343 (enum target_hw_bp_type): Remove.
6345 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6347 * Makefile.in (SFILES): /common/target-common.c.
6348 (OBS): Add target-common.o.
6349 (server_h): Add $(srcdir)/../common/target-common.h.
6350 (target-common.o): New target.
6351 * server.c (queue_stop_reply_callback): Free
6352 status string after use.
6353 * target.c (target_waitstatus_to_string): Remove.
6354 * target.h: Include target-common.h.
6355 (resume_kind): Likewise.
6356 (target_waitkind): Likewise.
6357 (target_waitstatus): Likewise.
6358 (TARGET_WNOHANG): Likewise.
6360 2013-07-04 Yao Qi <yao@codesourcery.com>
6362 * Makefile.in (host_alias): Use @host_noncanonical@.
6363 (target_alias): Use @target_noncanonical@.
6364 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6365 ACX_NONCANONICAL_HOST.
6366 * configure: Regenerated.
6369 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6371 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6372 * configure: Rebuild.
6373 * Makefile.in (version_host, version_target): Get from configure.
6374 (version.c): Use $(version_host) and $(version_target).
6376 2013-07-03 Pedro Alves <palves@redhat.com>
6378 * Makefile.in (config.status): Depend on development.sh.
6379 * acinclude.m4: Include libmcheck.m4.
6380 * configure: Regenerate.
6382 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6384 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6385 attribute inside the parentheses.
6386 (winapi_DebugSetProcessKillOnExit): Ditto.
6387 (winapi_DebugBreakProcess): Ditto.
6388 (winapi_GenerateConsoleCtrlEvent): Ditto.
6390 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6392 * notif.h (notif_event): Add a dummy member to avoid compiler
6395 2013-07-01 Pedro Alves <palves@redhat.com>
6397 * hostio.c (HOSTIO_PATH_MAX): Define.
6398 (require_filename, handle_open, handle_unlink, handle_readlink):
6401 2013-07-01 Pedro Alves <palves@redhat.com>
6403 * server.h: Include "pathmax.h".
6404 * linux-low.c: Don't include sys/param.h.
6405 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6407 * win32-low.c: Don't include sys/param.h.
6408 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6410 2013-07-01 Pedro Alves <palves@redhat.com>
6412 * event-loop.c: Don't check HAVE_UNISTD_H before including
6414 * gdbreplay.c: Likewise.
6415 * remote-utils.c: Likewise.
6416 * server.c: Likewise.
6417 * configure.ac: Don't check for unistd.h.
6418 * configure: Regenerate.
6420 2013-06-28 Tom Tromey <tromey@redhat.com>
6422 * Makefile.in (version.c): Use version.in, not
6425 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6427 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6428 * configure: Rebuild.
6429 * Makefile.in (version_host, version_target): Get from configure.
6430 (version.c): Use $(version_host) and $(version_target).
6432 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6434 Fix trace-status to output user name without trailing colon.
6435 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6437 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6439 Fix trace-status to output proper start-time and stop-time.
6440 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6441 output start time and stop time in hex as gdb expects.
6443 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6445 * tracepoint.c (build_traceframe_info_xml): Output trace state
6446 variables present in the trace buffer.
6448 2013-06-24 Tom Tromey <tromey@redhat.com>
6450 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6452 (version.o): Remove.
6453 * gdbreplay.c: Include version.h.
6454 (version, host_name): Don't declare.
6455 * server.h: Include version.h.
6456 (version, host_name): Don't declare.
6458 2013-06-12 Pedro Alves <palves@redhat.com>
6460 * linux-x86-low.c (linux_is_elf64): Delete global.
6461 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6462 with local linux_pid_exe_is_elf_64_file use.
6464 2013-06-11 Pedro Alves <palves@redhat.com>
6466 * linux-low.c (regset_disabled, disable_regset): New functions.
6467 (regsets_fetch_inferior_registers)
6468 (regsets_store_inferior_registers): Use them.
6469 (initialize_regsets_info); Don't allocate the disabled_regsets
6471 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6474 2013-06-11 Pedro Alves <palves@redhat.com>
6476 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6479 2013-06-11 Pedro Alves <palves@redhat.com>
6481 * linux-x86-low.c (initialize_low_arch): Call
6482 init_registers_x32_avx_linux.
6484 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6486 Fix compatibility with Android Bionic.
6487 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6490 2013-06-07 Pedro Alves <palves@redhat.com>
6493 * Makefile.in (OBS): Add tdesc.o.
6494 (IPA_OBJS): Add tdesc-ipa.o.
6495 (tdesc-ipa.o): New rule.
6496 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6498 * linux-low.c (new_inferior): Delete.
6499 (disabled_regsets, num_regsets): Delete.
6500 (linux_add_process): Adjust to set the new per-process
6502 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6503 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6504 was a stop. When calling arch_setup, switch the current inferior
6505 to the thread that got an event.
6506 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6507 (regsets_fetch_inferior_registers)
6508 (regsets_store_inferior_registers): New regsets_info parameter.
6510 (linux_register_in_regsets): New regs_info parameter. Adjust to
6512 (register_addr, fetch_register, store_register): New usrregs_info
6513 parameter. Adjust to use it.
6514 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6515 parameter regs_info. Adjust to use it.
6516 (linux_fetch_registers): Get the current inferior's regs_info, and
6518 (linux_store_registers): Ditto.
6519 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6520 (initialize_low): Don't initialize the target_regsets here. Call
6521 initialize_low_arch.
6522 * linux-low.h (target_regsets): Delete declaration.
6523 (struct regsets_info): New.
6524 (struct usrregs_info): New.
6525 (struct regs_info): New.
6526 (struct process_info_private) <new_inferior>: New field.
6527 (struct linux_target_ops): Delete the num_regs, regmap, and
6528 regset_bitmap fields. New field regs_info.
6529 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6530 * i387-fp.c (num_xmm_registers): Delete.
6531 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6532 calls to new interface.
6533 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6534 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6535 Infer the number of xmm registers from the regcache's target
6537 * i387-fp.h (num_xmm_registers): Delete.
6538 * inferiors.c (add_thread): Don't install the thread's regcache
6540 * proc-service.c (gregset_info): Fetch the current inferior's
6541 regs_info. Adjust to use it.
6542 * regcache.c: Include tdesc.h.
6543 (register_bytes, reg_defs, num_registers)
6544 (gdbserver_expedite_regs): Delete.
6545 (get_thread_regcache): If the thread doesn't have a regcache yet,
6546 create one, instead of aborting gdbserver.
6547 (regcache_invalidate_one): Rename to ...
6548 (regcache_invalidate_thread): ... this.
6549 (regcache_invalidate_one): New.
6550 (regcache_invalidate): Only invalidate registers of the current
6552 (init_register_cache): Add target_desc parameter, and use it.
6553 (new_register_cache): Ditto. Assert the target description has a
6554 non zero registers_size.
6555 (regcache_cpy): Add assertions. Adjust.
6556 (realloc_register_cache, set_register_cache): Delete.
6557 (registers_to_string, registers_from_string): Adjust.
6558 (find_register_by_name, find_regno, find_register_by_number)
6559 (register_cache_size): Add target_desc parameter, and use it.
6560 (free_register_cache_thread, free_register_cache_thread_one)
6561 (regcache_release, register_cache_size): New.
6562 (register_size): Add target_desc parameter, and use it.
6563 (register_data, supply_register, supply_register_zeroed)
6564 (supply_regblock, supply_register_by_name, collect_register)
6565 (collect_register_as_string, collect_register_by_name): Adjust.
6566 * regcache.h (struct target_desc): Forward declare.
6567 (struct regcache) <tdesc>: New field.
6568 (init_register_cache, new_register_cache): Add target_desc
6570 (regcache_invalidate_thread): Declare.
6571 (regcache_invalidate_one): Delete declaration.
6572 (regcache_release): Declare.
6573 (find_register_by_number, register_cache_size, register_size)
6574 (find_regno): Add target_desc parameter.
6575 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6577 * remote-utils.c: Include tdesc.h.
6578 (outreg, prepare_resume_reply): Adjust.
6579 * server.c: Include tdesc.h.
6580 (gdbserver_xmltarget): Delete declaration.
6581 (get_features_xml, process_serial_event): Adjust.
6582 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6584 (struct process_info) <tdesc>: New field.
6585 (ipa_tdesc): Declare.
6586 * tdesc.c: New file.
6587 * tdesc.h: New file.
6588 * tracepoint.c: Include tdesc.h.
6589 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6590 (get_context_regcache): Adjust to pass ipa_tdesc down.
6591 (do_action_at_tracepoint): Adjust to get the register cache size
6592 from the context regcache's description.
6593 (traceframe_walk_blocks): Adjust to get the register cache size
6594 from the current trace frame's description.
6595 (traceframe_get_pc): Adjust to get current trace frame's
6596 description and pass it down.
6597 (gdb_collect): Adjust to get the register cache size from the
6599 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6600 (gdbserver_xmltarget): Delete.
6601 (initialize_low_tracepoint): Set the ipa's target description.
6602 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6603 (initialize_low_tracepoint): Set the ipa's target description.
6604 * linux-x86-low.c: Include tdesc.h.
6605 [__x86_64__] (is_64bit_tdesc): New.
6606 (ps_get_thread_area, x86_get_thread_area): Use it.
6607 (i386_cannot_store_register): Rename to ...
6608 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6609 (i386_cannot_fetch_register): Rename to ...
6610 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6611 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6613 (target_regsets): Rename to ...
6614 (x86_regsets): ... this.
6615 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6617 (x86_siginfo_fixup): Use is_64bit_tdesc.
6618 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6619 (tdesc_x32_avx_linux, tdesc_x32_linux)
6620 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6622 (x86_linux_update_xmltarget): Delete.
6623 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6624 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6625 (AMD64_LINUX_USER64_CS): New.
6626 (x86_linux_read_description): New, based on
6627 x86_linux_update_xmltarget.
6628 (same_process_callback): New.
6629 (x86_arch_setup_process_callback): New.
6630 (x86_linux_update_xmltarget): New.
6631 (x86_regsets_info): New.
6632 (amd64_linux_regs_info): New.
6633 (i386_linux_usrregs_info): New.
6634 (i386_linux_regs_info): New.
6635 (x86_linux_regs_info): New.
6636 (x86_arch_setup): Reimplement.
6637 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6638 (x86_emit_ops): Ditto.
6639 (the_low_target): Adjust. Install x86_linux_regs_info,
6640 x86_cannot_fetch_register, and x86_cannot_store_register.
6641 (initialize_low_arch): New.
6642 * linux-ia64-low.c (tdesc_ia64): Declare.
6643 (ia64_fetch_register): Adjust.
6644 (ia64_usrregs_info, regs_info): New globals.
6645 (ia64_regs_info): New function.
6646 (the_low_target): Adjust.
6647 (initialize_low_arch): New function.
6648 * linux-sparc-low.c (tdesc_sparc64): Declare.
6649 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6651 (sparc_arch_setup): New function.
6652 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6653 (the_low_target): Adjust.
6654 (initialize_low_arch): New function.
6655 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6656 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6657 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6658 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6659 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6660 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6661 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6662 (tdesc_powerpc_isa205_vsx64l): Declare.
6663 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6664 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6665 (ppc_set_pc, ppc_get_hwcap): Adjust.
6666 (ppc_usrregs_info): Forward declare.
6667 (!__powerpc64__) ppc_regmap_adjusted: New global.
6668 (ppc_arch_setup): Adjust to the current process'es target
6670 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6671 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6672 (ppc_store_evrregset): Adjust.
6673 (target_regsets): Rename to ...
6674 (ppc_regsets): ... this, and make static.
6675 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6676 (ppc_regs_info): New function.
6677 (the_low_target): Adjust.
6678 (initialize_low_arch): New function.
6679 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6680 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6681 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6682 (tdesc_s390x_linux64v2): Declare.
6683 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6684 (s390_fill_gregset, s390_store_last_break): Adjust.
6685 (target_regsets): Rename to ...
6686 (s390_regsets): ... this, and make static.
6687 (s390_get_pc, s390_set_pc): Adjust.
6688 (s390_get_hwcap): New target_desc parameter, and use it.
6689 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6690 (s390_arch_setup): Adjust to set the current process'es target
6691 description. Don't adjust the regmap.
6692 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6693 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6694 (regs_info_3264): New globals.
6695 (s390_regs_info): New function.
6696 (the_low_target): Adjust.
6697 (initialize_low_arch): New function.
6698 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6699 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6700 [__mips64] (init_registers_mips_linux)
6701 (init_registers_mips_dsp_linux): Delete defines.
6702 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6703 (have_dsp): New global.
6704 (mips_read_description): New, based on mips_arch_setup.
6705 (mips_arch_setup): Reimplement.
6706 (get_usrregs_info): New function.
6707 (mips_cannot_fetch_register, mips_cannot_store_register)
6708 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6709 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6710 (target_regsets): Rename to ...
6711 (mips_regsets): ... this, and make static.
6712 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6713 (dsp_regs_info, regs_info): New globals.
6714 (mips_regs_info): New function.
6715 (the_low_target): Adjust.
6716 (initialize_low_arch): New function.
6717 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6718 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6720 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6721 (arm_read_description): New, with bits factored from
6723 (arm_arch_setup): Reimplement.
6724 (target_regsets): Rename to ...
6725 (arm_regsets): ... this, and make static.
6726 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6727 (arm_regs_info): New function.
6728 (the_low_target): Adjust.
6729 (initialize_low_arch): New function.
6730 * linux-m68k-low.c (tdesc_m68k): Declare.
6731 (target_regsets): Rename to ...
6732 (m68k_regsets): ... this, and make static.
6733 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6734 (m68k_regs_info): New function.
6735 (m68k_arch_setup): New function.
6736 (the_low_target): Adjust.
6737 (initialize_low_arch): New function.
6738 * linux-sh-low.c (tdesc_sharch): Declare.
6739 (target_regsets): Rename to ...
6740 (sh_regsets): ... this, and make static.
6741 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6742 (sh_regs_info, sh_arch_setup): New functions.
6743 (the_low_target): Adjust.
6744 (initialize_low_arch): New function.
6745 * linux-bfin-low.c (tdesc_bfin): Declare.
6746 (bfin_arch_setup): New function.
6747 (bfin_usrregs_info, regs_info): New globals.
6748 (bfin_regs_info): New function.
6749 (the_low_target): Adjust.
6750 (initialize_low_arch): New function.
6751 * linux-cris-low.c (tdesc_cris): Declare.
6752 (cris_arch_setup): New function.
6753 (cris_usrregs_info, regs_info): New globals.
6754 (cris_regs_info): New function.
6755 (the_low_target): Adjust.
6756 (initialize_low_arch): New function.
6757 * linux-cris-low.c (tdesc_crisv32): Declare.
6758 (cris_arch_setup): New function.
6759 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6760 (cris_regs_info): New function.
6761 (the_low_target): Adjust.
6762 (initialize_low_arch): New function.
6763 * linux-m32r-low.c (tdesc_m32r): Declare.
6764 (m32r_arch_setup): New function.
6765 (m32r_usrregs_info, regs_info): New globals.
6766 (m32r_regs_info): Adjust.
6767 (initialize_low_arch): New function.
6768 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6769 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6770 (tic6x_usrregs_info): Forward declare.
6771 (tic6x_read_description): New function, based on ...
6772 (tic6x_arch_setup): ... this. Reimplement.
6773 (target_regsets): Rename to ...
6774 (tic6x_regsets): ... this, and make static.
6775 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6776 (tic6x_regs_info): New function.
6777 (the_low_target): Adjust.
6778 (initialize_low_arch): New function.
6779 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6780 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6781 (target_regsets): Rename to ...
6782 (xtensa_regsets): ... this, and make static.
6783 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6785 (xtensa_arch_setup, xtensa_regs_info): New functions.
6786 (the_low_target): Adjust.
6787 (initialize_low_arch): New function.
6788 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6789 (nios2_arch_setup): Set the current process'es tdesc.
6790 (target_regsets): Rename to ...
6791 (nios2_regsets): ... this.
6792 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6793 (nios2_regs_info): New function.
6794 (the_low_target): Adjust.
6795 (initialize_low_arch): New function.
6796 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6797 (aarch64_arch_setup): Set the current process'es tdesc.
6798 (target_regsets): Rename to ...
6799 (aarch64_regsets): ... this.
6800 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6801 (aarch64_regs_info): New function.
6802 (the_low_target): Adjust.
6803 (initialize_low_arch): New function.
6804 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6806 (target_regsets): Rename to ...
6807 (tile_regsets): ... this.
6808 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6809 (tile_regs_info): New function.
6810 (tile_arch_setup): Set the current process'es tdesc.
6811 (the_low_target): Adjust.
6812 (initialize_low_arch): New function.
6813 * spu-low.c (tdesc_spu): Declare.
6814 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6815 * win32-arm-low.c (tdesc_arm): Declare.
6816 (arm_arch_setup): New function.
6817 (the_low_target): Install arm_arch_setup instead of
6819 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6820 (init_windows_x86): Rename to ...
6821 (i386_arch_setup): ... this. Set `win32_tdesc'.
6822 (the_low_target): Adjust.
6823 * win32-low.c (win32_tdesc): New global.
6824 (child_add_thread): Don't create the thread cache here.
6825 (do_initial_child_stuff): Set the new process'es tdesc.
6826 * win32-low.h (struct target_desc): Forward declare.
6827 (win32_tdesc): Declare.
6828 * lynx-i386-low.c (tdesc_i386): Declare global.
6829 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6830 * lynx-low.c (lynx_tdesc): New global.
6831 (lynx_add_process): Set the new process'es tdesc.
6832 * lynx-low.h (struct target_desc): Forward declare.
6833 (lynx_tdesc): Declare global.
6834 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6835 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6836 * nto-low.c (nto_tdesc): New global.
6837 (do_attach): Set the new process'es tdesc.
6838 * nto-low.h (struct target_desc): Forward declare.
6839 (nto_tdesc): Declare.
6840 * nto-x86-low.c (tdesc_i386): Declare.
6841 (nto_x86_arch_setup): Set `nto_tdesc'.
6843 2013-06-04 Gary Benson <gbenson@redhat.com>
6845 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6846 to qSupported response when appropriate.
6847 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6848 with nonzero-length annex.
6849 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6850 arguments supplied in annex.
6852 2013-05-31 Doug Evans <dje@google.com>
6855 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6856 64 bits in 64-cross-32 environment.
6858 2013-05-28 Pedro Alves <palves@redhat.com>
6860 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6861 (aarch64-without-fpu.c): Delete rule.
6862 * configure.srv (aarch64*-*-linux*): Remove references to
6863 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6864 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6867 2013-05-24 Pedro Alves <palves@redhat.com>
6869 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6870 instead of strchr/decode_address. Error if the range isn't split
6871 with a ','. Don't assume there's be a ':' in the action.
6873 2013-05-23 Yao Qi <yao@codesourcery.com>
6874 Pedro Alves <palves@redhat.com>
6876 * linux-low.c (lwp_in_step_range): New function.
6877 (linux_wait_1): If the thread was range stepping and stopped
6878 outside the stepping range, report the stop to GDB. Otherwise,
6879 continue stepping. Add range stepping debug output.
6880 (linux_set_resume_request): Copy the step range from the resume
6882 (linux_supports_range_stepping): New.
6883 (linux_target_ops) <supports_range_stepping>: Set to
6884 linux_supports_range_stepping.
6885 * linux-low.h (struct linux_target_ops)
6886 <supports_range_stepping>: New field.
6887 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6888 * linux-x86-low.c (x86_supports_range_stepping): New.
6889 (the_low_target) <supports_range_stepping>: Set to
6890 x86_supports_range_stepping.
6891 * server.c (handle_v_cont): Handle 'r' action.
6892 (handle_v_requests): Append ";r" if the target supports range
6894 * target.h (struct thread_resume) <step_range_start,
6895 step_range_end>: New fields.
6896 (struct target_ops) <supports_range_stepping>:
6898 (target_supports_range_stepping): New macro.
6900 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6902 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6903 confusion in comment.
6905 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6907 * lynx-low.c (struct process_info_private): New type.
6908 (lynx_add_process): New function.
6909 (lynx_create_inferior, lynx_attach): Replace calls to
6910 add_process by calls to lynx_add_process.
6911 (lynx_resume): If PTID is null, then try using
6912 current_process()->private->last_wait_event_ptid.
6914 (lynx_clear_inferiors): Delete. The contents of that function
6915 has been inlined in lynx_mourn;
6916 (lynx_wait_1): Save the ptid in the process's private data.
6917 (lynx_mourn): Free the process' private data. Replace call
6918 to lynx_clear_inferiors by call to clear_inferiors.
6920 2013-05-17 Yao Qi <yao@codesourcery.com>
6922 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6925 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6927 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6928 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6929 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6930 PT_TEXT_END_ADDR guards. Update comments.
6931 (linux_target_op) <read_offsets>: Conditionally define to
6932 linux_read_offsets if the target is UCLIBC and if it defines
6933 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6935 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6936 Andrew Jenner <andrew@codesourcery.com>
6938 * Makefile.in (SFILES): Add linux-nios2-low.c.
6939 (clean): Add action to delete nios2-linux.c.
6940 (nios2-linux.c): New rule.
6941 * configure.srv: Add nios2*-*-linux*.
6942 * linux-nios2-low.c: New.
6944 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6946 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6948 2013-04-25 Hui Zhu <hui@codesourcery.com>
6951 * ax.c (ax_printf): Add fflush.
6953 2013-04-22 Tom Tromey <tromey@redhat.com>
6955 * Makefile.in (SFILES): Add filestuff.c.
6956 (OBS): Add filestuff.o.
6957 (filestuff.o): New target.
6958 * config.in, configure: Rebuild.
6959 * configure.ac: Check for fdwalk, pipe2.
6961 2013-04-17 Pedro Alves <palves@redhat.com>
6963 * configure.ac (USE_THREAD_DB): Delete variable.
6964 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6965 Don't AC_SUBST USE_THREAD_DB.
6966 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6967 * config.in, configure: Regenerate.
6969 2013-04-16 Pedro Alves <palves@redhat.com>
6971 * linux-low.h (struct lwp_info) <thread_known>: Move under
6972 the USE_THREAD_DB #ifdef.
6974 2013-04-16 Pedro Alves <palves@redhat.com>
6976 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6977 (linux-low.o): Delete rule.
6978 * linux-low.h: Always include "gdb_thread_db.h" instead of
6979 conditionally including thread_db.h.
6980 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6983 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6985 * Makefile.in (install-only): Fix make install regression.
6987 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6989 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6990 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6992 * gdbserver.1: Remove.
6994 2013-03-22 Pedro Alves <palves@redhat.com>
6996 * linux-low.c (handle_extended_wait): Don't call
6997 linux_enable_event_reporting.
6999 2013-03-15 Tony Theodore <tonyt@logyst.com>
7002 * Makefile.in (SHELL): Use @SHELL@.
7004 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7006 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7009 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7011 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7012 Remove extraneous NULL element.
7014 2013-03-13 Yao Qi <yao@codesourcery.com>
7016 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7017 'V' block in trace frame.
7019 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7021 * target.h (struct target_ops): Add btrace ops.
7022 (target_supports_btrace): New macro.
7023 (target_enable_btrace): New macro.
7024 (target_disable_btrace): New macro.
7025 (target_read_btrace): New macro.
7026 * gdbthread.h (struct thread_info): Add btrace field.
7027 * server.c: Include btrace-common.h.
7028 (handle_btrace_general_set): New function.
7029 (handle_btrace_enable): New function.
7030 (handle_btrace_disable): New function.
7031 (handle_general_set): Call handle_btrace_general_set.
7032 (handle_qxfer_btrace): New function.
7033 (struct qxfer qxfer_packets[]): Add btrace entry.
7034 * inferiors.c (remove_thread): Disable btrace.
7035 * linux-low: Include linux-btrace.h.
7036 (linux_low_enable_btrace): New function.
7037 (linux_low_read_btrace): New function.
7038 (linux_target_ops): Add btrace ops.
7039 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7040 Add srv_linux_btrace=yes.
7041 (x86_64-*-linux*): Add linux-btrace.o.
7042 Add srv_linux_btrace=yes.
7043 * configure.ac: Define HAVE_LINUX_BTRACE.
7044 * config.in: Regenerated.
7045 * configure: Regenerated.
7047 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7049 * server.c (handle_qxfer): Preserve error message if -3 is
7051 (qxfer): Document the -3 return value.
7053 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7055 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7056 (linux_btrace_h): New variable.
7057 (linux-btrace.o): New rule.
7059 2013-03-08 Stan Shebs <stan@codesourcery.com>
7060 Hafiz Abid Qadeer <abidh@codesourcery.com>
7062 * tracepoint.c (trace_buffer_size): New global.
7063 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7064 (init_trace_buffer): Change to one-argument function. Allocate
7065 trace buffer memory.
7066 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7067 handle QTBuffer:size packet.
7068 (cmd_bigqtbuffer_size): New function.
7069 (initialize_tracepoint): Call init_trace_buffer with
7070 DEFAULT_TRACE_BUFFER_SIZE.
7071 * server.c (handle_query): Add QTBuffer:size in the
7074 2013-03-07 Yao Qi <yao@codesourcery.com>
7076 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7077 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7079 (cmd_qtsp): Adjust condition. Do post increment.
7080 Set cur_action and cur_step_action back to 0.
7082 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7085 * linux-low.c (linux_write_memory): Return early success if LEN is
7088 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7090 * configure.srv: Add x86_64-*-cygwin* as target.
7092 2013-02-28 Tom Tromey <tromey@redhat.com>
7094 * configure.ac: Invoke AC_SYS_LARGEFILE.
7095 * configure, config.in: Rebuild.
7097 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7099 * win32-low.c: Throughout, fix format strings and casts of
7100 printf-like functions to avoid type related warnings on all
7102 (get_child_debug_event): Print dwDebugEventCode as hex since
7103 that's how it's usually documented.
7105 2013-02-28 Yao Qi <yao@codesourcery.com>
7107 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7110 2013-02-27 Jiong Wang <jiwang@tilera.com>
7112 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7113 (reg-tilegx32.c): New rule.
7114 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7115 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7116 different register info initializer according to elf class.
7117 (init_registers_tilgx32): New function. The tilegx32 register info
7119 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7120 (tile_store_gregset): Likewise.
7122 2013-02-27 Yao Qi <yao@codesourcery.com>
7124 * server.c (process_point_options): Print debug message when
7125 debug_threads is true.
7127 2013-02-26 Yao Qi <yao@codesourcery.com>
7129 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7131 2013-02-19 Pedro Alves <palves@redhat.com>
7132 Kai Tietz <ktietz@redhat.com>
7136 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7137 instead of strtoul to extract address from packet.
7138 (process_serial_event) <'z'>: Likewise.
7140 2013-02-18 Yao Qi <yao@codesourcery.com>
7142 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7144 2013-02-14 Pedro Alves <palves@redhat.com>
7148 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7149 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7151 2013-02-14 Pedro Alves <palves@redhat.com>
7153 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7155 2013-02-14 Pedro Alves <palves@redhat.com>
7157 * tracepoint.c (save_string): Delete.
7158 (add_tracepoint_action): Use savestring instead of save_string.
7160 2013-02-12 Pedro Alves <palves@redhat.com>
7162 * linux-xtensa-low.c: Ditto.
7163 * xtensa-xtregs.c: Ditto.
7165 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7167 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7170 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7172 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7173 aarch64_num_wp_regs and aarch64_num_bp_regs to
7174 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7176 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7178 * linux-aarch64-low.c (ps_get_thread_area): Replace
7179 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7181 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7182 Marcus Shawcroft <marcus.shawcroft@arm.com>
7183 Nigel Stephens <nigel.stephens@arm.com>
7184 Yufeng Zhang <yufeng.zhang@arm.com>
7186 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7187 (aarch64.c, aarch64-without-fpu.c): New targets.
7188 * configure.srv (aarch64*-*-linux*): New.
7189 * linux-aarch64-low.c: New file.
7191 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7193 * linux-low.c (handle_extended_wait, linux_create_inferior)
7194 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7195 (dequeue_one_deferred_signal, linux_resume_one_thread)
7196 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7197 (linux_tracefork_grandchild, linux_test_for_tracefork)
7198 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7199 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7200 where the argument is 0.
7202 2013-01-25 Yao Qi <yao@codesourcery.com>
7204 * event-loop.c: Include "queue.h".
7205 (gdb_event_p): New typedef.
7206 (struct gdb_event) <next_event>: Remove.
7207 (event_queue): Change to QUEUE(gdb_event_p).
7208 (async_queue_event): Remove.
7209 (gdb_event_xfree): New.
7210 (initialize_event_loop): New.
7211 (process_event): Use API from QUEUE.
7212 (wait_for_event): Likewise.
7213 * server.c (main): Call initialize_event_loop.
7214 * server.h (initialize_event_loop): Declare.
7216 2013-01-18 Yao Qi <yao@codesourcery.com>
7218 * ax.h (struct eval_agent_expr_context): New.
7219 (gdb_eval_agent_expr): Update declaration.
7220 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7221 TFRAME. Add new argument CTX.
7222 * server.h (struct eval_agent_expr_context): Declare.
7223 (agent_mem_read, agent_tsv_read): Update declaration.
7224 (agent_mem_read_string): Likewise.
7225 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7226 (add_traceframe_block): Add new argument TPOINT.
7227 Increase TPOINT->traceframe_usage.
7228 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7229 eval_tracepoint_agent_expr.
7230 (condition_true_at_tracepoint): Likewise.
7231 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7232 (agent_mem_read_string, agent_tsv_read): Likewise.
7234 2013-01-16 Yao Qi <yao@codesourcery.com>
7236 * linux-low.c (linux_resume_one_lwp): Don't check
7237 'lwp->bp_reinsert != 0'.
7239 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7240 Pedro Alves <palves@redhat.com>
7242 * lynx-low.c (ptrace_request_to_str): Define a temporary
7243 macro and use it to simplify this function's implementation.
7245 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7247 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7250 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7252 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7254 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7256 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7258 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7260 * lynx-low.c (lynx_resume): Use the resume_info parameter
7261 to determine the ptid for the lynx_ptrace call, unless
7262 it is equal to minus_one_ptid, in which case we use the
7263 ptid of the current_inferior.
7264 (lynx_wait_1): After having received a thread create/exit
7265 event, resume the inferior's execution using the signaling
7266 thread's ptid, rather than the old ptid.
7268 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7270 * lynx-low.c (lynx_resume): Delete variable ret.
7272 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7274 * gdbreplay.c (gdbreplay_version): Update copyright year.
7275 * server.c (gdbserver_version): Likewise.
7277 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7279 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7282 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7284 * lynx-low.c (ptrace_request_to_str): Add handling for
7287 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7289 * lynx-low.c (lynx_attach): Delete variable new_process.
7291 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7293 * lynx-low.c (lynx_create_inferior): Delete variable
7296 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7298 * lynx-low.c (ptrace_request_to_str): Do not handle
7299 PTRACE_GETTHREADLIST if this macro does not exist.
7301 2012-12-15 Yao Qi <yao@codesourcery.com>
7303 * Makefile.in (OBS): Add notif.o.
7304 * notif.c, notif.h: New.
7305 * server.c: Include "notif.h".
7306 (struct vstop_notif) <next>: Remove.
7308 (queue_stop_reply): Update.
7309 (push_event, send_next_stop_reply): Remove.
7310 (discard_queued_stop_replies): Update.
7311 (notif_stop): New variable.
7312 (handle_v_stopped): Remove.
7313 (handle_v_requests): Don't call handle_v_stopped. Call
7314 handle_ack_notif instead.
7315 (queue_stop_reply_callback): Call notif_event_enque instead
7316 of queue_stop_reply.
7317 (handle_status): Don't call send_next_stop_reply, call
7318 notif_write_event instead.
7319 (kill_inferior_callback): Likewise.
7320 (detach_or_kill_inferior_callback): Likewise.
7321 (main): Call initialize_notif.
7322 (process_serial_event): Call QUEUE_is_empty.
7323 (handle_target_event): Call notif_push instead of push event.
7324 * server.h (push_event): Remove declaration.
7326 2012-12-10 Tom Tromey <tromey@redhat.com>
7328 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7329 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7332 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7333 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7334 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7335 (amd64-linux-ipa.o, ax.o): Rewrite.
7336 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7337 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7338 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7339 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7340 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7341 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7342 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7343 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7344 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7345 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7346 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7347 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7348 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7349 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7350 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7351 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7352 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7353 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7354 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7355 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7356 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7357 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7358 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7359 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7360 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7361 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7362 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7363 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7364 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7365 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7366 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7367 (reg-tilegx.o): Remove.
7368 (all_object_files): New macro.
7369 Include .deps files.
7370 * aclocal.m4, configure: Rebuild.
7371 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7372 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7373 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7375 2012-12-05 Tom Tromey <tromey@redhat.com>
7378 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7380 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7382 * configure.ac: Check for linux/perf_event.h.
7383 * config.in: Regenerated.
7384 * configure: Regenerated.
7386 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7388 * hostio.c (handle_readlink): Decrease buffer size
7389 parameter passed to readlink by one byte.
7391 2012-11-26 Yao Qi <yao@codesourcery.com>
7393 * configure.ac (build_warnings): Append '-Wempty-body'.
7394 * configure: Regenerated.
7395 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7398 2012-11-15 Pierre Muller <muller@sourceware.org>
7400 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7401 * config.in: Regenerate.
7402 * configure: Regenerate.
7403 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7404 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7405 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7406 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7408 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7409 instead of <sys/wait.h> header.
7410 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7412 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7414 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7415 (various make rules): Remove -DGDBSERVER
7417 2012-11-09 Yao Qi <yao@codesourcery.com>
7419 * spu-low.c (current_ptid): Move it to ..
7420 * gdbthread.h: ... here. New.
7421 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7422 * server.c (myresume, process_serial_event): Likewise.
7423 * thread-db.c (thread_db_find_new_threads): Likewise.
7424 * tracepoint.c (run_inferior_command): Likewise.
7426 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7428 * server.c (handle_search_memory_1): Include access length in
7431 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7433 * linux-crisv32-low.c: Fix compile errors.
7435 2012-09-04 Yao Qi <yao@codesourcery.com>
7437 * tracepoint.c (cmd_qtsv): Adjust debug message.
7438 Don't check CUR_TPOINT.
7440 2012-08-28 Yao Qi <yao@codesourcery.com>
7442 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7443 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7444 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7445 Remove declarations of xmalloc, xreallloc, xstrdup and
7447 * Makefile.in (libiberty_h): New.
7448 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7449 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7451 2012-08-23 Yao Qi <yao@codesourcery.com>
7453 * server.h: Remove declaration of 'xsnprintf'.
7455 2012-08-22 Keith Seitz <keiths@redhat.com>
7457 * server.h: Include build-gnulib-gbserver/config.h.
7458 * gdbreplay.c: Likewise.
7460 2012-08-08 Doug Evans <dje@google.com>
7462 * Makefile.in (SFILES): Add gdb_vecs.c.
7463 (OBS): Add gdb_vecs.o.
7464 (gdb_vecs_h, host_defs_h): New variables.
7465 (thread-db.o): Add $(gdb_vecs_h) dependency.
7466 (gdb_vecs.o): New rule.
7467 * thread-db.c: #include "gdb_vecs.h".
7468 (thread_db_load_search): Use a vector to iterate over path elements.
7469 Handle text appearing after "$pdir".
7471 * configure.ac: Add check for strstr.
7472 * config.in: Regenerate.
7473 * configure: Regenerate.
7475 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7477 * hostio.c (handle_pread): If pread fails, fall back to attempting
7479 (handle_pwrite): Likewise for pwrite.
7481 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7483 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7484 between unsupported TYPE and unimplementable ADDR/LEN combination.
7485 (arm_insert_point): Act on new return value.
7487 2012-07-31 Pedro Alves <palves@redhat.com>
7489 * server.c (process_point_options): Only skip tokens if we find
7490 one that is unrecognized. Don't treat 'X' specially while
7491 skipping unrecognized tokens.
7493 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7495 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7496 to 4-byte-align HW breakpoint addresses for Thumb.
7498 2012-07-27 Yao Qi <yao@codesourcery.com>
7502 * server.h: Declare gdb_agent_about_to_close.
7503 * target.c (kill_inferior): Include "agent.h".
7504 New. Send command 'kill'.
7505 * target.h (kill_inferior): Removed macro.
7506 * tracepoint.c (gdb_agent_about_to_close): New.
7507 (gdb_agent_helper_thread): Handle command 'close'.
7508 Wait endlessly until the inferior stops.
7509 Install gdb_agent_remove_socket to atexit hook.
7510 (agent_socket_name): New static variable.
7511 (gdb_agent_socket_init): Replace local variable 'name' with
7512 'agent_socket_name'.
7513 (gdb_agent_remove_socket): New.
7515 2012-07-27 Yao Qi <yao@codesourcery.com>
7517 * server.c (process_point_options): Stop at 'X' when parsing.
7519 2012-07-19 Michael Eager <eager@eagercon.com>
7521 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7523 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7524 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7525 hardware breakpoint.
7527 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7529 * gdbserver/linux-low.c (initialize_low): Call
7530 linux_ptrace_init_warnings.
7532 2012-07-02 Doug Evans <dje@google.com>
7534 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7537 2012-07-02 Stan Shebs <stan@codesourcery.com>
7539 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7540 (ax.o): Add it to build rule.
7542 (OBS): Add format.o.
7543 (IPA_OBS): Add format.o.
7544 * server.c (handle_query): Claim support for breakpoint commands.
7545 (process_point_options): Add command case.
7546 (process_serial_event): Leave running if there are printfs in
7548 * mem-break.h (any_persistent_commands): Declare.
7549 (add_breakpoint_commands): Declare.
7550 (gdb_no_commands_at_breakpoint): Declare.
7551 (run_breakpoint_commands): Declare.
7552 * mem-break.c (struct point_command_list): New struct.
7553 (struct breakpoint): New field command_list.
7554 (any_persistent_commands): New function.
7555 (add_commands_to_breakpoint): New function.
7556 (add_breakpoint_commands): New function.
7557 (gdb_no_commands_at_breakpoint): New function.
7558 (run_breakpoint_commands): New function.
7559 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7561 * ax.c: Include format.h.
7562 (ax_printf): New function.
7563 (gdb_eval_agent_expr): Add printf opcode.
7565 2012-06-13 Yao Qi <yao@codesourcery.com>
7567 * server.c (start_inferior): Remove duplicated writes to fields
7568 'last_resume_kind' and 'last_status' of 'current_inferior'.
7570 2012-06-12 Yao Qi <yao@codesourcery.com>
7571 Pedro Alves <palves@redhat.com>
7573 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7575 * server.c (handle_v_cont): Extend comment.
7577 2012-06-11 Yao Qi <yao@codesourcery.com>
7579 * linux-low.c (linux_attach): Add 'static'.
7581 2012-06-06 Yao Qi <yao@codesourcery.com>
7583 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7585 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7587 Fix gcc -flto compilation warning.
7588 * server.c (main): Make variable multi_mode and attach volatile.
7590 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7592 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7593 if the platform doesn't know about it.
7595 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7597 * Makefile.in (SFILES): Add linux-tile-low.c.
7598 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7599 * configure.srv: Handle tilegx-*-linux*.
7600 * linux-tile-low.c: New file.
7602 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7604 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7606 2012-05-24 Pedro Alves <palves@redhat.com>
7610 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7612 2012-05-24 Pedro Alves <palves@redhat.com>
7616 Replace target_signal with gdb_signal throughout.
7618 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7620 * linux-low.c (linux_store_registers): Avoid the copying sequence
7621 when no data has been retrieved by ptrace.
7623 2012-05-22 Will Deacon <will.deacon@arm.com>
7625 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7626 Include asm/ptrace.h.
7627 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7630 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7632 * linux-low.c (linux_store_registers): Don't re-retrieve data
7633 with ptrace that has already been obtained from /proc. Always
7634 copy any data retrieved with ptrace to the buffer supplied.
7636 2012-05-11 Yao Qi <yao@codesourcery.com>
7637 Pedro Alves <palves@redhat.com>
7639 * linux-low.c (enum stopping_threads_kind): New.
7640 (stopping_threads): Change type to `enum stopping_threads_kind'.
7641 (handle_extended_wait): If stopping and suspending threads, leave
7642 the new_lwp suspended too.
7643 (linux_wait_for_event): Adjust.
7644 (stop_all_lwps): Set `stopping_threads' to
7645 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7646 whether we're suspending threads or just stopping them. Assert no
7649 2012-04-29 Yao Qi <yao@codesourcery.com>
7651 * server.h: Move some code to ...
7652 * gdbthread.h: ... here. New.
7653 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7654 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7655 (nto-low.o, win32-low.o): Likewise.
7656 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7657 * regcache.c, remote-utils.c, server.c: Likewise.
7658 * target.c, tracepoint.c, win32-low.c: Likewise.
7660 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7662 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7663 (PTRACE_ARG4_TYPE): Likewise.
7664 (PTRACE_XFER_TYPE): Likewise.
7665 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7666 ptrace to PTRACE_ARG3_TYPE.
7667 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7668 (PTRACE_ARG4_TYPE): Likewise.
7669 (PTRACE_XFER_TYPE): Likewise.
7670 (linux_detach_one_lwp): Cast fourth argument of
7671 ptrace to long then PTRACE_ARG4_TYPE.
7672 (regsets_fetch_inferior_registers): Cast third argument of
7673 ptrace to long then PTRACE_ARG3_TYPE.
7674 (regsets_store_inferior_registers): Likewise.
7676 2012-04-20 Pedro Alves <palves@redhat.com>
7678 * configure: Regenerate.
7680 2012-04-19 Pedro Alves <palves@redhat.com>
7682 * Makefile.in (GNULIB_BUILDDIR): New.
7683 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7684 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7685 (all, install-only, uninstall, clean-info, all-lib, clean): No
7686 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7687 (maintainer-clean realclean distclean): Use subdir_do.
7689 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7690 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7691 * acinclude.m4: Include acx_configure_dir.m4.
7692 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7693 calls. Call AC_PROG_RANLIB. Configure gnulib using
7696 (GNULIB_STDINT_H): Adjust.
7697 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7698 * gdbreplay.c: Include build-gnulib/config.h.
7699 * server.h: Likewise.
7700 * aclocal.m4: Regenerate.
7701 * config.in: Regenerate.
7702 * configure: Regenerate.
7704 2012-04-19 Pedro Alves <palves@redhat.com>
7706 * Makefile.in (LIBGNU, INCGNU): Adjust.
7707 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7708 (all, install-only, uninstall, clean-info, all-lib, clean)
7709 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7710 * configure.ac: Adjust AC_OUTPUT output.
7711 * aclocal.m4: Regenerate.
7712 * configure: Regenerate.
7714 2012-04-19 Pedro Alves <palves@redhat.com>
7716 * Makefile.in (generated_files): New.
7717 (server_h): Remove the explicit dependency on config.h, and depend
7718 on $generated_files.
7720 2012-04-19 Pedro Alves <palves@redhat.com>
7722 * Makefile.in (INCGNU): Add -Ignulib.
7724 2012-04-19 Pedro Alves <palves@redhat.com>
7726 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7727 (INCGNU): ... this, and spell out -I here.
7728 (GNULIB_LIB): Rename to ...
7730 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7732 2012-04-19 Pedro Alves <palves@redhat.com>
7734 * config.in: Regenerate.
7736 2012-04-19 Pedro Alves <palves@redhat.com>
7738 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7739 * server.h (memmem): Remove declaration.
7740 * config.in: Regenerate.
7741 * configure: Regenerate.
7743 2012-04-19 Yao Qi <yao@codesourcery.com>
7745 * Makefile.in (SFILES): Add common/vec.c.
7749 2012-04-19 Yao Qi <yao@codesourcery.com>
7751 * remote-utils.c (prepare_resume_reply): Replace with macro
7752 target_core_of_thread.
7753 * server.c (handle_qxfer_threads_proper): Likewise.
7754 * target.h (traget_core_of_thread): New macro.
7756 2012-04-18 Pedro Alves <palves@redhat.com>
7758 * aclocal.m4: Regenerate.
7759 * configure: Regenerate.
7761 2012-04-16 Yao Qi <yao@codesourcery.com>
7763 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7764 duplicated on address.
7766 2012-04-16 Yao Qi <yao@codesourcery.com>
7768 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7769 (struct tracepoint_action_ops) <send>: New field.
7770 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7771 (agent_expr_send, x_tracepoint_action_send): New.
7772 (l_tracepoint_action_send): New.
7773 (cmd_qtdp): Download and install tracepoint
7774 according to `use_agent'.
7775 (run_inferior_command): Add one more parameter `len'.
7777 (tracepoint_send_agent): New.
7778 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7780 2012-04-16 Yao Qi <yao@codesourcery.com>
7782 * tracepoint.c (download_tracepoints): Moved to ...
7783 (cmd_qtstart): ... here.
7785 2012-04-14 Yao Qi <yao@codesourcery.com>
7787 * tracepoint.c: Include inttypes.h.
7788 (struct collect_memory_action): Use sized types.
7789 (struct tracepoint): Likewise.
7790 (cmd_qtdp, stop_tracing): Update print specifiers.
7791 (cmd_qtp, response_tracepoint): Likewise.
7792 (collect_data_at_tracepoint): Likewise.
7793 (collect_data_at_step): Likewise.
7795 2012-04-14 Yao Qi <yao@codesourcery.com>
7797 Import gnulib module inttypes.
7798 * aclocal.m4, config.in, configure: Regenerated.
7800 2012-04-14 Yao Qi <yao@codesourcery.com>
7802 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7803 Makefile and config.status at last.
7805 2012-04-13 Yao Qi <yao@codesourcery.com>
7807 * tracepoint.c: Include stdint.h unconditionally.
7809 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7811 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7812 on BFD_HAVE_SYS_PROCFS_TYPE.
7813 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7814 * configure: Regenerate.
7815 * config.in: Likewise.
7817 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7819 * Makefile.in (clean): Also remove x32.c x32-linux.c
7820 x32-avx.c x32-avx-linux.c.
7821 (x32.o): New target.
7823 (x32-linux.o): Likewise.
7824 (x32-linux.c): Likewise.
7825 (x32-avx.o): Likewise.
7826 (x32-avx.c): Likewise.
7827 (x32-avx-linux.o): Likewise.
7828 (x32-avx-linux.c): Likewise.
7830 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7831 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7832 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7833 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7834 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7835 i386/x32-avx-linux.xml.
7837 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7838 (init_registers_x32_avx_linux): Likwise.
7839 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7840 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7842 2012-04-13 Pedro Alves <palves@redhat.com>
7844 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7845 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7846 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7847 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7850 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7852 * linux-x86-low.c (compat_x32_clock_t): New.
7853 (compat_x32_siginfo_t): Likewise.
7854 (compat_x32_siginfo_from_siginfo): Likewise.
7855 (siginfo_from_compat_x32_siginfo): Likewise.
7856 (linux_is_elf64): Likewise.
7857 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7858 and siginfo_from_compat_x32_siginfo for x32.
7859 (x86_arch_setup): Set linux_is_elf64.
7861 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7864 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7866 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7867 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7868 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7869 compatible with process.
7871 2012-04-12 Yao Qi <yao@codesourcery.com>
7873 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7874 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7875 (install-only, install-info, clean): Handle sub dir gnulib.
7876 (all-lib, am--refresh): New targets.
7877 (memmem.o): Remove target.
7878 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7879 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7880 (AC_REPLACE_FUNCS): Remove memmem.
7881 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7882 (AC_OUTPUT): Generate Makefile in gnulib/.
7883 * aclocal.m4, config.in, configure: Regenerated.
7885 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7887 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7889 2012-04-05 Pedro Alves <palves@redhat.com>
7891 -Werror=strict-aliasing
7893 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7896 2012-04-04 Pedro Alves <palves@redhat.com>
7898 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7899 (sparc_store_gregset_from_stack, sparc_store_gregset)
7900 (sparc_breakpoint_at): Fix formatting.
7902 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7904 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7906 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7907 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7908 * config.in: Regenerate.
7909 * configure: Likewise.
7911 2012-03-29 Pedro Alves <palves@redhat.com>
7913 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7914 Correct ptrace arguments.
7916 2012-03-28 Pedro Alves <palves@redhat.com>
7918 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7919 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7920 (IA64_FR1_REGNUM): New defines.
7921 (ia64_fetch_register): New.
7922 (the_low_target): Install it.
7923 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7925 * linux-low.c (linux_fetch_registers): Try the
7926 the_low_target.fetch_register hook first.
7928 * linux-arm-low.c (the_low_target): Adjust.
7929 * linux-bfin-low.c (the_low_target): Adjust.
7930 * linux-cris-low.c (the_low_target): Adjust.
7931 * linux-crisv32-low.c (the_low_target): Adjust.
7932 * linux-m32r-low.c (the_low_target): Adjust.
7933 * linux-m68k-low.c (the_low_target): Adjust.
7934 * linux-mips-low.c (the_low_target): Adjust.
7935 * linux-ppc-low.c (the_low_target): Adjust.
7936 * linux-s390-low.c (the_low_target): Adjust.
7937 * linux-sh-low.c (the_low_target): Adjust.
7938 * linux-sparc-low.c (the_low_target): Adjust.
7939 * linux-tic6x-low.c (the_low_target): Adjust.
7940 * linux-x86-low.c (the_low_target): Adjust.
7941 * linux-xtensa-low.c (the_low_target): Adjust.
7943 2012-03-26 Pedro Alves <palves@redhat.com>
7945 * server.c (handle_qxfer_libraries): Don't bail early if
7946 the_target->qxfer_libraries_svr4 is not NULL.
7948 2012-03-26 Pedro Alves <palves@redhat.com>
7950 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7952 2012-03-23 Pedro Alves <palves@redhat.com>
7954 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7955 "library-list-svr4" element's start tag when the the DSO list is
7958 2012-03-23 Pedro Alves <palves@redhat.com>
7960 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7961 a variable whose type size is the same as the inferior's pointer
7964 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7966 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7968 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7969 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7970 * linux-low.h: Include <signal.h>.
7971 (struct siginfo): Remove forward declaration.
7972 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7975 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7977 * .gitignore: Ignore more files.
7979 2012-03-19 Pedro Alves <palves@redhat.com>
7980 Jan Kratochvil <jan.kratochvil@redhat.com>
7982 * server.c (cont_thread, general_thread): Add describing comments.
7983 (start_inferior): Clear `cont_thread'.
7984 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7987 2012-03-15 Yao Qi <yao@codesourcery.com>
7989 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7991 (cmd_qtdp): ... here.
7993 2012-03-15 Yao Qi <yao@codesourcery.com>
7995 * tracepoint.c (struct tracepoint_action_ops): New.
7996 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7997 (m_tracepoint_action_download): New.
7998 (r_tracepoint_action_download): New.
7999 (x_tracepoint_action_download): New.
8000 (l_tracepoint_action_download): New.
8001 (add_tracepoint_action): Install `action->ops' according type.
8002 (download_tracepoint_1): Move code `download' function pointer
8003 of various tracepoint_action_ops.
8005 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8007 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8008 linux_ptrace_attach_warnings.
8010 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8012 * Makefile.in (linux-ptrace.o): New.
8013 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8014 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8015 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8016 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8017 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8019 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8021 2012-03-08 Yao Qi <yao@codesourcery.com>
8022 Pedro Alves <palves@redhat.com>
8024 Fix PR server/13392.
8025 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8027 * tracepoint.c (remove_tracepoint): New.
8028 (cmd_qtdp): Call remove_tracepoint when failed to install.
8030 2012-03-07 Pedro Alves <palves@redhat.com>
8032 * linux-low.c (get_detach_signal): New.
8033 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8034 Pass on pending signals to PTRACE_DETACH. Check the result of the
8036 * server.c (program_signals, program_signals_p): New.
8037 (handle_general_set): Handle QProgramSignals.
8038 * server.h (program_signals, program_signals_p): Declare.
8040 2012-03-05 Pedro Alves <palves@redhat.com>
8041 Jan Kratochvil <jan.kratochvil@redhat.com>
8043 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8046 2012-03-03 Yao Qi <yao@codesourcery.com>
8048 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8049 agent_look_up_symbols.
8051 2012-03-03 Yao Qi <yao@codesourcery.com>
8053 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8054 (linux-x86-low.o): Likewise.
8055 * server.h: Remove in_process_agent_loaded.
8056 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8060 2012-03-03 Yao Qi <yao@codesourcery.com>
8062 * tracepoint.c (gdb_agent_capability): New global.
8063 (in_process_agent_loaded_ust): Renamed to
8064 `in_process_agent_supports_ust'.
8066 (in_process_agent_supports_ust): Call agent_capability_check.
8067 (clear_installed_tracepoints): Assert that agent supports
8070 2012-03-03 Yao Qi <yao@codesourcery.com>
8072 * linux-low.c (linux_supports_agent): New.
8073 (linux_target_ops): Initialize field `supports_agent' with
8074 linux_supports_agent.
8075 * target.h (struct target_ops) <supports_agent>: New.
8076 (target_supports_agent): New macro.
8077 * server.c (handle_general_set): Handle packet 'QAgent'.
8078 (handle_query): Send `QAgent+'.
8079 * Makefile.in (server.o): Depends on agent.h.
8081 2012-03-03 Yao Qi <yao@codesourcery.com>
8083 * Makefile.in (OBS): Add agent.o.
8084 Add new rule for agent.o.
8085 Track dependence of tracepoint.c on agent.h.
8086 * tracepoint.c (run_inferior_command_1):
8087 (run_inferior_command): Call agent_run_command.
8088 (gdb_ust_connect_sync_socket): Deleted. Move it to
8090 (resume_thread, stop_thread): Likewise.
8091 (gdb_ust_socket_init): Renamed to ...
8092 (gdb_agent_socket_init): ... New.
8093 (gdb_ust_thread): Renamed to ...
8094 (gdb_agent_helper_thread): ... New.
8095 (gdb_ust_init): Move some code to ...
8096 (gdb_agent_init): ... here. New.
8097 [HAVE_UST]: Call gdb_ust_init.
8098 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8099 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8100 * config.in, configure: Regenerated.
8102 2012-03-02 Pedro Alves <palves@redhat.com>
8104 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8105 * linux-low.c (struct simple_pid_list): New.
8106 (stopped_pids): New a struct simple_pid_list pointer.
8107 (add_to_pid_list, pull_pid_from_list): New.
8108 (handle_extended_wait): Don't assume the first signal new children
8109 report is SIGSTOP. Adjust call to pull_pid_from_list.
8110 (linux_wait_for_lwp): Adjust.
8112 2012-03-02 Yao Qi <yao@codesourcery.com>
8114 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8117 2012-03-02 Yao Qi <yao@codesourcery.com>
8119 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8120 `stop_pc' and `tpoint'. Update caller.
8122 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8124 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8125 * linux-low.c (use_linux_regsets): New macro.
8126 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8127 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8128 (linux_register_in_regsets): New function.
8129 (usr_fetch_inferior_registers): Skip registers covered by
8131 (usr_store_inferior_registers): Likewise.
8132 (usr_fetch_inferior_registers): New macro.
8133 (usr_store_inferior_registers): Likewise.
8134 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8135 (linux_store_registers): Likewise.
8136 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8138 (init_registers_mips64_dsp_linux): Likewise.
8139 (init_registers_mips_linux): New macro.
8140 (init_registers_mips_dsp_linux): Likewise.
8141 (mips_dsp_num_regs): Likewise.
8142 (DSP_BASE, DSP_CONTROL): New fallback macros.
8143 (mips_base_regs): New macro.
8144 (mips_regmap): Use it. Fix the size.
8145 (mips_dsp_regmap): New variable.
8146 (mips_dsp_regset_bitmap): Likewise.
8147 (mips_arch_setup): New function.
8148 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8150 (mips_cannot_store_register): Likewise.
8151 (the_low_target): Update .arch_setup, .num_regs and .regmap
8152 initializers. Add .regset_bitmap initializer.
8153 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8155 * linux-bfin-low.c (the_low_target): Likewise.
8156 * linux-cris-low.c (the_low_target): Likewise.
8157 * linux-crisv32-low.c (the_low_target): Likewise.
8158 * linux-ia64-low.c (the_low_target): Likewise.
8159 * linux-m32r-low.c (the_low_target): Likewise.
8160 * linux-m68k-low.c (the_low_target): Likewise.
8161 * linux-ppc-low.c (the_low_target): Likewise.
8162 * linux-s390-low.c (the_low_target): Likewise.
8163 * linux-sh-low.c (the_low_target): Likewise.
8164 * linux-sparc-low.c (the_low_target): Likewise.
8165 * linux-tic6x-low.c (the_low_target): Likewise.
8166 * linux-x86-low.c (the_low_target): Likewise.
8167 * linux-xtensa-low.c (the_low_target): Likewise.
8168 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8169 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8170 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8172 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8173 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8175 2012-02-29 Yao Qi <yao@codesourcery.com>
8176 Pedro Alves <palves@redhat.com>
8178 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8179 `step_over_finished' is true.
8181 2012-02-27 Pedro Alves <palves@redhat.com>
8183 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8184 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8186 2012-02-27 Pedro Alves <palves@redhat.com>
8189 * linux-low.c (pid_is_stopped): New.
8190 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8192 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8194 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8197 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8199 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8201 2012-02-24 Luis Machado <lgustavo@codesourcery>
8203 * server.c (handle_query): Advertise support for target-side
8204 breakpoint condition evaluation.
8205 (process_point_options): New function.
8206 (process_serial_event): When inserting a breakpoint, check for
8207 a target-side condition that should be evaluated.
8209 * mem-break.c: Include regcache.h and ax.h.
8210 (point_cond_list_t): New data structure.
8211 (breakpoint) <cond_list>: New field.
8212 (find_gdb_breakpoint_at): Make non-static.
8213 (delete_gdb_breakpoint_at): Clear any target-side
8215 (clear_gdb_breakpoint_conditions): New function.
8216 (add_condition_to_breakpoint): Likewise.
8217 (add_breakpoint_condition): Likewise.
8218 (gdb_condition_true_at_breakpoint): Likewise.
8219 (gdb_breakpoint_here): Return result directly instead
8220 of going through a local variable.
8222 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8223 (clear_gdb_breakpoint_conditions): Likewise.
8224 (add_breakpoint_condition): Likewise.
8225 (gdb_condition_true_at_breakpoint): Likewise.
8227 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8228 (need_step_over_p): Take target-side breakpoint condition into
8231 2012-02-24 Luis Machado <lgustavo@codesourcery>
8233 * server.h: Include tracepoint.h.
8234 (agent_mem_read, agent_get_trace_state_variable_value,
8235 agent_set_trace_state_variable_value,
8236 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8237 get_set_tsv_func_addr): New prototypes.
8239 * ax.h: New include file.
8240 * ax.c: New source file.
8242 * tracepoint.c: Include ax.h.
8243 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8244 agent_expr, eval_result_type): Move to ax.h.
8245 (parse_agent_expr): Rename to ...
8246 (gdb_parse_agent_expr): ... this, make it non-static and move
8248 (unparse_agent_expr) Rename to ...
8249 (gdb_unparse_agent_expr): ... this, make it non-static and move
8251 (eval_agent_expr): Rename to ...
8252 (eval_tracepoint_agent_expr): ... this.
8253 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8254 forward declarations.
8255 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8256 (agent_get_trace_state_variable_value): New function.
8257 (agent_set_trace_state_variable_value): New function.
8258 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8259 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8260 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8261 (condition_true_at_tracepoint): Likewise.
8262 (parse_agent_expr): Rename to ...
8263 (gdb_parse_agent_expr): ... this and move to ax.c.
8264 (unparse_agent_expr): Rename to ...
8265 (gdb_unparse_agent_expr): ... this and move to ax.c.
8266 (gdb_agent_op_name): Move to ax.c.
8267 (eval_agent_expr): Rename to ...
8268 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8270 (eval_tracepoint_agent_expr): New function.
8271 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8273 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8275 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8276 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8277 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8278 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8279 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8280 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8281 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8282 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8283 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8284 (compile_bytecodes): Remove forward declaration.
8285 (is_goto_target): Move to ax.c.
8286 (compile_bytecodes): Move to ax.c and call
8287 agent_get_trace_state_variable_value (...) and
8288 agent_set_trace_state_variable_value (...).
8290 * Makefile.in: Update ax.c and IPA dependencies.
8292 2012-02-24 Pedro Alves <palves@redhat.com>
8294 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8295 (cmd_bigqtbuffer_circular): ... this. Only handle
8296 'QTBuffer:circular:'.
8297 (handle_tracepoint_general_set): Adjust.
8299 2012-02-16 Yao Qi <yao@codesourcery.com>
8301 * inferiors.c: Move code to ...
8302 * dll.c: .... here. New.
8303 * server.h: Declare clear_dlls.
8304 * Makefile.in (SFILES): Add dll.c.
8308 2012-02-11 Yao Qi <yao@codesourcery.com>
8310 * server.c: (handle_monitor_command): Add a new parameter
8312 (handle_query): Update caller.
8314 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8316 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8317 * configure, config.in: Regenerate.
8318 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8321 2012-02-02 Pedro Alves <palves@redhat.com>
8323 Try SIGKILL first, then PTRACE_KILL.
8324 * linux-low.c (linux_kill_one_lwp): New.
8325 (linux_kill_one_lwp): Rename to ...
8326 (kill_one_lwp_callback): ... this. Use the new
8329 2012-02-02 Pedro Alves <palves@redhat.com>
8331 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8334 2012-01-27 Pedro Alves <palves@redhat.com>
8336 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8337 (elf_64_file_p): Make static.
8338 (linux_pid_exe_is_elf_64_file): New.
8339 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8340 Delete declarations.
8341 (linux_pid_exe_is_elf_64_file): Declare.
8342 * linux-x86-low.c (x86_arch_setup): Use
8343 linux_pid_exe_is_elf_64_file.
8345 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8347 * linux-low.c (linux_wait_for_event_1): Rename to ...
8348 (linux_wait_for_event): ... here and merge it with former
8349 linux_wait_for_event - new variable wait_ptid, use it.
8350 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8352 2012-01-23 Pedro Alves <palves@redhat.com>
8354 * server.c (main): Avoid yet another case of infinite loop while
8355 detaching/killing after a longjmp.
8357 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8360 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8362 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8364 * hostio.c (handle_readlink): New function.
8365 (handle_vFile): Call it to handle "vFile:readlink" packets.
8367 2012-01-20 Pedro Alves <palves@redhat.com>
8368 Ulrich Weigand <ulrich.weigand@linaro.org>
8370 * server.c (handle_v_requests): Only support vAttach and vRun to
8371 start multiple processes when in extended protocol mode.
8373 2012-01-17 Pedro Alves <palves@redhat.com>
8375 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8376 memalign plus mprotect to allocate the scratch buffer.
8378 2012-01-13 Pedro Alves <palves@redhat.com>
8380 * server.c (attach_inferior): Clear `cont_thread'.
8382 2012-01-13 Pedro Alves <palves@redhat.com>
8384 * server.c (main): Avoid infinite loop while detaching/killing
8387 2012-01-09 Doug Evans <dje@google.com>
8389 * server.c (start_inferior): Set last_ptid in --wrapper case.
8391 2012-01-06 Yao Qi <yao@codesourcery.com>
8393 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8395 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8397 2012-01-04 Yao Qi <yao@codesourcery.com>
8399 * tracepoint.c (cmd_qtdp): Print debug message
8400 for static tracepoint.
8402 2012-01-04 Yao Qi <yao@codesourcery.com>
8404 * tracepoint.c (trace_vdebug): Differentiate debug message
8405 between gdbserver and IPA.
8407 2012-01-03 Yao Qi <yao@codesourcery.com>
8409 * tracepoint.c (tracepoint_was_hit): Don't collect for
8412 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8414 * terminal.h: Reformat copyright header.
8416 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8418 * server.c (gdbserver_version): Update copyright year.
8419 * gdbreplay.c (gdbreplay_version): Likewise.
8421 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8423 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8426 2011-12-18 Hui Zhu <teawater@gmail.com>
8427 * linux-low.c (linux_create_inferior): Save return value to ret.
8429 2011-12-18 Hui Zhu <teawater@gmail.com>
8431 * linux-low.c (linux_create_inferior): Save return value to ret.
8433 2011-12-16 Doug Evans <dje@google.com>
8435 * linux-low.c (linux_create_inferior): If stdio connection,
8436 redirect stdin from /dev/null, stdout to stderr.
8437 * remote-utils.c (remote_is_stdio): New static global.
8438 (remote_connection_is_stdio): New function.
8439 (remote_prepare): Handle stdio connection.
8440 (remote_open): Ditto.
8441 (remote_close): Don't close stdin for stdio connections.
8442 (read_prim,write_prim): New functions. Replace all calls to
8443 read/write to these.
8444 * server.c (main): Watch for "-" argument. Move call to
8445 remote_prepare before start_inferior.
8446 * server.h (STDIO_CONNECTION_NAME): New macro.
8447 (remote_connection_is_stdio): Declare.
8449 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8450 in debugging output.
8452 2011-12-15 Yao Qi <yao@codesourcery.com>
8454 * tracepoint.c: Include sys/syscall.h.
8455 (gdb_ust_thread): Remove preprocessor conditional.
8457 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8459 * linux-low.c (linux_detach_one_lwp): Call
8460 the_low_target.prepare_to_resume before detaching.
8462 2011-12-14 Yao Qi <yao@codesourcery.com>
8464 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8467 2011-12-14 Yao Qi <yao@codesourcery.com>
8469 * i386-low.c (i386_low_stopped_data_address): Initialize local
8472 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8476 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8477 DR_CONTROL unless necessary. Extend comments.
8478 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8479 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8481 2011-12-13 Yao Qi <yao@codesourcery.com>
8483 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8485 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8487 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8489 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8490 Print new debug message for such case.
8492 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8494 Fix overlapping memcpy.
8495 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8496 the read_inferior_memory transfer.
8497 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8498 write_inferior_memory transfer.
8499 (set_fast_tracepoint_jump): New variable buf. Use it for the
8500 read_inferior_memory and write_inferior_memory transfers.
8501 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8502 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8503 Use it for the write_inferior_memory transfer.
8504 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8507 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8509 * linux-low.c (fetch_register, store_register): Make code
8510 consistent, fix formatting.
8512 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8514 * linux-low.c (usr_store_inferior_registers): Factor out code
8515 to handle individual registers into...
8516 (store_register): ... this new function.
8518 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8520 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8521 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8522 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8523 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8524 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8525 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8526 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8527 (srv_xmlfiles): Add new XML files.
8529 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8531 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8532 (init_registers_s390_linux32v1): Add prototype.
8533 (init_registers_s390_linux32v2): Likewise.
8534 (init_registers_s390_linux64v1): Likewise.
8535 (init_registers_s390_linux64v2): Likewise.
8536 (init_registers_s390x_linux64v1): Likewise.
8537 (init_registers_s390x_linux64v2): Likewise.
8538 (s390_num_regs): Increment to 52.
8539 (s390_regmap): Add orig_r2 register.
8540 (s390_num_regs_3264): Increment to 68.
8541 (s390_regmap_3264): Add orig_r2 register.
8542 (s390_collect_ptrace_register): Handle orig_r2 register.
8543 (s390_supply_ptrace_register): Likewise.
8544 (s390_fill_last_break): New function.
8545 (s390_store_last_break): Likewise.
8546 (s390_fill_system_call): New function.
8547 (s390_store_system_call): Likewise.
8548 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8550 (s390_check_regset): New function.
8551 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8552 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8553 Update target_regsets for available register sets.
8555 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8556 Jan Kratochvil <jan.kratochvil@redhat.com>
8558 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8559 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8561 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8562 * linux-low.h (struct process_info_private): New member r_debug.
8563 * server.c (handle_qxfer_libraries): Call
8564 the_target->qxfer_libraries_svr4.
8565 (handle_qxfer_libraries_svr4): New function.
8566 (qxfer_packets): New entry "libraries-svr4".
8567 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8568 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8569 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8570 PACKET_qXfer_libraries_svr4.
8572 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8574 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8575 PSW address/mask between 8-byte and 16-byte formats.
8576 (s390_supply_ptrace_register): Likewise.
8577 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8578 basic addressing mode bit.
8580 2011-11-24 Stan Shebs <stan@codesourcery.com>
8582 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8584 2011-11-17 Stan Shebs <stan@codesourcery.com>
8586 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8587 (tracing_start_time): New global.
8588 (tracing_stop_time): New global.
8589 (tracing_user_name): New global.
8590 (tracing_notes): New global.
8591 (tracing_stop_note): New global.
8592 (cmd_qtstart): Set traceframe_usage, start_time.
8593 (stop_tracing): Set stop_time.
8594 (cmd_qtstatus): Report additional status.
8595 (cmd_qtp): New function.
8596 (handle_tracepoint_query): Call it.
8597 (cmd_qtnotes): New function.
8598 (handle_tracepoint_general_set): Call it.
8599 (get_timestamp): Rename from tsv_get_timestamp.
8601 2011-11-14 Stan Shebs <stan@codesourcery.com>
8602 Kwok Cheung Yeung <kcy@codesourcery.com>
8604 * linux-x86-low.c (small_jump_insn): New.
8605 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8606 trampoline and error message, build a trampoline and issue a small
8607 jump instruction to it.
8608 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8609 trampoline and error message.
8610 (x86_get_min_fast_tracepoint_insn_len): New.
8611 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8612 * linux-low.h (struct linux_target_ops): Add arguments to
8613 install_fast_tracepoint_jump_pad operation, add new operation.
8614 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8616 (linux_get_min_fast_tracepoint_insn_len): New function.
8617 (linux_target_op): Add new operation.
8618 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8619 (gdb_trampoline_buffer_end): Ditto.
8620 (gdb_trampoline_buffer_error): Ditto.
8621 (struct ipa_sym_addresses): Add fields for new IPA variables.
8622 (symbol_list): Add entries for new IPA variables.
8623 (struct tracepoint): Add fields to hold the address range of the
8624 trampoline used by the tracepoint.
8625 (trampoline_buffer_head): New static variable.
8626 (trampoline_buffer_tail): Ditto.
8627 (claim_trampoline_space): New function.
8628 (have_fast_tracepoint_trampoline_buffer): New function.
8629 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8631 (install_fast_tracepoint): Ditto, also add error buffer argument.
8632 (cmd_qtminftpilen): New function.
8633 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8634 (fast_tracepoint_from_trampoline_address): New function.
8635 (fast_tracepoint_collecting): Handle trampoline as part of jump
8637 (set_trampoline_buffer_space): New function.
8638 (initialize_tracepoint): Initialize new IPA variables.
8639 * target.h (struct target_ops): Add arguments to
8640 install_fast_tracepoint_jump_pad operation, add new
8641 get_min_fast_tracepoint_insn_len operation.
8642 (target_get_min_fast_tracepoint_insn_len): New.
8643 (install_fast_tracepoint_jump_pad): Add arguments.
8644 * server.h (IPA_BUFSIZ): Define.
8645 * linux-i386-ipa.c: Include extra header files.
8646 (initialize_fast_tracepoint_trampoline_buffer): New function.
8647 (initialize_low_tracepoint): Call it.
8648 * server.h (set_trampoline_buffer_space): Declare.
8649 (claim_trampoline_space): Ditto.
8650 (have_fast_tracepoint_trampoline_buffer): Ditto.
8652 2011-11-14 Yao Qi <yao@codesourcery.com>
8654 * server.c (handle_query): Handle InstallInTrace for qSupported.
8655 * tracepoint.c (add_tracepoint): Sort list.
8656 (install_tracepoint, download_tracepoint): New.
8657 (cmd_qtdp): Call them to install and download tracepoints.
8658 (sort_tracepoints): Removed.
8659 (cmd_qtstart): Update.
8661 2011-11-14 Yao Qi <yao@codesourcery.com>
8663 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8664 * mem-break.h: Declare.
8665 * tracepoint.c (cmd_qtstart): Move some code to ...
8666 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8668 (download_tracepoints): Move some code to ...
8669 (download_tracepoint_1): ... here. New.
8671 2011-11-08 Yao Qi <yao@codesourcery.com>
8673 * remote-utils.c (relocate_instruction): A comment fix.
8675 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8677 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8678 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8679 dr_status_mirror and dr_control_mirror from debug_reg_state.
8680 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8681 (i386_initial_stuff): Remove use of deleted globals.
8682 (i386_get_thread_context, i386_set_thread_context,
8683 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8684 from debug_reg_state.
8686 2011-11-05 Yao Qi <yao@codesourcery.com>
8688 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8689 address as TPOINT's.
8691 2011-11-02 Stan Shebs <stan@codesourcery.com>
8693 * tracepoint.c (agent_mem_read_string): New function.
8694 (eval_agent_expr): Call it for tracenz.
8695 * server.c (handle_query): Report support for tracenz.
8697 2011-11-02 Yao Qi <yao@codesourcery.com>
8699 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8701 2011-11-02 Yao Qi <yao@codesourcery.com>
8703 * target.h: Fix a typo in comment.
8705 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8707 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8708 clobber the breakpoints' shadows with fast tracepoint jumps.
8709 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8710 * target.c (write_inferior_memory): Also pass MYADDR down to
8713 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8715 * configure.ac: Check support for personality routine.
8716 * configure: Regenerate.
8717 * config.in: Likewise.
8718 * linux-low.c: Include <sys/personality.h>.
8719 Define ADDR_NO_RANDOMIZE if necessary.
8720 (linux_create_inferior): Disable address space randomization when
8721 forking inferior, if requested.
8722 (linux_supports_disable_randomization): New function.
8723 (linux_target_ops): Install it.
8724 * server.h (disable_randomization): Declare.
8725 * server.c (disable_randomization): New global variable.
8726 (handle_general_set): Handle QDisableRandomization.
8727 (handle_query): Likewise for qSupported.
8728 (main): Support --disable-randomization and --no-disable-randomization
8729 command line arguments.
8730 * target.h (struct target_ops): Add supports_disable_randomization.
8731 (target_supports_disable_randomization): New macro.
8733 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8735 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8737 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8738 [!PT_GETDSBT] (target_loadmap): New definition.
8739 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8740 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8741 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8742 and PT_GETDSBT to LINUX_LOADMAP.
8743 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8744 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8746 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8748 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8749 (arm_linux_hwbp_cap): New static variable.
8750 (arm_linux_get_hwbp_cap): Replace by ...
8751 (arm_linux_init_hwbp_cap): ... this new function.
8752 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8753 (arm_linux_get_hw_watchpoint_count): Likewise.
8754 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8755 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8756 (arm_prepare_to_resume): Use perror_with_name instead of error.
8758 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8760 * linux-arm-low.c: Include <signal.h>.
8761 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8762 (struct arm_linux_hwbp_cap): New data type.
8763 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8764 (struct arm_linux_hw_breakpoint): New data type.
8765 (MAX_BPTS, MAX_WPTS): Define.
8766 (struct arch_process_info, struct arch_lwp_info): New data types.
8767 (arm_linux_get_hwbp_cap): New function.
8768 (arm_linux_get_hw_breakpoint_count): Likewise.
8769 (arm_linux_get_hw_watchpoint_count): Likewise.
8770 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8771 (arm_hwbp_control_initialize): Likewise.
8772 (arm_hwbp_control_is_enabled): Likewise.
8773 (arm_hwbp_control_is_initialized): Likewise.
8774 (arm_hwbp_control_disable): Likewise.
8775 (arm_linux_hw_breakpoint_equal): Likewise.
8776 (arm_linux_hw_point_initialize): Likewise.
8777 (struct update_registers_data): New data structure.
8778 (update_registers_callback: New function.
8779 (arm_insert_point): Likewise.
8780 (arm_remove_point): Likewise.
8781 (arm_stopped_by_watchpoint): Likewise.
8782 (arm_stopped_data_address): Likewise.
8783 (arm_new_process): Likewise.
8784 (arm_new_thread): Likewise.
8785 (arm_prepare_to_resume): Likewise.
8786 (the_low_target): Register arm_insert_point, arm_remove_point,
8787 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8788 arm_new_thread, and arm_prepare_to_resume.
8790 2011-09-15 Stan Shebs <stan@codesourcery.com>
8792 * server.h (struct emit_ops): Add compare-goto fields.
8793 * tracepoint.c (gdb_agent_op_sizes): New table.
8794 (emit_eq_goto): New function.
8795 (emit_ne_goto): New function.
8796 (emit_lt_goto): New function.
8797 (emit_le_goto): New function.
8798 (emit_gt_goto): New function.
8799 (emit_ge_goto): New function.
8800 (is_goto_target): New function.
8801 (compile_bytecodes): Recognize special cases of compare-goto
8802 combinations and call specialized emitters for them.
8803 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8804 (amd64_emit_ne_goto): New function.
8805 (amd64_emit_lt_goto): New function.
8806 (amd64_emit_le_goto): New function.
8807 (amd64_emit_gt_goto): New function.
8808 (amd64_emit_ge_goto): New function.
8809 (amd64_emit_ops): Add the new functions.
8810 (i386_emit_eq_goto): New function.
8811 (i386_emit_ne_goto): New function.
8812 (i386_emit_lt_goto): New function.
8813 (i386_emit_le_goto): New function.
8814 (i386_emit_gt_goto): New function.
8815 (i386_emit_ge_goto): New function.
8816 (i386_emit_ops): Add the new functions.
8818 2011-09-08 Stan Shebs <stan@codesourcery.com>
8820 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8821 (i386_emit_epilogue): Restore %ebx.
8823 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8825 * server.c (step_thread): Remove definition.
8826 (process_serial_event): Don't handle Hs.
8827 * server.h (step_thread): Remove declaration.
8828 * target.c (set_desired_inferior): Remove use of step_thread.
8830 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8832 * linux-low.c: Include linux-procfs.h.
8833 (linux_attach_lwp_1): Update comments.
8834 (linux_attach): Scan for existing threads when attaching to a
8835 process that is the tgid.
8836 * Makefile.in: Update dependencies.
8838 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8840 * configure.srv: Add linux-procfs.o dependencies.
8842 2011-08-14 Yao Qi <yao@codesourcery.com>
8844 * target.h (struct target_ops): Fix indent.
8845 * win32-low.c (win32_target_ops): Fix comment.
8847 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8848 Yao Qi <yao@codesourcery.com>
8850 * Makefile.in (clean): Remove tic6x-*.c files.
8851 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8852 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8853 (tic6x-c64xp-linux.c): Likewise.
8854 * configure.srv: Add support for tic6x-*-uclinux.
8855 * linux-tic6x-low.c: New.
8856 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8858 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8859 Yao Qi <yao@codesourcery.com>
8861 * target.h (struct target_ops): Add read_loadmap.
8862 * linux-low.c (struct target_loadseg): New type.
8863 (struct target_loadmap): New type.
8864 (linux_read_loadmap): New function.
8865 (linux_target_ops): Add linux_read_loadmap.
8866 * server.c (handle_query): Support qXfer:fdpic:read packet.
8867 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8870 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8872 * win32-low.c: Include <stdint.h>.
8874 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8876 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8877 to the inferior here.
8878 (i386_remove_aligned_watchpoint): Ditto.
8879 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8880 fit part of the watchpoint in the debug registers.
8881 (i386_update_inferior_debug_regs): New.
8882 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8883 registers, and only update the inferior on success.
8884 (i386_low_remove_watchpoint): Ditto.
8886 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8888 * linux-low.c (compare_ints, unique, list_threads, show_process,
8889 linux_core_of_thread): Delete.
8890 (linux_target_ops): Change linux_core_of_thread to
8891 linux_common_core_of_thread.
8892 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8893 * utils.c (malloc_failure): Change type of argument.
8894 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8895 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8896 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8897 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8898 (IPA_OBJS): Add common-utils-ipa.o.
8899 (ptid_h, linux_osdata_h): New macros.
8900 (server_h): Add common/common-utils.h, common/xml-utils.h,
8901 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8903 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8904 ptid.o, buffer.o): New rules.
8905 (linux-low.o): Add common/linux-osdata.h as a dependency.
8906 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8907 * configure.ac: Add AC_HEADER_DIRENT check.
8908 * config.in: Regenerate.
8909 * configure: Regenerate.
8910 * remote-utils.c (xml_escape_text): Delete.
8911 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8912 buffer_xml_printf): Move to common/buffer.c.
8913 * server.c (main): Remove call to initialize_inferiors.
8914 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8915 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8916 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8917 internal_error, gdb_assert, gdb_assert_fail): Delete.
8918 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8919 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8921 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8922 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8923 initialize_inferiors): Delete.
8925 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8927 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8930 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8932 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8934 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8936 2011-05-26 Yao Qi <yao@codesourcery.com>
8938 * Makefile.in (thread-db.o): Track dependence to
8939 common/gdb_thread_db.h.
8940 * thread-db.c: include gdb_thread_db.h from right place.
8942 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8944 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8945 __FILE__ and __LINE__ to internal_error.
8947 2011-05-13 Doug Evans <dje@google.com>
8949 * thread-db.c (try_thread_db_load_from_sdir): New function.
8950 (try_thread_db_load_from_dir): New function.
8951 (thread_db_load_search): Handle $sdir, ignore $pdir.
8952 Remove trying of system directories if search of
8953 libthread-db-search-path fails, that is now done via $sdir.
8955 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8957 * server.c (handle_query): Add EnableDisableTracepoints to the list
8958 of supported features.
8959 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8961 (cmd_qtenable_disable): New.
8962 (cmd_qtstart): Install tracepoints even if disabled.
8963 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8964 receiving a QTEnable or QTDisable packet.
8965 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8966 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8968 (gdb_probe): Skip data collection if static tracepoint is disabled.
8970 2011-05-10 Doug Evans <dje@google.com>
8972 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8974 2011-05-04 Doug Evans <dje@google.com>
8976 * linux-low.c (linux_join): Skip process lookup.
8977 * spu-low.c (spu_join): Ditto.
8978 * server.c (join_inferiors_callback): Delete.
8979 (process_serial_event): For 'D' packet (detach) call join_inferior
8982 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8984 * README: Don't mention xscale*-*-linux*.
8985 * configure.srv (xscale*-*-linux*): Don't handle target.
8987 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8989 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8991 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8992 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8993 (i386_emit_void_call_2): Likewise.
8995 2011-04-26 Yao Qi <yao@codesourcery.com>
8997 * linux-low.c: Move common macros to linux-ptrace.h.
8998 Include linux-ptrace.h.
8999 * Makefile.in (linux_ptrace_h): New.
9000 (linux-low.o): Depends on linux-ptrace.h.
9002 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9004 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9005 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9006 (remote_prepare): New function with most of the TCP code from ...
9007 (remote_open): ... here. Detect PORT here unconditionally. Move also
9008 setting transport_is_reliable.
9009 * server.c (run_once): New variable.
9010 (gdbserver_usage): Document it.
9011 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9012 the first run if RUN_ONCE.
9013 * server.h (run_once, remote_prepare): New declarations.
9015 2011-04-19 Tom Tromey <tromey@redhat.com>
9017 * win32-low.c (handle_load_dll): Remove duplicate "the".
9019 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9021 Remove support for old Cygwin 1.5 versions.
9022 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9023 function to avoid warning.
9024 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9027 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9029 * gdbserver/server.h (Macro _): Define it if not available.
9031 2011-03-14 Michael Snyder <msnyder@vmware.com>
9033 * hostio.c (handle_close): Remove unnecessary null test.
9035 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9037 * Makefile.in (maintainer-clean realclean distclean): Remove
9038 "make ... subdir_do" command.
9040 2011-03-10 Michael Snyder <msnyder@vmware.com>
9042 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9044 * server.c (handle_v_run): Free alloced buffer on early return.
9046 2011-03-09 Yao Qi <yao@codesourcery.com>
9049 2011-03-04 Yao Qi <yao@codesourcery.com>
9051 * Makefile.in: Remove GNU make feature --directory.
9053 2011-03-05 Yao Qi <yao@codesourcery.com>
9055 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9056 (subdir_do): New make target. Copied from gdb/Makefile.
9057 (maintainer-clean, realclean, distclean, clean): Call corresponding
9058 make targets in common/Makefile.
9060 2011-02-11 Yao Qi <yao@codesourcery.com>
9062 * configure.ac: Call AC_PROG_RANLIB.
9063 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9064 * configure: Regenerate.
9066 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9068 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9070 2011-03-06 Yao Qi <yao@codesourcery.com>
9072 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9074 2011-03-05 Yao Qi <yao@codesourcery.com>
9076 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9077 (subdir_do): New make target. Copied from gdb/Makefile.
9078 (maintainer-clean, realclean, distclean, clean): Call corresponding
9079 make targets in common/Makefile.
9081 2011-03-04 Yao Qi <yao@codesourcery.com>
9083 * Makefile.in: Remove GNU make feature --directory.
9085 2011-03-04 Michael Snyder <msnyder@vmware.com>
9087 * server.c (queue_stop_reply): Call xmalloc not malloc.
9089 2011-03-02 Michael Snyder <msnyder@vmware.com>
9091 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9093 2011-02-28 Michael Snyder <msnyder@vmware.com>
9095 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9096 (cmd_qtframe): Ditto.
9097 (cmd_qtbuffer): Ditto.
9098 (cmd_bigqtbuffer): Ditto.
9100 * utils.c (decimal2str): Initialize 'width' to nine, then
9103 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9105 * hostio.c (require_data): Free *data, not data.
9107 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9109 * hostio.c (require_data): Use free, not xfree.
9111 2011-02-27 Michael Snyder <msnyder@vmware.com>
9113 * server.c (handle_query): Discard unused value.
9115 * hostio.c (require_data): Free malloc memory before returning
9118 2011-02-26 Michael Snyder <msnyder@vmware.com>
9120 * linux-low.c (list_threads): Call closedir for dirent.
9122 2011-02-27 Michael Snyder <msnyder@vmware.com>
9124 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9125 a case statement falls through.
9127 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9129 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9132 2011-02-26 Michael Snyder <msnyder@vmware.com>
9134 * utils.c (decimal2str): Eliminate dead code and dead param.
9135 (pulongest): Drop dead param from call to decimal2str.
9138 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9140 Revert the following patch (not approved yet):
9141 2011-02-21 Hui Zhu <teawater@gmail.com>
9142 * tracepoint.c (tp_printf): New function.
9143 (eval_agent_expr): Handle gdb_agent_op_printf.
9145 2011-02-21 Hui Zhu <teawater@gmail.com>
9147 * tracepoint.c (tp_printf): New function.
9148 (eval_agent_expr): Handle gdb_agent_op_printf.
9150 2011-02-18 Tom Tromey <tromey@redhat.com>
9152 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9153 (tracepoint.o): Likewise.
9154 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9155 (gdb_agent_op_names): Likewise.
9157 2011-02-18 Tom Tromey <tromey@redhat.com>
9159 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9160 gdb_agent_op_rot>: New constants.
9161 (gdb_agent_op_names): Add pick and roll.
9162 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9165 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9167 * aclocal.m4: Regenerated with aclocal-1.11.1.
9169 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9171 * server.c (handle_qxfer_traceframe_info): New.
9172 (qxfer_packets): Register "traceframe-info".
9173 (handle_query): Report support for qXfer:traceframe-info:read+.
9174 * tracepoint.c (match_blocktype): New.
9175 (traceframe_find_block_type): Rename to ...
9176 (traceframe_walk_blocks): ... this. Add callback filter argument,
9178 (traceframe_find_block_type): New, reimplemented on top of
9179 traceframe_walk_blocks.
9180 (build_traceframe_info_xml): New.
9181 (traceframe_read_info): New.
9182 * server.h (traceframe_read_info): Declare.
9184 2011-02-11 Yao Qi <yao@codesourcery.com>
9186 * configure.ac: Call AC_PROG_RANLIB.
9187 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9188 * configure: Regenerate.
9190 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9192 * server.c (gdb_read_memory): Change return semantics to allow
9194 (handle_search_memory_1): Adjust.
9195 (process_serial_event) <'m' packet>: Handle partial transfers.
9196 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9198 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9200 * regcache.c (init_register_cache): Initialize
9201 regcache->register_status.
9202 (free_register_cache): Release regcache->register_status.
9203 (regcache_cpy): Copy register_status.
9204 (registers_to_string): Print 'x's for unavailable registers.
9205 (supply_register): Mark the register's status valid or
9206 unavailable, depending on whether a buffer was passed in or not.
9207 (supply_register_zeroed): New.
9208 (supply_regblock): Mark the registers' status valid or
9209 unavailable, depending on whether a buffer was passed in or not.
9210 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9211 (struct regcache): New `register_status' field.
9212 (supply_register_zeroed): Declare.
9213 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9214 supply_register_zeroed, rather than passing a NULL buffer to
9216 * tracepoint.c (fetch_traceframe_registers): Update comment.
9218 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9220 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9223 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9225 * server.h (decode_xfer_write): Change prototype.
9226 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9227 and don't extract the annex here.
9228 * server.c (decode_xfer_read): Remove `annex' parameter,
9229 and don't extract the annex here.
9231 (struct qxfer): New.
9232 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9233 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9234 (handle_qxfer_statictrace): New functions, abstracted out from
9235 handle_query, and made to use the struct qxfer interface.
9236 (handle_threads_qxfer_proper): Rename to ...
9237 (handle_qxfer_threads_proper): ... this.
9238 (handle_threads_qxfer): Rename to ...
9239 (handle_qxfer_threads): ... this. Adjust.
9240 (qxfer_packets): New array.
9241 (handle_qxfer): New function.
9242 (handle_query): Use handle_qxfer.
9244 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9246 * gdbreplay.c: Shorten lines of >= 80 columns.
9247 * linux-low.c: Ditto.
9248 * linux-ppc-low.c: Ditto.
9249 * linux-s390-low.c: Ditto.
9250 * linux-sparc-low.c: Ditto.
9251 * linux-x86-low.c: Ditto.
9252 * linux-xtensa-low.c: Ditto.
9253 * mem-break.c: Ditto.
9255 * regcache.h: Ditto.
9256 * remote-utils.c: Ditto.
9259 * thread-db.c: Ditto.
9260 * tracepoint.c: Ditto.
9262 * win32-low.h: Ditto.
9264 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9266 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9269 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9271 * server.c (gdbserver_version): Update copyright year in version
9273 * gdbreplay.c (gdbreplay_version): Ditto.
9275 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9277 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9278 * linux-bfin-low.c: New file.
9279 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9280 PT_DATA_ADDR for BFIN targets.
9281 * Makefile.in (SFILES): Add linux-bfin-low.c.
9282 (clean): Remove reg-bfin.c.
9283 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9284 * README: Mention supported Blackfin targets.
9286 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9288 * .gitignore: New file.
9290 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9292 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9294 2010-10-22 Jie Zhang <jie@codesourcery.com>
9296 * Makefile.in: Add FLAGS_TO_PASS variable.
9297 (install): Remove dependency of install-only and recursively
9298 invoke make for install-only.
9300 2010-10-04 Doug Evans <dje@google.com>
9302 * Makefile.in (uninstall): Use $(DESTDIR).
9304 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9308 * linux-x86-low.c (compat_siginfo_from_siginfo)
9309 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9310 si_code is < 0. Check for si_code == SI_TIMER before checking for
9313 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9315 * lynx-i386-low.c: New file.
9316 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9318 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9320 * lynx-low.c (ptrace_request_to_str): Remove handling for
9321 request values that have been removed in LynxOS 5.x.
9323 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9325 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9328 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9330 * configure.ac: Add --enable-inprocess-agent option.
9331 * configure: Rebuilt.
9333 2010-09-06 Yao Qi <yao@codesourcery.com>
9335 * linux-low.c (linux_kill): Remove unused variable.
9336 (linux_stabilize_threads): Likewise.
9337 * server.c (start_inferior): Likewise.
9338 (queue_stop_reply_callback): Likewise.
9339 * tracepoint.c (do_action_at_tracepoint): Likewise.
9341 2010-09-06 Yao Qi <yao@codesourcery.com>
9343 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9346 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9348 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9350 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9352 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9355 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9357 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9358 gdbserver/lynx-ppc-low.c: New files.
9359 * Makefile.in (lynx_low_h): New variable.
9360 (lynx-low.o, lynx-ppc-low.o): New rules.
9361 * configure.ac: On LynxOS, link with -lnetinet.
9362 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9363 * configure: regenerate.
9365 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9367 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9368 * configure.ac: Add check for vasprintf and vsnprintf.
9369 * configure, config.in: Regenerate.
9370 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9372 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9374 * gdbreplay.c: Move include of alloca.h up, next to include of
9376 * server.h: Add include of malloc.h.
9377 * mem-break.c: Remove include of malloc.h.
9378 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9380 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9382 * Makefile.in (memmem.o): Build with -Wno-error.
9384 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9386 * utils.c (xsnprintf): Make non-static.
9387 * server.h: Add xsnprintf declaration.
9388 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9389 replace calls to snprintf by calls to xsnprintf throughout.
9391 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9393 * configure.ac: Add configure check for alloca.
9394 * configure, config.in: Regenerate.
9395 * server.h: Include alloca.h if it exists.
9396 * gdbreplay.c: Include alloca.h if it exists.
9398 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9400 * linux-low.c (__SIGRTMIN): Define if not already defined.
9401 (linux_create_inferior): Check for __ANDROID__ rather than
9403 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9404 are already deferred.
9405 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9406 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9407 stopped and already has a pending signal to report.
9408 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9409 a pending signal to report or is moving out of a jump pad.
9410 (linux_init_signals): Check for __ANDROID__ rather than
9413 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9415 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9416 debug_threads check. Avoid a linear search when not doing debug
9419 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9421 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9422 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9423 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9424 (process_event): Change local fd's type to gdb_fildes_t.
9425 (create_file_handler): Adjust prototype.
9426 (delete_file_handler): Adjust prototype.
9427 (handle_file_event): Adjust prototype. Use pfildes.
9428 (create_file_event): Adjsut prototype.
9429 * remote-utils.c (remote_desc, listen_desc): Change type to
9431 * server.h: New gdb_fildes_t typedef.
9432 [USE_WIN32API]: Include winsock2.h.
9433 (delete_file_handler, add_file_handler): Adjust prototypes.
9435 * utils.c (pfildes): New.
9437 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9439 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9440 * configure: Regenerate.
9442 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9444 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9445 (linux_done_accessing_memory): ... this.
9446 (linux_target_ops): Adjust.
9447 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9448 * nto-low.c (nto_target_ops): Adjust comment.
9449 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9450 * spu-low.c (spu_target_ops): Adjust comment.
9451 * target.h (target_ops): Rename unprepare_to_access_memory field
9452 to done_accessing_memory.
9453 (unprepare_to_access_memory): Rename to ...
9454 (done_accessing_memory): ... this.
9456 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9458 * linux-low.c (linux_prepare_to_access_memory): New.
9459 (linux_unprepare_to_access_memory): New.
9460 (linux_target_ops): Install them.
9461 * server.c (read_memory): Rename to ...
9462 (gdb_read_memory): ... this. Use
9463 prepare_to_access_memory/prepare_to_access_memory.
9464 (write_memory): Rename to ...
9465 (gdb_write_memory): ... this. Use
9466 prepare_to_access_memory/prepare_to_access_memory.
9467 (handle_search_memory_1): Adjust.
9468 (process_serial_event): Adjust.
9469 * target.h (struct target_ops): New fields
9470 prepare_to_access_memory and unprepare_to_access_memory.
9471 (prepare_to_access_memory, unprepare_to_access_memory): New.
9472 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9473 prepare_to_access_memory/prepare_to_access_memory.
9474 * nto-low.c (nto_target_ops): Adjust.
9475 * spu-low.c (spu_target_ops): Adjust.
9476 * win32-low.c (win32_target_ops): Adjust.
9478 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9480 * Makefile.in (WARN_CFLAGS): Get it from configure.
9481 (WERROR_CFLAGS): New.
9482 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9483 * configure.ac: Introduce --enable-werror, which adds -Werror to
9484 the compiler command line. Enabled by default. Disable with
9485 --disable-werror. Add -Wdeclaration-after-statement
9486 Wpointer-arith and -Wformat-nonliteral to warning flags.
9487 * configure: Regenerate.
9489 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9491 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9493 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9495 * gdbreplay.c (remote_error): New.
9497 (expect): Use gdbchar. Check for error reading from GDB.
9498 Clarify sync error output.
9499 (play): Check for errors writing to GDB.
9500 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9501 * remote-utils.c (getpkt): Check for errors writing to the remote
9504 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9506 * linux-low.c (linux_wait_1): Move non-debugging code out of
9507 `debug_threads' control.
9509 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9511 * linux-low.c (linux_wait_1): Don't set last_status here.
9512 * server.c (push_event, queue_stop_reply_callback): Assert we're
9513 not pushing a TARGET_WAITKIND_IGNORE event.
9514 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9515 (myresume, handle_target_event): Set the thread's last_resume_kind
9516 and last_status from the target returned status.
9518 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9522 * linux-x86-low.c (update_debug_registers_callback): New.
9523 (i386_dr_low_set_addr): Use it.
9524 (i386_dr_low_get_addr): New.
9525 (i386_dr_low_set_control): Use update_debug_registers_callback.
9526 (i386_dr_low_get_control): New.
9527 (i386_dr_low_get_status): Adjust.
9528 * linux-low.c (linux_stop_lwp): New.
9529 * linux-low.h (linux_stop_lwp): Declare.
9531 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9532 argument instead of a i386_debug_reg_state.
9533 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9534 a i386_debug_reg_state.
9535 (i386_insert_aligned_watchpoint): Adjust.
9536 (i386_remove_aligned_watchpoint): Adjust.
9537 (i386_low_stopped_data_address): Read the debug registers from the
9538 inferior instead of from the mirrors.
9539 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9540 (i386_dr_low_get_addr): Declare.
9541 (i386_dr_low_get_control): Declare.
9542 (i386_dr_low_get_status): Change prototype.
9544 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9545 (i386_dr_low_get_addr): New.
9546 (i386_dr_low_get_control): New.
9547 (i386_dr_low_get_status): Adjust prototype. Return
9549 (i386_initial_stuff): Clear dr_status_mirror and
9551 (i386_get_thread_context): Adjust.
9552 (i386_set_thread_context): Adjust.
9553 (i386_thread_added): Adjust.
9555 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9557 * linux-low.h (linux_thread_area): Delete declaration.
9559 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9561 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9562 after its termination.
9564 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9566 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9567 (gdb_wants_all_stopped): Delete.
9568 (linux_wait_1): Don't call them.
9569 * server.c (handle_v_cont): Tag all threads as want-stopped.
9570 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9571 stopped as "client-wants-stopped".
9573 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9575 * Makefile.in (signals_h): New.
9576 (server_h): Depend on it.
9577 (server.o): Don't depend on $(signals_def).
9578 (signals.o): Depend on $(signals_def).
9580 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9582 * Makefile.in (signals_def): New.
9583 (server_h): Append include/gdb/signals.h and signals_def.
9584 (server.o): Append signals_def.
9586 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9588 * server.c (handle_target_event): Use target_signal_to_host for
9589 resume_info.sig initialization.
9590 * target.h (struct thread_resume) <sig>: New comment.
9592 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9594 * server.c (handle_query): strcpy() the returned string from paddress()
9595 instead of sprintf().
9596 * utils.c (paddress): Return phex_nz().
9598 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9600 * server.c (handle_v_cont): Call mourn_inferior if process
9602 (myresume): Likewise.
9604 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9606 Static tracepoints, and integration with UST.
9608 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9609 * mem-break.c (uninsert_all_breakpoints)
9610 (reinsert_all_breakpoints): New.
9611 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9612 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9613 (gdb_agent_ust_loaded, helper_thread_id)
9614 (gdb_agent_helper_thread_id): New macros.
9615 (struct ipa_sym_addresses): Add addr_ust_loaded,
9616 addr_helper_thread_id, addr_cmd_buf.
9617 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9618 (in_process_agent_loaded_ust): New.
9619 (write_e_ust_not_loaded): New.
9620 (maybe_write_ipa_ust_not_loaded): New.
9621 (struct collect_static_trace_data_action): New.
9622 (enum tracepoint_type) <static_tracepoint>: New.
9623 (struct tracepoint) <handle>: Mention static tracepoints.
9624 (struct static_tracepoint_ctx): New.
9625 (CMD_BUF_SIZE): New.
9626 (add_tracepoint_action): Handle static tracepoint actions.
9627 (unprobe_marker_at): New.
9628 (clear_installed_tracepoints): Handle static tracepoints.
9629 (cmd_qtdp): Handle static tracepoints.
9630 (probe_marker_at): New.
9631 (cmd_qtstart): Handle static tracepoints.
9632 (response_tracepoint): Handle static tracepoints.
9633 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9634 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9635 (get_context_regcache): Handle static tracepoints.
9636 (do_action_at_tracepoint): Handle static tracepoint actions.
9637 (traceframe_find_block_type): Handle static trace data blocks.
9638 (traceframe_read_sdata): New.
9639 (download_tracepoints): Download static tracepoint actions.
9640 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9641 (GDB_PROBE_NAME): New.
9646 (ust_marker_to_static_tracepoint): New.
9648 (collect_ust_data_at_tracepoint): New.
9649 (gdb_ust_probe): New.
9650 (UNIX_PATH_MAX, SOCK_DIR): New.
9651 (gdb_ust_connect_sync_socket): New.
9652 (resume_thread, stop_thread): New.
9653 (run_inferior_command): New.
9654 (init_named_socket): New.
9655 (gdb_ust_socket_init): New.
9656 (cstr_to_hexstr): New.
9658 (first_marker, next_marker): New.
9659 (response_ust_marker): New.
9660 (cmd_qtfstm, cmd_qtsstm): New.
9661 (unprobe_marker_at, probe_marker_at): New.
9662 (cmd_qtstmat, gdb_ust_thread): New.
9663 (gdb_ust_init): New.
9664 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9665 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9667 (x86_64_st_collect_regmap): New.
9668 (X86_64_NUM_ST_COLLECT_GREGS): New.
9669 (AMD64_RIP_REGNUM): New.
9670 (supply_static_tracepoint_registers): New.
9671 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9673 (i386_st_collect_regmap): New.
9674 (i386_NUM_ST_COLLECT_GREGS): New.
9675 (supply_static_tracepoint_registers): New.
9676 * server.c (handle_query): Handle qXfer:statictrace:read.
9677 <qSupported>: Report support for StaticTracepoints, and
9678 qXfer:statictrace:read features.
9679 * server.h (traceframe_read_sdata)
9680 (supply_static_tracepoint_registers): Declare.
9681 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9682 (unpack_varlen_hex): Include in IPA build.
9683 * Makefile.in (ustlibs, ustinc): New.
9684 (IPA_OBJS): Add remote-utils-ipa.o.
9685 ($(IPA_LIB)): Link -ldl and -lpthread.
9687 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9688 * config.in, configure: Regenerate.
9690 2010-06-20 Ian Lance Taylor <iant@google.com>
9691 Pedro Alves <pedro@codesourcery.com>
9693 * linux-x86-low.c (always_true): Delete.
9694 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9695 trying to fool the compiler with always_true.
9697 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9699 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9700 conditions in gdbserver.
9702 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9704 * spu-low.c (spu_read_memory): Wrap around local store limit.
9705 (spu_write_memory): Likewise.
9707 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9709 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9710 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9712 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9714 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9715 uses with LONGEST uses.
9717 2010-06-14 Stan Shebs <stan@codesourcery.com>
9718 Pedro Alves <pedro@codesourcery.com>
9722 * linux-x86-low.c: Include limits.h.
9727 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9728 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9729 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9730 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9731 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9732 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9733 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9734 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9735 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9736 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9737 (amd64_emit_void_call_2): New.
9738 (amd64_emit_ops): New.
9739 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9740 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9741 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9742 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9743 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9744 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9745 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9746 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9747 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9748 (i386_emit_stack_adjust, i386_emit_int_call_1)
9749 (i386_emit_void_call_2): New.
9750 (i386_emit_ops): New.
9751 (x86_emit_ops): New.
9752 (the_low_target): Install x86_emit_ops.
9753 * server.h (struct emit_ops): New.
9754 (get_raw_reg_func_addr): Declare.
9755 (current_insn_ptr, emit_error): Declare.
9756 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9757 (set_trace_state_variable_value): New defines.
9758 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9759 addr_get_trace_state_variable_value and
9760 addr_set_trace_state_variable_value.
9761 (symbol_list): New fields for get_raw_reg,
9762 get_trace_state_variable_value and set_trace_state_variable_value.
9763 (condfn): New typedef.
9764 (struct tracepoint): New field `compiled_cond'.
9765 (do_action_at_tracepoint): Clear compiled_cond.
9766 (get_trace_state_variable_value, set_trace_state_variable_value):
9768 (condition_true_at_tracepoint): If there's a compiled condition,
9770 (current_insn_ptr, emit_error): New globals.
9771 (struct bytecode_address): New.
9772 (get_raw_reg_func_addr): New.
9773 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9774 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9775 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9776 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9777 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9778 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9779 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9780 (compile_tracepoint_condition, compile_bytecodes): New.
9781 * target.h (emit_ops): Forward declare.
9782 (struct target_ops): New field emit_ops.
9783 (target_emit_ops): New.
9784 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9785 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9786 * linux-low.c (linux_emit_ops): New.
9787 (linux_target_ops): Install it.
9788 * linux-low.h (struct linux_target_ops): New field emit_ops.
9790 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9792 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9793 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9795 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9796 Stan Shebs <stan@codesourcery.com>
9798 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9799 (all): Depend on $(extra_libraries).
9800 (install-only): Install the IPA.
9801 (IPA_OBJS, IPA_LIB): New.
9802 (clean): Remove the IPA lib.
9803 (IPAGENT_CFLAGS): New.
9804 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9805 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9806 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9807 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9808 * configure.ac: Check for atomic builtins support in the compiler.
9809 (IPA_DEPFILES, extra_libraries): Define.
9810 * configure.srv (ipa_obj): Add description.
9811 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9812 (i[34567]86-*-linux*): Set ipa_obj.
9813 (x86_64-*-linux*): Set ipa_obj.
9814 * linux-low.c (stabilizing_threads): New.
9815 (supports_fast_tracepoints): New.
9816 (linux_detach): Stabilize threads before detaching.
9817 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9818 the lwp is either not stabilizing, or is moving out of a jump pad.
9819 (linux_fast_tracepoint_collecting): New.
9820 (maybe_move_out_of_jump_pad): New.
9821 (enqueue_one_deferred_signal): New.
9822 (dequeue_one_deferred_signal): New.
9823 (linux_wait_for_event_1): If moving out of a jump pad, defer
9824 pending signals to later.
9825 (linux_stabilize_threads): New.
9826 (linux_wait_1): Check if threads need moving out of jump pads, and
9828 (stuck_in_jump_pad_callback): New.
9829 (move_out_of_jump_pad_callback): New.
9831 (linux_resume_one_lwp): Handle moving out of jump pads.
9832 (linux_set_resume_request): Dequeue deferred signals.
9833 (need_step_over_p): Also step over fast tracepoint jumps.
9834 (start_step_over): Also uninsert fast tracepoint jumps.
9835 (finish_step_over): Also reinsert fast tracepoint jumps.
9836 (linux_install_fast_tracepoint_jump): New.
9837 (linux_target_ops): Install linux_stabilize_threads and
9838 linux_install_fast_tracepoint_jump_pad.
9839 * linux-low.h (linux_target_ops) <get_thread_area,
9840 install_fast_tracepoint_jump_pad>: New fields.
9841 (struct lwp_info) <collecting_fast_tracepoint,
9842 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9843 (linux_get_thread_area): Declare.
9844 * linux-x86-low.c (jump_insn): New.
9845 (x86_get_thread_area): New.
9846 (append_insns): New.
9848 (amd64_install_fast_tracepoint_jump_pad): New.
9849 (i386_install_fast_tracepoint_jump_pad): New.
9850 (x86_install_fast_tracepoint_jump_pad): New.
9851 (the_low_target): Install x86_get_thread_area and
9852 x86_install_fast_tracepoint_jump_pad.
9853 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9854 (struct fast_tracepoint_jump): New.
9855 (fast_tracepoint_jump_insn): New.
9856 (fast_tracepoint_jump_shadow): New.
9857 (find_fast_tracepoint_jump_at): New.
9858 (fast_tracepoint_jump_here): New.
9859 (delete_fast_tracepoint_jump): New.
9860 (set_fast_tracepoint_jump): New.
9861 (uninsert_fast_tracepoint_jumps_at): New.
9862 (reinsert_fast_tracepoint_jumps_at): New.
9863 (set_breakpoint_at): Use write_inferior_memory.
9864 (uninsert_raw_breakpoint): Use write_inferior_memory.
9865 (check_mem_read): Mask out fast tracepoint jumps.
9866 (check_mem_write): Mask out fast tracepoint jumps.
9867 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9868 (set_fast_tracepoint_jump): Declare.
9869 (delete_fast_tracepoint_jump)
9870 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9871 (reinsert_fast_tracepoint_jumps_at): Declare.
9872 * regcache.c: Don't compile many functions when building the
9873 in-process agent library.
9874 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9875 the register buffer in the heap.
9876 (free_register_cache): If the register buffer isn't owned by the
9877 regcache, don't free it.
9878 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9879 pre-existing register caches.
9880 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9882 (convert_ascii_to_int): : Constify `from' parameter type.
9883 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9884 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9885 the needed buffer in-place.
9886 (relocate_instruction): New.
9887 * server.c (handle_query) <qSymbols>: If the target supports
9888 tracepoints, give it a chance of looking up symbols. Report
9889 support for fast tracepoints.
9890 (handle_status): Stabilize threads.
9891 (process_serial_event): Adjust.
9892 * server.h (struct fast_tracepoint_jump): Forward declare.
9893 (struct process_info) <fast_tracepoint_jumps>: New field.
9894 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9895 (decode_X_packet, decode_M_packet): Adjust.
9896 (relocate_instruction): Declare.
9897 (in_process_agent_loaded): Declare.
9898 (tracepoint_look_up_symbols): Declare.
9899 (struct fast_tpoint_collect_status): Declare.
9900 (fast_tracepoint_collecting): Declare.
9901 (force_unlock_trace_buffer): Declare.
9902 (handle_tracepoint_bkpts): Declare.
9903 (initialize_low_tracepoint)
9904 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9905 * target.h (struct target_ops) <stabilize_threads,
9906 install_fast_tracepoint_jump_pad>: New fields.
9907 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9908 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9909 [HAVE_STDINT_H]: Include stdint.h.
9910 (trace_debug_1): Rename to ...
9911 (trace_vdebug): ... this.
9912 (trace_debug): Rename to ...
9913 (trace_debug_1): ... this. Add `level' parameter.
9915 (ATTR_USED, ATTR_NOINLINE): New.
9916 (IP_AGENT_EXPORT): New.
9917 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9918 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9919 (about_to_request_buffer_space, trace_buffer_is_full)
9920 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9921 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9922 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9923 (traceframe_write_count, traceframes_created)
9924 (trace_state_variables)
9925 New renaming defines.
9926 (struct ipa_sym_addresses): New.
9927 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9929 (ipa_sym_addrs): New.
9930 (all_tracepoint_symbols_looked_up): New.
9931 (in_process_agent_loaded): New.
9932 (write_e_ipa_not_loaded): New.
9933 (maybe_write_ipa_not_loaded): New.
9934 (tracepoint_look_up_symbols): New.
9935 (debug_threads) [IN_PROCESS_AGENT]: New.
9936 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9937 (UNKNOWN_SIDE_EFFECTS): New.
9938 (stop_tracing): New.
9939 (flush_trace_buffer): New.
9940 (stop_tracing_bkpt): New.
9941 (flush_trace_buffer_bkpt): New.
9942 (read_inferior_integer): New.
9943 (read_inferior_uinteger): New.
9944 (read_inferior_data_pointer): New.
9945 (write_inferior_data_pointer): New.
9946 (write_inferior_integer): New.
9947 (write_inferior_uinteger): New.
9948 (struct collect_static_trace_data_action): Delete.
9949 (enum tracepoint_type): New.
9950 (struct tracepoint) <type>: New field `type'.
9951 <actions_str, step_actions, step_actions_str>: Only include in
9953 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9954 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9955 (tracepoints): Use IP_AGENT_EXPORT.
9956 (last_tracepoint): Don't include in the IPA.
9957 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9958 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9959 (alloced_trace_state_variables): New.
9960 (trace_state_variables): Use IP_AGENT_EXPORT.
9961 (traceframe_t): Delete unused variable.
9962 (circular_trace_buffer): Don't include in the IPA.
9963 (trace_buffer_start): Delete.
9964 (struct trace_buffer_control): New.
9965 (trace_buffer_free): Delete.
9966 (struct ipa_trace_buffer_control): New.
9967 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9968 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9970 (trace_buffer_ctrl): New.
9971 (TRACE_BUFFER_CTRL_CURR): New.
9972 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9973 Reimplement as macros.
9974 (trace_buffer_wrap): Delete.
9975 (traceframe_write_count, traceframe_read_count)
9976 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9977 (struct tracepoint_hit_ctx) <type>: New field.
9978 (struct fast_tracepoint_ctx): New.
9979 (memory_barrier): New.
9981 (record_tracepoint_error): Update atomically in the IPA.
9982 (clear_inferior_trace_buffer): New.
9983 (about_to_request_buffer_space): New.
9984 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9985 updating the same buffer.
9986 (add_tracepoint): Default the tracepoint's type to trap
9987 tracepoint, and orig_size to -1.
9988 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9990 (create_trace_state_variable): New parameter `gdb'. Handle it.
9991 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9992 (cmd_qtdp): Handle fast tracepoints.
9994 (max_jump_pad_size): New.
9995 (gdb_jump_pad_head): New.
9996 (get_jump_space_head): New.
9997 (claim_jump_space): New.
9998 (sort_tracepoints): New.
9999 (MAX_JUMP_SIZE): New.
10000 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10002 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10003 support. Upload fast traceframes, and delete internal IPA
10005 (stop_tracing_handler): New.
10006 (flush_trace_buffer_handler): New.
10007 (cmd_qtstop): Upload fast tracepoints.
10008 (response_tracepoint): Handle fast tracepoints.
10009 (tracepoint_finished_step): Upload fast traceframes. Set the
10010 tracepoint hit context's tracepoint type.
10011 (handle_tracepoint_bkpts): New.
10012 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10013 type. Add comment about fast tracepoints.
10014 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10015 non-existing action_str field.
10016 (get_context_regcache): Handle fast tracepoints.
10017 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10019 (fast_tracepoint_from_jump_pad_address): New.
10020 (fast_tracepoint_from_ipa_tpoint_address): New.
10021 (collecting_t): New.
10022 (force_unlock_trace_buffer): New.
10023 (fast_tracepoint_collecting): New.
10025 (gdb_collect): New.
10026 (write_inferior_data_ptr): New.
10027 (target_tp_heap): New.
10028 (target_malloc): New.
10029 (download_agent_expr): New.
10031 (download_tracepoints): New.
10032 (download_trace_state_variables): New.
10033 (upload_fast_traceframes): New.
10034 (IPA_FIRST_TRACEFRAME): New.
10035 (IPA_NEXT_TRACEFRAME_1): New.
10036 (IPA_NEXT_TRACEFRAME): New.
10037 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10038 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10039 (gdb_jump_pad_buffer_end): New.
10040 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10041 (initialize_tracepoint): Adjust.
10042 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10043 buffer. Initialize the low module.
10044 * utils.c (PREFIX, TOOLNAME): New.
10045 (malloc_failure): Use PREFIX.
10046 (error): In the IPA, an error causes an exit.
10047 (fatal, warning): Use PREFIX.
10048 (internal_error): Use TOOLNAME.
10049 (NUMCELLS): Increase to 10.
10050 * configure, config.in: Regenerate.
10052 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10054 * server.c (handle_query) <qSupported>: Do two passes over the
10055 qSupported string to avoid nesting strtok.
10057 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10059 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10061 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10062 -Wl,--dynamic-list.
10063 * configure: Regenerate.
10064 * proc-service.list: New.
10066 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10068 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10071 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10073 * gdbreplay.c (remote_open): Check error return from socket() call by
10074 its equality to -1 not by it being negative.
10075 * remote-utils.c (remote_open): Likewise.
10077 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10079 * config.h: Regenerate.
10081 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10083 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10084 doesn't provide PTRACE_GET_THREAD_AREA.
10086 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10088 * linux-m68k-low.c: Include <asm/ptrace.h>
10089 (ps_get_thread_area): Implement.
10091 2010-05-03 Doug Evans <dje@google.com>
10093 * event-loop.c (struct callback_event): New struct.
10094 (callback_list): New global.
10095 (append_callback_event, delete_callback_event): New functions.
10096 (process_callback): New function.
10097 (start_event_loop): Call it.
10098 * remote-utils.c (NOT_SCHEDULED): Define.
10099 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10100 moved out of readchar.
10101 (readchar): Rewrite. Call reschedule before returning.
10102 (reset_readchar): New function.
10103 (remote_close): Call it.
10104 (process_remaining, reschedule): New functions.
10105 * server.h (callback_handler_func): New typedef.
10106 (append_callback_event, delete_callback_event): Declare.
10108 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10110 * proc-service.c (ps_pglobal_lookup): Use
10111 thread_db_look_up_one_symbol.
10112 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10113 parameter. Use it instead of all_symbols_looked_up.
10114 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10116 (all_symbols_looked_up): Don't declare.
10117 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10118 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10120 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10121 Set all_symbols_looked_up here.
10122 (thread_db_look_up_one_symbol): New.
10123 (thread_db_get_tls_address): Adjust.
10124 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10125 thread_db object on the heap, and tentatively set it in the
10127 (thread_db_init): Don't set all_symbols_looked_up here.
10128 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10130 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10132 * linux-low.c (linux_kill, linux_detach): Adjust.
10133 (status_pending_p_callback): Remove redundant statement. Check
10134 for !TARGET_WAITIKIND_IGNORE, instead of
10135 TARGET_WAITKIND_STOPPED.
10136 (handle_tracepoints): Make sure LWP is locked. Adjust.
10137 (linux_wait_for_event_1): Adjust.
10138 (linux_cancel_breakpoints): New.
10139 (unsuspend_one_lwp): New.
10140 (unsuspend_all_lwps): New.
10141 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10142 (send_sigstop_callback): Change return type to int, add new
10143 `except' parameter and handle it.
10144 (suspend_and_send_sigstop_callback): New.
10145 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10146 pass them down. If SUSPEND, also increment the lwp's suspend
10148 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10149 (need_step_over_p): Don't consider suspended LWPs.
10150 (start_step_over): Adjust.
10151 (proceed_one_lwp): Change return type to int, add new `except'
10152 parameter and handle it.
10153 (unsuspend_and_proceed_one_lwp): New.
10154 (proceed_all_lwps): Use find_inferior instead of
10156 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10157 also decrement the suspend count of LWPs. Pass `except' down,
10158 instead of hacking its suspend count.
10159 (linux_pause_all): Add `freeze' parameter. Adjust.
10160 (linux_unpause_all): New.
10161 (linux_target_ops): Install linux_unpause_all.
10162 * server.c (handle_status): Adjust.
10163 * target.h (struct target_ops): New fields `unpause_all' and
10164 `cancel_breakpoints'. Add new parameter to `pause_all'.
10165 (pause_all): Add new `freeze' parameter.
10166 (unpause_all): New.
10167 (cancel_breakpoints): New.
10168 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10169 cancel breakpoints.
10170 (cmd_qtstart): Pause threads.
10171 (stop_tracing): Pause threads, and cancel breakpoints.
10172 * win32-low.c (win32_target_ops): Adjust.
10174 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10176 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10177 the inferior right away from here...
10178 (linux_wait_1): ... to here, and adjust to check the thread's
10179 last_resume_kind instead of the lwp's step or stop_expected flags.
10181 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10183 * README: Use consistent `GDB' and `GDBserver' spellings.
10185 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10187 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10188 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10189 (linux_detach_one_lwp): Assume the lwp is stopped.
10190 (any_thread_of): Delete.
10191 (linux_detach): Stop all lwps here. Don't blindly delete all
10193 (delete_lwp_callback): New.
10194 (linux_mourn): Delete all lwps of the process that is gone.
10195 (linux_wait_1): Don't delete the last lwp of the process here.
10196 * mem-break.h (mark_breakpoints_out): Declare.
10197 * mem-break.c (mark_breakpoints_out): New.
10198 (free_all_breakpoints): Use it.
10199 * server.c (handle_target_event): If the process is gone, mark
10201 * thread-db.c (struct thread_db) <create_bp>: New field.
10202 (thread_db_enable_reporting): Fix prototype. Store a thread event
10203 breakpoint reference in the thread_db struct.
10204 (thread_db_load_search): Clear the thread_db object.
10205 (try_thread_db_load_1): Ditto.
10206 (switch_to_process): New.
10207 (disable_thread_event_reporting): Use it.
10208 (remove_thread_event_breakpoints): New.
10209 (thread_db_detach, thread_db_mourn): Use it.
10211 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10213 * linux-low.c (linux_enable_event_reporting): New.
10214 (linux_wait_for_event_1, handle_extended_wait): Use it.
10216 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10218 * linux-low.c (linux_kill_one_lwp, linux_kill)
10219 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10220 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10221 SIGSTOP even if the LWP is stopped.
10222 (send_sigstop_callback): New.
10223 (stop_all_lwps): Use send_sigstop_callback instead.
10224 (linux_resume_one_thread): Adjust.
10225 (proceed_one_lwp): Still proceed an LWP that the client has
10226 requested to stop, if we haven't reported it as stopped yet. Make
10227 sure that LWPs the client want stopped, have a pending SIGSTOP.
10229 2010-04-26 Doug Evans <dje@google.com>
10231 * server.c (handle_general_set): Make static.
10233 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10234 Print received char after testing for error/eof instead of before.
10235 (input_interrupt): Tweak comment.
10237 2010-04-23 Doug Evans <dje@google.com>
10239 * server.c (start_inferior): Print inferior argv if --debug.
10241 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10243 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10244 * nto-x86-low.c: Include server.h
10246 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10248 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10249 be consistent with other sources of this directory.
10250 (init_registers_amd64): Correct name of source file of this function
10253 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10255 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10256 64-bit executables.
10258 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10260 * win32-i386-low.c: Add 64-bit support.
10261 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10262 (init_registers_amd64): Declare.
10263 (mappings): Add 64-bit version of array.
10264 (init_windows_x86): New function.
10265 (the_low_target): Change init_arch field to init_windows_x86.
10267 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10269 * win32-low.c: Adapt to support also 64-bit architecture.
10270 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10271 (get_image_name): Use SIZE_T type for local variable `done'.
10272 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10273 (toolhelp_get_dll_name): Idem.
10274 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10275 Use uintptr_t typecast to avoid warning.
10276 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10277 (handle_exception): Use phex_nz to avoid warning.
10278 (win32_wait): Remove unused local variable `process'.
10280 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10282 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10285 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10287 * configure.ac: Use `ws2_32' library for srv_mingw.
10288 * configure: Regenerate.
10289 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10290 * remote-utils.c: Likewise.
10292 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10294 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10295 if __x86_64__ is defined.
10297 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10299 * configure: Regenerate.
10301 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10303 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10304 * target.h (target_ops): New get_tib_address field.
10305 * win32-low.h (win32_thread_info): Add thread_local_base field.
10306 * win32-low.c (child_add_thread): Add tlb argument.
10307 Set thread_local_base field to TLB.
10308 (get_child_debug_event): Adapt to child_add_thread change.
10309 (win32_get_tib_address): New function.
10310 (win32_target_ops): Set get_tib_address field to
10311 win32_get_tib_address.
10312 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10314 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10316 * linux-low.c (linux_mourn): Also remove the process.
10317 * server.c (handle_target_event): Don't remove the process here.
10318 * nto-low.c (nto_mourn): New.
10319 (nto_target_ops): Install it.
10320 * spu-low.c (spu_mourn): New.
10321 (spu_target_ops): Install it.
10322 * win32-low.c (win32_mourn): New.
10323 (win32_target_ops): Install it.
10325 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10327 * server.h (buffer_xml_printf): Remove redundant `;'.
10329 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10331 * regcache.c (set_register_cache): Invalidate regcaches before
10332 changing the register cache layout.
10333 (regcache_invalidate_one): Allow a NULL regcache.
10334 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10335 regcaches before changing the register cache layout or the target
10338 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10340 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10341 variable warning on Linux/x86-64.
10343 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10345 GDBserver disconnected tracing support.
10347 * linux-low.c (linux_remove_process): Delete.
10348 (add_lwp): Don't set last_resume_kind here.
10349 (linux_kill): Use `mourn'.
10350 (linux_detach): Use `thread_db_detach', and `mourn'.
10351 (linux_mourn): New.
10352 (linux_attach_lwp_1): Adjust comment.
10353 (linux_attach): last_resume_kind moved the thread_info; adjust.
10354 (status_pending_p_callback): Adjust.
10355 (linux_wait_for_event_1): Adjust.
10356 (count_events_callback, select_singlestep_lwp_callback)
10357 (select_event_lwp_callback, cancel_breakpoints_callback)
10358 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10359 (proceed_one_lwp): Adjust.
10360 (linux_async): Add debug output.
10361 (linux_thread_stopped): New.
10362 (linux_pause_all): New.
10363 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10365 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10366 (thread_db_free): Delete declaration.
10367 (thread_db_detach, thread_db_mourn): Declare.
10368 * thread-db.c (thread_db_init): Use thread_db_mourn.
10369 (thread_db_free): Delete, split in two.
10370 (disable_thread_event_reporting): New.
10371 (thread_db_detach): New.
10372 (thread_db_mourn): New.
10374 * server.h (struct thread_info) <last_resume_kind>: New field.
10375 <attached>: Add comment.
10376 <gdb_detached>: New field.
10377 (handler_func): Change return type to int.
10378 (handle_serial_event, handle_target_event): Ditto.
10379 (gdb_connected): Declare.
10381 (disconnected_tracing): Declare.
10382 (stop_tracing): Declare.
10384 * server.c (handle_query) <qSupported>: Report support for
10385 disconnected tracing.
10386 (queue_stop_reply_callback): Account for running threads.
10387 (gdb_wants_thread_stopped): New.
10388 (gdb_wants_all_threads_stopped): New.
10389 (gdb_reattached_process): New.
10390 (handle_status): Clear the `gdb_detached' flag of all processes.
10391 In all-stop, stop all threads.
10392 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10393 (process_serial_event): If the remote connection breaks, or if an
10394 exit was forced with "monitor exit", force an event loop exit.
10395 Handle disconnected tracing on detach.
10396 (handle_serial_event): Adjust.
10397 (handle_target_event): If GDB isn't connected, forward events back
10398 to the inferior, unless the last process exited, in which case,
10399 exit gdbserver. Adjust interface.
10401 * remote-utils.c (remote_open): Don't block in accept. Instead
10402 register an event loop source on the listen socket file
10403 descriptor. Refactor bits into ...
10404 (listen_desc): ... this new global.
10405 (gdb_connected): ... this new function.
10406 (enable_async_notification): ... this new function.
10407 (handle_accept_event): ... this new function.
10408 (remote_close): Clear remote_desc.
10410 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10412 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10414 (mourn_inferior): Define.
10415 (target_process_qsupported): Avoid the dangling else problem.
10416 (thread_stopped): Define.
10417 (pause_all): Define.
10418 (target_waitstatus_to_string): Declare.
10419 * target.c (target_waitstatus_to_string): New.
10421 * tracepoint.c (tracing): Make extern.
10422 (disconnected_tracing): New.
10423 (stop_tracing): Make extern. Handle tracing stops due to GDB
10425 (cmd_qtdisconnected): New.
10426 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10427 (handle_tracepoint_general_set): Handle QTDisconnected.
10429 * event-loop.c (event_handler_func): Change return type to int.
10430 (process_event): Bail out if the event handler wants the event
10432 (handle_file_event): Ditto.
10433 (start_event_loop): Bail out if the event handler wants the event
10436 * nto-low.c (nto_target_ops): Adjust.
10437 * spu-low.c (spu_wait): Don't remove the process here.
10438 (spu_target_ops): Adjust.
10439 * win32-low.c (win32_wait): Don't remove the process here.
10440 (win32_target_ops): Adjust.
10442 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10444 * regcache.c (realloc_register_cache): Invalidate inferior's
10445 regcache before recreating it.
10447 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10449 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10451 2010-04-09 Stan Shebs <stan@codesourcery.com>
10452 Pedro Alves <pedro@codesourcery.com>
10454 * server.h (LONGEST): New.
10455 (struct thread_info) <while_stepping>: New field.
10456 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10458 (initialize_tracepoint, handle_tracepoint_general_set)
10459 (handle_tracepoint_query, tracepoint_finished_step)
10460 (tracepoint_was_hit, release_while_stepping_state_list):
10461 (current_traceframe): Declare.
10462 * server.c (handle_general_set): Handle tracepoint packets.
10463 (read_memory): New.
10464 (write_memory): New.
10465 (handle_search_memory_1): Use read_memory.
10466 (handle_query): Report support for conditional tracepoints, trace
10467 state variables, and tracepoint sources. Handle tracepoint
10469 (main): Initialize the tracepoints module.
10470 (process_serial_event): Handle traceframe reads/writes.
10472 * linux-low.c (handle_tracepoints): New.
10473 (linux_wait_1): Call it.
10474 (linux_resume_one_lwp): Handle while-stepping.
10475 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10476 (linux_target_ops): Install them.
10477 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10479 * linux-x86-low.c (x86_supports_tracepoints): New.
10480 (the_low_target). Install it.
10482 * mem-break.h (delete_breakpoint): Declare.
10483 * mem-break.c (delete_breakpoint): Make external.
10485 * target.h (struct target_ops): Add `supports_tracepoints',
10486 `read_pc', and `write_pc' fields.
10487 (target_supports_tracepoints): Define.
10488 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10491 * regcache.h (struct regcache) <registers_owned>: New field.
10492 (init_register_cache, regcache_cpy): Declare.
10493 (regcache_read_pc, regcache_write_pc): Declare.
10494 (register_cache_size): Declare.
10495 (supply_regblock): Declare.
10496 * regcache.c (init_register_cache): New.
10497 (new_register_cache): Use it.
10498 (regcache_cpy): New.
10499 (register_cache_size): New.
10500 (supply_regblock): New.
10501 (regcache_read_pc, regcache_write_pc): New.
10503 * tracepoint.c: New.
10505 * Makefile.in (OBS): Add tracepoint.o.
10506 (tracepoint.o): New rule.
10508 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10510 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10512 (i386-mmx.c): Likewise.
10513 (i386-mmx-linux.o): Likewise.
10514 (i386-mmx-linux.c): Likewise.
10516 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10517 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10518 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10519 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10521 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10522 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10523 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10525 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10527 * Makefile.in (clean): Updated.
10529 (i386-avx.c): Likewise.
10530 (i386-avx-linux.o): Likewise.
10531 (i386-avx-linux.c): Likewise.
10532 (amd64-avx.o): Likewise.
10533 (amd64-avx.c): Likewise.
10534 (amd64-avx-linux.o): Likewise.
10535 (amd64-avx-linux.c): Likewise.
10537 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10538 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10539 (srv_amd64_regobj): Add amd64-avx.o.
10540 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10541 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10542 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10543 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10544 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10545 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10546 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10548 * i387-fp.c: Include "i386-xstate.h".
10550 (i387_cache_to_xsave): Likewise.
10551 (i387_xsave_to_cache): Likewise.
10552 (x86_xcr0): Likewise.
10554 * i387-fp.h (i387_cache_to_xsave): Likewise.
10555 (i387_xsave_to_cache): Likewise.
10556 (x86_xcr0): Likewise.
10558 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10559 * linux-crisv32-low.c (target_regsets): Likewise.
10560 * linux-m68k-low.c (target_regsets): Likewise.
10561 * linux-mips-low.c (target_regsets): Likewise.
10562 * linux-ppc-low.c (target_regsets): Likewise.
10563 * linux-s390-low.c (target_regsets): Likewise.
10564 * linux-sh-low.c (target_regsets): Likewise.
10565 * linux-sparc-low.c (target_regsets): Likewise.
10566 * linux-xtensa-low.c (target_regsets): Likewise.
10568 * linux-low.c: Include <sys/uio.h>.
10569 (regsets_fetch_inferior_registers): Support nt_type.
10570 (regsets_store_inferior_registers): Likewise.
10571 (linux_process_qsupported): New.
10572 (linux_target_ops): Add linux_process_qsupported.
10574 * linux-low.h (regset_info): Add nt_type.
10575 (linux_target_ops): Add process_qsupported.
10577 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10579 (init_registers_i386_avx_linux): New.
10580 (init_registers_amd64_avx_linux): Likewise.
10581 (xmltarget_i386_linux_no_xml): Likewise.
10582 (xmltarget_amd64_linux_no_xml): Likewise.
10583 (PTRACE_GETREGSET): Likewise.
10584 (PTRACE_SETREGSET): Likewise.
10585 (x86_fill_xstateregset): Likewise.
10586 (x86_store_xstateregset): Likewise.
10587 (use_xml): Likewise.
10588 (x86_linux_update_xmltarget): Likewise.
10589 (x86_linux_process_qsupported): Likewise.
10590 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10591 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10592 init_registers_i386_linux here. Call
10593 x86_linux_update_xmltarget.
10594 (the_low_target): Add x86_linux_process_qsupported.
10596 * server.c (handle_query): Call target_process_qsupported.
10598 * target.h (target_ops): Add process_qsupported.
10599 (target_process_qsupported): New.
10601 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10603 * inferiors.c (add_thread): Set last_status kind to
10604 TARGET_WAITKIND_IGNORE.
10605 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10606 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10607 (linux_wait_1): Move `thread' local definition to block that uses
10608 it. Don't NULL initialize `event_child'.
10609 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10610 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10611 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10613 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10615 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10616 an extended waitstatus, or by a watchpoint.
10617 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10618 thread was stepping or has been stopped by a watchpoint.
10620 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10622 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10623 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10624 of another, then delete the previous, and validate all
10626 (validate_inserted_breakpoint): New.
10627 (delete_disabled_breakpoints): New.
10628 (validate_breakpoints): New.
10629 (check_mem_read): Validate breakpoints before trusting their
10630 shadow. Delete disabled breakpoints.
10631 (check_mem_write): Validate breakpoints before trusting they
10632 should be inserted. Delete disabled breakpoints.
10633 * mem-break.h (validate_breakpoints):
10634 * server.c (handle_query): Validate breakpoints when we see a
10637 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10639 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10640 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10641 if we could tell there's a GDB breakpoint at stop_pc.
10642 (need_step_over_p): Don't do a step over if we find a GDB
10643 breakpoint at the resume PC.
10645 * mem-break.c (struct raw_breakpoint): New.
10646 (enum bkpt_type): New type `gdb_breakpoint'.
10647 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10648 fields. New field `raw'.
10649 (find_raw_breakpoint_at): New.
10650 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10651 breakpoint instead.
10652 (set_breakpoint_at): Adjust.
10653 (delete_raw_breakpoint): New.
10654 (release_breakpoint): New.
10655 (delete_breakpoint): Rename to...
10656 (delete_breakpoint_1): ... this. Add proc parameter. Use
10657 release_breakpoint. Return ENOENT.
10658 (delete_breakpoint): Reimplement.
10659 (find_breakpoint_at): Delete.
10660 (find_gdb_breakpoint_at): New.
10661 (delete_breakpoint_at): Delete.
10662 (set_gdb_breakpoint_at): New.
10663 (delete_gdb_breakpoint_at): New.
10664 (gdb_breakpoint_here): New.
10665 (set_reinsert_breakpoint): Use release_breakpoint.
10666 (uninsert_breakpoint): Rename to ...
10667 (uninsert_raw_breakpoint): ... this.
10668 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10669 (reinsert_raw_breakpoint): Change parameter type to
10671 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10673 (check_breakpoints): Adjust. Use release_breakpoint.
10674 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10675 (breakpoint_inserted_here): Ditto.
10676 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10677 Don't trust the breakpoint's shadow if it is not inserted.
10678 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10679 (delete_all_breakpoints): Adjust.
10680 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10681 use delete_breakpoint_1.
10683 * mem-break.h (breakpoints_supported): Delete declaration.
10684 (set_gdb_breakpoint_at): Declare.
10685 (gdb_breakpoint_here): Declare.
10686 (delete_breakpoint_at): Delete.
10687 (delete_gdb_breakpoint_at): Declare.
10689 * server.h (struct raw_breakpoint): Forward declare.
10690 (struct process_info): New field `raw_breakpoints'.
10692 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10695 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10697 * linux-low.c (status_pending_p_callback): Fix comment.
10698 (linux_wait_for_event_1): Move most of the internal breakpoint
10699 handling from here...
10700 (linux_wait_1): ... to here.
10701 (count_events_callback): New.
10702 (select_singlestep_lwp_callback): New.
10703 (select_event_lwp_callback): New.
10704 (cancel_breakpoints_callback): New.
10705 (select_event_lwp): New.
10706 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10707 priority to all LWPs that have had events that should be reported
10708 to the client. Cancel breakpoints when about to reporting the
10709 event to the client, not while stopping lwps. No longer cancel
10710 finished single-steps here.
10711 (cancel_finished_single_step): Delete.
10712 (cancel_finished_single_steps): Delete.
10714 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10716 * mem-break.c (enum bkpt_type): New.
10717 (struct breakpoint): New field `type'.
10718 (set_breakpoint_at): Change return type to struct breakpoint
10719 pointer. Set type to `other_breakpoint' by default.
10720 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10721 in the breakpoint list.
10722 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10723 (reinsert_breakpoint): Rename to ...
10724 (reinsert_raw_breakpoint): ... this.
10725 (reinsert_breakpoints_at): Adjust.
10726 * mem-break.h (struct breakpoint): Declare.
10727 (set_breakpoint_at): Change return type to struct breakpoint
10730 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10732 * server.c (handle_query): Assign, not compare.
10734 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10736 Teach linux gdbserver to step-over-breakpoints.
10738 * linux-low.c (can_hardware_single_step): New.
10739 (supports_breakpoints): New.
10740 (handle_extended_wait): If stopping threads, read the stop pc of
10741 the new cloned LWP.
10743 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10744 low target doesn't support retrieving the PC.
10745 (add_lwp): Set last_resume_kind to resume_continue.
10746 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10747 (linux_attach): Don't clear stop_expected. Set the lwp's
10748 last_resume_kind to resume_stop.
10749 (linux_detach_one_lwp): Don't check for removed breakpoints.
10750 (check_removed_breakpoint): Delete.
10751 (status_pending_p): Rename to ...
10752 (status_pending_p_callback): ... this. Don't check for removed
10753 breakpoints. Don't consider threads that are stopped from GDB's
10755 (linux_wait_for_lwp): Always read the stop_pc here.
10756 (cancel_breakpoint): New.
10757 (step_over_bkpt): New global.
10758 (linux_wait_for_event_1): Implement stepping over breakpoints.
10759 (gdb_wants_lwp_stopped): New.
10760 (gdb_wants_all_stopped): New.
10761 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10762 single-step traps here. Store the thread's last reported target
10764 (send_sigstop): Don't clear stop_expected. Always set it,
10766 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10767 (cancel_finished_single_step): New.
10768 (cancel_finished_single_steps): New.
10769 (wait_for_sigstop): Don't cancel finished single-step traps here.
10770 (linux_resume_one_lwp): Don't check for removed breakpoints.
10771 Don't set `step' on non-hardware step archs.
10772 (linux_set_resume_request): Ignore resume_stop requests if already
10773 stopping or stopped. Set the lwp's last_resume_kind.
10774 (resume_status_pending_p): Don't check for removed breakpoints.
10775 (need_step_over_p): New.
10776 (start_step_over): New.
10777 (finish_step_over): New.
10778 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10779 requests. Clear the thread's last reported target waitstatus.
10780 Don't use the `suspended' flag. Don't consider pending breakpoints.
10781 (linux_resume): Start a step-over if necessary.
10782 (proceed_one_lwp): New.
10783 (proceed_all_lwps): New.
10784 (unstop_all_lwps): New.
10785 * linux-low.h (struct lwp_info): Rewrite comment for the
10786 `suspended' flag. Add the `stop_pc' field. Delete the
10787 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10788 Add `'last_resume_kind' and `need_step_over' fields.
10789 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10790 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10791 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10792 (set_raw_breakpoint_at): New.
10793 (set_breakpoint_at): Rewrite to use it.
10794 (reinsert_breakpoint_handler): Delete.
10795 (set_reinsert_breakpoint): New.
10796 (reinsert_breakpoint_by_bp): Delete.
10797 (delete_reinsert_breakpoints): New.
10798 (uninsert_breakpoint): Rewrite.
10799 (uninsert_breakpoints_at): New.
10800 (reinsert_breakpoint): Rewrite.
10801 (reinsert_breakpoints_at): New.
10802 (check_breakpoints): Rewrite.
10803 (breakpoint_here): New.
10804 (breakpoint_inserted_here): New.
10805 (check_mem_read): Adjust.
10806 * mem-break.h (breakpoints_supported, breakpoint_here)
10807 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10808 (reinsert_breakpoint_by_bp): Delete declaration.
10809 (delete_reinsert_breakpoints): Declare.
10810 (reinsert_breakpoint): Delete declaration.
10811 (reinsert_breakpoints_at): Declare.
10812 (uninsert_breakpoint): Delete declaration.
10813 (uninsert_breakpoints_at): Declare.
10814 (check_breakpoints): Adjust prototype.
10815 * server.h: Adjust include order.
10816 (struct thread_info): Declare here. Add a `last_status' field.
10818 2010-03-23 Michael Snyder <msnyder@vmware.com>
10820 * server.c (crc32): New function.
10821 (handle_query): Add handling for 'qCRC:' request.
10823 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10825 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10826 lwp had been stopped by a watchpoint.
10828 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10830 * server.h (internal_error): Declare.
10831 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10832 * utils.c (internal_error): New function.
10834 2010-03-15 Andreas Schwab <schwab@redhat.com>
10836 * configure.srv: Fix typo setting srv_regobj.
10838 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10840 * linux-low.c (fetch_register): Avoid passing a non string literal
10842 (usr_store_inferior_registers): Ditto.
10844 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10846 * linux-low.c (linux_write_memory): Bail out early if peeking
10849 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10851 * linux-low.h (struct lwp_info): New fields
10852 `stopped_by_watchpoint' and `stopped_data_address'.
10853 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10854 here, and cache them in the lwp object.
10855 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10857 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10859 (linux_stopped_by_watchpoint): Rewrite.
10860 (linux_stopped_data_address): Rewrite.
10862 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10864 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10865 switching the current inferior, not before.
10867 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10869 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10870 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10871 i386-linux.c and amd64-linux.c.
10872 (reg-i386.o): Removed.
10873 (reg-i386.c): Likewise.
10874 (reg-i386-linux.o): Likewise.
10875 (reg-i386-linux.c): Likewise.
10876 (reg-x86-64.o): Likewise.
10877 (reg-x86-64.c): Likewise.
10878 (reg-x86-64-linux.o): Likewise.
10879 (reg-x86-64-linux.c): Likewise.
10881 (i386.c): Likewise.
10882 (i386-linux.o): Likewise.
10883 (i386-linux.c): Likewise.
10884 (amd64.o): Likewise.
10885 (amd64.c): Likewise.
10886 (amd64-linux.o): Likewise.
10887 (amd64-linux.c): Likewise.
10889 * configure.srv (srv_i386_regobj): New.
10890 (srv_i386_linux_regobj): Likewise.
10891 (srv_amd64_regobj): Likewise.
10892 (srv_amd64_linux_regobj): Likewise.
10893 (srv_i386_32bit_xmlfiles): Likewise.
10894 (srv_i386_64bit_xmlfiles): Likewise.
10895 (srv_i386_xmlfiles): Likewise.
10896 (srv_amd64_xmlfiles): Likewise.
10897 (srv_i386_linux_xmlfiles): Likewise.
10898 (srv_amd64_linux_xmlfiles): Likewise.
10899 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10900 srv_xmlfiles to $srv_i386_xmlfiles.
10901 (i[34567]86-*-mingw32ce*): Likewise.
10902 (i[34567]86-*-mingw*): Likewise.
10903 (i[34567]86-*-nto*): Likewise.
10904 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10905 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10906 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10907 (x86_64-*-linux*): Likewise.
10909 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10910 (init_registers_amd64_linux): New.
10911 (x86_arch_setup): Replace init_registers_x86_64_linux with
10912 init_registers_amd64_linux.
10914 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10916 * configure.ac: Check for libdl. If it is not available link against
10917 static libthread_db.
10918 * configure: Regenerate.
10920 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10924 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10925 handing a read watchpoint.
10926 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10928 2010-02-12 Doug Evans <dje@google.com>
10930 * linux-low.c (linux_supports_tracefork_flag): Document.
10931 (linux_look_up_symbols): Add comment.
10933 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10935 * regcache.c (supply_register): Clear regcache if buf is NULL.
10937 2010-02-02 Nicolas Roche <roche@sourceware.org>
10938 Joel Brobecker <brobecker@adacore.com>
10940 * inferiors.c (find_inferior): Add function documentation.
10941 (unloaded_dll): Handle the case where the unloaded dll has not
10942 been previously registered in the dll list.
10944 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10946 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10947 (thumb2_breakpoint): New.
10948 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10950 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10952 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10953 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10956 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10958 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10960 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10962 * linux-s390-low.c (s390_collect_ptrace_register)
10963 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10965 2010-01-21 Doug Evans <dje@google.com>
10967 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10968 (PTRACE_ARG4_TYPE): New macro.
10969 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10970 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10971 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10972 (usr_store_inferior_registers): Ditto.
10973 (linux_read_memory, linux_write_memory): Ditto.
10974 (linux_test_for_tracefork): Ditto.
10976 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10977 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10979 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10981 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10984 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10986 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10987 prototype to take a regcache. Adjust.
10989 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10991 * regcache.h (struct thread_info): Forward declare.
10992 (struct regcache): New.
10993 (new_register_cache): Adjust prototype.
10994 (get_thread_regcache): Declare.
10995 (free_register_cache): Adjust prototype.
10996 (registers_to_string, registers_from_string): Ditto.
10997 (supply_register, supply_register_by_name, collect_register)
10998 (collect_register_as_string, collect_register_by_name): Ditto.
10999 * regcache.c (struct inferior_regcache_data): Delete.
11000 (get_regcache): Rename to ...
11001 (get_thread_regcache): ... this. Adjust. Switch inferior before
11002 fetching registers.
11003 (regcache_invalidate_one): Adjust.
11004 (regcache_invalidate): Fix prototype.
11005 (new_register_cache): Return the new register cache.
11006 (free_register_cache): Change prototype.
11007 (realloc_register_cache): Adjust.
11008 (registers_to_string): Change prototype to take a regcache. Adjust.
11009 (registers_from_string): Ditto.
11010 (register_data): Ditto.
11011 (supply_register): Ditto.
11012 (supply_register_by_name): Ditto.
11013 (collect_register): Ditto.
11014 (collect_register_as_string): Ditto.
11015 (collect_register_by_name): Ditto.
11016 * server.c (process_serial_event): Adjust.
11017 * linux-low.h (regset_fill_func, regset_store_func): Change
11019 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11021 * linux-low.c (get_stop_pc): Adjust.
11022 (check_removed_breakpoint): Adjust.
11023 (linux_wait_for_event): Adjust.
11024 (linux_resume_one_lwp): Adjust.
11025 (fetch_register): Add regcache parameter. Adjust.
11026 (usr_store_inferior_registers): Ditto.
11027 (regsets_fetch_inferior_registers): Ditto.
11028 (regsets_store_inferior_registers): Ditto.
11029 (linux_fetch_registers, linux_store_registers): Ditto.
11030 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11032 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11034 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11035 prototype to take a regcache.
11036 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11037 * remote-utils.c (convert_ascii_to_int, outreg)
11038 (prepare_resume_reply): Change prototype to take a regcache.
11040 * target.h (struct target_ops) <fetch_registers, store_registers>:
11041 Change prototype to take a regcache.
11042 (fetch_inferior_registers, store_inferior_registers): Change
11043 prototype to take a regcache. Adjust.
11044 * proc-service.c (ps_lgetregs): Adjust.
11045 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11046 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11047 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11048 take a regcache. Adjust.
11049 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11050 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11051 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11052 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11053 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11054 (cris_cannot_fetch_register):
11055 (cris_breakpoint_at): Change prototype to take a regcache.
11057 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11058 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11059 to take a regcache. Adjust.
11060 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11062 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11063 take a regcache. Adjust.
11064 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11065 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11066 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11067 * linux-mips-low.c (mips_get_pc):
11068 (mips_set_pc): Change prototype to take a regcache. Adjust.
11069 (mips_reinsert_addr): Adjust.
11070 (mips_collect_register): Change prototype to take a regcache.
11072 (mips_supply_register):
11073 (mips_collect_register_32bit, mips_supply_register_32bit)
11074 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11075 (mips_store_fpregset): Ditto.
11076 * linux-ppc-low.c (ppc_supply_ptrace_register)
11077 (ppc_supply_ptrace_register): Ditto.
11078 (parse_spufs_run): Adjust.
11079 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11080 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11081 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11082 take a regcache. Adjust.
11083 * linux-s390-low.c (s390_collect_ptrace_register)
11084 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11085 (s390_set_pc): Change prototype to take a regcache. Adjust.
11086 (s390_arch_setup): Adjust.
11087 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11088 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11089 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11090 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11091 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11093 (sparc_breakpoint_at): Adjust.
11094 * linux-xtensa-low.c (xtensa_fill_gregset):
11095 (xtensa_store_gregset):
11096 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11097 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11098 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11099 prototype to take a regcache. Adjust.
11100 * win32-arm-low.c (arm_fetch_inferior_register)
11101 (arm_store_inferior_register): Change prototype to take a
11103 * win32-i386-low.c (i386_fetch_inferior_register)
11104 (i386_store_inferior_register): Change prototype to take a
11106 * win32-low.c (child_fetch_inferior_registers)
11107 (child_store_inferior_registers): Change prototype to take a
11109 (win32_wait): Adjust.
11110 (win32_fetch_inferior_registers): Change prototype to take a
11112 (win32_store_inferior_registers): Adjust.
11113 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11114 store_inferior_register>: Change prototype to take a regcache.
11116 2010-01-20 Doug Evans <dje@google.com>
11118 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11120 (linux_wait_for_event1, linux_init_signals): Ditto.
11121 (W_STOPCODE): Provide definition if missing.
11123 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11125 * linux-low.c (linux_core_of_thread): New.
11126 (compare_ints, show_process, list_threads): New.
11127 (linux_qxfer_osdata): Report threads and cores.
11128 (linux_target_op): Register linux_core_of_thread.
11129 * remote-utils.c (prepare_resume_reply): Report the core.
11130 (buffer_xml_printf): Support %d specifier.
11131 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11133 (handle_query): Handle qXfer:threads. Announce availability
11135 * target.h (struct target_ops): New field core_of_thread.
11137 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11139 * Makefile.in (clean): Remove new generated files.
11140 (reg-s390.o, reg-s390.c): Remove rules.
11141 (reg-s390x.o, reg-s390x.c): Likewise.
11142 (s390-linux32.o, s390-linux32.c): Add rules.
11143 (s390-linux64.o, s390-linux64.c): Likewise.
11144 (s390x-linux64.o, s390x-linux64.c): Likewise.
11145 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11146 * linux-s390-low.c: Include <elf.h>.
11147 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11148 (init_registers_s390): Remove prototype.
11149 (init_registers_s390x): Likewise.
11150 (init_registers_s390_linux32): Add prototype.
11151 (init_registers_s390_linux64): Likewise.
11152 (init_registers_s390x_linux64): Likewise.
11153 (s390_num_regs_3264): New define.
11154 (s390_regmap_3264): New global variable.
11155 (s390_cannot_fetch_register): Remove obsolete check.
11156 (s390_cannot_store_register): Likewise.
11157 (s390_collect_ptrace_register): Handle upper/lower register halves.
11158 (s390_supply_ptrace_register): Likewise.
11159 (s390_fill_gregset): Update to register number changes.
11160 (s390_get_hwcap): New routine.
11161 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11162 Install appropriate regmap and register set.
11164 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11166 * server.c (gdbserver_version): Update copyright year to 2010.
11167 * gdbreplay.c (gdbreplay_version): Likewise.
11169 2009-12-28 Doug Evans <dje@google.com>
11171 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11172 elf/external.h. Include <elf.h> instead but only if necessary.
11174 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11176 * linux-low.c (linux_remove_process): Remove `detaching'
11177 parameter. Don't release/detach from thread_db here.
11178 (linux_kill): Release/detach from thread_db here, ...
11179 (linux_detach): ... and here, before actually detaching.
11180 (linux_wait_1): ... and here, when a process exits.
11181 * thread-db.c (any_thread_of): New.
11182 (thread_db_free): Switch the current inferior to a thread of the
11185 2009-12-21 Doug Evans <dje@google.com>
11187 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11189 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11190 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11191 warning ifndef __NR_tkill. Move setting of errno there too.
11192 Delete unnecessary resetting of errno after syscall.
11193 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11195 * configure.ac: Check for dladdr.
11196 * config.in: Regenerate.
11197 * configure: Regenerate.
11198 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11199 (try_thread_db_load): Update.
11201 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11203 2009-12-18 Doug Evans <dje@google.com>
11205 * event-loop.c: Include unistd.h if it exists.
11207 * linux-low.c (my_waitpid): Move definition away from being in
11208 between linux_tracefork_child/linux_test_for_tracefork.
11210 * gdb_proc_service.h (psaddr_t): Fix type.
11211 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11212 signature to match glibc.
11214 2009-12-16 Doug Evans <dje@google.com>
11216 * linux-low.c (linux_read_memory): Fix argument to read.
11218 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11220 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11221 events, don't leave current_inferior pointing at null.
11223 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11225 * win32-low.c (LOG): Delete.
11226 (OUTMSG): Output to stderr.
11227 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11228 on compile time LOG macro.
11229 (win32_wait): Fix debug output.
11231 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11233 * win32-low.c (win32_add_one_solib): If the dll name is
11234 "ntdll.dll", prepend the system directory to the dll path.
11236 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11238 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11240 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11241 Vladimir Prus <vladimir@codesourcery.com>
11243 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11244 * configure.ac: Check for __mcoldfire__ and set
11245 gdb_cv_m68k_is_coldfire.
11246 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11247 reg-cf.o and reg-m68k.o.
11248 * configure: Regenerated.
11250 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11252 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11253 Pass it to thread_db_free.
11254 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11255 proper `detaching' argument to linux_remove_process.
11256 * linux-low.h (thread_db_free): Add `detaching' parameter.
11257 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11259 (thread_db_free): Add `detaching' parameter. Only
11260 call td_ta_clear_event if detaching from process.
11262 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11264 * thread-db.c (thread_db_free): Fix typo.
11266 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11269 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11271 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11273 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11274 with an i686 compiler.
11275 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11277 * configure: Rebuilt.
11279 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11283 * server.c (handle_search_memory_1): Correct read_addr initialization
11284 in loop for searching subsequent chunks.
11286 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11288 * configure.ac: New --with-libthread-db option.
11289 * thread-db.c: Allow direct dependence on libthread_db.
11290 (thread_db_free): Adjust.
11291 * config.in: Regenerate.
11292 * configure: Likewise.
11294 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11297 * thread-db.c (attach_thread): New function.
11298 (maybe_attach_thread): Return success/failure.
11299 (find_new_threads_callback): Adjust.
11300 (thread_db_find_new_threads): Loop until no new threads.
11302 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11304 * proc-service.c (ps_lgetregs): Formatting.
11306 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11308 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11309 * configure.ac: Adjust.
11310 * linux-low.h (struct process_info_private): Move members to struct
11312 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11313 * linux-low.c (linux_remove_process): Adjust.
11314 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11315 * server.c (handle_query): Move code ...
11316 (handle_monitor_command): ... here. New function.
11317 * target.h (struct target_ops): New member.
11318 * thread-db.c (struct thread_db): New.
11319 (libthread_db_search_path): New variable.
11320 (thread_db_create_event, thread_db_enable_reporting)
11321 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11322 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11323 (try_thread_db_load_1, dladdr_to_soname): New functions.
11324 (try_thread_db_load, thread_db_load_search): New functions.
11325 (thread_db_init): Search for libthread_db.
11326 (thread_db_free): New function.
11327 (thread_db_handle_monitor_command): Likewise.
11328 * config.in: Regenerate.
11329 * configure: Regenerate.
11331 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11333 * spu-low.c (spu_kill): Wait for inferior to terminate.
11334 Call clear_inferiors.
11335 (spu_detach): Call clear_inferiors.
11337 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11339 * aclocal.m4: Regenerate.
11340 * config.in: Likewise.
11341 * configure: Likewise.
11343 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11345 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11346 (parse_spufs_run): New function.
11347 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11348 (ppc_breakpoint_at): Handle SPU breakpoints.
11350 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11352 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11353 (SPUFS_MAGIC): Define.
11354 (spu_enumerate_spu_ids): New function.
11355 (linux_qxfer_spu): New function.
11356 (linux_target_ops): Install linux_qxfer_spu.
11358 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11360 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11361 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11362 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11363 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11364 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11365 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11366 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11367 (init_registers_powerpc_cell32l): Add prototype.
11368 (init_registers_powerpc_cell64l): Likewise.
11369 (ppc_arch_setup): Detect Cell/B.E. architecture.
11371 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11373 * Makefile.in (datarootdir): New variable.
11375 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11377 * linux-low.c (linux_write_memory): Update debugging output.
11378 * Makefile.in (clean): Add new descriptions.
11379 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11380 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11381 * configure.srv: Add new files for arm*-*-linux*.
11382 * linux-arm-low.c: Add new declarations.
11383 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11384 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11385 (HWCAP_VFPv3D16): New.
11386 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11387 instead of __IWMMXT__.
11388 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11389 (arm_arch_setup): New.
11390 (target_regsets): Remove #ifdef. Add VFP regset.
11391 (the_low_target): Use arm_arch_setup.
11393 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11395 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11396 the main thread again.
11398 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11400 Adding Neutrino gdbserver.
11401 * configure: Regenerated.
11402 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11403 * configure.srv (i[34567]86-*-nto*): New target.
11404 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11405 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11406 (nto_comctrl) [__QNX__]: New function.
11407 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11409 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11411 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11414 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11415 Pedro Alves <pedro@codesourcery.com>
11417 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11418 don't support CONTEXT_EXTENDED_REGISTERS.
11419 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11420 (the_low_target): Install them.
11421 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11422 failing with ERROR_PIPE_NOT_CONNECTED.
11424 2009-06-30 Doug Evans <dje@google.com>
11425 Pierre Muller <muller@ics.u-strasbg.fr>
11427 Add h/w watchpoint support to x86-linux, win32-i386.
11428 * Makefile.in (SFILES): Add i386-low.c
11429 (i386_low_h): Define.
11430 (i386-low.o): Add dependencies.
11431 (linux-x86-low.o): Add i386-low.h dependency.
11432 (win32-i386-low.o): Ditto.
11433 * i386-low.c: New file.
11434 * i386-low.h: New file.
11435 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11436 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11437 * linux-low.c (linux_add_process): Initialize arch_private.
11438 (linux_remove_process): Free arch_private.
11439 (add_lwp): Initialize arch_private.
11440 (delete_lwp): Free arch_private.
11441 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11443 * linux-low.h (process_info_private): New member arch_private.
11444 (lwp_info): New member arch_private.
11445 (linux_target_ops): New members new_process, new_thread,
11447 (ptid_of): New macro.
11448 * linux-x86-low.c: Include stddef.h, i386-low.h.
11449 (arch_process_info): New struct.
11450 (arch_lwp_info): New struct.
11451 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11452 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11453 (i386_dr_low_get_status): New function.
11454 (x86_insert_point, x86_remove_point): New functions.
11455 (x86_stopped_by_watchpoint): New function.
11456 (x86_stopped_data_address): New function.
11457 (x86_linux_new_process, x86_linux_new_thread): New functions.
11458 (x86_linux_prepare_to_resume): New function.
11459 (the_low_target): Add entries for insert_point, remove_point,
11460 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11462 * server.c (debug_hw_points): New global.
11463 (monitor_show_help): Document set debug-hw-points.
11464 (handle_query): Process "set debug-hw-points".
11465 * server.h (debug_hw_points): Declare.
11466 (paddress): Declare.
11467 * utils.c (NUMCELLS, CELLSIZE): New macros.
11468 (get_sell, xsnprintf, paddress): New functions.
11469 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11470 remove_point, stopped_by_watchpoint, stopped_data_address.
11471 * win32-i386-low.c: Include i386-low.h.
11472 (debug_reg_state): Replaces dr.
11473 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11474 (i386_dr_low_get_status): New function.
11475 (i386_insert_point, i386_remove_point): New functions.
11476 (i386_stopped_by_watchpoint): New function.
11477 (i386_stopped_data_address): New function.
11478 (i386_initial_stuff): Update.
11479 (get_thread_context,set_thread_context,i386_thread_added): Update.
11480 (the_low_target): Add entries for insert_point,
11481 remove_point, stopped_by_watchpoint, stopped_data_address.
11482 * win32-low.c (win32_insert_watchpoint): New function.
11483 (win32_remove_watchpoint): New function.
11484 (win32_stopped_by_watchpoint): New function.
11485 (win32_stopped_data_address): New function.
11486 (win32_target_ops): Add entries for insert_watchpoint,
11487 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11488 * win32-low.h (win32_target_ops): New members insert_point,
11489 remove_point, stopped_by_watchpoint, stopped_data_address.
11491 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11493 * server.c (process_serial_event): Re-return unsupported, not
11494 error, if the type isn't recognized. Re-allow supporting only
11495 insert or remove packets. Also call require_running for
11496 breakpoints. Add missing break statement to default case. Tidy.
11497 * target.h (struct target_ops): Rename insert_watchpoint to
11498 insert_point, and remove_watchpoint to remove_point.
11500 * linux-low.h (struct linux_target_ops): Likewise.
11501 * linux-low.c (linux_insert_watchpoint): Rename to ...
11502 (linux_insert_point): ... this. Adjust.
11503 (linux_remove_watchpoint): Rename to ...
11504 (linux_remove_point): ... this. Adjust.
11505 (linux_target_ops): Adjust.
11506 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11507 (cris_insert_point): ... this.
11508 (cris_remove_watchpoint): Rename to ...
11509 (cris_remove_point): ... this.
11510 (the_low_target): Adjust.
11512 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11514 * server.c (handle_v_kill): Pass signal_pid to
11515 kill_inferior if multi_process is zero.
11517 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11519 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11520 * target.h (target_ops): Comment for *_watchpoint to make it clear
11521 the functions can get types '0' and '1'.
11523 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11525 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11526 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11527 * regcache.c (get_regcache): Likewise.
11528 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11529 * win32-low.c (child_fetch_inferior_registers): Remove check for
11532 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11533 Pedro Alves <pedro@codesourcery.com>
11535 * target.h (struct target_ops) <supports_multi_process>: New
11537 (target_supports_multi_process): New.
11538 * server.c (handle_query): Even if GDB reports support, only
11539 enable multi-process if the target also supports it. Report
11540 multi-process support only if the target backend supports it.
11541 * linux-low.c (linux_supports_multi_process): New function.
11542 (linux_target_ops): Install it as target_supports_multi_process
11545 2009-05-24 Doug Evans <dje@google.com>
11547 Global renaming of find_thread_pid to find_thread_ptid.
11548 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11549 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11550 All callers updated.
11552 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11553 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11556 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11557 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11558 (linux_resume_one_lwp): Ditto.
11560 2009-05-23 Doug Evans <dje@google.com>
11562 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11563 from struct inferior_list_entry * to struct lwp_info *.
11564 All callers updated.
11566 2009-05-13 Doug Evans <dje@google.com>
11568 * linux-x86-low.c: Don't include assert.h.
11569 (x86_siginfo_fixup): Use fatal, not assert.
11570 (x86_arch_setup): Fix comment.
11572 2009-05-12 Doug Evans <dje@google.com>
11574 Biarch support for i386/amd64 gdbserver.
11575 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11576 Add linux-x86-low.c.
11577 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11578 (linux-x86-low.o): Add.
11579 * linux-x86-64-low.c: Delete.
11580 * linux-i386-low.c: Delete.
11581 * linux-x86-low.c: New file.
11582 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11584 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11586 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11587 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11588 (linux_child_pid_to_exec_file): New function.
11589 (elf_64_header_p, elf_64_file_p): New functions.
11590 (siginfo_fixup): New function.
11591 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11592 give target a chance to convert layout.
11593 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11594 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11596 2009-05-07 Doug Evans <dje@google.com>
11598 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11599 (regsets_store_inferior_registers): Ditto.
11601 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11605 * linux-low.c (must_set_ptrace_flags): Delete.
11606 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11608 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11609 `lwp->must_set_ptrace_flags' instead.
11610 (linux_wait_for_event_1): Set ptrace options here.
11611 (linux_wait_1): ... not here.
11613 2009-04-30 Doug Evans <dje@google.com>
11615 * inferiors.c (started_inferior_callback): New function.
11616 (attached_inferior_callback): New function.
11617 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11618 * server.c (print_started_pid, print_attached_pid): New functions.
11619 (detach_or_kill_for_exit): New function.
11620 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11621 * server.h (have_started_inferiors_p): Declare.
11622 (have_attached_inferiors_p): Declare.
11624 * inferiors.c (remove_process): Fix memory leak, free process.
11625 * linux-low.c (linux_remove_process): New function.
11626 (linux_kill): Call it instead of remove_process.
11627 (linux_detach, linux_wait_1): Ditto.
11629 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11631 * configure.srv: Add x86 Windows CE target.
11633 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11635 * inferiors.c (get_thread_process): Make global.
11636 * server.h (get_thread_process): Add prototype.
11637 * thread-db.c (find_one_thread): Use get_thread_process
11638 instead of current_process.
11639 (thread_db_get_tls_address): Do not crash if called when
11640 thread layer is not yet initialized.
11642 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11644 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11645 * spu-low.c (current_tid): Rename to ...
11646 (current_ptid): ... this.
11647 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11648 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11649 ptid_get_lwp (current_ptid) instead of current_tid.
11650 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11651 instead of current_tid. Use find_process_pid to verify pid
11652 argument is valid. Pass proper argument to remove_process.
11653 (spu_thread_alive): Compare current_ptid instead of current_tid.
11654 (spu_resume): Likewise.
11656 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11658 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11661 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11663 Implement the multiprocess extensions, and add linux multiprocess
11666 * server.h (ULONGEST): Declare.
11667 (struct ptid, ptid_t): New.
11668 (minus_one_ptid, null_ptid): Declare.
11669 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11670 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11671 (struct inferior_list_entry): Change `id' type from unsigned from
11673 (struct sym_cache, struct breakpoint, struct
11674 process_info_private): Forward declare.
11675 (struct process_info): Declare.
11676 (current_process): Declare.
11677 (all_processes): Declare.
11678 (initialize_inferiors): Declare.
11679 (add_thread): Adjust to use ptid_t.
11680 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11681 (add_process, remove_process, find_thread_pid): Declare.
11682 (find_inferior_id): Adjust to use ptid_t.
11683 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11684 (multi_process): Declare.
11685 (push_event): Adjust to use ptid_t.
11686 (read_ptid, write_ptid): Declare.
11687 (prepare_resume_reply): Adjust to use ptid_t.
11688 (clear_symbol_cache): Declare.
11689 * inferiors.c (all_processes): New.
11690 (null_ptid, minus_one_ptid): New.
11691 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11692 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11693 (add_thread): Change unsigned long to ptid. Remove gdb_id
11695 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11696 (gdb_id_to_thread): Rename to ...
11697 (find_thread_pid): ... this. Change unsigned long to ptid.
11698 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11699 (loaded_dll, pull_pid_from_list): Adjust.
11700 (add_process, remove_process, find_process_pid)
11701 (get_thread_process, current_process, initialize_inferiors): New.
11702 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11703 (struct target_waitstatus) <related_pid>: Ditto.
11704 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11705 return type to int.
11706 (struct target_ops) <join>: Add `pid' argument.
11707 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11708 (struct target_ops) <wait>: Add `ptid' field. Change return type
11710 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11711 (mywait): Add `ptid' argument. Change return type to ptid_t.
11712 (target_pid_to_str): Declare.
11713 * target.c (set_desired_inferior): Adjust to use ptids.
11714 (mywait): Add new `ptid' argument. Adjust.
11715 (target_pid_to_str): New.
11716 * mem-break.h (free_all_breakpoints): Declare.
11717 * mem-break.c (breakpoints): Delelete.
11718 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11719 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11720 to use per-process breakpoint list.
11721 (free_all_breakpoints): New.
11722 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11723 (symbol_cache, all_symbols_looked_up): Delete.
11725 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11727 (prepare_resume_reply): Change ptid argument's type from unsigned
11728 long to ptid_t. Adjust. Implement W;process and X;process.
11729 (free_sym_cache, clear_symbol_cache): New.
11730 (look_up_one_symbol): Adjust to per-process symbol cache. *
11731 * server.c (cont_thread, general_thread, step_thread): Change type
11733 (attached): Delete.
11734 (multi_process): New.
11735 (last_ptid): Change type to ptid_t.
11736 (struct vstop_notif) <ptid>: Change type to ptid_t.
11737 (queue_stop_reply, push_event): Change `ptid' argument's type to
11739 (discard_queued_stop_replies): Add `pid' argument.
11740 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11741 changes. Don't reference the `attached' global.
11742 (attach_inferior): Adjust to mywait interface changes.
11743 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11744 features. Handle and report "multiprocess+". Handle
11746 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11748 (handle_v_kill): New.
11749 (handle_v_stopped): Adjust to use target_pid_to_str.
11750 (handle_v_requests): Allow multiple attaches and runs when
11751 multiprocess extensions are in effect. Handle "vKill".
11752 (myresume): Adjust to use ptids.
11753 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11754 (handle_status): Adjust to discard_queued_stop_replies interface
11756 (first_thread_of, kill_inferior_callback)
11757 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11758 (main): Call initialize_inferiors. Adjust to use ptids, killing
11759 and detaching from all inferiors. Handle multiprocess packet
11761 * linux-low.h: Include gdb_proc_service.h.
11762 (struct process_info_private): New.
11763 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11764 <lwpid_of>: Use ptid_get_lwp.
11765 (get_lwp_thread): Adjust.
11766 (struct lwp_info): Add `dead' member.
11767 (find_lwp_pid): Declare.
11768 * linux-low.c (thread_db_active): Delete.
11769 (new_inferior): Adjust comment.
11770 (inferior_pid): Delete.
11771 (linux_add_process): New.
11772 (handle_extended_wait): Adjust.
11773 (add_lwp): Change unsigned long to ptid.
11774 (linux_create_inferior): Add process to processes table. Adjust
11775 to use ptids. Don't set new_inferior here.
11776 (linux_attach_lwp): Rename to ...
11777 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11778 it. Adjust to use ptids.
11779 (linux_attach_lwp): New.
11780 (linux_attach): Add process to processes table. Don't set
11782 (struct counter): New.
11783 (second_thread_of_pid_p, last_thread_of_process_p): New.
11784 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11785 multiple processes.
11786 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11787 processes. Remove process from process table.
11788 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11789 to multiple processes.
11790 (any_thread_of): New.
11791 (linux_detach): Add `pid' argument, and handle it. Remove process
11792 from processes table.
11793 (linux_join): Add `pid' argument. Handle it.
11794 (linux_thread_alive): Change unsighed long argument to ptid_t.
11795 Consider dead lwps as not being alive.
11796 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11797 threads we're not interested in.
11798 (same_lwp, find_lwp_pid): New.
11799 (linux_wait_for_lwp): Change `pid' argument's type from int to
11801 (linux_wait_for_event): Rename to ...
11802 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11803 from int to ptid_t. Adjust.
11804 (linux_wait_for_event): New.
11805 (linux_wait_1): Add `ptid' argument. Change return type to
11806 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11807 that exit from the process table.
11808 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11810 (mark_lwp_dead): New.
11811 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11812 stopping all threads, mark its main lwp as dead.
11813 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11815 (fetch_register, usr_store_inferior_registers)
11816 (regsets_fetch_inferior_registers)
11817 (regsets_store_inferior_registers, linux_read_memory)
11818 (linux_write_memory): Inline `inferior_pid'.
11819 (linux_look_up_symbols): Adjust to use per-process
11820 `thread_db_active'.
11821 (linux_request_interrupt): Adjust to use ptids.
11822 (linux_read_auxv): Inline `inferior_pid'.
11823 (initialize_low): Don't reference thread_db_active.
11824 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11825 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11826 (ps_getpid): Return the pid of the current inferior.
11827 * thread-db.c (proc_handle, thread_agent): Delete.
11828 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11830 (find_one_thread): Change argument type to ptid_t. Adjust to
11832 (maybe_attach_thread): Adjust to per-process data and ptids.
11833 (thread_db_find_new_threads): Ditto.
11834 (thread_db_init): Ditto.
11835 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11836 processes table. Adjust to use ptids.
11837 (spu_kill, spu_detach): Adjust interface. Remove process from
11839 (spu_join, spu_thread_alive): Adjust interface.
11840 (spu_wait): Adjust interface. Remove process from processes
11841 table. Adjust to use ptids.
11842 * win32-low.c (current_inferior_tid): Delete.
11843 (current_inferior_ptid): New.
11844 (debug_event_ptid): New.
11845 (thread_rec): Take a ptid. Adjust.
11846 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11847 (child_delete_thread): Ditto.
11848 (do_initial_child_stuff): Add `attached' argument. Add process to
11850 (child_fetch_inferior_registers, child_store_inferior_registers):
11852 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11853 (win32_attach): Pass 1 to do_initial_child_stuff.
11854 (win32_kill): Adjust interface. Remove process from processes
11856 (win32_detach): Ditto.
11857 (win32_join): Adjust interface.
11858 (win32_thread_alive): Take a ptid.
11859 (win32_resume): Adjust to use ptids.
11860 (get_child_debug_event): Ditto.
11861 (win32_wait): Adjust interface. Remove exiting process from
11864 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11866 Non-stop mode support.
11868 * server.h (non_stop): Declare.
11869 (gdb_client_data, handler_func): Declare.
11870 (delete_file_handler, add_file_handler, start_event_loop):
11872 (handle_serial_event, handle_target_event, push_event)
11873 (putpkt_notif): Declare.
11874 * target.h (enum resume_kind): New.
11875 (struct thread_resume): Replace `step' field by `kind' field.
11876 (TARGET_WNOHANG): Define.
11877 (struct target_ops) <wait>: Add `options' argument.
11878 <supports_non_stop, async, start_non_stop>: New fields.
11879 (target_supports_non_stop, target_async): New.
11880 (start_non_stop): Declare.
11881 (mywait): Add `options' argument.
11882 * target.c (mywait): Add `options' argument. Print child exit
11883 notifications here.
11884 (start_non_stop): New.
11885 * server.c (non_stop, own_buf, mem_buf): New globals.
11886 (struct vstop_notif): New.
11887 (notif_queue): New global.
11888 (queue_stop_reply, push_event, discard_queued_stop_replies)
11889 (send_next_stop_reply): New.
11890 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11892 (attach_inferior): In non-stop mode, don't wait for the target
11894 (handle_general_set): Handle QNonStop.
11895 (handle_query): When handling qC, return the current general
11896 thread, instead of the first thread of the list.
11897 (handle_query): If the backend supports non-stop mode, include
11898 QNonStop+ in the qSupported query response.
11899 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11901 (handle_v_attach, handle_v_run): Handle non-stop mode.
11902 (handle_v_stopped): New.
11903 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11904 (myresume): Adjust to use resume_kind. Handle non-stop.
11905 (queue_stop_reply_callback): New.
11906 (handle_status): Handle non-stop mode.
11907 (main): Clear non_stop flag on reconnection. Use the event-loop.
11908 Refactor serial protocol handling from here ...
11909 (process_serial_event): ... to this new function. When GDB
11910 selects any thread, select one here. In non-stop mode, wait until
11911 GDB acks all pending events before exiting.
11912 (handle_serial_event, handle_target_event): New.
11913 * remote-utils.c (remote_open): Install remote_desc in the event
11915 (remote_close): Remove remote_desc from the event loop.
11916 (putpkt_binary): Rename to...
11917 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11918 (putpkt_binary): New as wrapper around putpkt_binary_1.
11919 (putpkt_notif): New.
11920 (prepare_resume_reply): In non-stop mode, don't change the
11922 * event-loop.c: New.
11923 * Makefile.in (OBJ): Add event-loop.o.
11924 (event-loop.o): New rule.
11926 * linux-low.h (pid_of): Moved here.
11928 (get_lwp_thread): Use lwpid_of.
11929 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11930 * linux-low.c (pid_of): Delete.
11931 (inferior_pid): Use lwpid_of.
11932 (linux_event_pipe): New.
11933 (target_is_async_p): New.
11935 (handle_extended_wait): Use lwpid_of.
11936 (add_lwp): Don't set lwpid field.
11937 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11938 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11939 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11940 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11941 first. Adjust to linux_wait_for_event interface changes. Use
11943 (linux_detach): Don't delete the main lwp here.
11944 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11945 (status_pending_p): Don't consider explicitly suspended lwps.
11946 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11947 pointer. Add OPTIONS argument. Change return type to int. Use
11948 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11949 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11950 pointer. Add status pointer argument. Return a pid instead of a
11951 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11952 changes. In non-stop mode, don't switch to a random thread.
11953 (linux_wait): Rename to...
11954 (linux_wait_1): ... this. Add target_options argument, and handle
11955 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11956 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11957 clean exit and signal exit code. Don't stop all threads in
11958 non-stop mode. In all-stop mode, only stop all threads when
11959 reporting a stop to GDB. Handle explicit thread stop requests.
11960 (async_file_flush, async_file_mark): New.
11962 (send_sigstop): Use lwpid_of.
11963 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11964 interface changes. In non-stop mode, don't switch to a random
11966 (linux_resume_one_lwp): Use lwpid_of.
11967 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11968 (linux_resume_one_thread): ... this. Handle resume_stop. In
11969 non-stop mode, don't look for pending flag in all threads.
11970 (resume_status_pending_p): Don't consider explicitly suspended
11972 (my_waitpid): Reimplement. Emulate __WALL.
11973 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11975 (sigchld_handler, linux_supports_non_stop, linux_async)
11976 (linux_start_non_stop): New.
11977 (linux_target_ops): Register linux_supports_non_stop, linux_async
11978 and linux_start_non_stop.
11979 (initialize_low): Install SIGCHLD handler.
11980 * thread-db.c (thread_db_create_event, find_one_thread)
11981 (thread_db_get_tls_address): Use lwpid_of.
11982 * win32-low.c (win32_detach): Adjust to use resume_kind.
11983 (win32_wait): Add `options' argument.
11984 * spu-low.c (spu_resume): Adjust to use resume_kind.
11985 (spu_wait): Add `options' argument.
11987 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11989 Decouple target code from remote protocol.
11991 * target.h (enum target_waitkind): New.
11992 (struct target_waitstatus): New.
11993 (struct target_ops) <wait>: Return an unsigned long. Take a
11994 target_waitstatus pointer instead of a char pointer.
11995 (mywait): Likewise.
11996 * target.c (mywait): Change prototype to return an unsigned long.
11997 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11998 * server.h (thread_from_wait, old_thread_from_wait): Delete
12000 (prepare_resume_reply): Change prototype to take a
12002 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12003 (last_status, last_ptid): New.
12004 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12005 pid instead of a signal.
12006 (attach_inferior): Remove "status" and "signal" parameters.
12008 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12010 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12011 (handle_v_requests, myresume): Remove "status" and "signal"
12012 parameters. Adjust.
12013 (handle_status): New.
12014 (main): Delete local `status'. Adjust.
12015 * remote-utils.c: Include target.h.
12016 (prepare_resume_reply): Change prototype to take a
12017 target_waitstatus. Adjust.
12019 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12021 * spu-low.c (spu_wait): Adjust.
12022 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12024 (win32_wait): Adjust.
12026 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12028 * target.h (struct thread_resume): Delete leave_stopped member.
12029 (struct target_ops): Add a `n' argument to the `resume' callback.
12030 * server.c (start_inferior): Adjust.
12031 (handle_v_cont, myresume): Adjust.
12032 * linux-low.c (check_removed_breakpoint): Adjust to resume
12033 interface change, and to removed leave_stopped field.
12034 (resume_ptr): Delete.
12035 (struct thread_resume_array): New.
12036 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12037 resume interface change.
12038 (linux_continue_one_thread, linux_queue_one_thread)
12039 (resume_status_pending_p): Check if the resume field is NULL
12040 instead of checking the leave_stopped member.
12041 (linux_resume): Adjust to the target resume interface change.
12042 * spu-low.c (spu_resume): Adjust to the target resume interface
12044 * win32-low.c (win32_detach, win32_resume): Ditto.
12046 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12048 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12050 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12052 (linux_continue_one_thread): Only preserve the stepping flag if
12053 there's a pending breakpoint.
12055 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12057 * server.c (main): After the inferior having exited, call
12058 remote_close before exiting gdbserver.
12060 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12062 Fix size of FPSCR in Power 7 processors.
12063 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12064 (PPC_FEATURE_HAS_DFP): New #define.
12065 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12068 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12070 * server.c (handle_query) Whitespace and formatting.
12072 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12074 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12075 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12076 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12077 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12078 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12079 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12080 Makefile.in, configure.ac: Fix whitespace throughout.
12081 * configure: Regenerate.
12083 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12085 * inferiors.c (find_inferior): Make it safe for the callback
12086 function to delete the currently iterated inferior.
12088 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12090 * Makefile.in (linuw_low_h): Move higher.
12091 (thread-db.o): Depend on $(linux_low_h).
12093 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12095 Rename "process" to "lwp" throughout.
12097 * linux-low.c (all_processes): Rename to...
12098 (all_lwps): ... this.
12099 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12100 (add_process): Rename to ...
12101 (add_lwp): ... this. Adjust.
12102 (linux_create_inferior): Adjust.
12103 (linux_attach_lwp): Adjust.
12104 (linux_attach): Adjust.
12105 (linux_kill_one_process): Rename to ...
12106 (linux_kill_one_lwp): ... this. Adjust.
12107 (linux_kill): Adjust.
12108 (linux_detach_one_process): Rename to ...
12109 (linux_detach_one_lwp): ... this. Adjust.
12110 (linux_detach): Adjust.
12111 (check_removed_breakpoint): Adjust.
12112 (status_pending_p): Adjust.
12113 (linux_wait_for_process): Rename to ...
12114 (linux_wait_for_lwp): ... this. Adjust.
12115 (linux_wait_for_event): Adjust.
12116 (send_sigstop): Adjust.
12117 (wait_for_sigstop): Adjust.
12118 (stop_all_processes): Rename to ...
12119 (stop_all_lwps): ... this.
12120 (linux_resume_one_process): Rename to ...
12121 (linux_resume_one_lwp): ... this. Adjust.
12122 (linux_set_resume_request, linux_continue_one_thread)
12123 (linux_queue_one_thread, resume_status_pending_p)
12124 (usr_store_inferior_registers, regsets_store_inferior_registers)
12125 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12127 * linux-low.h (get_process): Rename to ...
12128 (get_lwp): ... this. Adjust.
12129 (get_thread_process): Rename to ...
12130 (get_thread_lwp): ... this. Adjust.
12131 (get_process_thread): Rename to ...
12132 (get_lwp_thread): ... this. Adjust.
12133 (struct process_info): Rename to ...
12134 (struct lwp_info): ... this.
12135 (all_processes): Rename to ...
12136 (all_lwps): ... this.
12137 * proc-service.c (ps_lgetregs): Adjust.
12138 * thread-db.c (thread_db_create_event, find_one_thread)
12139 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12141 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12143 * server.c (handle_query): Handle "qAttached".
12145 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12147 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12148 GPLv3, update license URL.
12150 2009-03-01 Doug Evans <dje@google.com>
12152 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12153 (server_h): Add gdb_signals.h.
12154 (signals.o): Update.
12155 * server.h (target_signal_from_host,target_signal_to_host_p)
12156 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12158 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12160 * remote-utils.c (getpkt): Also generate remote-debug
12161 information if noack_mode is set.
12163 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12165 * server.c (handle_query): Report qXfer:siginfo:read and
12166 qXfer:siginfo:write as supported and handle them.
12167 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12168 * linux-low.c (linux_xfer_siginfo): New.
12169 (linux_target_ops): Set it.
12171 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12173 * server.c (gdbserver_usage): Mention --remote-debug.
12174 (main): Accept '--remote-debug' switch.
12176 2009-01-18 Doug Evans <dje@google.com>
12178 * regcache.c (new_register_cache): No need to check result of xcalloc.
12179 * server.c (handle_search_memory): Back out calls to xmalloc,
12180 result is checked and error is returned to user upon failure.
12181 (handle_query): Ditto. Add more checks for result of malloc.
12182 (handle_v_cont): Check result of malloc, report error back to
12184 (handle_v_run): Ditto. Call freeargv.
12185 * server.h (freeargv): Declare.
12186 * utils.c (freeargv): New fn.
12188 2009-01-15 Doug Evans <dje@google.com>
12190 * gdbreplay.c (perror_with_name): Make arg const char *.
12191 * server.h (target_signal_to_name): Make return type const char *.
12192 * thread-db.c (thread_db_err_str): Make return type const char *.
12193 * utils.c (perror_with_name): Make arg const char *.
12195 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12197 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12198 when handling a EXIT_PROCESS_DEBUG_EVENT.
12200 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12202 * gdbreplay.c (gdbreplay_version): Update copyright year.
12203 * server.c (gdbserver_version): Likewise.
12205 2009-01-05 Doug Evans <dje@google.com>
12207 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12208 (handle_extended_wait): Improve comment.
12210 2008-12-13 Doug Evans <dje@google.com>
12212 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12213 * server.h (ATTR_MALLOC): New macro.
12214 (xmalloc,xcalloc,xstrdup): Declare.
12215 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12216 * inferiors.c: Ditto.
12217 * linux-low.c: Ditto.
12218 * mem-break.c: Ditto.
12219 * regcache.c: Ditto.
12220 * remote-utils.c: Ditto.
12223 * win32-low.c: Ditto.
12225 2008-12-12 Doug Evans <dje@google.com>
12227 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12228 in debugging printf.
12230 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12232 2008-12-09 Doug Evans <dje@google.com>
12234 * linux-low.h (struct process_info): Delete member tid, unused.
12235 * thread-db.c (find_one_thread): Update.
12236 (maybe_attach_thread): Update.
12238 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12240 * target.h (struct target_ops): Add qxfer_osdata member.
12241 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12243 (linux_qxfer_osdata): New functions.
12244 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12246 * server.c (handle_query): Handle "qXfer:osdata:read:".
12247 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12248 (buffer_xml_printf): New functions.
12249 * server.h (struct buffer): New.
12250 (buffer_grow_str, buffer_grow_str0): New macros.
12251 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12252 (buffer_xml_printf): Declare.
12254 2008-11-24 Doug Evans <dje@google.com>
12256 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12258 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12260 * server.c (handle_v_run): Always use the supplied argument list.
12262 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12264 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12265 (xtensa_regmap_table): Add entry for scompare1.
12267 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12269 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12270 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12271 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12272 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12273 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12274 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12275 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12276 XML target descriptions.
12277 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12278 when inferior is running on an ISA 2.05 or later processor. Add
12279 special case to return offset for full 64-bit slot of FPSCR when
12282 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12284 * Makefile.in (SFILES, clean): Added sparc64 files.
12285 (reg-sparc64.o, reg-sparc64.c): New.
12286 * configure.srv (sparc*-*-linux*): New configuration.
12287 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12288 syscall arguments for SPARC.
12289 (regsets_store_inferior_registers): Likewise.
12290 * linux-sparc-low.c: New file.
12292 2008-10-21 Doug Evans <dje@google.com>
12294 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12295 (READLINE_DIR,READLINE_DEP): Delete.
12296 (INTERNAL_CFLAGS): Update.
12297 (LINTFLAGS): Update.
12299 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12301 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12302 whole argv from the last run, not just argv[0].
12304 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12306 * regcache.c (new_register_cache): Return NULL if the register
12307 cache size isn't known yet.
12308 (free_register_cache): Avoid dereferencing a NULL regcache.
12310 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12312 * configure.srv: Merge MIPS and MIPS64.
12314 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12316 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12318 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12320 * Makefile.in: Add required vsx dependencies.
12322 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12323 Declare init_registers_powerpc_vsx32l.
12324 Declare init_registers_powerpc_vsx64l.
12325 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12326 (ppc_arch_setup): Check for VSX in hwcap.
12327 (ppc_fill_vsxregset): New function.
12328 (ppc_store_vsxregset): New function.
12329 Add new VSX entry in regset_info target_regsets.
12331 * configure.srv: Add new VSX dependencies.
12333 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12335 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12336 (remote_open): Set or clear transport_is_reliable.
12337 (putpkt_binary): Don't expect acks in noack mode.
12338 (getpkt): Don't send ack/nac in noack mode.
12339 * server.c (handle_general_set): Handle QStartNoAckMode.
12340 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12342 (main): Reset noack_mode on every connection.
12343 * server.h (noack_mode): Declare.
12345 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12347 * Makefile.in (GDBREPLAY_OBS): New variable.
12348 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12350 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12351 Daniel Jacobowitz <dan@codesourcery.com>
12353 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12354 (usr_store_inferior_registers): Likewise.
12355 (regsets_store_inferior_registers): Likewise.
12357 2008-07-31 Rolf Jansen <rj@surtec.com>
12358 Pedro Alves <pedro@codesourcery.com>
12360 * configure.ac: Check for memmem declaration.
12361 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12362 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12363 (disable_packet_qfThreadInfo): Unconditionally compile.
12364 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12365 * configure, config.in: Regenerate.
12367 2008-07-28 Doug Kwan <dougkwan@google.com>
12369 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12370 (linux_write_memory): Remove declaration of errno.
12372 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12374 * linux-low.c (handle_extended_wait): Do not use "status"
12375 variable uninitialized.
12377 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12379 * server.c (handle_v_attach): Inhibit reporting dll changes.
12381 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12383 * remote-utils.c (prepare_resume_reply): If requested, don't
12384 output "thread:TID" in the T stop reply.
12386 * server.c (disable_packet_vCont, disable_packet_Tthread)
12387 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12388 (handle_query): If requested, disable support for qC, qfThreadInfo
12390 (handle_v_requests): If requested, disable support for vCont.
12391 (gdbserver_show_disableable): New.
12392 (main): Handle --disable-packet and --disable-packet=LIST.
12394 * server.h (disable_packet_vCont, disable_packet_Tthread)
12395 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12397 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12399 * server.c (gdbserver_usage): Mention --version.
12401 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12403 * Makefile.in (gdbreplay.o): New rule.
12405 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12407 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12408 message, not gdbserver.
12410 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12411 Nathan Sidwell <nathan@codesourcery.com>
12412 Joseph Myers <joseph@codesourcery.com>
12414 * acinclude.m4: Include ../../config/acx.m4.
12415 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12416 * configure, config.in: Regenerate.
12417 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12418 * server.c (gdbserver_version): Print PKGVERSION.
12419 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12420 (main): Adjust gdbserver_usage calls.
12421 * gdbreplay.c (version, host_name): Add declarations.
12422 (gdbreplay_version, gdbreplay_usage): New.
12423 (main): Accept --version and --help options.
12425 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12427 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12428 (arm_breakpoint_at): Handle Thumb.
12429 (the_low_target): Add comment.
12431 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12433 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12435 2008-05-09 Doug Evans <dje@google.com>
12437 * server.h (decode_search_memory_packet): Declare.
12438 * remote-utils.c (decode_search_memory_packet): New fn.
12439 * server.c (handle_search_memory_1): New fn.
12440 (handle_search_memory): New fn.
12441 (handle_query): Process qSearch:memory packets.
12443 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12445 * regcache.c (registers_length): Remove.
12446 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12447 full register packet.
12448 * regcache.h (registers_length): Remove prototype.
12449 * server.h (PBUFSIZ): Define to 16384.
12451 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12453 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12454 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12455 powerpc-64l.o, and powerpc-altivec64l.o.
12456 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12457 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12458 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12459 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12460 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12463 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12464 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12465 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12466 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12467 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12468 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12469 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12470 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12471 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12472 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12475 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12476 (init_registers_powerpc_32l): ... this new prototype.
12477 (init_registers_powerpc_32): Remove, replace by ...
12478 (init_registers_powerpc_altivec32l): ... this new prototype.
12479 (init_registers_powerpc_e500): Remove, replace by ...
12480 (init_registers_powerpc_e500l): ... this new prototype.
12481 (init_registers_ppc64): Remove, replace by ...
12482 (init_registers_powerpc_64l): ... this new prototype.
12483 (init_registers_powerpc_64): Remove, replace by ...
12484 (init_registers_powerpc_altivec64l): ... this new prototype.
12485 (ppc_num_regs): Set to 73.
12486 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12487 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12488 (ppc_cannot_store_register): Handle orig_r3 and trap.
12489 (ppc_arch_setup): Update init_registers_... calls.
12490 (ppc_fill_gregset): Handle orig_r3 and trap.
12492 * inferiors.c (clear_inferiors): Reset current_inferior.
12494 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12496 * acinclude.m4: Add override.m4.
12497 * configure: Regenerate.
12499 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12501 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12502 initial call to init_register_ppc64.
12504 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12506 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12507 single powerpc*-*-linux* case.
12508 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12510 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12512 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12513 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12515 * linux-ppc-low.c: Include <elf.h>.
12516 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12517 (ppc_hwcap): New global variable.
12518 (ppc_regmap): Remove __SPE__ #ifdef sections.
12519 (ppc_regmap_e500): New global variable.
12520 (ppc_cannot_store_register): Update __SPE__ special case.
12521 (ppc_get_hwcap): New function.
12522 (ppc_arch_setup): Use it to determine whether inferior supports
12523 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12524 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12525 Do not access registers if target does not support AltiVec.
12526 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12527 Do not access registers if target does not support SPE.
12528 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12530 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12532 * linux-low.c (disabled_regsets, num_regsets): New.
12533 (use_regsets_p): Delete.
12534 (linux_wait_for_process): Clear disabled_regsets.
12535 (regsets_fetch_inferior_registers): Check and set it.
12536 (regsets_store_inferior_registers): Likewise.
12537 (linux_fetch_registers, linux_store_registers): Do not use
12539 (initialize_low): Allocate disabled_regsets.
12541 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12543 * Makefile.in (LIBOBJS): New.
12544 (OBS): Use LIBOBJS.
12545 (memmem.o): New rule.
12546 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12547 * configure: Regenerated.
12549 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12551 * server.c (handle_query): Never return "unsupported" for
12552 qXfer:features:read queries.
12554 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12556 * server.c (get_features_xml): Fix inverted condition.
12557 (handle_query): Always support qXfer:feature:read.
12559 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12561 * server.c (wrapper_argv): New.
12562 (start_inferior): Handle wrapper_argv. If set, expect an extra
12564 (gdbserver_usage): Document --wrapper.
12565 (main): Parse --wrapper.
12567 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12569 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12570 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12571 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12572 (ppc_set_pc): Likewise.
12573 (ppc_arch_setup): New function.
12574 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12575 of collect_register.
12576 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12578 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12580 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12581 instead of linux-ppc64-low.o.
12582 * linux-ppc64-low.c: Remove file.
12583 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12584 (linux-ppc64-low.o): Remove rule.
12586 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12587 (init_registers_powerpc_64): Likewise.
12588 (ppc_regmap): Conditionally define depending on __powerpc64__.
12589 (ppc_cannot_store_register): Do not special-case "fpscr" when
12590 compiled on __powerpc64__.
12591 (ppc_collect_ptrace_register): New function.
12592 (ppc_supply_ptrace_register): New function.
12593 (ppc_breakpoint): Change type to "unsigned int".
12594 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12595 (the_low_target): Conditionally provide initializers for the
12596 arch_setup member depending on __powerpc64__. Install
12597 collect_ptrace_register and supply_ptrace_register members.
12599 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12601 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12602 * server.c (gdbserver_xmltarget): Define.
12603 (get_features_xml): Use it to replace "target.xml" and arch_string.
12605 * configure.srv: Remove srv_xmltarget. Add XML files that were
12606 mentioned there to srv_xmlfiles instead. Remove conditional tests
12607 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12608 srv_xmlfiles and srv_regobj to include all possible choices.
12609 * configure.ac (srv_xmltarget): Remove.
12610 (srv_xmlfiles): Do not add "target.xml".
12611 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12612 checks for supplementary target information.
12613 * configure: Regenerate.
12614 * Makefile.in (XML_TARGET): Remove.
12615 (target.xml): Remove rule.
12616 (clean): Do not clean up target.xml.
12617 (.PRECIOUS): Do not mention target.xml.
12619 * target.h (struct target_ops): Remove arch_string member.
12620 * linux-low.c (linux_arch_string): Remove.
12621 (linux_target_ops): Remove arch_string initializer.
12622 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12623 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12624 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12625 * spu-low.c (spu_arch_string): Remove.
12626 (spu_target_ops): Remove arch_string initializer.
12627 * win32-low.c (win32_arch_string): Remove.
12628 (win32_target_ops): Remove arch_string initializer.
12629 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12630 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12631 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12633 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12635 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12636 by collect_ptrace_register and supply_ptrace_register hooks.
12637 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12638 instead of checking for the_low_target.left_pad_xfer.
12639 (usr_store_inferior_registers): Use collect_ptrace_register callback
12640 instead of checking for the_low_target.left_pad_xfer.
12642 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12643 (s390_supply_ptrace_register): Likewise.
12644 (s390_fill_gregset): Call s390_collect_ptrace_register.
12645 (the_low_target): Update.
12647 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12648 (ppc_supply_ptrace_register): Likewise.
12649 (the_low_target): Update.
12651 * linux-i386-low.c (the_low_target): Update.
12652 * linux-x86-64-low.c (the_low_target): Update.
12654 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12656 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12657 reg-s390.o and reg-s390x.o.
12659 * linux-low.c (new_inferior): New global variable.
12660 (linux_create_inferior, linux_attach): Set it.
12661 (linux_wait_for_process): Call the_low_target.arch_setup after the
12662 target has stopped for the first time.
12663 (initialize_low): Do not call the_low_target.arch_setup.
12665 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12666 (s390_set_pc): Likewise.
12667 (s390_arch_setup): New function.
12668 (the_low_target): Use s390_arch_setup as arch_setup routine.
12670 * regcache.c (realloc_register_cache): New function.
12671 (set_register_cache): Call it for each existing regcache.
12673 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12675 * server.h (init_registers): Remove prototype.
12677 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12678 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12679 instead of init_registers ().
12680 * linux-arm-low.c (init_registers_arm): Add prototype.
12681 (init_registers_arm_with_iwmmxt): Likewise.
12682 (the_low_target): Add initializer for arch_setup field.
12683 * linux-cris-low.c (init_registers_cris): Add prototype.
12684 (the_low_target): Add initializer for arch_setup field.
12685 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12686 (the_low_target): Add initializer for arch_setup field.
12687 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12688 (the_low_target): Add initializer for arch_setup field.
12689 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12690 (the_low_target): Add initializer for arch_setup field.
12691 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12692 (the_low_target): Add initializer for arch_setup field.
12693 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12694 (the_low_target): Add initializer for arch_setup field.
12695 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12696 (init_registers_mips64_linux): Likewise.
12697 (the_low_target): Add initializer for arch_setup field.
12698 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12699 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12700 (the_low_target): Add initializer for arch_setup field.
12701 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12702 (init_registers_powerpc_64): Likewise.
12703 (the_low_target): Add initializer for arch_setup field.
12704 * linux-s390-low.c (init_registers_s390): Add prototype.
12705 (init_registers_s390x): Likewise.
12706 (the_low_target): Add initializer for arch_setup field.
12707 * linux-sh-low.c (init_registers_sh): Add prototype.
12708 (the_low_target): Add initializer for arch_setup field.
12709 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12710 (the_low_target): Add initializer for arch_setup field.
12711 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12712 (the_low_target): Add initializer for arch_setup field.
12714 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12715 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12716 instead of init_registers ().
12717 * win32-arm-low.c (init_registers_arm): Add prototype.
12718 (the_low_target): Add initializer for arch_setup field.
12719 * win32-i386-low.c (init_registers_i386): Add prototype.
12720 (the_low_target): Add initializer for arch_setup field.
12722 * spu-low.c (init_registers_spu): Add prototype.
12723 (initialize_low): Call initialie_registers_spu () instead of
12724 initialize_registers ().
12726 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12728 * server.c (handle_v_requests): When handling the vRun and vAttach
12729 packets, if already debugging a process, don't kill it. Return an
12732 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12734 * server.c (handle_query): Correct length check.
12736 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12738 * win32-low.c (do_initial_child_stuff): Add process handle
12739 parameter. Set current_process_handle and current_process_id from the
12740 parameters. Clear globals.
12741 (win32_create_inferior): Don't set current_process_handle and
12742 current_process_id here. Instead pass them on the call to
12743 do_initial_child_stuff.
12744 (win32_attach): Likewise.
12745 (win32_clear_inferiors): New.
12746 (win32_kill): Don't close the current process handle or the
12747 current thread handle here. Instead call win32_clear_inferiors.
12748 (win32_detach): Don't open a new handle to the process. Call
12749 win32_clear_inferiors.
12750 (win32_join): Don't rely on current_process_handle; open a new
12751 handle using the process id.
12752 (win32_wait): Call win32_clear_inferiors when the inferior process
12755 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12757 * server.c (monitor_show_help): Add "exit".
12759 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12761 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12762 (clean): Add reg-xtensa.c.
12763 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12764 * configure.srv (xtensa*-*-linux*) New target.
12765 * linux-xtensa-low.c: New.
12766 * xtensa-xtregs.c: New.
12768 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12770 * hostio.c: Don't include errno.h.
12771 (errno_to_fileio_errno): Move to hostio-errno.
12772 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12773 error number outputting to the target->hostio_last_error callback.
12774 (hostio_packet_error): Use FILEIO_EINVAL directly.
12775 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12776 calls to hostio_error.
12777 * hostio-errno.c: New.
12778 * server.h (hostio_last_error_from_errno): Declare.
12779 * target.h (target_ops): Add hostio_last_error member.
12780 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12781 as hostio_last_error handler.
12782 * spu-low.c (spu_target_ops): Likewise.
12783 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12784 (wince_hostio_last_error): New functions.
12785 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12786 as hostio_last_error handler.
12787 (win32_target_ops) [!_WIN32_WCE]: Register
12788 hostio_last_error_from_errno as hostio_last_error handler.
12789 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12790 (hostio-errno.o): New rule.
12791 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12792 * configure.srv (srv_hostio_err_objs): New variable. Default to
12794 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12795 * configure: Regenerate.
12797 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12799 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12800 (linux_kill, linux_detach): Clean up the process list.
12801 * remote-utils.c (remote_open): Improve port number parsing.
12802 (putpkt_binary, input_interrupt): Only send interrupts if the target
12804 * server.c (extended_protocol): Make static.
12805 (attached): Define earlier.
12806 (exit_requested, response_needed, program_argv): New variables.
12807 (target_running): New.
12808 (start_inferior): Clear attached here.
12809 (attach_inferior): Set attached here.
12810 (require_running): Define.
12811 (handle_query): Use require_running and target_running. Implement
12813 (handle_v_attach, handle_v_run): New.
12814 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12815 (gdbserver_usage): Update.
12816 (main): Redo argument parsing. Handle --debug and --multi. Handle
12817 --attach along with other options or after the port. Save
12818 program_argv. Support no initial program. Resynchronize
12819 communication with GDB after an error. Handle "monitor exit".
12820 Use require_running and target_running. Always allow the extended
12821 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12822 restart in extended mode.
12823 * README: Refer to the GDB manual. Update --attach usage.
12825 2007-12-20 Andreas Schwab <schwab@suse.de>
12827 * linux-low.c (STACK_SIZE): Define.
12828 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12829 (linux_test_for_tracefork): Likewise.
12831 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12833 * linux-low.c (linux_wait_for_event): Update messages. Do not
12834 reinsert auto-delete breakpoints.
12835 * mem-break.c (struct breakpoint): Change return type of handler to
12837 (set_breakpoint_at): Update handler type.
12838 (reinsert_breakpoint_handler): Return 1 instead of calling
12840 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12842 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12843 * mem-break.h (set_breakpoint_at): Update handler type.
12844 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12845 * win32-low.c (auto_delete_breakpoint): New.
12846 (get_child_debug_event): Use it.
12848 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12850 * configure.ac: Check for pread and pwrite.
12851 * hostio.c (handle_pread): Fall back to lseek and read.
12852 (handle_pwrite): Fall back to lseek and write.
12853 * config.in, configure: Regenerated.
12855 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12857 * server.c (myresume): Add own_buf argument.
12858 (main): Update calls.
12860 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12862 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12863 * remote-utils.c (remote_open): Do not call disable_async_io.
12864 (block_async_io): Delete.
12865 (unblock_async_io): Make static.
12866 (initialize_async_io): New.
12867 * server.c (handle_v_cont): Handle async I/O here.
12868 (myresume): Likewise. Move other common resume tasks here...
12869 (main): ... from here. Call initialize_async_io. Disable async
12870 I/O before the main loop.
12871 * server.h (initialize_async_io): Declare.
12872 (block_async_io, unblock_async_io): Delete prototypes.
12873 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12875 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12877 * remote-utils.c (readchar): Allow binary data in received messages.
12879 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12881 * win32-low.c (attaching): New global.
12882 (win32_create_inferior): Clear the `attaching' global.
12883 (win32_attach): Set the `attaching' global.
12884 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12885 attaching. Only set a breakpoint at the entry point if not
12888 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12890 * server.c (main): Don't report dll events on the initial
12891 connection on attaches.
12893 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12895 * server.c (main): Relax numerical bases supported for the pid of
12896 the --attach command line argument.
12898 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12900 * win32-low.c (win32_attach): Call OpenProcess before
12901 DebugActiveProcess, not after. Add last error output to error
12904 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12906 * win32-low.c (win32_get_thread_context)
12907 (win32_set_thread_context): New functions.
12908 (thread_rec): Use win32_get_thread_context.
12909 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12910 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12913 2007-12-03 Leo Zayas
12914 Pedro Alves <pedro_alves@portugalmail.pt>
12916 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12918 (child_add_thread): Minor cleanup.
12919 (child_continue): Resume artificially suspended threads before
12920 calling ContinueDebugEvent.
12921 (suspend_one_thread): New.
12922 (fake_breakpoint_event): New.
12923 (get_child_debug_event): Change return type to int. Check here if
12924 gdb sent an interrupt request. If a soft interrupt was requested,
12925 fake a breakpoint event. Return 0 if there is no event to handle,
12927 (win32_wait): Don't check here if gdb sent an interrupt request.
12928 Ensure there is a valid event to handle.
12929 (win32_request_interrupt): Add soft interruption method as last
12932 2007-12-03 Leo Zayas
12933 Pedro Alves <pedro_alves@portugalmail.pt>
12935 * win32-low.h (win32_thread_info): Add descriptions to the
12936 structure members. Replace `suspend_count' counter by a
12938 * win32-low.c (thread_rec): Update condition of when to get the
12939 context from the inferior. Rely on ContextFlags being set if it
12940 has already been retrieved. Only suspend the inferior thread if
12941 we haven't already. Warn if that fails.
12942 (continue_one_thread): s/suspend_count/suspended/. Only call
12943 ResumeThread once. Warn if that fails.
12945 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12947 * win32-low.c (win32_wait): Don't read from the inferior when it
12948 has already exited.
12950 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12952 * Makefile.in (win32_low_h): New variable.
12953 (win32-low.o): Add dependency on $(win32_low_h).
12954 (win32-arm-low.o, win32-i386-low.o): New rules.
12956 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12958 * hostio.c: Correct copyright year.
12960 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12962 * Makefile.in (OBS): Add hostio.o.
12963 (hostio.o): New rule.
12964 * server.h (handle_vFile): Declare.
12965 * hostio.c: New file.
12966 * server.c (handle_v_requests): Take packet_len and new_packet_len
12967 for binary packets. Call handle_vFile.
12968 (main): Update call to handle_v_requests.
12970 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12972 * linux-low.c: Include <sched.h>.
12974 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12976 * linux-low.c (linux_tracefork_grandchild): New.
12977 (linux_tracefork_child): Use clone.
12978 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12980 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12982 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12984 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12986 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12988 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12990 * inferiors.c (change_inferior_id): Delete.
12991 (add_pid_to_list, pull_pid_from_list): New.
12992 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12993 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12994 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12995 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12996 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12997 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12998 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12999 (using_threads): Always set to 1.
13000 (handle_extended_wait): New.
13001 (add_process): Do not set TID.
13002 (linux_create_inferior): Set must_set_ptrace_flags.
13003 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13004 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13005 (linux_thread_alive): Rename TID argument to LWPID.
13006 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13007 (linux_wait_for_event): Do not use TID or check using_threads. Update
13008 call to dead_thread_notify. Call handle_extended_wait.
13009 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13010 (send_sigstop): Delete sigstop_sent.
13011 (wait_for_sigstop): Avoid TID.
13012 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13013 (linux_test_for_tracefork): New.
13014 (linux_lookup_signals): Use thread_db_active and
13015 linux_supports_tracefork_flag.
13016 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13017 * linux-low.h (get_process_thread): Avoid TID.
13018 (struct process_ifo): Move thread_known and tid to the end. Remove
13020 (linux_attach_lwp, thread_db_init): Update prototypes.
13021 * server.h (change_inferior_id): Delete prototype.
13022 (add_pid_to_list, pull_pid_from_list): New prototypes.
13023 * thread-db.c (thread_db_use_events): New.
13024 (find_first_thread): Rename to...
13025 (find_one_thread): ...this. Update callers and messages. Do not
13026 call fatal. Check thread_db_use_events. Do not call
13027 change_inferior_id or new_thread_notify.
13028 (maybe_attach_thread): Update. Do not call new_thread_notify.
13029 (thread_db_init): Set thread_db_use_events. Check use_events.
13030 * utils.c (fatal, warning): Correct message prefix.
13032 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13034 * Makefile.in (clean): Remove new files.
13035 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13036 (powerpc-64.o, powerpc-64.c): New rules.
13037 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13038 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13040 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13042 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13043 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13044 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13045 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13046 (target_regsets): Add AltiVec and SPE register sets.
13047 * configure.ac: Check for AltiVec and SPE.
13048 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13049 (ppc_fill_vrregset, ppc_store_vrregset): New.
13050 (target_regsets): Add AltiVec register set.
13051 * configure: Regenerated.
13053 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13055 * linux-low.c (O_LARGEFILE): Define.
13056 (linux_read_memory): Use /proc/PID/mem.
13057 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13058 * configure, config.in: Regenerated.
13060 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13062 * linux-low.c (linux_wait_for_event): Do not pass signals while
13065 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13067 * win32-low.c (create_process): New.
13068 (win32_create_inferior): Use create_process instead of
13069 CreateProcess. If create_process failed retry appending an ".exe"
13070 suffix. Store the GetLastError result immediatelly after
13071 create_process calls and use it on the call to error.
13073 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13075 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13077 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13079 * configure.ac: Switch license to GPLv3.
13081 2007-08-01 Michael Snyder <msnyder@access-company.com>
13083 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13085 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13087 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13089 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13090 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13091 CloseToolhelp32Snapshot.
13092 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13093 CloseToolhelp32Snapshot.
13095 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13097 * server.c (main): Check for inferior exit before main loop.
13099 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13101 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13102 instead of on tmp_desc.
13104 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13105 Daniel Jacobowitz <dan@codesourcery.com>
13107 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13108 (add_thread): Minor cleanups.
13109 (clear_inferiors): Move lower in the file. Clear the DLL
13111 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13112 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13113 (xml_escape_text): New.
13114 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13116 (handle_v_cont): Report errors.
13117 (gdbserver_version): Update.
13118 (main): Correct size of own_buf. Do not report initial DLL events.
13119 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13120 (unloaded_dll, xml_escape_text): New.
13121 * win32-low.c (enum target_waitkind): Update comments.
13122 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13123 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13124 (win32_EnumProcessModules, win32_GetModuleInformation)
13125 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13126 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13127 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13128 (win32_Module32First, win32_Module32Next, load_toolhelp)
13129 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13130 (get_child_debug_event): Handle DLL events.
13131 (win32_wait): Likewise.
13133 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13135 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13136 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13138 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13140 * win32-low.c (handle_output_debug_string): Ignore event if not
13143 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13145 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13147 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13149 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13151 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13153 * inferiors.c (change_inferior_id): Add comment.
13154 * linux-low.c (check_removed_breakpoint): Add an early
13155 prototype. Improve debug output.
13156 (linux_attach): Doc update.
13157 (linux_detach_one_process, linux_detach): Clean up before releasing
13159 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13160 * linux-low.h (struct process_info): Doc improvement.
13161 * mem-break.c (delete_all_breakpoints): New.
13162 * mem-break.h (delete_all_breakpoints): New prototype.
13163 * thread-db.c (find_first_thread): New.
13164 (thread_db_create_event): Call it instead of
13165 thread_db_find_new_threads. Clean up unused variables.
13166 (maybe_attach_thread): Remove first thread handling.
13167 (thread_db_find_new_threads): Use find_first_thread.
13168 (thread_db_get_tls_address): Likewise.
13170 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13172 * thread-db.c (thread_db_find_new_threads): Add prototype.
13173 (thread_db_create_event): Check for the main thread before adding
13175 (maybe_attach_thread): Only enable event reporting if TID == 0.
13176 (thread_db_get_tls_address): Check for new threads.
13178 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13180 * linux-low.c (linux_create_inferior): Try execv before execvp.
13181 * spu-low.c (spu_create_inferior): Likewise.
13183 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13185 * linux-low.c (linux_create_inferior): Change execv to execvp.
13186 * spu-low.c (spu_create_inferior): Likewies.
13188 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13190 * Makefile.in (clean): Clean new files instead of deleted ones.
13191 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13192 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13194 * configure.srv: Specify XML files and new regformats for MIPS and
13196 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13197 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13198 an entry for the restart register.
13199 (mips_cannot_fetch_register, mips_cannot_store_register)
13200 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13201 register names to match the XML descriptions.
13202 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13203 restart register instead of $0.
13205 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13206 Markus Deuling <deuling@de.ibm.com>
13208 * remote-utils.c (decode_xfer_write): New function.
13209 * server.h (decode_xfer_write): Add prototype.
13210 * server.c (handle_query): Add PACKET_LEN argument. Support
13211 qXfer:spu:read and qXfer:spu:write packets.
13212 (main): Pass packet_len to handle_query.
13213 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13214 * target.h (target_ops): Add qxfer_spu.
13216 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13218 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13219 accessing non-seekable spufs files.
13221 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13223 * server.c (handle_query): Add reply for qC packet.
13225 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13226 Leo Zayas <lerele@champenstudios@com>
13228 * server.h (check_remote_input_interrupt_request): New function.
13229 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13230 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13231 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13232 (check_remote_input_interrupt_request): New function.
13233 * server.h (check_remote_input_interrupt_request): Declare.
13234 * win32-low.c (winapi_DebugBreakProcess,
13235 winapi_GenerateConsoleCtrlEvent): New typedefs.
13236 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13238 (win32_wait): Check for remote interrupt request
13239 with check_remote_input_interrupt_request.
13240 (win32_request_interrupt): New function.
13241 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13243 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13245 * win32-low.c (debug_registers_changed,
13246 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13247 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13248 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13249 (thread_rec): Get context using the low target.
13250 (child_add_thread): Call thread_added on the low target,
13251 which does the same thing.
13253 (do_initial_child_stuff): Remove debug registers references.
13254 Set context using the low target. Resume threads after
13255 setting the contexts.
13256 (child_continue): Remove dead variable. Remove debug
13257 registers references.
13258 (child_fetch_inferior_registers): Go through the low target.
13259 (do_child_store_inferior_registers): Remove.
13260 (child_store_inferior_registers): Go through the low target.
13261 (win32_resume): Remove debug registers references.
13262 Set context using the low target.
13263 (handle_exception): Change return type to void. Don't record
13264 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13265 first chance exception.
13266 (get_child_debug_event): Change return type to void. Remove
13267 goto loop. Always return after waiting for debug event.
13268 (win32_wait): Convert to switch statement. Handle spurious
13271 * win32-i386-low.c (debug_registers_changed,
13272 debug_registers_used): New.
13273 (initial_stuff): Rename to ...
13274 (i386_initial_stuff): ... this. Clear debug registers
13276 (store_debug_registers): Delete.
13277 (i386_get_thread_context): New.
13278 (load_debug_registers): Delete.
13279 (i386_set_thread_context): New.
13280 (i386_thread_added): New.
13281 (single_step): Rename to ...
13282 (i386_single_step): ... this.
13283 (do_fetch_inferior_registers): Rename to ...
13284 (i386_fetch_inferior_register): ... this.
13285 (i386_store_inferior_register): New.
13286 (the_low_target): Adapt to new interface.
13288 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13289 (arm_get_thread_context): New.
13290 (arm_set_thread_context): New.
13292 (do_fetch_inferior_registers): Rename to ...
13293 (arm_fetch_inferior_register): ... this.
13294 (arm_store_inferior_register): New.
13295 (arm_wince_breakpoint): Reimplement as unsigned long.
13296 (arm_wince_breakpoint_len): Define.
13297 (the_low_target): Adapt to new interface.
13299 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13300 load_debug_registers. Add get_thread_context, set_thread_context,
13301 thread_added and store_inferior_register. Rename
13302 fetch_inferior_registers to fetch_inferior_register.
13303 (regptr): Remove declaration.
13305 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13307 * linux-low.c (linux_detach): Change return type to int. Return 0.
13308 * spu-low.c (spu_detach): Likewise.
13310 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13312 * target.h (target_ops): Change return type of detach to int.
13314 (join_inferior): New.
13315 * server.c (main): Don't skip detach support on mingw32.
13316 If the inferior doesn't support detaching return error.
13317 Call join_inferior instead of using waitpid.
13318 * linux-low.c (linux_join): New.
13319 (linux_target_op): Add linux_join.
13320 * spu-low.c (spu_join): New.
13321 (spu_target_ops): Add spu_join.
13322 * win32-low.c (win32_detach): Adapt to new interface.
13323 Reopen current_process_handle before detaching. Issue a child
13324 resume before detaching.
13326 (win32_target_op): Add win32_join.
13328 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13330 * win32-low.c (win32-attach): Fix return value.
13331 * target.h (target_ops): Describe ATTACH return values.
13333 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13335 * win32-low.c (GETPROCADDRESS): Define.
13336 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13337 (winapi_DebugSetProcessKillOnExit): Likewise.
13338 (win32_create_inferior): Force usage of ansi CreateProcessA.
13339 (win32_attach): Use GETPROCADDRESS.
13340 (win32_detach): Likewise.
13342 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13344 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13346 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13348 * win32-low.c: Commit leftover changes from 2007-03-29.
13350 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13352 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13353 fields short instead of int. Add explicit padding.
13354 (i387_cache_to_fsave): Remove unnecessary casts.
13355 (i387_fsave_to_cache): Doc fix.
13356 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13358 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13360 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13361 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13363 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13365 * configure.srv (arm*-*-mingw32ce*): Move near the other
13368 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13370 * configure.ac: Add errno checking.
13371 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13372 sys/file.h and malloc.h.
13373 (AC_CHECK_DECLS): Add perror.
13374 (srv_mingwce): Handle.
13375 * configure.srv (i[34567]86-*-cygwin*): Add
13376 win32-i386-low.o to srv_tgtobj.
13377 (i[34567]86-*-mingw*): Likewise.
13378 (arm*-*-mingw32ce*): Add case.
13379 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13380 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13381 [__MINGW32CE__] (strerror): New function.
13382 [__MINGW32CE__] (errno): Define to GetLastError.
13383 [__MINGW32CE__] (COUNTOF): New macro.
13384 (remote_open): Remove extra close call.
13385 * mem-break.c (delete_breakpoint_at): New function.
13386 * mem-break.h (delete_breakpoint_at): Declare.
13387 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13388 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13389 [USE_WIN32API] (read, write): Add char* casts.
13390 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13391 * server.h: Include wincecompat.h on Windows CE.
13392 [HAVE_ERRNO_H]: Check.
13393 (perror): Declare if not declared.
13394 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13395 (perror_with_name): Remove errno declaration.
13396 * wincecompat.h: New.
13397 * wincecompat.c: New.
13398 * win32-low.h: New.
13399 * win32-arm-low.c: New.
13400 * win32-i386-low.c: New.
13401 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13402 (OUTMSG2): Make it safe.
13404 (COUNTOF): New macro.
13405 (NUM_REGS): Get it from the low target.
13406 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13407 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13408 (thread_rec): Let low target handle debug registers.
13409 (child_add_thread): Likewise.
13410 (child_init_thread_list): Likewise.
13411 (continue_one_thread): Likewise.
13413 (do_child_fetch_inferior_registers): Move to ...
13414 * win32-i386-low.c: ... here, and rename to ...
13415 (do_fetch_inferior_registers): ... this.
13416 * win32-low.c (child_fetch_inferior_registers):
13417 Go through the low target.
13418 (do_child_store_inferior_registers): Use regptr.
13419 (strwinerror): New function.
13420 (win32_create_inferior): Handle Windows CE.
13421 Use strwinerror instead of strerror on Windows error
13422 codes. Add program to the error output.
13423 Don't close the main thread handle on Windows CE.
13424 (win32_attach): Use coredll.dll on Windows CE.
13425 (win32_kill): Close current process and current
13427 (win32_detach): Use coredll.dll on Windows CE.
13428 (win32_resume): Let low target handle debug registers, and
13430 (handle_exception): Add/Remove initial breakpoint. Avoid
13431 non-existant WSTOPSIG on Windows CE.
13432 (win32_read_inferior_memory): Cast to remove warning.
13433 (win32_arch_string): Go through the low target.
13434 (initialize_low): Call set_breakpoint_data with the low
13435 target's breakpoint.
13436 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13437 FOP_REGNUM, mappings): Move to ...
13438 * win32-i386-low.c: ... here.
13439 * win32-low.c (win32_thread_info): Move to ...
13440 * win32-low.h: ... here.
13441 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13442 win32-arm-low.c and wincecompat.c.
13443 (all:): Add $EXEEXT.
13444 (install-only:): Likewise.
13445 (gdbserver:): Likewise.
13446 (gdbreplay:): Likewise.
13447 * config.in: Regenerate.
13448 * configure: Regenerate.
13450 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13452 * win32-low.c: Rename typedef thread_info to
13453 win32_thread_info throughout.
13455 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13457 * win32-i386-low.c: Rename to ...
13458 * win32-low.c: ... this.
13459 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13460 * Makefile.in: Likewise.
13462 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13464 * remote-utils.c (monitor_output): Constify msg parameter.
13465 * server.h (monitor_output): Likewise.
13466 * win32-i386-low.c (handle_output_debug_string): New.
13467 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13468 handle_output_debug_string.
13469 (get_child_debug_event): Likewise.
13471 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13473 * server.c (main): Correct strtoul check.
13475 2007-03-27 Jon Ringle <jon@ringle.org>
13477 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13479 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13481 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13483 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13485 * terminal.h: Check HAVE_SGTTY_H.
13487 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13489 * remote-utils.c (remote_open): Print out the assigned port number.
13491 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13493 * remote-utils.c (monitor_output): New function.
13494 * server.c (debug_threads): Define here.
13495 (monitor_show_help): New function.
13496 (handle_query): Handle qRcmd.
13497 (main): Do not handle 'd' packet.
13498 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13499 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13502 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13504 * Makefile.in (EXEEXT): New.
13505 (clean): Use $(EXEEXT).
13507 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13509 * target.h (target_ops): Rename send_signal to request_interrupt,
13510 and remove enum target_signal parameter.
13511 * linux-low.c (linux_request_interrupt): Rename from
13512 linux_send_signal, and always send SIGINT.
13513 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13514 and always send SIGINT.
13515 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13517 (input_interrupt): Likewise.
13519 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13521 * server.c (get_features_xml): Check if target implemented
13523 * win32-i386-low.c (win32_arch_string): New.
13524 (win32_target_ops): Add win32_arch_string as arch_string member.
13526 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13528 * spu-low.c (spu_arch_string): New.
13529 (spu_target_ops): Add spu_arch_string.
13531 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13533 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13534 * configure.ac: Do not check for terminal.h.
13535 * configure, config.in: Regenerated.
13537 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13539 * Makefile.in (OBS): Add $(XML_BUILTIN).
13540 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13542 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13543 (arm-with-iwmmxt.c): New.
13544 * config.in, configure: Regenerate.
13545 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13546 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13547 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13548 (arm*-*-linux*): Add iWMMXt and regset support.
13549 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13550 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13551 (arm_store_wmmxregset, target_regsets): New.
13552 * server.c (get_features_xml): Take annex argument. Check builtin
13554 (handle_query): Handle multiple annexes.
13556 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13558 * remote-utils.c [USE_WIN32API] (read, write): Define.
13559 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13562 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13564 * linux-i386-low.c (the_low_target): Set arch_string.
13565 * linux-x86-64-low.c (the_low_target): Likewise.
13566 * linux-low.c (linux_arch_string): New.
13567 (linux_target_ops): Add it.
13568 * linux-low.h (struct linux_target_ops): Add arch_string.
13569 * server.c (write_qxfer_response): Use const void * for DATA.
13570 (get_features_xml): New.
13571 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13572 * target.h (struct target_ops): Add arch_string method.
13574 2007-01-03 Denis Pilat <denis.pilat@st.com>
13575 Daniel Jacobowitz <dan@codesourcery.com>
13577 * linux-low.c (linux_kill): Handle being called with no threads.
13578 * win32-i386-low.c (win32_kill): Likewise.
13579 (get_child_debug_event): Clear current_process_handle.
13581 2006-12-30 Denis PILAT <denis.pilat@st.com>
13582 Daniel Jacobowitz <dan@codesourcery.com>
13584 * remote-utils.c (remote_open): Check the type of specified
13585 serial port devices before opening them.
13586 * server.c (main): Kill the inferior if an error occurs during
13587 the first remote_open.
13589 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13591 * README: Update supported targets.
13593 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13595 * Makefile.in (clean): Remove reg-mips64.c.
13596 (reg-mips64.c, reg-mips64.o): New rules.
13597 * configure.srv: Handle mips64. Include regset support for mips.
13598 * linux-mips-low.c (union mips_register): New.
13599 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13600 (mips_breakpoint, mips_breakpoint_at): Use int.
13601 (mips_collect_register, mips_supply_register)
13602 (mips_collect_register_32bit, mips_supply_register_32bit)
13603 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13604 (mips_store_fpregset, target_regsets): New.
13605 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13607 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13609 * configure.srv: Add target "spu*-*-*".
13610 * Makefile.in (clean): Remove reg-spu.c.
13611 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13612 * spu-low.c: New file.
13614 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13616 * configure.ac: Correct td_thr_tls_get_addr test.
13617 * configure: Regenerated.
13619 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13621 * linux-low.c (linux_wait_for_event): Reformat. Use the
13622 pass_signals array.
13623 * remote-utils.c (decode_address_to_semicolon): New.
13624 * server.c (pass_signals, handle_general_set): New.
13625 (handle_query): Mention QPassSignals for qSupported.
13626 (main): Call handle_general_set.
13627 * server.h (pass_signals, decode_address_to_semicolon): New.
13629 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13631 * server.c (handle_query): Correct error handling for read_auxv.
13633 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13635 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13636 and srv_linux_thread_db to yes.
13637 * linux-s390-low.c (s390_fill_gregset): New function.
13638 (target_regsets): Define data structure.
13640 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13642 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13643 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13644 * config.in, configure: Regenerated.
13645 * inferiors.c (gdb_id_to_thread): New function.
13646 (gdb_id_to_thread_id): Use it.
13647 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13648 * linux-low.h (struct process_info): Add th member.
13649 (thread_db_get_tls_address): New prototype.
13650 * remote-utils.c (decode_address): Make non-static.
13651 * server.c (handle_query): Handle qGetTLSAddr.
13652 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13653 * target.h (struct target_ops): Add get_tls_address.
13654 * thread-db.c (maybe_attach_thread): Save the thread handle.
13655 (thread_db_get_tls_address): New.
13657 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13659 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13660 (linux_resume_one_process): Take a siginfo_t *. Update all
13661 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13662 (struct pending_signals): Add a siginfo_t.
13663 (linux_wait_for_process): Always set last_status.
13664 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13665 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13666 * linux-low.h (struct process_info): Add last_status.
13668 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13670 * remote-utils.c (try_rle): New function.
13671 (putpkt_binary): Use it.
13673 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13675 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13676 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13677 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13678 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13679 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13682 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13684 * server.c (terminal_fd): New variable.
13685 (old_foreground_pgrp): Likewise.
13686 (restore_old_foreground_pgrp): New function.
13687 (start_inferior): Record the terminal file descriptor in terminal_fd
13688 and its original foreground group in old_foreground_pgrp. Register
13689 restore_old_foreground_pgrp with atexit().
13691 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13693 * server.c (handle_query): Correct qPart to qXfer.
13695 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13697 * configure.ac: Check for more headers which are missing on
13698 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13699 * configure.srv: Add Cygwin and mingw32.
13700 * remote-utils.c: Don't include headers unconditionally which
13701 are missing on mingw32. Include <winsock.h> for mingw32.
13702 (remote_open): Adjust for mingw32 support. Flush
13703 standard error after writing to it.
13704 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13705 (unblock_async_io, enable_async_io, disable_async_io)
13706 (readchar, getpkt): Update for Winsock support.
13707 (prepare_resume_reply): Expect a protocol signal number.
13708 * server.c: Disable <sys/wait.h> on mingw32.
13709 (start_inferior): Adjust for mingw32 support. Flush
13710 standard error after writing to it.
13711 (attach_inferior): Likewise. Use protocol signal
13713 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13715 * win32-i386-low.c: New file.
13716 * Makefile.in (XM_CLIBS): Set.
13717 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13718 (win32-i386-low.o): New dependency rule.
13719 * linux-low.c (linux_wait): Use target signal numbers.
13720 * target.h (struct target_ops): Doc fix.
13721 * server.h (target_signal_to_name): New prototype.
13722 * gdbreplay.c: Don't include headers unconditionally which
13723 are missing on mingw32. Include <winsock.h> for mingw32.
13724 (remote_close, remote_open): Adjust for Winsock support.
13725 * configure, config.in: Regenerated.
13727 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13729 * server.c (decode_xfer_read, write_qxfer_response): New.
13730 (handle_query): Take a packet length argument. Handle
13731 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13732 the qSupported response.
13733 (main): Update call to handle_query.
13735 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13737 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13738 (putpkt_binary): Renamed from putpkt and adjusted for binary
13740 (putpkt): New wrapper for putpkt_binary.
13741 (readchar): Don't mask off the high bit.
13742 (decode_X_packet): New function.
13743 * server.c (main): Call putpkt_binary if a handler sets the packet
13744 length. Save the length of the incoming packet. Handle 'X'.
13745 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13747 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13749 * server.c (handle_query): Handle qSupported.
13751 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13753 * remote-utils.c (all_symbols_looked_up): New variable.
13754 (look_up_one_symbol): Check it.
13755 * server.h (look_up_one_symbol): New declaration.
13756 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13758 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13760 * Makefile.in (linux-arm-low.o): Update dependencies.
13761 * linux-arm-low.c: Include "gdb_proc_service.h".
13762 (PTRACE_GET_THREAD_AREA): Define.
13763 (ps_get_thread_area): New function.
13765 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13767 * configure.srv (m68k*-*-uclinux*): New target.
13768 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13769 (linux_resume_one_process): Remove extraneous cast.
13770 (linux_read_offsets): New.
13771 (linux_target_op): Add linux_read_offsets on mmuless systems.
13772 * server.c (handle_query): Add qOffsets logic.
13773 * target.h (struct target_ops): Add read_offsets.
13775 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13777 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13778 (PTRACE_GET_THREAD_AREA): Define.
13779 (ps_get_thread_area): New function.
13780 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13781 (linux-x86-64-low.o): Update.
13783 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13785 * configure.ac: Remove checks for prfpregset_t.
13786 * gdb_proc_service.h: New file.
13787 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13788 new "gdb_proc_service.h".
13789 * proc-service.c: Likewise.
13790 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13791 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13792 * Makefile.in (gdb_proc_service_h): Updated.
13793 * configure, config.in: Regenerated.
13795 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13797 * remote-utils.c (prepare_resume_reply): Move declaration
13798 of gdb_id_from_wait to the top of the block.
13800 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13802 * linux-low.c (regsets_store_inferior_registers): Read the regset
13803 from the target before filling it.
13805 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13807 * server.c (attach_inferior): Return SIGTRAP for a successful
13810 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13812 * Makefile.in (OBS): Add version.o.
13813 (STAGESTUFF): Delete.
13814 (version.o): Add dependencies.
13815 (version.c): Replace rule.
13816 (clean): Remove version.c.
13817 * server.c (gdbserver_version): New.
13818 (gdbserver_usage): Use printf.
13819 (main): Handle --version and --help.
13820 * server.h (version, host_name): Add declarations.
13822 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13834 * linux-x86-64-low.c:
13836 * linux-s390-low.c:
13837 * linux-ppc64-low.c:
13839 * linux-mips-low.c:
13840 * linux-m68k-low.c:
13841 * linux-m32r-low.c:
13844 * linux-ia64-low.c:
13845 * linux-i386-low.c:
13846 * linux-crisv32-low.c:
13858 * gdbserver.1: Add (C) after Copyright. Update the FSF
13861 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13863 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13864 (arm_breakpoint_at): Recognize both breakpoints.
13865 (the_low_target): Use the correct breakpoint instruction.
13867 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13869 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13870 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13871 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13872 (the_low_target): Update.
13874 2005-10-25 Andreas Schwab <schwab@suse.de>
13876 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13878 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13879 (ia64_num_regs): Reduce to 462.
13881 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13883 * acinclude.m4: Correct quoting.
13884 * aclocal.m4: Regenerated.
13886 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13887 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13888 (thread_db_init): Call thread_db_err_str.
13889 * configure.ac: Check for TD_VERSION.
13890 * config.in, configure: Regenerated.
13892 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13894 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13896 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13898 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13899 is not available. Define HAVE_PTRACE_GETREGS if it is.
13900 * config.in, configure: Regenerated.
13901 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13902 * linux-i386-low.c, linux-m68k-low.c: Update to use
13903 HAVE_PTRACE_GETREGS.
13904 * linux-low.c (regsets_fetch_inferior_registers)
13905 (regsets_store_inferior_registers): Only return 0 if we processed
13907 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13908 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13910 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13912 * inferiors.c (struct thread_info): Add gdb_id.
13913 (add_thread): Add gdb_id argument.
13914 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13915 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13916 calls to add_thread.
13917 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13918 * server.c (handle_query): Use thread_to_gdb_id.
13919 (handle_v_cont, main): Use gdb_id_to_thread_id.
13920 * server.h (add_thread): Update prototype.
13921 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13924 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13926 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13927 left-padded registers.
13928 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13929 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13931 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13933 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13934 * configure: Regenerate.
13935 * config.in: Regenerate.
13936 * server.h (NEED_DECLARATION_STRERROR):
13937 Replace with !HAVE_DECL_STRERROR.
13939 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13941 * linux-low.c (linux_wait, linux_send_signal): Don't test
13942 an unsigned long variable for > 0 if it could be MAX_ULONG.
13943 * server.c (myresume): Likewise.
13944 * target.c (set_desired_inferior): Likewise.
13946 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13948 * configure.ac: Simplify and improve check for socklen_t.
13949 * configure, config.in: Regenerate.
13951 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13953 * acconfig.h: Remove.
13954 * configure.ac: Add a test for socklen_t. Use three-argument
13955 AC_DEFINE throughout.
13956 * config.in: Regenerated using autoheader 2.59.
13957 * configure: Regenerated.
13959 * gdbreplay.c (socklen_t): Provide a default.
13960 (remote_open): Use socklen_t.
13961 * remote-utils.c (socklen_t): Provide a default.
13962 (remote_open): Use socklen_t.
13963 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13966 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13968 * linux-low.c (linux_read_memory, linux_write_memory)
13969 (linux_read_auxv): Likewise.
13970 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13971 (check_mem_write): Likewise.
13972 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13974 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13975 (registers_from_string, register_data): Likewise.
13976 * server.c (handle_query, main): Likewise.
13977 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13978 (decode_M_packet): Likewise.
13979 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13980 * target.h (struct target_ops): Update read_memory, write_memory,
13982 (read_inferior_memory, write_inferior_memory): Update.
13983 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13984 to unsigned char *.
13985 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13986 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13987 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13988 linux-s390-low.c, linux-sh-low.c: Update for changes in
13989 read_inferior_memory and the_low_target->breakpoint.
13991 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13993 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13994 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13995 * configure.srv: Add powerpc64-*-linux*.
13996 * linux-ppc64-low.c: New file.
13998 2005-05-23 Orjan Friberg <orjanf@axis.com>
14000 * linux-cris-low.c: New file with support for CRIS.
14001 * linux-crisv32-low.c: Ditto for CRISv32.
14002 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14003 (clean): Add reg-cris.c and reg-crisv32.c.
14004 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14005 reg-crisv32.o, and reg-crisv32.c to make rules.
14006 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14007 recognized targets.
14009 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14011 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14012 of sizeof (PTRACE_XFER_TYPE).
14013 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14015 2005-05-12 Orjan Friberg <orjanf@axis.com>
14017 * target.h (struct target_ops): Add insert_watchpoint,
14018 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14019 pointers for hardware watchpoint support.
14020 * linux-low.h (struct linux_target_ops): Ditto.
14021 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14022 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14023 to linux_target_ops.
14024 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14026 * server.c (main): Recognize 'Z' and 'z' packets.
14028 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14030 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14031 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14032 (the_low_target): Add new members.
14034 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14036 * proc-service.c (ps_lgetregs): Search all_processes instead of
14039 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14041 * server.c (start_inferior): Change return type to int.
14042 (attach_inferior): Change sigptr to int *.
14043 (handle_v_cont, handle_v_requests): Change signal to int *.
14044 (main): Change signal to int.
14046 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14048 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14049 * configure.srv: Add m32r*-*-linux*.
14050 * linux-m32r-low.c: New file.
14052 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14054 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14056 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14058 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14059 Take unsigned long arguments for PIDs.
14060 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14061 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14062 (wait_for_sigstop, linux_resume_one_process)
14063 (regsets_fetch_inferior_registers, linux_send_signal)
14064 (linux_read_auxv): Likewise. Update the types of variables holding
14065 PIDs. Update format string specifiers.
14066 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14067 * remote-utils.c (prepare_resume_reply): Likewise.
14068 * server.c (cont_thread, general_thread, step_thread)
14069 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14071 (handle_query): Update format specifiers.
14072 (handle_v_cont, main): Use strtoul for thread IDs.
14073 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14074 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14075 (general_thread, step_thread, thread_from_wait)
14076 (old_thread_from_wait): Update.
14077 * target.h (struct thread_resume): Use unsigned long for THREAD.
14078 (struct target_ops): Use unsigned long for arguments to attach and
14081 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14083 * acinclude.m4: Include bfd/bfd.m4 directly.
14084 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14085 <agriffis@toolchain.org>.
14086 * aclocal.m4, configure: Regenerated.
14088 2005-01-07 Andrew Cagney <cagney@gnu.org>
14090 * configure.ac: Rename configure.in, require autoconf 2.59.
14091 * configure: Re-generate.
14093 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14095 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14096 LIBS when finished.
14097 * aclocal.m4: Regenerated.
14098 * configure: Regenerated.
14100 2004-11-21 Andreas Schwab <schwab@suse.de>
14102 * linux-m68k-low.c (m68k_num_gregs): Define.
14103 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14104 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14105 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14106 (m68k_breakpoint_at): New. Add to the_low_target.
14108 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14109 srv_linux_thread_db to yes.
14111 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14113 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14114 (ARCH_SET_FS): Likewise.
14115 (ARCH_GET_FS): Likewise.
14116 (ARCH_GET_GS): Likewise.
14118 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14120 * linux-i386-low.c (ps_get_thread_area): New.
14121 * linux-x86-64-low.c (ps_get_thread_area): New.
14122 * linux-low.c: Include <sys/syscall.h>.
14123 (linux_kill_one_process): Don't kill the first thread here.
14124 (linux_kill): Kill the first thread here.
14125 (kill_lwp): New function.
14126 (send_sigstop, linux_send_signal): Use it.
14127 * proc-service.c: Clean up #ifdefs.
14128 (fpregset_info): Delete.
14129 (ps_lgetregs): Update and enable implementation.
14130 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14132 * remote-utils.c (struct sym_cache, symbol_cache): New.
14133 (input_interrupt): Print a clearer message.
14134 (async_io_enabled): New variable.
14135 (enable_async_io, disable_async_io): Use it. Update comments.
14136 (look_up_one_symbol): Use the symbol cache.
14137 * thread-db.c (thread_db_look_up_symbols): New function.
14138 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14140 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14142 * configure.in: Test for -rdynamic.
14143 * configure: Regenerated.
14144 * Makefile (INTERNAL_LDFLAGS): New.
14145 (gdbserver, gdbreplay): Use it.
14147 2004-09-02 Andrew Cagney <cagney@gnu.org>
14149 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14151 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14153 * linux-low.c (linux_wait): Clear all_processes list also.
14155 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14157 * linux-low.c: Include <errno.h>. Remove extern declaration of
14160 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14162 * gdbreplay.c, server.h, utils.c: Update copyright years.
14164 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14166 * server.c (main): Print child status or termination signal from
14167 variable 'signal', not 'sig'.
14169 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14171 * linux-low.c (linux_read_memory): Change return type to
14172 int. Check for and return error from ptrace().
14173 * target.c (read_inferior_memory): Change return type to int. Pass
14174 back return status from the_target->read_memory().
14175 * target.h (struct target_ops): Adapt *read_memory() prototype.
14177 (read_inferior_memory): Adapt prototype.
14178 * server.c (main): Return an error packet if
14179 read_inferior_memory() returns an error.
14181 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14183 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14184 Unify with other clean targets.
14186 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14188 * server.c (handle_v_cont): Call set_desired_inferior.
14190 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14192 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14194 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14196 * linux-low.c (linux_wait): Unblock async I/O.
14197 (linux_resume): Block and enable async I/O.
14198 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14199 * server.h (block_async_io, unblock_async_io): Add prototypes.
14201 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14203 * remote-utils.c (remote_open): Print a status notice after
14204 opening a TCP port.
14205 * server.c (attach_inferior): Print a status notice after
14208 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14210 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14212 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14214 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14216 * server.c, target.h: Update copyright years.
14218 2004-02-25 Roland McGrath <roland@redhat.com>
14220 * target.h (struct target_ops): New member `read_auxv'.
14221 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14222 * linux-low.c (linux_read_auxv): New function.
14223 (linux_target_ops): Initialize `read_auxv' member to that.
14225 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14227 Committed by Jim Blandy <jimb@redhat.com>.
14229 * linux-s390-low.c (s390_num_regs): Update.
14230 (s390_regmap): Remove control registers. Use __s390x__ predefine
14231 instead of GPR_SIZE to distiguish s390 and s390x targets.
14233 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14235 * linux-low.c: Update copyright year.
14236 (check_removed_breakpoint): Clear pending_is_breakpoint.
14237 (linux_set_resume_request, linux_queue_one_thread)
14238 (resume_status_pending_p): New functions.
14239 (linux_continue_one_thread): Use process->resume.
14240 (linux_resume): Only resume threads if there are no pending events.
14241 * linux-low.h (struct process_info): Add resume request
14244 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14246 * regcache.c (new_register_cache): Clear the allocated register
14247 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14249 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14251 * linux-low.c (linux_resume): Take a struct thread_resume *
14253 (linux_wait): Update call.
14254 (resume_ptr): New static variable.
14255 (linux_continue_one_thread): Renamed from
14256 linux_continue_one_process. Use resume_ptr.
14257 (linux_resume): Use linux_continue_one_thread.
14258 * server.c (handle_v_cont, handle_v_requests): New functions.
14259 (myresume): New function.
14260 (main): Handle 'v' case.
14261 * target.h (struct thread_resume): New type.
14262 (struct target_ops): Change argument of "resume" to struct
14264 (myresume): Delete macro.
14266 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14268 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14269 (uninstall): Support DESTDIR.
14271 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14273 * configure.srv: Add xscale*linux copy of arm*linux entry.
14275 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14277 * linux-arm-low.c (arm_reinsert_addr): New function.
14278 (the_low_target): Add arm_reinsert_addr.
14280 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14282 * mem-break.c: Remove whitespace at end of file.
14284 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14286 * configure.in: Check whether we need to prototype strerror.
14287 * server.h: Optionally prototype strerror.
14288 * gdbreplay.c (perror_with_name): Use strerror.
14289 * linux-low.c (linux_attach_lwp): Use strerror.
14290 * utils.c (perror_with_name): Use strerror.
14291 * config.in, configure: Regenerated.
14293 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14295 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14296 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14298 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14300 * Makefile.in (SFILES): Update.
14301 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14302 low-sun3.c: Remove files.
14304 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14306 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14307 (linux_detach_one_process, linux_detach): New functions.
14308 (linux_target_ops): Add linux_detach.
14309 * server.c (main): Handle 'D' packet.
14310 * target.h (struct target_ops): Add "detach" member.
14311 (detach_inferior): Define.
14313 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14315 From Kelley Cook <kelleycook@wideopenwest.com>:
14316 * configure.srv: Accept i[34567]86 variants.
14318 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14320 * linux-low.c (linux_wait_for_event): Correct comment typos.
14321 (linux_resume_one_process): Call check_removed_breakpoint.
14322 (linux_send_signal): New function.
14323 (linux_target_ops): Add linux_send_signal.
14324 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14326 * target.h (struct target_ops): Add send_signal.
14328 2003-05-29 Jim Blandy <jimb@redhat.com>
14330 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14331 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14332 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14333 away part of the register's value.
14335 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14337 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14338 (linux_wait_for_event, linux_init_signals): Likewise.
14340 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14342 * configure.in: Check for stdlib.h.
14343 * configure: Regenerated.
14344 * config.in: Regenerated.
14346 2003-01-04 Andreas Schwab <schwab@suse.de>
14348 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14350 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14352 * Makefile.in: Remove obsolete code.
14354 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14356 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14357 defined(PT_FPR0_HI).
14359 2002-11-17 Stuart Hughes <seh@zee2.com>
14361 * linux-arm-low.c (arm_num_regs): Increase.
14362 (arm_regmap): Include status register.
14364 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14366 * linux-low.c (register_addr): Remove incorrect -1 check.
14368 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14370 * linux-low.c (linux_create_inferior): Call setpgid. Return
14372 (unstopped_p, linux_signal_pid): Remove.
14373 (linux_target_ops): Remove linux_signal_pid.
14374 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14375 global instead of target method.
14376 * target.h (struct target_ops): Remove signal_pid. Update comment
14377 for create_inferior.
14378 * server.c (signal_pid): New variable.
14379 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14380 gdbserver. Set the child to be the foreground process group.
14381 (attach_inferior): Set signal_pid.
14383 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14385 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14387 2002-08-20 Jim Blandy <jimb@redhat.com>
14389 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14392 2002-08-01 Andrew Cagney <cagney@redhat.com>
14394 * Makefile.in: Make chill references obsolete.
14396 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14398 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14399 * configure: Regenerate.
14400 * config.in: Regenerate.
14402 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14404 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14405 (perror_with_name, remote_close, remote_open, expect, play): Static.
14407 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14409 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14410 byte offsets instead of an array of indexes.
14411 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14413 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14415 * regcache.c: Add comment.
14417 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14419 * thread-db.c: New file.
14420 * proc-service.c: New file.
14421 * acinclude.m4: New file.
14422 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14423 proc-service.o, and thread-db.o.
14424 (linux-low.o): Add USE_THREAD_DB.
14425 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14426 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14427 * aclocal.m4: Regenerated.
14428 * config.in: Regenerated.
14429 * configure: Regenerated.
14430 * configure.in: Check for proc_service.h, sys/procfs.h,
14431 thread_db.h, and linux/elf.h headrs.
14432 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14433 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14434 Check for -lthread_db and thread support.
14435 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14436 PowerPC, and SuperH.
14437 * i387-fp.c: Constify arguments.
14438 * i387-fp.h: Likewise.
14439 * inferiors.c: (struct thread_info): Renamed from
14440 `struct inferior_info'. Remove PID member. Use generic inferior
14441 list header. All uses updated.
14442 (inferiors, signal_pid): Removed.
14443 (all_threads): New variable.
14444 (get_thread): Define.
14445 (add_inferior_to_list): New function.
14446 (for_each_inferior): New function.
14447 (change_inferior_id): New function.
14448 (add_inferior): Removed.
14449 (remove_inferior): New function.
14450 (add_thread): New function.
14451 (free_one_thread): New function.
14452 (remove_thread): New function.
14453 (clear_inferiors): Use for_each_inferior and free_one_thread.
14454 (find_inferior): New function.
14455 (find_inferior_id): New function.
14456 (inferior_target_data): Update argument type.
14457 (set_inferior_target_data): Likewise.
14458 (inferior_regcache_data): Likewise.
14459 (set_inferior_regcache_data): Likewise.
14460 * linux-low.c (linux_bp_reinsert): Remove.
14461 (all_processes, stopping_threads, using_thrads)
14462 (struct pending_signals, debug_threads, pid_of): New.
14463 (inferior_pid): Replace with macro.
14464 (struct inferior_linux_data): Remove.
14465 (get_stop_pc, add_process): New functions.
14466 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14467 Use add_process and add_thread.
14468 (linux_attach_lwp): New function, based on old linux_attach. Use
14469 add_process and add_thread. Set stop_expected for new threads.
14470 (linux_attach): New function.
14471 (linux_kill_one_process): New function.
14472 (linux_kill): Kill all LWPs.
14473 (linux_thread_alive): Use find_inferior_id.
14474 (check_removed_breakpoints, status_pending_p): New functions.
14475 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14476 Update. Use WNOHANG. Wait for cloned processes also. Update process
14477 struct for the found process.
14478 (linux_wait_for_event): New function.
14479 (linux_wait): Use it. Support LWPs.
14480 (send_sigstop, wait_for_sigstop, stop_all_processes)
14481 (linux_resume_one_process, linux_continue_one_process): New functions.
14482 (linux_resume): Support LWPs.
14483 (REGISTER_RAW_SIZE): Remove.
14484 (fetch_register): Use register_size instead. Call supply_register.
14485 (usr_store_inferior_registers): Likewise. Call collect_register.
14486 Fix recursive case.
14487 (regsets_fetch_inferior_registers): Improve error message.
14488 (regsets_store_inferior_registers): Add debugging.
14489 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14490 (unstopped_p, linux_signal_pid): New functions.
14491 (linux_target_ops): Add linux_signal_pid.
14492 (linux_init_signals): New function.
14493 (initialize_low): Call it. Initialize using_threads.
14494 * regcache.c (inferior_regcache_data): Add valid
14496 (get_regcache): Fetch registers lazily. Add fetch argument
14497 and update all callers.
14498 (regcache_invalidate_one, regcache_invalidate): New
14500 (new_register_cache): Renamed from create_register_cache.
14501 Return the new regcache.
14502 (free_register_cache): Change argument to a void *.
14503 (registers_to_string, registers_from_string): Call get_regcache
14504 with fetch flag set.
14505 (register_data): Make static. Pass fetch flag to get_regcache.
14506 (supply_register): Call get_regcache with fetch flag clear.
14507 (collect_register): Call get_regcache with fetch flag set.
14508 (collect_register_as_string): New function.
14509 * regcache.h: Update.
14510 * remote-utils.c (putpkt): Flush after debug output and use
14512 Handle input interrupts while waiting for an ACK.
14513 (input_interrupt): Use signal_pid method.
14514 (getpkt): Flush after debug output and use stderr.
14515 (outreg): Use collect_register_as_string.
14516 (new_thread_notify, dead_thread_notify): New functions.
14517 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14518 and general_thread.
14519 (look_up_one_symbol): Flush after debug output.
14520 * server.c (step_thread, server_waiting): New variables.
14521 (start_inferior): Don't use signal_pid. Update call to mywait.
14522 (attach_inferior): Update call to mywait.
14523 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14524 (main): Don't fetch/store registers explicitly. Use
14525 set_desired_inferior. Support proposed ``Hs'' packet. Update
14527 * server.h: Update.
14528 (struct inferior_list, struct_inferior_list_entry): New.
14529 * target.c (set_desired_inferior): New.
14530 (write_inferior_memory): Constify.
14531 (mywait): New function.
14532 * target.h: Update.
14533 (struct target_ops): New signal_pid method.
14534 (mywait): Removed macro, added prototype.
14536 * linux-low.h (regset_func): Removed.
14537 (regset_fill_func, regset_store_func): New.
14538 (enum regset_type): New.
14539 (struct regset_info): Add type field. Use new operation types.
14540 (struct linux_target_ops): stop_pc renamed to get_pc.
14541 Add decr_pc_after_break and breakpoint_at.
14542 (get_process, get_thread_proess, get_process_thread)
14543 (strut process_info, all_processes, linux_attach_lwp)
14544 (thread_db_init): New.
14546 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14547 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14548 (the_low_target): Add new members.
14549 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14550 (i386_store_fpxregset): Constify.
14551 (target_regsets): Add new kind identifier.
14552 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14553 (i386_set_pc): Add debugging.
14554 (i386_breakpoint_at): New function.
14555 (the_low_target): Add new members.
14556 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14557 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14558 (mips_breakpoint_at): New.
14559 (the_low_target): Add new members.
14560 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14561 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14562 (the_low_target): Add new members.
14563 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14564 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14565 (the_low_target): Add new members.
14566 * linux-x86-64-low.c (target_regsets): Add new kind
14569 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14571 From Martin Pool <mbp@samba.org>:
14572 * server.c (gdbserver_usage): New function.
14575 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14577 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14578 stop_at -> stop_pc.
14580 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14582 * Makefile.in: Remove obsolete code.
14584 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14586 * linux-low.c (regsets_fetch_inferior_registers),
14587 (regsets_store_inferior_registers): Removed cast to int from
14589 * regcache.h: Added declaration of struct inferior_info.
14591 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14593 * inferiors.c (struct inferior_info): Add regcache_data.
14594 (add_inferior): Call create_register_cache.
14595 (clear_inferiors): Call free_register_cache.
14596 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14597 * regcache.c (struct inferior_regcache_data): New.
14598 (registers): Remove.
14599 (get_regcache): New function.
14600 (create_register_cache, free_register_cache): New functions.
14601 (set_register_cache): Don't initialize the register cache here.
14602 (registers_to_string, registers_from_string, register_data): Call
14604 * regcache.h: Add prototypes.
14605 * server.h: Likewise.
14607 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14609 * mem-break.c: New file.
14610 * mem-break.h: New file.
14611 * Makefile.in: Add mem-break.o rule; update server.h
14613 * inferiors.c (struct inferior_info): Add target_data
14615 (clear_inferiors): Free target_data member if set.
14616 (inferior_target_data, set_inferior_target_data): New functions.
14617 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14618 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14619 * linux-low.c (linux_bp_reinsert): New variable.
14620 (struct inferior_linux_data): New.
14621 (linux_create_inferior): Use set_inferior_target_data.
14622 (linux_attach): Likewise. Call add_inferior.
14623 (linux_wait_for_one_inferior): New function.
14624 (linux_wait): Call it.
14625 (linux_write_memory): Add const.
14626 (initialize_low): Call set_breakpoint_data.
14627 * linux-low.h (struct linux_target_ops): Add breakpoint
14629 * server.c (attach_inferior): Remove extra add_inferior
14631 * server.h: Include mem-break.h. Update inferior.c
14633 * target.c (read_inferior_memory)
14634 (write_inferior_memory): New functions.
14635 * target.h (read_inferior_memory)
14636 (write_inferior_memory): Change macros to prototypes.
14637 (struct target_ops): Update comments. Add const to write_memory
14640 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14642 * linux-low.c (usr_store_inferior_registers): Support
14643 registers which are allowed to fail to store.
14644 * linux-low.h (linux_target_ops): Likewise.
14645 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14646 (ppc_cannot_store_register): FPSCR may not be storable.
14648 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14650 * server.h: Include <string.h> if HAVE_STRING_H.
14651 * ChangeLog: Correct paths in last ChangeLog entry.
14653 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14655 * linux-low.h: Remove obsolete prototypes.
14656 (struct linux_target_ops): New.
14657 (extern the_low_target): New.
14658 * linux-low.c (num_regs, regmap): Remove declarations.
14659 (register_addr): Use the_low_target explicitly.
14660 (fetch_register): Likewise.
14661 (usr_fetch_inferior_registers): Likewise.
14662 (usr_store_inferior_registers): Likewise.
14663 * linux-arm-low.c (num_regs): Remove.
14664 (arm_num_regs): Define.
14665 (arm_regmap): Renamed from regmap, made static.
14666 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14668 (arm_cannot_store_register): Renamed from cannot_store_register,
14670 (the_low_target): New.
14671 * linux-i386-low.c (num_regs): Remove.
14672 (i386_num_regs): Define.
14673 (i386_regmap): Renamed from regmap, made static.
14674 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14676 (i386_cannot_store_register): Renamed from cannot_store_register,
14678 (the_low_target): New.
14679 * linux-ia64-low.c (num_regs): Remove.
14680 (ia64_num_regs): Define.
14681 (ia64_regmap): Renamed from regmap, made static.
14682 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14684 (ia64_cannot_store_register): Renamed from cannot_store_register,
14686 (the_low_target): New.
14687 * linux-m68k-low.c (num_regs): Remove.
14688 (m68k_num_regs): Define.
14689 (m68k_regmap): Renamed from regmap, made static.
14690 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14692 (m68k_cannot_store_register): Renamed from cannot_store_register,
14694 (the_low_target): New.
14695 * linux-mips-low.c (num_regs): Remove.
14696 (mips_num_regs): Define.
14697 (mips_regmap): Renamed from regmap, made static.
14698 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14700 (mips_cannot_store_register): Renamed from cannot_store_register,
14702 (the_low_target): New.
14703 * linux-ppc-low.c (num_regs): Remove.
14704 (ppc_num_regs): Define.
14705 (ppc_regmap): Renamed from regmap, made static.
14706 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14708 (ppc_cannot_store_register): Renamed from cannot_store_register,
14710 (the_low_target): New.
14711 * linux-s390-low.c (num_regs): Remove.
14712 (s390_num_regs): Define.
14713 (s390_regmap): Renamed from regmap, made static.
14714 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14716 (s390_cannot_store_register): Renamed from cannot_store_register,
14718 (the_low_target): New.
14719 * linux-sh-low.c (num_regs): Remove.
14720 (sh_num_regs): Define.
14721 (sh_regmap): Renamed from regmap, made static.
14722 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14724 (sh_cannot_store_register): Renamed from cannot_store_register,
14726 (the_low_target): New.
14727 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14728 (the_low_target): New.
14730 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14732 * Makefile.in: Add stamp-h target.
14733 * configure.in: Create stamp-h.
14734 * configure: Regenerated.
14736 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14738 * inferiors.c: New file.
14739 * target.c: New file.
14740 * target.h: New file.
14741 * Makefile.in: Add target.o and inferiors.o. Update
14743 * linux-low.c (inferior_pid): New static variable,
14744 moved from server.c.
14745 (linux_create_inferior): Renamed from create_inferior.
14746 Call add_inferior. Return 0 on success instead of a PID.
14747 (linux_attach): Renamed from myattach.
14748 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14749 (linux_thread_alive): Renamed from mythread_alive.
14750 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14752 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14753 (regsets_store_inferior_registers): Correct error message.
14754 Add missing ``return 0''.
14755 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14756 (linux_store_registers): Renamed from store_inferior_registers.
14757 (linux_read_memory): Renamed from read_inferior_memory.
14758 (linux_write_memory): Renamed from write_inferior_memory.
14759 (linux_target_ops): New structure.
14760 (initialize_low): Call set_target_ops ().
14761 * remote-utils.c (unhexify): New function.
14762 (hexify): New function.
14763 (input_interrupt): Send signals to ``signal_pid''.
14764 * server.c (inferior_pid): Remove.
14765 (start_inferior): Update create_inferior call.
14766 (attach_inferior): Call add_inferior.
14767 (handle_query): New function.
14768 (main): Call handle_query for `q' packets.
14769 * server.h: Include "target.h". Remove obsolete prototypes.
14770 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14772 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14774 * Makefile.in: Add WARN_CFLAGS. Update configury
14776 * configure.in: Check for <string.h>
14777 * configure: Regenerate.
14778 * config.in: Regenerate.
14779 * gdbreplay.c: Include needed system headers.
14780 (remote_open): Remove strchr prototype.
14781 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14782 * regcache.c (supply_register): Change buf argument to const void *.
14783 (supply_register_by_name): Likewise.
14784 (collect_register): Change buf argument to void *.
14785 (collect_register_by_name): Likewise.
14786 * regcache.h: Add missing prototypes.
14787 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14788 * server.c (handle_query): New function.
14789 (attached): New static variable, moved out of main.
14790 (main): Quiet longjmp clobber warnings.
14791 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14792 * utils.c (error): Remove NORETURN.