1 2016-09-05 Pedro Alves <palves@redhat.com>
3 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4 (COMPILE.pre, CC_LD): Use CXX directly.
5 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6 * acinclude.m4: Don't include build-with-cxx.m4.
7 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8 * configure: Regenerate.
10 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
13 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
14 call writing data to own_buf.
16 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
18 * target.c (mywait): Call target_wait instead of
20 (target_wait): New function.
22 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
24 * server.c (start_inferior): New variable 'ptid'. Replace calls
25 to the_target->resume by target_continue{,_no_signal}, depending
27 * target.c (target_stop_and_wait): Call target_continue_no_signal
28 instead of the_target->resume.
29 (target_continue): New function.
31 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
33 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
35 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
38 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
40 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
41 * linux-arm-low.c (ps_get_thread_area): Likewise.
42 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
43 * linux-m68k-low.c (ps_get_thread_area): Likewise.
44 * linux-mips-low.c (ps_get_thread_area): Likewise.
45 * linux-nios2-low.c (ps_get_thread_area): Likewise.
46 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
47 * linux-x86-low.c (ps_get_thread_area): Likewise.
48 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
50 2016-08-19 Pedro Alves <palves@redhat.com>
52 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
54 2016-08-19 Pedro Alves <palves@redhat.com>
56 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
57 comment. Use memcpy instead of casting through unsigned long.
59 2016-08-19 Pedro Alves <palves@redhat.com>
61 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
62 allocating around 0x80000000.
64 2016-08-19 Pedro Alves <palves@redhat.com>
67 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
68 (x32-avx512-linux-ipa.o): New rules.
69 * configure.ac (x86_64-*-linux*): New x32 check.
70 * configure.srv (ipa_x32_linux_regobj): New.
71 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
72 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
74 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
76 * configure: Regenerate.
78 2016-08-09 Pedro Alves <palves@redhat.com>
81 * Makefile.in (OBS): Add signals-state-save-restore.o.
82 (signals-state-save-restore.o): New rule.
83 * config.in: Regenerate.
84 * configure: Regenerate.
85 * linux-low.c: Include "signals-state-save-restore.h".
86 (linux_create_inferior): Call
87 restore_original_signals_state.
88 * server.c: Include "dispositions-save-restore.h".
89 (captured_main): Call save_original_signals_state.
91 2016-08-05 Pedro Alves <palves@redhat.com>
93 * configure: Regenerate.
95 2016-08-04 Yao Qi <yao.qi@linaro.org>
97 * linux-low.c (regsets_fetch_inferior_registers): Check
98 errno is ESRCH or not.
100 2016-08-02 Yao Qi <yao.qi@linaro.org>
102 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
103 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
104 (thread_db_load_search): Update.
105 (try_thread_db_load_1): Don't look for td_ta_event_addr,
106 td_ta_set_event and td_ta_event_getmsg.
108 2016-07-26 Pedro Alves <palves@redhat.com>
111 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
112 of unsigned long for 64-bit registers and use uint32_t instead of
113 unsigned int for 32-bit registers.
115 2016-07-26 Pedro Alves <palves@redhat.com>
117 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
120 2016-07-21 Tom Tromey <tom@tromey.com>
122 * configure: Rebuild.
124 2016-07-21 Yao Qi <yao.qi@linaro.org>
126 * mem-break.c (find_gdb_breakpoint): Cast bp to
127 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
129 2016-07-21 Yao Qi <yao.qi@linaro.org>
131 * server.c (handle_v_requests): Support s and S actions
132 if target_supports_software_single_step return true.
134 2016-07-21 Yao Qi <yao.qi@linaro.org>
136 * linux-low.c (resume_stopped_resumed_lwps): If resume request
137 is resume_step, call maybe_hw_step.
138 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
140 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
142 (proceed_one_lwp): If resume request is resume_step, install
143 reinsert breakpoints and call maybe_hw_step.
145 2016-07-21 Yao Qi <yao.qi@linaro.org>
147 * linux-low.c (proceed_one_lwp): Declare.
148 (linux_resume_one_thread): Remove local variable 'step'.
149 Lift code enqueue signal. Call proceed_one_lwp instead of
150 linux_resume_one_lwp.
152 2016-07-21 Yao Qi <yao.qi@linaro.org>
154 * linux-low.c (linux_resume_one_thread): Call
155 enqueue_pending_signal.
157 2016-07-21 Yao Qi <yao.qi@linaro.org>
159 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
160 * inferiors.c (do_restore_current_thread_cleanup): New function.
161 (make_cleanup_restore_current_thread): Likewise.
162 * linux-low.c (install_software_single_step_breakpoints): Call
163 make_cleanup_restore_current_thread. Switch current_thread to
166 2016-07-21 Yao Qi <yao.qi@linaro.org>
168 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
169 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
170 (clone_one_breakpoint): Likewise.
171 (delete_reinsert_breakpoints): Change parameter to thread.
173 (has_reinsert_breakpoints): Likewise.
174 (uninsert_reinsert_breakpoints): Likewise.
175 (reinsert_reinsert_breakpoints): Likewise.
176 * mem-break.h (set_reinsert_breakpoint): Update declaration.
177 (delete_reinsert_breakpoints): Likewise.
178 (reinsert_reinsert_breakpoints): Likewise.
179 (uninsert_reinsert_breakpoints): Likewise.
180 (has_reinsert_breakpoints): Likewise.
182 2016-07-21 Yao Qi <yao.qi@linaro.org>
184 * inferiors.c (get_thread_process): Make parameter const.
185 * inferiors.h (get_thread_process): Update declaration.
186 * mem-break.c (clone_all_breakpoints): Remove all parameters.
187 Add new parameters child_thread and parent_thread. Callers
189 * mem-break.h (clone_all_breakpoints): Update declaration.
191 2016-07-21 Yao Qi <yao.qi@linaro.org>
193 * mem-break.c (struct breakpoint) <cond_list>: Remove.
194 <command_list, handler>: Remove.
195 (struct gdb_breakpoint): New.
196 (struct other_breakpoint): New.
197 (struct reinsert_breakpoint): New.
198 (is_gdb_breakpoint): New function.
199 (any_persistent_commands): Update command_list if
200 is_gdb_breakpoint returns true.
201 (set_breakpoint): Create breakpoints according to their types.
202 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
203 (set_gdb_breakpoint_1): Likewise.
204 (set_gdb_breakpoint): Likewise.
205 (clear_breakpoint_conditions): Change parameter type to
206 'struct gdb_breakpoint *'.
207 (clear_breakpoint_commands): Likewise.
208 (clear_breakpoint_conditions_and_commands): Likewise.
209 (add_condition_to_breakpoint): Likewise.
210 (add_breakpoint_condition): Likewise.
211 (add_commands_to_breakpoint): Likewise.
212 (check_breakpoints): Check other_breakpoint.
213 (clone_one_breakpoint): Clone breakpopint according to its type.
214 * mem-break.h (struct gdb_breakpoint): Declare.
215 (set_gdb_breakpoint): Update declaration.
216 (clear_breakpoint_conditions_and_commands): Likewise.
217 (add_breakpoint_condition): Likewise.
218 (add_breakpoint_commands): Likewise.
219 * server.c (process_point_options): Change parameter type to
220 'struct gdb_breakpoint *'.
222 2016-07-21 Yao Qi <yao.qi@linaro.org>
224 * mem-break.c (set_breakpoint_at): Rename it to ...
225 (set_breakpoint_type_at): ... it.
226 (set_breakpoint_at): Call set_breakpoint_type_at.
227 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
228 * mem-break.h (set_breakpoint_at): Update comments.
230 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
232 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
234 (nios2_store_gregset): Likewise.
236 2016-07-01 Pedro Alves <palves@redhat.com>
237 Antoine Tremblay <antoine.tremblay@ericsson.com>
239 * linux-low.c: Change interface to take the target lwp_info
240 pointer directly and return void. Handle detaching from a zombie
242 (linux_detach_lwp_callback): New function.
243 (linux_detach): Detach from the leader thread after detaching from
246 2016-06-28 Yao Qi <yao.qi@linaro.org>
248 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
249 for variable new_offset.
250 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
251 (aarch64_ftrace_insn_reloc_cb): Likewise.
252 (aarch64_ftrace_insn_reloc_tb): Likewise.
253 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
254 PRIx64 instead of PRIx32.
256 2016-06-28 Yao Qi <yao.qi@linaro.org>
258 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
259 (the_low_target): Install arm_get_syscall_trapinfo.
261 2016-06-28 Yao Qi <yao.qi@linaro.org>
263 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
265 (the_low_target): Install aarch64_get_syscall_trapinfo.
267 2016-06-28 Yao Qi <yao.qi@linaro.org>
269 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
271 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
272 Remove parameter sysno.
273 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
276 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
278 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
279 (s390_emit_ne_goto): Likewise.
280 (s390_emit_lt_goto): Likewise.
281 (s390_emit_le_goto): Likewise.
282 (s390_emit_gt_goto): Likewise.
283 (s390_emit_ge_goto): Likewise.
284 (s390x_emit_eq_goto): Likewise.
285 (s390x_emit_ne_goto): Likewise.
286 (s390x_emit_lt_goto): Likewise.
287 (s390x_emit_le_goto): Likewise.
288 (s390x_emit_gt_goto): Likewise.
289 (s390x_emit_ge_goto): Likewise.
290 (s390_emit_ops_impl): Mark variable static.
291 (s390x_emit_ops): Likewise.
293 2016-06-17 Yao Qi <yao.qi@linaro.org>
295 * linux-low.c (handle_extended_wait): Call
296 uninsert_reinsert_breakpoints for the parent process. Remove
297 reinsert breakpoints from the child process. Reinsert them to
298 the parent process when vfork is done.
299 * mem-break.c (uninsert_reinsert_breakpoints): New function.
300 (reinsert_reinsert_breakpoints): New function.
301 * mem-break.h (uninsert_reinsert_breakpoints): Declare
302 (reinsert_reinsert_breakpoints): Declare.
304 2016-06-17 Yao Qi <yao.qi@linaro.org>
306 * linux-low.c (handle_extended_wait): If the parent is doing
307 step-over, remove the reinsert breakpoints from the forked child.
309 2016-06-17 Yao Qi <yao.qi@linaro.org>
311 * linux-low.c (unsuspend_all_lwps): Declare.
312 (linux_low_filter_event): If thread exited, call finish_step_over.
313 If step-over is finished, unsuspend other threads.
315 2016-06-17 Yao Qi <yao.qi@linaro.org>
317 * linux-low.c (linux_resume_one_lwp_throw): Assert
318 has_reinsert_breakpoints returns false.
319 * mem-break.c (delete_disabled_breakpoints): Assert
320 bp type isn't reinsert_breakpoint.
322 2016-06-17 Yao Qi <yao.qi@linaro.org>
324 * linux-low.c (maybe_hw_step): New function.
325 (linux_resume_one_lwp_throw): Call maybe_hw_step.
326 (finish_step_over): Switch current_thread to lwp temporarily,
327 and assert has_reinsert_breakpoints returns true.
328 (proceed_one_lwp): Call maybe_hw_step.
329 * mem-break.c (has_reinsert_breakpoints): New function.
330 * mem-break.h (has_reinsert_breakpoints): Declare.
332 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
334 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
336 2016-05-17 Yao Qi <yao.qi@linaro.org>
338 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
339 instead of find_inferior.
341 2016-05-05 Yao Qi <yao.qi@linaro.org>
343 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
344 Initialize res to zero.
346 2016-05-05 Yao Qi <yao.qi@linaro.org>
348 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
351 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
353 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
354 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
355 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
357 2016-04-28 Par Olsson <par.olsson@windriver.com>
358 Simon Marchi <simon.marchi@ericsson.com>
360 * tracepoint.c (write_inferior_int8): New function.
361 (cmd_qtenable_disable): Write enable flag using
364 2016-04-25 Yao Qi <yao.qi@linaro.org>
366 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
367 (need_step_over_p): Return zero if the LWP has pending signals
368 can be delivered on software single step target.
370 2016-04-25 Yao Qi <yao.qi@linaro.org>
372 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
373 return instead of error.
375 2016-04-22 Yao Qi <yao.qi@linaro.org>
377 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
380 2016-04-22 Yao Qi <yao.qi@linaro.org>
382 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
383 signal when stepping over breakpoint with software single
386 2016-04-21 Pedro Alves <palves@redhat.com>
388 * linux-s390-low.c (s390_collect_ptrace_register)
389 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
391 (s390_check_regset): Use void * instead of gdb_byte *.
393 2016-04-20 Pedro Alves <palves@redhat.com>
395 * configure: Renegerate.
397 2016-04-20 Yao Qi <yao.qi@linaro.org>
399 * linux-aarch32-low.c: Include "arch/arm-linux.h".
400 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
402 (arm_store_gregset): Likewise.
404 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
406 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
407 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
408 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
409 (amd64-avx-mpx-linux.c): New rules.
410 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
411 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
412 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
413 (srv_amd64_regobj): Add amd64-avx-mpx.o.
414 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
415 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
416 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
417 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
418 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
419 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
420 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
421 * linux-x86-low.c (x86_linux_read_description): Add case for
422 X86_XSTATE_AVX_MPX_MASK.
423 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
424 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
425 init_registers_i386_avx_mpx_linux.
426 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
427 (initialize_low_tracepoint): Call
428 init_registers_i386_avx_mpx_linux.
429 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
430 (initialize_low_tracepoint): Call
431 init_registers_amd64_avx_mpx_linux.
432 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
433 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
434 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
437 2016-04-18 Pedro Alves <palves@redhat.com>
439 * configure: Regenerate.
441 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
443 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
444 (aarch64_emit_sub): Likewise.
446 2016-04-12 Pedro Alves <palves@redhat.com>
448 * utils.c (prepare_to_throw_exception): Delete.
450 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
452 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
454 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
456 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
458 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
460 * linux-aarch64-ipa.c: Add <elf.h> include.
461 * linux-ppc-ipa.c: Add <elf.h> include.
462 * linux-s390-ipa.c: Add <elf.h> include.
464 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
466 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
467 (get_raw_reg_ptr): Likewise.
468 (get_trace_state_variable_value_ptr): Likewise.
469 (set_trace_state_variable_value_ptr): Likewise.
470 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
473 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
474 Marcin Kościelnicki <koriakin@0x04.net>
477 * linux-ppc-low.c (emit_insns): New function.
478 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
479 (ppc_emit_prologue): New function.
480 (ppc_emit_epilogue): New function.
481 (ppc_emit_add): New function.
482 (ppc_emit_sub): New function.
483 (ppc_emit_mul): New function.
484 (ppc_emit_lsh): New function.
485 (ppc_emit_rsh_signed): New function.
486 (ppc_emit_rsh_unsigned): New function.
487 (ppc_emit_ext): New function.
488 (ppc_emit_zero_ext): New function.
489 (ppc_emit_log_not): New function.
490 (ppc_emit_bit_and): New function.
491 (ppc_emit_bit_or): New function.
492 (ppc_emit_bit_xor): New function.
493 (ppc_emit_bit_not): New function.
494 (ppc_emit_equal): New function.
495 (ppc_emit_less_signed): New function.
496 (ppc_emit_less_unsigned): New function.
497 (ppc_emit_ref): New function.
498 (ppc_emit_const): New function.
499 (ppc_emit_reg): New function.
500 (ppc_emit_pop): New function.
501 (ppc_emit_stack_flush): New function.
502 (ppc_emit_swap): New function.
503 (ppc_emit_stack_adjust): New function.
504 (ppc_emit_call): New function.
505 (ppc_emit_int_call_1): New function.
506 (ppc_emit_void_call_2): New function.
507 (ppc_emit_if_goto): New function.
508 (ppc_emit_goto): New function.
509 (ppc_emit_eq_goto): New function.
510 (ppc_emit_ne_goto): New function.
511 (ppc_emit_lt_goto): New function.
512 (ppc_emit_le_goto): New function.
513 (ppc_emit_gt_goto): New function.
514 (ppc_emit_ge_goto): New function.
515 (ppc_write_goto_address): New function.
516 (ppc_emit_ops_impl): New static variable.
517 (ppc64v1_emit_prologue): New function.
518 (ppc64v2_emit_prologue): New function.
519 (ppc64_emit_epilogue): New function.
520 (ppc64_emit_add): New function.
521 (ppc64_emit_sub): New function.
522 (ppc64_emit_mul): New function.
523 (ppc64_emit_lsh): New function.
524 (ppc64_emit_rsh_signed): New function.
525 (ppc64_emit_rsh_unsigned): New function.
526 (ppc64_emit_ext): New function.
527 (ppc64_emit_zero_ext): New function.
528 (ppc64_emit_log_not): New function.
529 (ppc64_emit_bit_and): New function.
530 (ppc64_emit_bit_or): New function.
531 (ppc64_emit_bit_xor): New function.
532 (ppc64_emit_bit_not): New function.
533 (ppc64_emit_equal): New function.
534 (ppc64_emit_less_signed): New function.
535 (ppc64_emit_less_unsigned): New function.
536 (ppc64_emit_ref): New function.
537 (ppc64_emit_const): New function.
538 (ppc64v1_emit_reg): New function.
539 (ppc64v2_emit_reg): New function.
540 (ppc64_emit_pop): New function.
541 (ppc64_emit_stack_flush): New function.
542 (ppc64_emit_swap): New function.
543 (ppc64v1_emit_call): New function.
544 (ppc64v2_emit_call): New function.
545 (ppc64v1_emit_int_call_1): New function.
546 (ppc64v2_emit_int_call_1): New function.
547 (ppc64v1_emit_void_call_2): New function.
548 (ppc64v2_emit_void_call_2): New function.
549 (ppc64_emit_if_goto): New function.
550 (ppc64_emit_eq_goto): New function.
551 (ppc64_emit_ne_goto): New function.
552 (ppc64_emit_lt_goto): New function.
553 (ppc64_emit_le_goto): New function.
554 (ppc64_emit_gt_goto): New function.
555 (ppc64_emit_ge_goto): New function.
556 (ppc64v1_emit_ops_impl): New static variable.
557 (ppc64v2_emit_ops_impl): New static variable.
558 (ppc_emit_ops): New function.
559 (linux_low_target): Wire in ppc_emit_ops.
561 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
562 Marcin Kościelnicki <koriakin@0x04.net>
565 * Makefile.in: Add powerpc-*-ipa.o
566 * configure.srv: Add ipa_obj for powerpc*-linux.
567 * linux-ppc-ipa.c: New file.
568 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
570 (PPC_FIELD): New macro.
571 (PPC_SEXT): New macro.
572 (PPC_OP6): New macro.
576 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
577 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
578 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
579 (ppc_get_thread_area): New function.
580 (is_elfv2_inferior): New function.
581 (gen_ds_form): New function.
582 (GEN_STD): New macro.
583 (GEN_STDU): New macro.
585 (GEN_LDU): New macro.
586 (gen_d_form): New function.
587 (GEN_ADDI): New macro.
588 (GEN_ADDIS): New macro.
590 (GEN_LIS): New macro.
591 (GEN_ORI): New macro.
592 (GEN_ORIS): New macro.
593 (GEN_LWZ): New macro.
594 (GEN_STW): New macro.
595 (GEN_STWU): New macro.
596 (gen_xfx_form): New function.
597 (GEN_MFSPR): New macro.
598 (GEN_MTSPR): New macro.
599 (GEN_MFCR): New macro.
600 (GEN_MTCR): New macro.
601 (GEN_SYNC): New macro.
602 (GEN_LWSYNC): New macro.
603 (gen_x_form): New function.
606 (GEN_LWARX): New macro.
607 (GEN_STWCX): New macro.
608 (GEN_CMPW): New macro.
609 (gen_md_form): New function.
610 (GEN_RLDICL): New macro.
611 (GEN_RLDICR): New macro.
612 (gen_i_form): New function.
615 (gen_b_form): New function.
616 (GEN_BNE): New macro.
617 (GEN_LOAD): New macro.
618 (GEN_STORE): New macro.
619 (gen_limm): New function.
620 (gen_atomic_xchg): New function.
621 (gen_call): New function.
622 (ppc_relocate_instruction): New function.
623 (ppc_install_fast_tracepoint_jump_pad): New function.
624 (ppc_get_min_fast_tracepoint_insn_len): New function.
625 (ppc_get_ipa_tdesc_idx): New function.
626 (the_low_target): Wire in the new functions.
627 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
629 * linux-ppc-tdesc.h: New file.
631 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
633 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
634 (alloc_jump_pad_buffer): New function.
635 * linux-amd64-ipa.c: Add <sys/mman.h> include.
636 (alloc_jump_pad_buffer): New function.
637 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
638 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
639 (alloc_jump_pad_buffer): New function.
640 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
641 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
642 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
643 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
645 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
647 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
648 * linux-amd64-ipa.c: Likewise.
649 * linux-i386-ipa.c: Likewise.
650 * linux-s390-ipa.c: Likewise.
651 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
652 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
653 set_trace_state_variable_value_ptr.
654 (struct ipa_sym_addresses): Likewise.
655 (symbol_list): Likewise.
656 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
657 accessing gdb_collect directly.
658 (gdb_collect_ptr_type): New typedef.
659 (get_raw_reg_ptr_type): New typedef.
660 (get_trace_state_variable_value_ptr_type): New typedef.
661 (set_trace_state_variable_value_ptr_type): New typedef.
662 (gdb_collect_ptr): New global.
663 (get_raw_reg_ptr): New global.
664 (get_trace_state_variable_value_ptr): New global.
665 (set_trace_state_variable_value_ptr): New global.
666 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
667 accessing get_raw_reg directly.
668 (get_get_tsv_func_addr): Likewise for
669 get_trace_state_variable_value_ptr.
670 (get_set_tsv_func_addr): Likewise for
671 set_trace_state_variable_value_ptr.
672 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
674 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
676 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
678 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
680 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
682 (relocate_instruction): Remove own_buf.
683 * server.c (own_buf): Make global.
684 (handle_v_requests): Make global.
685 * server.h (own_buf): New declaration.
686 (handle_v_requests): New prototype.
688 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
691 * linux-s390-low.c (add_insns): New function.
692 (s390_emit_prologue): New function.
693 (s390_emit_epilogue): New function.
694 (s390_emit_add): New function.
695 (s390_emit_sub): New function.
696 (s390_emit_mul): New function.
697 (s390_emit_lsh): New function.
698 (s390_emit_rsh_signed): New function.
699 (s390_emit_rsh_unsigned): New function.
700 (s390_emit_ext): New function.
701 (s390_emit_log_not): New function.
702 (s390_emit_bit_and): New function.
703 (s390_emit_bit_or): New function.
704 (s390_emit_bit_xor): New function.
705 (s390_emit_bit_not): New function.
706 (s390_emit_equal): New function.
707 (s390_emit_less_signed): New function.
708 (s390_emit_less_unsigned): New function.
709 (s390_emit_ref): New function.
710 (s390_emit_if_goto): New function.
711 (s390_emit_goto): New function.
712 (s390_write_goto_address): New function.
713 (s390_emit_litpool): New function.
714 (s390_emit_const): New function.
715 (s390_emit_call): New function.
716 (s390_emit_reg): New function.
717 (s390_emit_pop): New function.
718 (s390_emit_stack_flush): New function.
719 (s390_emit_zero_ext): New function.
720 (s390_emit_swap): New function.
721 (s390_emit_stack_adjust): New function.
722 (s390_emit_set_r2): New function.
723 (s390_emit_int_call_1): New function.
724 (s390_emit_void_call_2): New function.
725 (s390_emit_eq_goto): New function.
726 (s390_emit_ne_goto): New function.
727 (s390_emit_lt_goto): New function.
728 (s390_emit_le_goto): New function.
729 (s390_emit_gt_goto): New function.
730 (s390_emit_ge_goto): New function.
731 (s390x_emit_prologue): New function.
732 (s390x_emit_epilogue): New function.
733 (s390x_emit_add): New function.
734 (s390x_emit_sub): New function.
735 (s390x_emit_mul): New function.
736 (s390x_emit_lsh): New function.
737 (s390x_emit_rsh_signed): New function.
738 (s390x_emit_rsh_unsigned): New function.
739 (s390x_emit_ext): New function.
740 (s390x_emit_log_not): New function.
741 (s390x_emit_bit_and): New function.
742 (s390x_emit_bit_or): New function.
743 (s390x_emit_bit_xor): New function.
744 (s390x_emit_bit_not): New function.
745 (s390x_emit_equal): New function.
746 (s390x_emit_less_signed): New function.
747 (s390x_emit_less_unsigned): New function.
748 (s390x_emit_ref): New function.
749 (s390x_emit_if_goto): New function.
750 (s390x_emit_const): New function.
751 (s390x_emit_call): New function.
752 (s390x_emit_reg): New function.
753 (s390x_emit_pop): New function.
754 (s390x_emit_stack_flush): New function.
755 (s390x_emit_zero_ext): New function.
756 (s390x_emit_swap): New function.
757 (s390x_emit_stack_adjust): New function.
758 (s390x_emit_int_call_1): New function.
759 (s390x_emit_void_call_2): New function.
760 (s390x_emit_eq_goto): New function.
761 (s390x_emit_ne_goto): New function.
762 (s390x_emit_lt_goto): New function.
763 (s390x_emit_le_goto): New function.
764 (s390x_emit_gt_goto): New function.
765 (s390x_emit_ge_goto): New function.
766 (s390_emit_ops): New function.
767 (struct linux_target_ops): Fill in emit_ops hook.
769 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
772 * Makefile.in: Add s390 IPA files.
773 * configure.srv: Build IPA for s390.
774 * linux-s390-ipa.c: New file.
775 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
776 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
777 (tdesc_s390_linux32): Likewise.
778 (init_registers_s390_linux32v1): Likewise.
779 (tdesc_s390_linux32v1): Likewise.
780 (init_registers_s390_linux32v2): Likewise.
781 (tdesc_s390_linux32v2): Likewise.
782 (init_registers_s390_linux64): Likewise.
783 (tdesc_s390_linux64): Likewise.
784 (init_registers_s390_linux64v1): Likewise.
785 (tdesc_s390_linux64v1): Likewise.
786 (init_registers_s390_linux64v2): Likewise.
787 (tdesc_s390_linux64v2): Likewise.
788 (init_registers_s390_te_linux64): Likewise.
789 (tdesc_s390_te_linux64): Likewise.
790 (init_registers_s390_vx_linux64): Likewise.
791 (tdesc_s390_vx_linux64): Likewise.
792 (init_registers_s390_tevx_linux64): Likewise.
793 (tdesc_s390_tevx_linux64): Likewise.
794 (init_registers_s390x_linux64): Likewise.
795 (tdesc_s390x_linux64): Likewise.
796 (init_registers_s390x_linux64v1): Likewise.
797 (tdesc_s390x_linux64v1): Likewise.
798 (init_registers_s390x_linux64v2): Likewise.
799 (tdesc_s390x_linux64v2): Likewise.
800 (init_registers_s390x_te_linux64): Likewise.
801 (tdesc_s390x_te_linux64): Likewise.
802 (init_registers_s390x_vx_linux64): Likewise.
803 (tdesc_s390x_vx_linux64): Likewise.
804 (init_registers_s390x_tevx_linux64): Likewise.
805 (tdesc_s390x_tevx_linux64): Likewise.
806 (have_hwcap_s390_vx): New static variable.
807 (s390_arch_setup): Fill have_hwcap_s390_vx.
808 (s390_get_thread_area): New function.
809 (s390_ft_entry_gpr_esa): New const.
810 (s390_ft_entry_gpr_zarch): New const.
811 (s390_ft_entry_misc): New const.
812 (s390_ft_entry_fr): New const.
813 (s390_ft_entry_vr): New const.
814 (s390_ft_main_31): New const.
815 (s390_ft_main_64): New const.
816 (s390_ft_exit_fr): New const.
817 (s390_ft_exit_vr): New const.
818 (s390_ft_exit_misc): New const.
819 (s390_ft_exit_gpr_esa): New const.
820 (s390_ft_exit_gpr_zarch): New const.
821 (append_insns): New function.
822 (s390_relocate_instruction): New function.
823 (s390_install_fast_tracepoint_jump_pad): New function.
824 (s390_get_min_fast_tracepoint_insn_len): New function.
825 (s390_get_ipa_tdesc_idx): New function.
826 (struct linux_target_ops): Wire in the above functions.
827 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
828 * linux-s390-tdesc.h: New file.
830 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
832 * linux-s390-low.c (s390_supports_tracepoints): New function.
833 (struct linux_target_ops): Fill supports_tracepoints hook.
835 2016-03-18 Yao Qi <yao.qi@linaro.org>
837 * linux-low.c (lwp_signal_can_be_delivered): New function.
838 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
840 2016-03-18 Yao Qi <yao.qi@linaro.org>
842 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
843 0 if signal is enqueued. Remove 'signal' from one debugging
844 message. Move one debugging message to some lines below.
845 Remove code setting 'signal' to 0.
847 2016-03-18 Yao Qi <yao.qi@linaro.org>
849 * linux-low.c (linux_low_filter_event): Remove redundant
850 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
852 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
854 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
855 (struct linux_target_ops): Wire in the above.
857 2016-03-03 Yao Qi <yao.qi@linaro.org>
859 * linux-low.c: Update comments to start_step_over.
861 2016-03-03 Yao Qi <yao.qi@linaro.org>
864 * linux-low.c (handle_extended_wait): Set child suspended
865 if event_lwp->bp_reinsert isn't zero.
867 2016-03-02 Yao Qi <yao.qi@linaro.org>
869 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
870 enqueue_pending_signal.
872 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
874 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
877 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
879 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
880 (s390_regmap_3264) [!__s390x__]: New global.
881 (s390_collect_ptrace_register): Skip map entries containing -1.
882 (s390_supply_ptrace_register): Ditto.
883 (s390_fill_gprs_high): New function.
884 (s390_store_gprs_high): New function.
885 (s390_regsets): Add NT_S390_HIGH_GPRS.
886 (s390_get_hwcap): Enable on 31-bit.
887 (have_hwcap_s390_high_gprs): Enable on 31-bit.
888 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
889 Detect NT_S390_HIGH_GPRS.
890 (s390_usrregs_info_3264): Enable on 31-bit.
891 (s390_regs_info): Enable regs_info_3264 on 31-bit.
892 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
894 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
897 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
898 * configure.srv: Ditto.
899 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
900 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
901 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
902 (init_registers_amd64_linux): Remove prototype.
903 (tdesc_amd64_linux): Remove declaration.
904 (get_ipa_tdesc): New function.
905 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
906 initialize remaining tdescs.
907 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
908 (init_registers_i386_linux): Remove prototype.
909 (tdesc_i386_linux): Remove declaration.
910 (get_ipa_tdesc): New function.
911 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
912 initialize remaining tdescs.
913 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
914 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
915 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
916 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
917 (x86_get_ipa_tdesc_idx): New function.
918 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
919 * linux-x86-tdesc.h: New file.
920 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
921 (target_get_ipa_tdesc_idx): New macro.
922 * tracepoint.c (ipa_tdesc_idx): New macro.
923 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
924 (symbol_list): Add ipa_tdesc_idx.
925 (cmd_qtstart): Write ipa_tdesc_idx in the target.
927 (ipa_tdesc_idx): New variable.
928 (get_context_regcache): Use get_ipa_tdesc.
929 (gdb_collect): Ditto.
931 * tracepoint.h (get_ipa_tdesc): New prototype.
934 2016-02-24 Pedro Alves <palves@redhat.com>
936 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
937 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
938 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
939 Factor out common code between the USE_SIGTRAP_SIGINFO and
940 !USE_SIGTRAP_SIGINFO blocks.
941 (linux_low_filter_event): Call save_stop_reason instead of
942 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
944 (linux_wait_1): Update comments.
946 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
948 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
949 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
950 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
951 ppc_insert_point, ppc_remove_point.
953 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
955 * linux-s390-low.c (s390_supports_z_point_type): New function.
956 (struct linux_target_ops): Wire s390_supports_z_point_type in.
958 2016-02-16 Yao Qi <yao.qi@linaro.org>
960 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
961 PC. Get pc from regcache_read_pc.
963 2016-02-12 Yao Qi <yao.qi@linaro.org>
965 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
966 or linux_get_pc_32bit.
967 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
969 2016-02-12 Yao Qi <yao.qi@linaro.org>
971 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
972 arm_linux_get_next_pcs_fixup.
974 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
976 * tracepoint.c (x_tracepoint_action_download): Change
977 write_inferior_data_ptr to write_inferior_data_pointer.
978 (cmd_qtstart): Likewise.
979 (write_inferior_data_ptr): Remove.
980 (download_agent_expr): Change write_inferior_data_ptr to
981 write_inferior_data_pointer.
982 (download_tracepoint_1): Likewise.
983 (download_tracepoint): Likewise.
984 (download_trace_state_variables): Likewise.
986 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
987 Marcin Kościelnicki <koriakin@0x04.net>
989 * tracepoint.c (struct tracepoint_action_ops): Remove.
990 (struct tracepoint_action): Remove ops.
991 (m_tracepoint_action_download, r_tracepoint_action_download)
992 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
993 size and offset accordingly.
994 (m_tracepoint_action_ops, r_tracepoint_action_ops)
995 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
996 (tracepoint_action_send, tracepoint_action_download): New functions.
997 Helpers for trace action handlers.
998 (add_tracepoint_action): Remove setup actions ops.
999 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1001 2016-02-10 Yao Qi <yao.qi@linaro.org>
1003 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1005 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1007 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1009 * configure: Regenerate.
1011 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1013 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1014 void * to gdb_byte *.
1015 * linux-low.c (siginfo_fixup): Likewise.
1016 (linux_xfer_siginfo): Likewise.
1017 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1019 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1021 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1023 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1025 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1027 * linux-x86-low.c [__x86_64__]: Include
1028 "nat/amd64-linux-siginfo.h".
1029 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1030 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1031 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1032 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1033 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1034 (cpt_si_fd, si_timerid, si_overrun): Move from
1035 nat/amd64-linux-siginfo.c.
1036 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1038 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1040 * server.c (skip_to_semicolon): Remove.
1041 (process_point_options): Use strchrnul instead of
1044 2016-01-26 Yao Qi <yao.qi@linaro.org>
1046 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1047 * linux-low.c (install_software_single_step_breakpoints): Don't
1048 call regcache_read_pc.
1049 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1052 2016-01-26 Yao Qi <yao.qi@linaro.org>
1054 * linux-low.c (install_software_single_step_breakpoints): Call
1055 regcache_read_pc instead of get_pc.
1057 2016-01-26 Yao Qi <yao.qi@linaro.org>
1059 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1060 (unblock_async_io): Rename to ...
1061 (block_unblock_async_io): ... it. New function.
1062 (enable_async_io): Don't install SIGIO handler. Unblock it
1064 (disable_async_io): Don't ignore SIGIO. Block it instead.
1065 (initialize_async_io): Install SIGIO handler. Don't call
1068 2016-01-26 Yao Qi <yao.qi@linaro.org>
1070 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1071 first character is '\003', call *the_target->request_interrupt.
1073 2016-01-25 Yao Qi <yao.qi@linaro.org>
1075 * remote-utils.c (new_thread_notify): Remove.
1076 (dead_thread_notify): Likewise.
1077 * remote-utils.h (new_thread_notify): Remove declaration.
1078 (dead_thread_notify): Likewise.
1080 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1082 * gdb.trace/pending.exp: Fix expected message on continue.
1084 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1086 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1087 it works properly on big-endian machines where sizeof (CORE_ADDR)
1090 2016-01-21 Pedro Alves <palves@redhat.com>
1092 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1093 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1094 * configure: Regenerate.
1096 2016-01-21 Yao Qi <yao.qi@linaro.org>
1098 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1099 is_thumb and set it according to CPSR saved on the stack.
1100 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1101 arm_sigreturn_next_pc.
1103 2016-01-18 Yao Qi <yao.qi@linaro.org>
1105 * linux-low.c (linux_set_pc_64bit): New function.
1106 (linux_get_pc_64bit): New function.
1107 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1109 * linux-sparc-low.c (debug_threads): Remove declaration.
1110 (sparc_get_pc): Remove.
1111 (the_low_target): Use linux_get_pc_64bit instead of
1113 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1114 (the_low_target): Use linux_get_pc_64bit and
1117 2016-01-18 Yao Qi <yao.qi@linaro.org>
1119 * linux-arm-low.c (debug_threads): Remove declaration.
1120 (arm_get_pc, arm_set_pc): Remove.
1121 (the_low_target): Use linux_get_pc_32bit and
1123 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1124 (the_low_target): Use linux_get_pc_32bit and
1126 * linux-cris-low.c (debug_threads): Remove declaration.
1127 (cris_get_pc, cris_set_pc,): Remove.
1128 (the_low_target): Use linux_get_pc_32bit and
1130 * linux-crisv32-low.c (debug_threads): Remove declaration.
1131 (cris_get_pc, cris_set_pc): Remove.
1132 (the_low_target): Use linux_get_pc_32bit and
1134 * linux-low.c: Include inttypes.h.
1135 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1136 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1137 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1138 (the_low_target): Use linux_get_pc_32bit and
1140 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1141 (the_low_target): Use linux_get_pc_32bit and
1143 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1144 (the_low_target): Use linux_get_pc_32bit and
1146 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1147 (the_low_target): Use linux_get_pc_32bit and
1149 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1150 (the_low_target): Use linux_get_pc_32bit and
1153 2016-01-18 Gary Benson <gbenson@redhat.com>
1155 * configure.ac (AC_FUNC_FORK): New check.
1156 * config.in: Regenerate.
1157 * configure: Likewise.
1159 2016-01-14 Yao Qi <yao.qi@linaro.org>
1161 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1162 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1163 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1164 arm_get_next_pcs_ctor.
1166 2016-01-12 Josh Stone <jistone@redhat.com>
1167 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1169 * inferiors.h: Include "gdb_vecs.h".
1170 (struct process_info): Add syscalls_to_catch.
1171 * inferiors.c (remove_process): Free syscalls_to_catch.
1172 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1173 syscall_return stops.
1174 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1175 * server.c (handle_general_set): Handle QCatchSyscalls.
1176 (handle_query): Report support for QCatchSyscalls.
1177 * target.h (struct target_ops): Add supports_catch_syscall.
1178 (target_supports_catch_syscall): New macro.
1179 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1180 (struct lwp_info): Add syscall_state.
1181 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1182 Maintain syscall_state and syscalls_to_catch across exec.
1183 (get_syscall_trapinfo): New function, proxy to the_low_target.
1184 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1185 (linux_low_filter_event): Toggle syscall_state entry/return for
1186 syscall traps, and set it ignored for all others.
1187 (gdb_catching_syscalls_p): New function.
1188 (gdb_catch_this_syscall_p): New function.
1189 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1190 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1191 (linux_supports_catch_syscall): New function.
1192 (linux_target_ops): Install it.
1193 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1194 (the_low_target): Install it.
1196 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1198 * acinclude.m4: Include new ../warning.m4 file.
1199 * configure: Regenerated.
1200 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1202 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1204 * ax.c (is_goto_target): Mark static.
1205 * linux-low.c (register_addr): Likewise.
1206 (linux_fetch_registers, linux_store_registers): Likewise.
1207 * mem-break.c (any_persistent_commands): Fix old prototype.
1208 (add_commands_to_breakpoint): Mark static.
1209 * regcache.c (find_register_by_name): Delete unused func.
1210 * remote-utils.c (hex_or_minus_one): Mark static.
1211 * server.c (monitor_show_help): Mark static.
1212 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1213 handle_v_requests): Likewise.
1215 2016-01-12 Pedro Alves <palves@redhat.com>
1217 Remove use of the registered trademark symbol throughout.
1219 2016-01-08 Yao Qi <yao.qi@linaro.org>
1221 * remote-utils.c (getpkt): If c is '\003', call target hook
1224 2016-01-06 Yao Qi <yao.qi@linaro.org>
1226 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1227 linux-aarch32-low.c.
1228 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1229 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1230 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1231 (thumb2_breakpoint): Declare.
1232 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1233 linux-aarch32-low.h.
1234 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1235 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1236 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1238 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1240 * gdbreplay.c (gdbreplay_version): Change copyright year in
1242 * server.c (gdbserver_version): Likewise.
1244 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1246 * server.c (crc32_table): Delete.
1247 (crc32): Use libiberty's xcrc32 function.
1249 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1251 * lynx-low.c (lynx_delete_thread_callback): New function.
1252 (lynx_mourn): Properly delete our process and all of its
1253 threads. Remove call to clear_inferiors.
1255 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1257 * target.c (thread_search_callback): Add check that
1258 the thread_stopped target callback is not NULL before
1261 2015-12-21 Yao Qi <yao.qi@linaro.org>
1263 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1266 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1268 * server.c (handle_query): Call target_supports_software_single_step.
1270 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1272 * linux-low.c (single_step): New function.
1273 (linux_resume_one_lwp_throw): Call single_step.
1274 (start_step_over): Likewise.
1276 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1278 * Makefile.in (SFILES): Append arch/arm-linux.c,
1279 arch/arm-get-next-pcs.c.
1280 (arm-linux.o): New rule.
1281 (arm-get-next-pcs.o): New rule.
1282 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1284 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1285 to linux-aarch32-low.c.
1286 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1287 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1288 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1289 (thumb2_breakpoint_len): Likewise.
1290 (arm_is_thumb_mode): Make non-static.
1291 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1292 from linux-aarch32-low.c.
1293 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1294 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1295 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1296 (thumb2_breakpoint_len): Likewise.
1297 (arm_is_thumb_mode): New declaration.
1298 * linux-arm-low.c: Include arch/arm-linux.h
1299 aarch/arm-get-next-pcs.h, sys/syscall.h.
1300 (get_next_pcs_ops): New struct.
1301 (get_next_pcs_addr_bits_remove): New function.
1302 (get_next_pcs_is_thumb): New function.
1303 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1304 (arm_sigreturn_next_pc): Likewise.
1305 (get_next_pcs_syscall_next_pc): Likewise.
1306 (arm_gdbserver_get_next_pcs): Likewise.
1307 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1309 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1310 * server.h: Include gdb_vecs.h.
1312 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1314 * Makefile.in (SFILES): Append common/common-regcache.c.
1315 (OBS): Append common-regcache.o.
1316 (common-regcache.o): New rule.
1317 * regcache.c (init_register_cache): Initialize cache to
1319 (regcache_raw_read_unsigned): New function.
1320 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1321 register_status enum.
1323 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1325 * linux-aarch64-low.c (the_low_targets): Rename
1326 breakpoint_reinsert_addr to get_next_pcs.
1327 * linux-arm-low.c (the_low_targets): Likewise.
1328 * linux-bfin-low.c (the_low_targets): Likewise.
1329 * linux-cris-low.c (the_low_targets): Likewise.
1330 * linux-crisv32-low.c (the_low_targets): Likewise.
1331 * linux-low.c (can_software_single_step): Likewise.
1332 (install_software_single_step_breakpoints): New function.
1333 (start_step_over): Use install_software_single_step_breakpoints.
1334 * linux-low.h: New CORE_ADDR vector.
1335 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1337 * linux-mips-low.c (the_low_targets): Likewise.
1338 * linux-nios2-low.c (the_low_targets): Likewise.
1339 * linux-sparc-low.c (the_low_targets): Likewise.
1341 2015-12-17 Pedro Alves <palves@redhat.com>
1343 * linux-low.c (linux_kill_one_lwp): Remove references to
1345 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1347 (linux_init_signals): Delete.
1348 (initialize_low): Adjust.
1349 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1351 2015-12-16 Pedro Alves <palves@redhat.com>
1353 * configure.ac (compiler warning flags): When testing a
1354 -Wno-foo option, check whether -Wfoo works instead.
1355 * configure: Regenerate.
1357 2015-12-11 Don Breazeal <donb@codesourcery.com>
1359 * server.c (process_serial_event): Don't exit from gdbserver
1360 in remote mode if there are still active inferiors.
1362 2015-12-11 Yao Qi <yao.qi@linaro.org>
1364 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1365 arm_breakpoint_at if the process is 32-bit.
1367 2015-12-11 Yao Qi <yao.qi@linaro.org>
1369 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1372 2015-12-07 Yao Qi <yao.qi@linaro.org>
1374 * configure.srv: Append arm.o to srv_tgtobj for
1375 aarch64*-*-linux* target.
1376 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1377 from linux-arm-low.c.
1378 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1379 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1380 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1381 (thumb2_breakpoint_len): Likewise.
1382 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1383 (arm_breakpoint_kinds): Likewise.
1384 (arm_breakpoint_kind_from_pc): Likewise.
1385 (arm_sw_breakpoint_from_kind): Likewise.
1386 (arm_breakpoint_kind_from_current_state): Likewise.
1387 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1388 (arm_sw_breakpoint_from_kind): Declare.
1389 (arm_breakpoint_kind_from_current_state): Declare.
1390 (arm_breakpoint_at): Declare.
1391 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1392 arm_sw_breakpoint_from_kind if process is 32-bit.
1393 (aarch64_breakpoint_kind_from_pc): New function.
1394 (aarch64_breakpoint_kind_from_current_state): New function.
1395 (the_low_target): Initialize fields breakpoint_kind_from_pc
1396 and breakpoint_kind_from_current_state.
1397 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1398 linux-aarch32-low.c.
1399 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1400 (arm_breakpoint, arm_breakpoint_len): Likewise.
1401 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1402 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1403 (arm_is_thumb_mode): Likewise.
1404 (arm_breakpoint_at): Likewise.
1405 (arm_breakpoint_kind_from_pc): Likewise.
1406 (arm_sw_breakpoint_from_kind): Likewise.
1407 (arm_breakpoint_kind_from_current_state): Likewise.
1410 2015-08-04 Yao Qi <yao.qi@linaro.org>
1412 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1413 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1414 * server.c (extended_protocol): Remove "static".
1415 * server.h (extended_protocol): Declare it.
1417 2015-12-04 Josh Stone <jistone@redhat.com>
1419 * target.h (struct target_ops) <arch_setup>: Rename to ...
1420 (struct target_ops) <post_create_inferior>: ... this.
1421 (target_arch_setup): Rename to ...
1422 (target_post_create_inferior): ... this, calling post_create_inferior.
1423 * server.c (start_inferior): Update target_arch_setup calls to
1424 target_post_create_inferior.
1425 * linux-low.c (linux_low_ptrace_options): Forward declare.
1426 (linux_arch_setup): Update its comment for general use.
1427 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1428 (struct linux_target_ops): Use linux_post_create_inferior.
1429 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1430 to post_create_inferior.
1431 * nto-low.c (struct nto_target_ops): Likewise.
1432 * spu-low.c (struct spu_target_ops): Likewise.
1433 * win32-low.c (struct win32_target_ops): Likewise.
1435 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1437 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1439 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1441 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1442 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1443 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1444 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1445 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1446 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1447 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1448 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1449 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1450 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1451 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1452 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1454 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1456 * linux-low.c (linux_look_up_symbols): Don't call
1457 linux_supports_traceclone.
1458 * linux-low.h (thread_db_init): Remove use_events argument.
1459 * thread-db.c (thread_db_use_event): Remove global variable.
1460 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1461 (struct thread_db) <td_create_bp>: Remove field.
1462 (thread_db_create_event): Remove function.
1463 (thread_db_enable_reporting): Likewise.
1464 (find_one_thread): Don't check for thread_db_use_events.
1465 (attach_thread): Likewise.
1466 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1467 (try_thread_db_load_1): Don't check for thread_db_use_events.
1468 (thread_db_init): Remove use_events argument and thread events
1470 (remove_thread_event_breakpoints): Remove function.
1471 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1473 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1475 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1477 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1478 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1479 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1480 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1481 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1483 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1485 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1486 * linux-low.c (can_hardware_single_step): Use
1487 supports_hardware_single_step.
1488 (can_software_single_step): New function.
1489 (start_step_over): Call can_software_single_step.
1490 (linux_supports_hardware_single_step): New function.
1491 (struct target_ops) <supports_software_single_step>: Initialize.
1492 * linux-low.h (struct linux_target_ops)
1493 <supports_hardware_single_step>: Initialize.
1494 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1496 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1497 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1498 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1499 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1500 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1501 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1502 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1503 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1505 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1506 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1508 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1509 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1510 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1512 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1513 * target.h (struct target_ops): <supports_software_single_step>:
1515 (target_supports_software_single_step): New macro.
1517 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1519 * linux-low.c (linux_wait_1): Fix pc advance condition.
1520 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1521 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1523 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1525 * linux-arm-low.c (arm_is_thumb_mode): New function.
1526 (arm_breakpoint_at): Use arm_is_thumb_mode.
1527 (arm_breakpoint_kind_from_current_state): New function.
1528 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1530 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1531 (linux_breakpoint_kind_from_current_state): New function.
1532 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1533 * linux-low.h (struct linux_target_ops)
1534 <breakpoint_kind_from_current_state>: New field.
1535 * target.h (struct target_ops): Likewise.
1536 (target_breakpoint_kind_from_current_state): New macro.
1538 2015-11-30 Pedro Alves <palves@redhat.com>
1540 * linux-low.c (linux_resume): Wake up the event loop before
1543 2015-11-30 Pedro Alves <palves@redhat.com>
1545 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1547 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1549 * target.c (struct thread_search): New structure.
1550 (thread_search_callback): New function.
1551 (prev_general_thread): New global.
1552 (prepare_to_access_memory, done_accessing_memory): New functions.
1553 * target.h (prepare_to_access_memory, done_accessing_memory):
1554 Replace macros with function declarations.
1556 2015-11-30 Pedro Alves <palves@redhat.com>
1559 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1560 report TARGET_WAITKIND_NO_RESUMED.
1561 * remote-utils.c (prepare_resume_reply): Handle
1562 TARGET_WAITKIND_NO_RESUMED.
1563 * server.c (report_no_resumed): New global.
1564 (handle_query) <qSupported>: Handle "no-resumed+". Report
1565 "no-resumed+" support.
1566 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1567 return error if the client doesn't support no-resumed events.
1568 (push_stop_notification): New function.
1569 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1570 events if the client supports them.
1572 2015-11-30 Pedro Alves <palves@redhat.com>
1574 * linux-low.c (thread_still_has_status_pending_p): Don't check
1576 (lwp_resumed): New function.
1577 (status_pending_p_callback): Return early if the LWP is not
1578 supposed to be resumed.
1580 2015-11-30 Pedro Alves <palves@redhat.com>
1582 * linux-low.c (handle_extended_wait): Assert that the LWP's
1583 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1584 thread create events, leave the new child's status pending.
1585 (linux_low_filter_event): If GDB wants to hear about thread exit
1586 events, leave the LWP marked dead and don't delete it.
1587 (linux_wait_for_event_filtered): Don't check for thread exit.
1588 (filter_exit_event): New function.
1589 (linux_wait_1): Use it, when returning an exit event.
1590 (linux_resume_one_lwp_throw): Assert that the LWP's
1591 waitstatus is TARGET_WAITKIND_IGNORE.
1592 * remote-utils.c (prepare_resume_reply): Handle
1593 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1594 * server.c (report_thread_events): New global.
1595 (handle_general_set): Handle QThreadEvents.
1596 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1597 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1598 TARGET_WAITKIND_THREAD_EXITED.
1599 * server.h (report_thread_events): Declare.
1601 2015-11-30 Pedro Alves <palves@redhat.com>
1603 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1604 the thread's last_resume_kind was resume_stop.
1606 2015-11-30 Pedro Alves <palves@redhat.com>
1608 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1611 2015-11-30 Pedro Alves <palves@redhat.com>
1613 * server.c (handle_v_requests): Handle vCtrlC.
1615 2015-11-30 Pedro Alves <palves@redhat.com>
1617 * gdbthread.h (find_any_thread_of_pid): Declare.
1618 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1620 * server.c (handle_query): If current_thread is NULL, look for
1621 another thread of the selected process.
1623 2015-11-26 Daniel Colascione <dancol@dancol.org>
1624 Simon Marchi <simon.marchi@ericsson.com>
1626 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1627 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1629 * target.h (struct target_ops) <thread_name>: New field.
1630 (target_thread_name): New macro.
1632 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1634 * regcache.h (regcache_invalidate_pid): Add declaration.
1635 * regcache.c (regcache_invalidate_pid): New function, extracted
1636 from regcache_invalidate.
1637 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1638 Add trivial documentation comment.
1639 * lynx-low.c: Use regcache_invalidate_pid instead of
1640 regcache_invalidate.
1642 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1644 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1645 and Elf64_auxv_t if the target is Android.
1647 2015-11-22 Doug Evans <xdje42@gmail.com>
1649 * target.h: #include <sys/types.h>.
1651 2015-11-19 Pedro Alves <palves@redhat.com>
1653 * linux-low.c (linux_process_qsupported): Change prototype.
1655 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1657 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1658 and adjust to loop over all features.
1659 * server.c (handle_query) <qSupported>: Adjust to call
1660 target_process_qsupported once, passing it a vector of unprocessed
1662 * target.h (struct target_ops) <process_qsupported>: Change
1664 (target_process_qsupported): Adjust.
1666 2015-11-19 Pedro Alves <palves@redhat.com>
1668 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1670 * configure: Regenerate.
1672 2015-11-19 Pedro Alves <palves@redhat.com>
1674 * configure: Regenerate.
1676 2015-11-19 Yao Qi <yao.qi@linaro.org>
1678 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1681 2015-11-19 Yao Qi <yao.qi@linaro.org>
1683 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1684 (struct aarch64_operand): Move enum out.
1686 2015-11-19 Yao Qi <yao.qi@linaro.org>
1688 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1689 struct user_fpsimd_state *.
1690 (aarch64_store_fpregset): Likewise.
1692 2015-11-19 Yao Qi <yao.qi@linaro.org>
1694 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1695 struct user_pt_regs *.
1696 (aarch64_store_gregset): Likewise.
1698 2015-11-18 Pedro Alves <palves@redhat.com>
1700 * Makefile.in (all_object_files): Add $IPA_OBJS.
1702 2015-11-17 Pedro Alves <palves@redhat.com>
1704 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1705 GDB_SIGNAL_0 and gdb_signal_to_string.
1707 2015-11-17 Pedro Alves <palves@redhat.com>
1709 * win32-low.c (handle_output_debug_string): Remove parameter.
1710 (win32_kill): Remove our_status local and adjust call to
1711 handle_output_debug_string.
1712 (get_child_debug_event): Adjust call to
1713 handle_output_debug_string.
1715 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1717 * linux-mips-low.c (mips_fill_gregset): Add cast.
1718 (mips_store_gregset): Likewise.
1719 (mips_fill_fpregset): Likewise.
1720 (mips_store_fpregset): Likewise.
1722 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1724 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1727 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1729 * linux-mips-low.c (mips_linux_new_thread): Change type of
1730 watch_type to enum target_hw_bp_type.
1732 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1734 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1735 Change return type to arm_hwbp_type.
1737 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1739 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1740 (arm_store_gregset): Likewise.
1741 * linux-arm-low.c (arm_get_hwcap): Likewise.
1742 (arm_read_description): Likewise.
1744 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1746 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1748 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1750 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1751 (ppc_fill_vsxregset): Likewise.
1752 (ppc_store_vsxregset): Likewise.
1753 (ppc_fill_vrregset): Likewise.
1754 (ppc_store_vrregset): Likewise.
1755 (ppc_fill_evrregset): Likewise.
1756 (ppc_store_evrregset): Likewise.
1758 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1760 * linux-ppc-low.c (ppc_usrregs_info): Remove
1761 forward-declaration.
1762 (ppc_arch_setup): Move lower in file.
1764 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1766 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1767 (ps_pdwrite): Likewise.
1769 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1771 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1772 to after assert checks.
1774 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1776 * proc-service.c (ps_pdread): Add/adjust casts.
1777 (ps_pdwrite): Add/adjust casts.
1779 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1781 * server.c (handle_search_memory_1): Cast return value of
1784 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1786 * server.c (write_qxfer_response): Change type of data to
1789 2015-10-29 Pedro Alves <palves@redhat.com>
1791 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1793 2015-10-29 Pedro Alves <palves@redhat.com>
1795 * tracepoint.c (clear_installed_tracepoints): Add casts.
1797 2015-10-29 Pedro Alves <palves@redhat.com>
1799 * server.c (handle_v_cont, process_serial_event): Add enum
1800 gdb_signal casts to signal parsing code.
1802 2015-10-29 Pedro Alves <palves@redhat.com>
1804 * linux-low.h (NULL_REGSET): Define.
1805 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1806 * linux-arm-low.c (arm_regsets): Likewise.
1807 * linux-crisv32-low.c (cris_regsets): Likewise.
1808 * linux-m68k-low.c (m68k_regsets): Likewise.
1809 * linux-mips-low.c (mips_regsets): Likewise.
1810 * linux-nios2-low.c (nios2_regsets): Likewise.
1811 * linux-ppc-low.c (ppc_regsets): Likewise.
1812 * linux-s390-low.c (s390_regsets): Likewise.
1813 * linux-sh-low.c (sh_regsets): Likewise.
1814 * linux-sparc-low.c (sparc_regsets): Likewise.
1815 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1816 * linux-tile-low.c (tile_regsets): Likewise.
1817 * linux-x86-low.c (x86_regsets): Likewise.
1818 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1820 2015-10-29 Pedro Alves <palves@redhat.com>
1822 * linux-low.h (NULL_REGSET): Define.
1823 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1824 * linux-arm-low.c (arm_regsets): Likewise.
1825 * linux-crisv32-low.c (cris_regsets): Likewise.
1826 * linux-m68k-low.c (m68k_regsets): Likewise.
1827 * linux-mips-low.c (mips_regsets): Likewise.
1828 * linux-nios2-low.c (nios2_regsets): Likewise.
1829 * linux-ppc-low.c (ppc_regsets): Likewise.
1830 * linux-s390-low.c (s390_regsets): Likewise.
1831 * linux-sh-low.c (sh_regsets): Likewise.
1832 * linux-sparc-low.c (sparc_regsets): Likewise.
1833 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1834 * linux-tile-low.c (tile_regsets): Likewise.
1835 * linux-x86-low.c (x86_regsets): Likewise.
1836 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1838 2015-10-26 Doug Evans <dje@google.com>
1840 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1842 2015-10-26 Doug Evans <dje@google.com>
1844 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1846 2015-10-26 Doug Evans <dje@google.com>
1848 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1850 (attach_thread, find_new_threads_callback): Ditto.
1852 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1854 * mem-break.h (set_breakpoint_data): Remove.
1856 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1858 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1859 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1860 (initialize_low): Remove set_breakpoint_data call.
1861 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1862 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1863 (initialize_low): Remove set_breakpoint_data call.
1864 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1865 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1866 (initialize_low): Remove set_breakpoint_data call.
1868 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1870 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1871 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1872 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1873 * target.h (target_breakpoint_kind_from_pc): New macro.
1875 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1877 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1878 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1879 the default breakpoint kind.
1881 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1883 * linux-arm-low.c (arm_supports_z_point_type): Add software
1886 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1888 * linux-arm-low.c: Refactor breakpoint definitions.
1889 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1890 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1892 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1894 * Makefile.in: Add arm.c/o.
1895 * configure.srv: Likewise.
1896 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1897 (arm_breakpoint_kind_from_pc): New function.
1898 (arm_sw_breakpoint_from_kind): Return proper kind.
1899 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1901 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1903 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1905 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1906 (struct raw_breakpoint) <size>: Remove.
1907 (struct raw_breakpoint) <kind>: Add.
1908 (bp_size): New function.
1909 (bp_opcode): Likewise.
1910 (find_raw_breakpoint_at): Adjust for kind.
1911 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1912 (remove_memory_breakpoint): Adjust for kind call bp_size.
1913 (set_raw_breakpoint_at): Adjust for kind.
1914 (set_breakpoint): Likewise.
1915 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1916 (delete_raw_breakpoint): Adjust for kind.
1917 (delete_breakpoint): Likewise.
1918 (find_gdb_breakpoint): Likewise.
1919 (set_gdb_breakpoint_1): Likewise.
1920 (set_gdb_breakpoint): Likewise.
1921 (delete_gdb_breakpoint_1): Likewise.
1922 (delete_gdb_breakpoint): Likewise.
1923 (uninsert_raw_breakpoint): Likewise.
1924 (reinsert_raw_breakpoint): Likewise.
1925 (set_breakpoint_data): Remove.
1926 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1927 (check_mem_read): Adjust for kind call bp_size.
1928 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1929 (clone_one_breakpoint): Adjust for kind.
1930 * mem-break.h (set_gdb_breakpoint): Likewise.
1931 (delete_gdb_breakpoint): Likewise.
1932 * server.c (process_serial_event): Likewise.
1934 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1936 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1937 (struct linux_target_ops) <breakpoint>: Remove.
1938 (struct linux_target_ops) <breakpoint_len>: Remove.
1939 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1940 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1941 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1942 (arm_sw_breakpoint_from_kind): New function.
1943 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1944 (struct linux_target_ops) <breakpoint>: Remove.
1945 (struct linux_target_ops) <breakpoint_len>: Remove.
1946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1948 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1949 (struct linux_target_ops) <breakpoint>: Remove.
1950 (struct linux_target_ops) <breakpoint_len>: Remove.
1951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1953 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1954 (struct linux_target_ops) <breakpoint>: Remove.
1955 (struct linux_target_ops) <breakpoint_len>: Remove.
1956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1958 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1959 and sw_breakpoint_from_kind to increment the pc.
1960 (linux_breakpoint_kind_from_pc): New function.
1961 (linux_sw_breakpoint_from_kind): New function.
1962 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1963 (initialize_low): Call breakpoint_kind_from_pc and
1964 sw_breakpoint_from_kind to replace breakpoint_data/len.
1965 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1968 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1969 (struct linux_target_ops) <breakpoint>: Remove.
1970 (struct linux_target_ops) <breakpoint_len>: Remove.
1971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1973 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1974 (struct linux_target_ops) <breakpoint>: Remove.
1975 (struct linux_target_ops) <breakpoint_len>: Remove.
1976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1978 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1979 (struct linux_target_ops) <breakpoint>: Remove.
1980 (struct linux_target_ops) <breakpoint_len>: Remove.
1981 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1982 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1983 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1984 (struct linux_target_ops) <breakpoint>: Remove.
1985 (struct linux_target_ops) <breakpoint_len>: Remove.
1986 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1987 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1988 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1989 (struct linux_target_ops) <breakpoint>: Remove.
1990 (struct linux_target_ops) <breakpoint_len>: Remove.
1991 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1992 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1993 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1994 (struct linux_target_ops) <breakpoint>: Remove.
1995 (struct linux_target_ops) <breakpoint_len>: Remove.
1996 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1997 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1998 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1999 (struct linux_target_ops) <breakpoint>: Remove.
2000 (struct linux_target_ops) <breakpoint_len>: Remove.
2001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2003 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2004 (struct linux_target_ops) <breakpoint>: Remove.
2005 (struct linux_target_ops) <breakpoint_len>: Remove.
2006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2008 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2009 (struct linux_target_ops) <breakpoint>: Remove.
2010 (struct linux_target_ops) <breakpoint_len>: Remove.
2011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2013 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2014 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2015 (struct linux_target_ops) <breakpoint>: Remove.
2016 (struct linux_target_ops) <breakpoint_len>: Remove.
2017 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2018 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2019 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2020 (struct linux_target_ops) <breakpoint>: Remove.
2021 (struct linux_target_ops) <breakpoint_len>: Remove.
2022 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2023 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2025 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2027 * linux-cris-low.c (cris_get_pc): Remove void arg.
2029 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2031 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2034 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2036 * inferiors.c (thread_pid_matches_callback): New function.
2037 (find_thread_process): New function.
2038 (remove_thread): Reset current_thread.
2039 (remove_process): Assert threads have been removed first.
2041 2015-10-15 Yao Qi <yao.qi@linaro.org>
2043 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2045 (aarch64_remove_point): Likewise.
2046 * regcache.c (regcache_register_size): New function.
2048 2015-10-12 Yao Qi <yao.qi@linaro.org>
2050 * linux-aarch64-low.c: Update all callers as emit_load_store
2051 is renamed to aarch64_emit_load_store.
2053 2015-10-12 Yao Qi <yao.qi@linaro.org>
2055 * linux-aarch64-low.c: Update all callers of function renaming
2056 from emit_insn to aarch64_emit_insn.
2058 2015-10-12 Yao Qi <yao.qi@linaro.org>
2060 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2061 arch/aarch64-insn.h.
2062 (struct aarch64_memory_operand): Likewise.
2064 (emit_insn): Move to arch/aarch64-insn.c.
2065 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2066 (emit_load_store): Move to arch/aarch64-insn.c.
2067 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2068 (can_encode_int32): Remove.
2070 2015-10-12 Yao Qi <yao.qi@linaro.org>
2072 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2073 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2074 (aarch64_relocate_instruction): Likewise.
2075 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2076 (struct aarch64_insn_visitor): Likewise.
2078 2015-10-12 Yao Qi <yao.qi@linaro.org>
2080 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2081 (struct aarch64_insn_visitor): New.
2082 (struct aarch64_insn_relocation_data): New.
2083 (aarch64_ftrace_insn_reloc_b): New function.
2084 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2085 (aarch64_ftrace_insn_reloc_cb): Likewise.
2086 (aarch64_ftrace_insn_reloc_tb): Likewise.
2087 (aarch64_ftrace_insn_reloc_adr): Likewise.
2088 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2089 (aarch64_ftrace_insn_reloc_others): Likewise.
2091 (aarch64_relocate_instruction): Use visitor.
2093 2015-10-12 Yao Qi <yao.qi@linaro.org>
2095 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2096 int. Add argument buf.
2097 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2098 aarch64_relocate_instruction.
2100 2015-10-12 Yao Qi <yao.qi@linaro.org>
2102 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2103 argument insn. Remove local variable insn. Don't call
2105 (aarch64_install_fast_tracepoint_jump_pad): Call
2108 2015-09-30 Yao Qi <yao.qi@linaro.org>
2110 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2111 (emit_load_store_pair): Likewise.
2113 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2115 * dll.c (match_dll): Add cast(s).
2116 (unloaded_dll): Likewise.
2117 * linux-low.c (second_thread_of_pid_p): Likewise.
2118 (delete_lwp_callback): Likewise.
2119 (count_events_callback): Likewise.
2120 (select_event_lwp_callback): Likewise.
2121 (linux_set_resume_request): Likewise.
2122 * server.c (accumulate_file_name_length): Likewise.
2123 (emit_dll_description): Likewise.
2124 (handle_qxfer_threads_worker): Likewise.
2125 (visit_actioned_threads): Likewise.
2126 * thread-db.c (any_thread_of): Likewise.
2127 * tracepoint.c (same_process_p): Likewise.
2128 (match_blocktype): Likewise.
2129 (build_traceframe_info_xml): Likewise.
2131 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2133 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2135 (gdb_unparse_agent_expr): Likewise.
2136 * hostio.c (require_data): Likewise.
2137 (handle_pread): Likewise.
2138 * linux-low.c (disable_regset): Likewise.
2139 (fetch_register): Likewise.
2140 (store_register): Likewise.
2141 (get_dynamic): Likewise.
2142 (linux_qxfer_libraries_svr4): Likewise.
2143 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2144 (set_fast_tracepoint_jump): Likewise.
2145 (uninsert_fast_tracepoint_jumps_at): Likewise.
2146 (reinsert_fast_tracepoint_jumps_at): Likewise.
2147 (validate_inserted_breakpoint): Likewise.
2148 (clone_agent_expr): Likewise.
2149 * regcache.c (init_register_cache): Likewise.
2150 * remote-utils.c (putpkt_binary_1): Likewise.
2151 (decode_M_packet): Likewise.
2152 (decode_X_packet): Likewise.
2153 (look_up_one_symbol): Likewise.
2154 (relocate_instruction): Likewise.
2155 (monitor_output): Likewise.
2156 * server.c (handle_search_memory): Likewise.
2157 (handle_qxfer_exec_file): Likewise.
2158 (handle_qxfer_libraries): Likewise.
2159 (handle_qxfer): Likewise.
2160 (handle_query): Likewise.
2161 (handle_v_cont): Likewise.
2162 (handle_v_run): Likewise.
2163 (captured_main): Likewise.
2164 * target.c (write_inferior_memory): Likewise.
2165 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2166 * tracepoint.c (init_trace_buffer): Likewise.
2167 (add_tracepoint_action): Likewise.
2168 (add_traceframe): Likewise.
2169 (add_traceframe_block): Likewise.
2170 (cmd_qtdpsrc): Likewise.
2171 (cmd_qtdv): Likewise.
2172 (cmd_qtstatus): Likewise.
2173 (response_source): Likewise.
2174 (response_tsv): Likewise.
2175 (cmd_qtnotes): Likewise.
2176 (gdb_collect): Likewise.
2177 (initialize_tracepoint): Likewise.
2179 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2181 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2182 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2183 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2185 (enum aarch64_condition_codes): New enum.
2186 (w0): New static global.
2189 (struct aarch64_memory_operand) <type>: New
2190 MEMORY_OPERAND_POSTINDEX type.
2191 (postindex_memory_operand): New helper function.
2192 (emit_ret): New function.
2193 (emit_load_store_pair): New function, factored out of emit_stp
2194 with support for MEMORY_OPERAND_POSTINDEX.
2195 (emit_stp): Rewrite using emit_load_store_pair.
2196 (emit_ldp): New function.
2197 (emit_load_store): Likewise.
2198 (emit_ldr): Mention post-index instruction in comment.
2199 (emit_ldrh): New function.
2200 (emit_ldrb): New function.
2201 (emit_ldrsw): Mention post-index instruction in comment.
2202 (emit_str): Likewise.
2203 (emit_subs): New function.
2204 (emit_cmp): Likewise.
2205 (emit_and): Likewise.
2206 (emit_orr): Likewise.
2207 (emit_orn): Likewise.
2208 (emit_eor): Likewise.
2209 (emit_mvn): Likewise.
2210 (emit_lslv): Likewise.
2211 (emit_lsrv): Likewise.
2212 (emit_asrv): Likewise.
2213 (emit_mul): Likewise.
2214 (emit_sbfm): Likewise.
2215 (emit_sbfx): Likewise.
2216 (emit_ubfm): Likewise.
2217 (emit_ubfx): Likewise.
2218 (emit_csinc): Likewise.
2219 (emit_cset): Likewise.
2220 (emit_nop): Likewise.
2221 (emit_ops_insns): New helper function.
2222 (emit_pop): Likewise.
2223 (emit_push): Likewise.
2224 (aarch64_emit_prologue): New function.
2225 (aarch64_emit_epilogue): Likewise.
2226 (aarch64_emit_add): Likewise.
2227 (aarch64_emit_sub): Likewise.
2228 (aarch64_emit_mul): Likewise.
2229 (aarch64_emit_lsh): Likewise.
2230 (aarch64_emit_rsh_signed): Likewise.
2231 (aarch64_emit_rsh_unsigned): Likewise.
2232 (aarch64_emit_ext): Likewise.
2233 (aarch64_emit_log_not): Likewise.
2234 (aarch64_emit_bit_and): Likewise.
2235 (aarch64_emit_bit_or): Likewise.
2236 (aarch64_emit_bit_xor): Likewise.
2237 (aarch64_emit_bit_not): Likewise.
2238 (aarch64_emit_equal): Likewise.
2239 (aarch64_emit_less_signed): Likewise.
2240 (aarch64_emit_less_unsigned): Likewise.
2241 (aarch64_emit_ref): Likewise.
2242 (aarch64_emit_if_goto): Likewise.
2243 (aarch64_emit_goto): Likewise.
2244 (aarch64_write_goto_address): Likewise.
2245 (aarch64_emit_const): Likewise.
2246 (aarch64_emit_call): Likewise.
2247 (aarch64_emit_reg): Likewise.
2248 (aarch64_emit_pop): Likewise.
2249 (aarch64_emit_stack_flush): Likewise.
2250 (aarch64_emit_zero_ext): Likewise.
2251 (aarch64_emit_swap): Likewise.
2252 (aarch64_emit_stack_adjust): Likewise.
2253 (aarch64_emit_int_call_1): Likewise.
2254 (aarch64_emit_void_call_2): Likewise.
2255 (aarch64_emit_eq_goto): Likewise.
2256 (aarch64_emit_ne_goto): Likewise.
2257 (aarch64_emit_lt_goto): Likewise.
2258 (aarch64_emit_le_goto): Likewise.
2259 (aarch64_emit_gt_goto): Likewise.
2260 (aarch64_emit_ge_got): Likewise.
2261 (aarch64_emit_ops_impl): New static global variable.
2262 (aarch64_emit_ops): New target function, return
2263 &aarch64_emit_ops_impl.
2264 (struct linux_target_ops): Install it.
2266 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2268 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2269 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2271 * linux-aarch64-ipa.c: New file.
2272 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2274 (aarch64_get_thread_area): New target method.
2275 (extract_signed_bitfield): New helper function.
2276 (aarch64_decode_ldr_literal): New function.
2277 (enum aarch64_opcodes): New enum.
2278 (struct aarch64_register): New struct.
2279 (struct aarch64_operand): New struct.
2280 (x0): New static global.
2289 (aarch64_register): New helper function.
2290 (register_operand): Likewise.
2291 (immediate_operand): Likewise.
2292 (struct aarch64_memory_operand): New struct.
2293 (offset_memory_operand): New helper function.
2294 (preindex_memory_operand): Likewise.
2295 (enum aarch64_system_control_registers): New enum.
2296 (ENCODE): New macro.
2297 (emit_insn): New helper function.
2298 (emit_b): New function.
2299 (emit_bcond): Likewise.
2300 (emit_cb): Likewise.
2301 (emit_tb): Likewise.
2302 (emit_blr): Likewise.
2303 (emit_stp): Likewise.
2304 (emit_ldp_q_offset): Likewise.
2305 (emit_stp_q_offset): Likewise.
2306 (emit_load_store): Likewise.
2307 (emit_ldr): Likewise.
2308 (emit_ldrsw): Likewise.
2309 (emit_str): Likewise.
2310 (emit_ldaxr): Likewise.
2311 (emit_stxr): Likewise.
2312 (emit_stlr): Likewise.
2313 (emit_data_processing_reg): Likewise.
2314 (emit_data_processing): Likewise.
2315 (emit_add): Likewise.
2316 (emit_sub): Likewise.
2317 (emit_mov): Likewise.
2318 (emit_movk): Likewise.
2319 (emit_mov_addr): Likewise.
2320 (emit_mrs): Likewise.
2321 (emit_msr): Likewise.
2322 (emit_sevl): Likewise.
2323 (emit_wfe): Likewise.
2324 (append_insns): Likewise.
2325 (can_encode_int32_in): New helper function.
2326 (aarch64_relocate_instruction): New function.
2327 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2328 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2329 (struct linux_target_ops): Install aarch64_get_thread_area,
2330 aarch64_install_fast_tracepoint_jump_pad and
2331 aarch64_get_min_fast_tracepoint_insn_len.
2333 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2335 * Makefile.in (aarch64-insn.o): New rule.
2336 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2338 2015-09-21 Yao Qi <yao.qi@linaro.org>
2340 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2342 2015-09-21 Yao Qi <yao.qi@linaro.org>
2344 * tracepoint.c (max_jump_pad_size): Remove.
2346 2015-09-18 Yao Qi <yao.qi@linaro.org>
2348 * linux-aarch64-low.c: Don't include sys/uio.h.
2349 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2351 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2353 * tracepoint.c (eval_result_type): Change prototype.
2354 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2356 2015-09-15 Pedro Alves <palves@redhat.com>
2358 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2359 Check whether to report exec events instead of checking whether
2360 multiprocess is enabled.
2362 2015-09-15 Pedro Alves <palves@redhat.com>
2365 * remote-utils.c (prepare_resume_reply): Merge
2366 TARGET_WAITKIND_VFORK_DONE switch case with the
2367 TARGET_WAITKIND_FORKED case.
2369 2015-09-15 Yao Qi <yao.qi@linaro.org>
2371 * server.c (handle_query): Check string comparison using
2372 "else if" instead of "if".
2374 2015-09-15 Yao Qi <yao.qi@linaro.org>
2376 * server.c (vCont_supported): New global variable.
2377 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2378 matches. Append ";vContSupported+" to own_buf.
2379 (handle_v_requests): Append ";s;S" to own_buf if target supports
2380 hardware single step or vCont_supported is false.
2381 (capture_main): Set vCont_supported to zero.
2383 2015-09-15 Yao Qi <yao.qi@linaro.org>
2385 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2387 (linux_supports_hardware_single_step): ... New function.
2388 (linux_target_ops): Update.
2389 * lynx-low.c (lynx_target_ops): Set field
2390 supports_hardware_single_step to target_can_do_hardware_single_step.
2391 * nto-low.c (nto_target_ops): Likewise.
2392 * spu-low.c (spu_target_ops): Likewise.
2393 * win32-low.c (win32_target_ops): Likewise.
2394 * target.c (target_can_do_hardware_single_step): New function.
2395 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2396 Remove. <supports_hardware_single_step>: New field.
2397 (target_supports_conditional_breakpoints): Remove.
2398 (target_supports_hardware_single_step): New macro.
2399 (target_can_do_hardware_single_step): Declare.
2400 * server.c (handle_query): Use target_supports_hardware_single_step
2401 instead of target_supports_conditional_breakpoints.
2403 2015-09-15 Yao Qi <yao.qi@linaro.org>
2405 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2407 (struct linux_target_ops the_low_target): Install
2408 aarch64_linux_siginfo_fixup.
2410 2015-09-11 Don Breazeal <donb@codesourcery.com>
2411 Luis Machado <lgustavo@codesourcery.com>
2413 * linux-low.c (linux_mourn): Static declaration.
2414 (linux_arch_setup): Move in front of
2415 handle_extended_wait.
2416 (linux_arch_setup_thread): New function.
2417 (handle_extended_wait): Handle exec events. Call
2418 linux_arch_setup_thread. Make event_lwp argument a
2419 pointer-to-a-pointer.
2420 (check_zombie_leaders): Do not check stopped threads.
2421 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2422 (linux_low_filter_event): Add lwp and thread for exec'ing
2423 non-leader thread if leader thread has been deleted.
2424 Refactor code into linux_arch_setup_thread and call it.
2425 Pass child lwp pointer by reference to handle_extended_wait.
2426 (linux_wait_for_event_filtered): Update comment.
2427 (linux_wait_1): Prevent clobbering exec event status.
2428 (linux_supports_exec_events): New function.
2429 (linux_target_ops) <supports_exec_events>: Initialize new member.
2430 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2432 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2433 * server.c (report_exec_events): New global variable.
2434 (handle_query): Handle qSupported query for exec-events feature.
2435 (captured_main): Initialize report_exec_events.
2436 * server.h (report_exec_events): Declare new global variable.
2437 * target.h (struct target_ops) <supports_exec_events>: New
2439 (target_supports_exec_events): New macro.
2440 * win32-low.c (win32_target_ops) <supports_exec_events>:
2441 Initialize new member.
2443 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2445 * linux-low.c (linux_low_enable_btrace): Remove.
2446 (linux_target_ops): Replace linux_low_enable_btrace with
2447 linux_enable_btrace.
2449 2015-09-03 Yao Qi <yao.qi@linaro.org>
2451 * linux-aarch64-low.c (aarch64_insert_point): Call
2452 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2455 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2457 * linux-low.c (check_stopped_by_breakpoint): Use
2458 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2460 2015-08-27 Pedro Alves <palves@redhat.com>
2462 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2464 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2466 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2467 the XNEW-family equivalent.
2468 (compile_bytecodes): Likewise.
2469 * dll.c (loaded_dll): Likewise.
2470 * event-loop.c (append_callback_event): Likewise.
2471 (create_file_handler): Likewise.
2472 (create_file_event): Likewise.
2473 * hostio.c (handle_open): Likewise.
2474 * inferiors.c (add_thread): Likewise.
2475 (add_process): Likewise.
2476 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2477 * linux-arm-low.c (arm_new_process): Likewise.
2478 (arm_new_thread): Likewise.
2479 * linux-low.c (add_to_pid_list): Likewise.
2480 (linux_add_process): Likewise.
2481 (handle_extended_wait): Likewise.
2482 (add_lwp): Likewise.
2483 (enqueue_one_deferred_signal): Likewise.
2484 (enqueue_pending_signal): Likewise.
2485 (linux_resume_one_lwp_throw): Likewise.
2486 (linux_resume_one_thread): Likewise.
2487 (linux_read_memory): Likewise.
2488 (linux_write_memory): Likewise.
2489 * linux-mips-low.c (mips_linux_new_process): Likewise.
2490 (mips_linux_new_thread): Likewise.
2491 (mips_add_watchpoint): Likewise.
2492 * linux-x86-low.c (initialize_low_arch): Likewise.
2493 * lynx-low.c (lynx_add_process): Likewise.
2494 * mem-break.c (set_raw_breakpoint_at): Likewise.
2495 (set_breakpoint): Likewise.
2496 (add_condition_to_breakpoint): Likewise.
2497 (add_commands_to_breakpoint): Likewise.
2498 (clone_agent_expr): Likewise.
2499 (clone_one_breakpoint): Likewise.
2500 * regcache.c (new_register_cache): Likewise.
2501 * remote-utils.c (look_up_one_symbol): Likewise.
2502 * server.c (queue_stop_reply): Likewise.
2503 (start_inferior): Likewise.
2504 (queue_stop_reply_callback): Likewise.
2505 (handle_target_event): Likewise.
2506 * spu-low.c (fetch_ppc_memory): Likewise.
2507 (store_ppc_memory): Likewise.
2508 * target.c (set_target_ops): Likewise.
2509 * thread-db.c (thread_db_load_search): Likewise.
2510 (try_thread_db_load_1): Likewise.
2511 * tracepoint.c (add_tracepoint): Likewise.
2512 (add_tracepoint_action): Likewise.
2513 (create_trace_state_variable): Likewise.
2514 (cmd_qtdpsrc): Likewise.
2515 (cmd_qtro): Likewise.
2516 (add_while_stepping_state): Likewise.
2517 * win32-low.c (child_add_thread): Likewise.
2518 (get_image_name): Likewise.
2520 2015-08-25 Yao Qi <yao.qi@linaro.org>
2522 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2524 2015-08-25 Yao Qi <yao.qi@linaro.org>
2526 * Makefile.in (aarch64-linux.o): New rule.
2527 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2529 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2530 (aarch64_init_debug_reg_state): Make it extern.
2531 (aarch64_linux_prepare_to_resume): Remove.
2533 2015-08-25 Yao Qi <yao.qi@linaro.org>
2535 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2536 lwp_arch_private_info and ptid_of_lwp.
2538 2015-08-25 Yao Qi <yao.qi@linaro.org>
2540 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2541 Find proc_info by find_process_pid. All callers updated.
2543 2015-08-25 Yao Qi <yao.qi@linaro.org>
2545 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2547 (debug_reg_change_callback): Remove.
2548 (aarch64_notify_debug_reg_change): Remove.
2550 2015-08-25 Yao Qi <yao.qi@linaro.org>
2552 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2553 Call current_lwp_ptid.
2555 2015-08-25 Yao Qi <yao.qi@linaro.org>
2557 * linux-aarch64-low.c (debug_reg_change_callback): Use
2560 2015-08-25 Yao Qi <yao.qi@linaro.org>
2562 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2564 2015-08-25 Yao Qi <yao.qi@linaro.org>
2566 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2568 2015-08-25 Yao Qi <yao.qi@linaro.org>
2570 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2573 2015-08-25 Yao Qi <yao.qi@linaro.org>
2575 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2577 (debug_reg_change_callback): Remove argument entry and add argument
2578 lwp. Remove local variable thread. Don't print thread id in the
2579 debugging output. Don't check whether pid of thread equals to pid.
2580 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2581 iterate_over_lwps instead find_inferior.
2583 2015-08-24 Pedro Alves <palves@redhat.com>
2585 * inferiors.c (get_first_process): New function.
2586 * inferiors.h (get_first_process): New declaration.
2587 * remote-utils.c (read_ptid): Default to the first process in the
2588 list, instead of to the current thread's process.
2590 2015-08-24 Pedro Alves <palves@redhat.com>
2592 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2593 * event-loop.c: Likewise.
2594 * remote-utils.c: Likewise.
2595 * tracepoint.c: Likewise.
2597 2015-08-24 Pedro Alves <palves@redhat.com>
2599 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2602 2015-08-21 Pedro Alves <palves@redhat.com>
2604 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2605 instead of literal 1.
2607 2015-08-21 Pedro Alves <palves@redhat.com>
2609 * tdesc.c (default_description): Explicitly zero-initialize.
2611 2015-08-21 Pedro Alves <palves@redhat.com>
2614 * inferiors.c (remove_thread): Discard any pending stop reply for
2616 * server.c (remove_all_on_match_pid): Rename to ...
2617 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2619 (discard_queued_stop_replies): Change parameter to a ptid. Now
2621 (handle_v_kill, kill_inferior_callback, captured_main)
2622 (process_serial_event): Adjust.
2623 * server.h (discard_queued_stop_replies): Declare.
2625 2015-08-21 Pedro Alves <palves@redhat.com>
2627 * linux-low.c (wait_for_sigstop): Always switch to no thread
2628 selected if the previously current thread dies.
2629 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2630 process instead of the current thread's.
2631 * remote-utils.c (input_interrupt): Don't check if there's no
2633 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2634 current thread to the general thread fails, error out.
2635 (handle_qxfer_auxv, handle_qxfer_libraries)
2636 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2637 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2638 (handle_query): Check if there's a thread selected instead of
2639 checking whether there's any thread in the thread list.
2640 (handle_qxfer_threads, handle_qxfer_btrace)
2641 (handle_qxfer_btrace_conf): Don't error out early if there's no
2642 thread in the thread list.
2643 (handle_v_cont, myresume): Don't set the current thread to the
2645 (process_serial_event) <Hg handling>: Also set thread_id if the
2646 previous general thread is still alive.
2647 (process_serial_event) <g/G handling>: If setting the current
2648 thread to the general thread fails, error out.
2649 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2650 thread's lwp instead of the current thread's.
2651 * target.c (set_desired_thread): If the desired thread was not
2652 found, leave the current thread pointing to NULL. Return an int
2653 (boolean) indicating success.
2654 * target.h (set_desired_thread): Change return type to int.
2656 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2658 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2659 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2661 (ps_get_thread_area): New function.
2663 2015-08-19 Gary Benson <gbenson@redhat.com>
2665 * hostio.c (handle_pread): Do not attempt to read more data
2666 than hostio_reply_with_data can fit in a packet.
2668 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2670 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2672 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2674 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2676 2015-08-06 Pedro Alves <palves@redhat.com>
2678 * tracepoint.c (expr_eval_result): Now an int.
2680 2015-08-06 Pedro Alves <palves@redhat.com>
2682 * gdbthread.h (struct regcache): Forward declare.
2683 (struct thread_info) <regcache_data>: Now a struct regcache
2685 * inferiors.c (inferior_regcache_data)
2686 (set_inferior_regcache_data): Now work with struct regcache
2688 * inferiors.h (struct regcache): Forward declare.
2689 (inferior_regcache_data, set_inferior_regcache_data): Now work
2690 with struct regcache pointers.
2691 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2692 (free_register_cache_thread): Remove struct regcache pointer
2695 2015-08-06 Pedro Alves <palves@redhat.com>
2697 * server.c (captured_main): On error, print the exception message
2698 to stderr, and if run_once is set, throw a quit.
2700 2015-08-06 Pedro Alves <palves@redhat.com>
2702 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2705 2015-08-06 Pedro Alves <palves@redhat.com>
2707 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2708 reading beyond the passed in buffer length.
2710 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2712 * tracepoint.c (symbol_list) <required>: Remove.
2714 2015-08-06 Pedro Alves <palves@redhat.com>
2716 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2717 count if stopping and suspending threads.
2718 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2719 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2720 (linux_detach): Complete an ongoing step-over.
2721 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2723 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2724 (linux_wait_1): If passing a signal to the inferior after
2725 finishing a step-over, unsuspend and re-resume all lwps. If we
2726 see a single-step event but the thread should be continuing, don't
2727 pass the trap to gdb.
2728 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2729 internal_error instead of gdb_assert.
2730 (enqueue_pending_signal): New function.
2731 (check_ptrace_stopped_lwp_gone): Add debug output.
2732 (start_step_over): Use internal_error instead of gdb_assert.
2733 (complete_ongoing_step_over): New function.
2734 (linux_resume_one_thread): Don't resume a suspended thread.
2735 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2738 2015-08-06 Pedro Alves <palves@redhat.com>
2740 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2741 (linux_thread_alive): Use lwp_is_marked_dead.
2742 (extended_event_reported): Delete.
2743 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2744 instead of extended_event_reported.
2745 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2747 (lwp_is_marked_dead): New function.
2748 (lwp_running): Use lwp_is_marked_dead.
2749 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2752 2015-08-06 Pedro Alves <palves@redhat.com>
2754 * linux-low.c (linux_wait_1): Move fork event output out of the
2755 !report_to_gdb check. Pass event_child->waitstatus to
2756 target_waitstatus_to_string instead of ourstatus.
2758 2015-08-04 Yao Qi <yao.qi@linaro.org>
2760 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2761 if current_thread is 32 bit.
2763 2015-08-04 Yao Qi <yao.qi@linaro.org>
2765 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2766 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2767 * server.c (extended_protocol): Remove "static".
2768 * server.h (extended_protocol): Declare it.
2770 2015-08-04 Yao Qi <yao.qi@linaro.org>
2772 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2773 both aarch64 and aarch32.
2774 (aarch64_set_pc): Likewise.
2776 2015-08-04 Yao Qi <yao.qi@linaro.org>
2778 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2779 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2780 arm-with-neon.xml to srv_xmlfiles.
2781 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2782 (is_64bit_tdesc): New function.
2783 (aarch64_linux_read_description): New function.
2784 (aarch64_arch_setup): Call aarch64_linux_read_description.
2785 (regs_info): Rename to regs_info_aarch64.
2786 (aarch64_regs_info): Return right regs_info.
2787 (initialize_low_arch): Call initialize_low_arch_aarch32.
2789 2015-08-04 Yao Qi <yao.qi@linaro.org>
2791 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2792 * linux-aarch32-low.c: New file.
2793 * linux-aarch32-low.h: New file.
2794 * linux-arm-low.c (arm_fill_gregset): Move it to
2795 linux-aarch32-low.c.
2796 (arm_store_gregset): Likewise.
2797 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2798 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2799 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2800 (regs_info): Rename to regs_info_arm.
2801 (arm_regs_info): Return regs_info_aarch32 if
2802 have_ptrace_getregset is 1 and target description is
2803 arm_with_neon or arm_with_vfpv3.
2804 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2805 Call initialize_low_arch_aarch32 instead.
2807 2015-08-04 Yao Qi <yao.qi@linaro.org>
2809 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2810 * linux-low.c: ... here.
2811 * linux-low.h (have_ptrace_getregset): Declare it.
2813 2015-08-04 Pedro Alves <palves@redhat.com>
2815 * thread-db.c (struct thread_db): Use new typedefs.
2816 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2818 (disable_thread_event_reporting): Cast result of dlsym to
2819 destination function pointer type.
2820 (thread_db_mourn): Use td_ta_delete_ftype.
2822 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2824 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2826 (CDX_BREAKPOINT): Define for R2.
2827 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2828 (the_low_target): Add comments.
2830 2015-07-30 Yao Qi <yao.qi@linaro.org>
2832 * linux-arm-low.c (arm_hwcap): Remove it.
2833 (arm_read_description): New local variable arm_hwcap. Don't
2834 set arm_hwcap to zero.
2836 2015-07-30 Yao Qi <yao.qi@linaro.org>
2838 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2839 Use regcache->tdesc instead.
2840 (arm_store_wmmxregset): Likewise.
2841 (arm_fill_vfpregset): Likewise.
2842 (arm_store_vfpregset): Likewise.
2844 2015-07-30 Yao Qi <yao.qi@linaro.org>
2846 * linux-arm-low.c: Include arch/arm.h.
2847 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2848 (arm_store_gregset): Likewise.
2850 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2852 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2853 ptrace's 4th parameter.
2855 2015-07-27 Yao Qi <yao.qi@linaro.org>
2857 * configure.srv (case aarch64*-*-linux*): Don't set
2860 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2862 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2864 * linux-arm-low.c: Likewise.
2865 * linux-cris-low.c: Likewise.
2866 * linux-crisv32-low.c: Likewise.
2867 * linux-low.c: Likewise.
2868 * linux-m68k-low.c: Likewise.
2869 * linux-mips-low.c: Likewise.
2870 * linux-nios2-low.c: Likewise.
2871 * linux-s390-low.c: Likewise.
2872 * linux-sparc-low.c: Likewise.
2873 * linux-tic6x-low.c: Likewise.
2874 * linux-tile-low.c: Likewise.
2875 * linux-x86-low.c: Likewise.
2877 2015-07-24 Pedro Alves <palves@redhat.com>
2879 * config.in: Regenerate.
2880 * configure: Regenerate.
2882 2015-07-24 Pedro Alves <palves@redhat.com>
2884 * acinclude.m4: Include ../ptrace.m4.
2885 * configure.ac: Call GDB_AC_PTRACE.
2886 * config.in, configure: Regenerate.
2888 2015-07-24 Yao Qi <yao.qi@linaro.org>
2890 * linux-low.c (linux_create_inferior): Remove setting to
2891 proc->priv->new_inferior.
2892 (linux_attach): Likewise.
2893 (linux_low_filter_event): Likewise.
2894 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2896 2015-07-24 Yao Qi <yao.qi@linaro.org>
2898 * linux-low.c (linux_arch_setup): New function.
2899 (linux_low_filter_event): If proc->tdesc is NULL and
2900 proc->attached is true, call the_low_target.arch_setup.
2901 Otherwise, keep status pending, and return.
2902 (linux_resume_one_lwp_throw): Don't call get_pc if
2903 thread->while_stepping isn't NULL. Don't call
2904 get_thread_regcache if proc->tdesc is NULL.
2905 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2906 (linux_target_ops): Install arch_setup.
2907 * server.c (start_inferior): Call the_target->arch_setup.
2908 * target.h (struct target_ops) <arch_setup>: New field.
2909 (target_arch_setup): New marco.
2910 * lynx-low.c (lynx_target_ops): Update.
2911 * nto-low.c (nto_target_ops): Update.
2912 * spu-low.c (spu_target_ops): Update.
2913 * win32-low.c (win32_target_ops): Update.
2915 2015-07-24 Yao Qi <yao.qi@linaro.org>
2917 * linux-low.c (linux_add_process): Don't set
2918 proc->priv->new_inferior.
2919 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2920 (linux_attach): Likewise.
2922 2015-07-24 Yao Qi <yao.qi@linaro.org>
2924 * server.c (start_inferior): Code refactor.
2926 2015-07-24 Yao Qi <yao.qi@linaro.org>
2928 * server.c (process_serial_event): Set general_thread.
2930 2015-07-21 Yao Qi <yao.qi@linaro.org>
2932 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2933 aarch64_linux_get_debug_reg_capacity.
2935 2015-07-17 Yao Qi <yao.qi@linaro.org>
2937 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2938 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2939 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2940 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2941 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2942 (AARCH64_HWP_ALIGNMENT): Likewise.
2943 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2944 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2945 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2946 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2947 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2948 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2949 (struct aarch64_debug_reg_state): Likewise.
2950 (struct arch_lwp_info): Likewise.
2951 (aarch64_align_watchpoint): Likewise.
2952 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2953 (aarch64_watchpoint_length): Likewise.
2954 (aarch64_point_encode_ctrl_reg): Likewise
2955 (aarch64_point_is_aligned): Likewise.
2956 (aarch64_align_watchpoint): Likewise.
2957 (aarch64_linux_set_debug_regs):
2958 (aarch64_dr_state_insert_one_point): Likewise.
2959 (aarch64_dr_state_remove_one_point): Likewise.
2960 (aarch64_handle_breakpoint): Likewise.
2961 (aarch64_handle_aligned_watchpoint): Likewise.
2962 (aarch64_handle_unaligned_watchpoint): Likewise.
2963 (aarch64_handle_watchpoint): Likewise.
2965 2015-07-17 Yao Qi <yao.qi@linaro.org>
2967 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2968 and don't aarch64_get_debug_reg_state. All callers update.
2969 (aarch64_handle_aligned_watchpoint): Likewise.
2970 (aarch64_handle_unaligned_watchpoint): Likewise.
2971 (aarch64_handle_watchpoint): Likewise.
2972 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2973 (aarch64_remove_point): Likewise.
2975 2015-07-17 Yao Qi <yao.qi@linaro.org>
2977 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2979 (aarch64_handle_unaligned_watchpoint): Likewise.
2981 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2983 Revert the previous 3 commits:
2984 Move gdb_regex* to common/
2985 Move linux_find_memory_regions_full & co.
2986 gdbserver build-id attribute generator
2988 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2989 Jan Kratochvil <jan.kratochvil@redhat.com>
2991 gdbserver build-id attribute generator.
2992 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2993 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2994 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2996 (get_dynamic): Use find_pdhr to traverse program headers.
2997 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2998 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2999 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3000 (get_hex_build_id): New.
3001 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3002 to reply XML document.
3004 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3005 Jan Kratochvil <jan.kratochvil@redhat.com>
3007 * target.c: Include target/target-utils.h and fcntl.h.
3008 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3009 (target_fileio_read_stralloc): New functions.
3011 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3013 * Makefile.in (OBS): Add gdb_regex.o.
3015 * config.in: Rebuilt.
3016 * configure: Rebuilt.
3018 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3019 Jan Kratochvil <jan.kratochvil@redhat.com>
3021 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3022 * Makefile.in (OBS): Add target-utils.o.
3023 (linux-maps.o, target-utils.o): New.
3024 * configure.srv (srv_linux_obj): Add linux-maps.o.
3026 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3028 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3030 (the_low_target): Install it.
3032 2015-07-14 Pedro Alves <palves@redhat.com>
3034 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3035 Instead, ignore ECHILD, and throw an error for other errnos.
3037 2015-07-10 Pedro Alves <palves@redhat.com>
3039 * event-loop.c (struct callback_event) <data>: Change type to
3040 gdb_client_data instance instead of gdb_client_data pointer.
3041 (append_callback_event): Adjust.
3043 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3045 * linux-aarch64-low.c: Add comments for each linux_target_ops
3046 method. Remove comments already covered in target_ops and
3047 linux_target_ops definitions.
3048 (the_low_target): Add comments for each unimplemented method.
3050 2015-07-09 Yao Qi <yao.qi@linaro.org>
3052 * linux-aarch64-low.c (aarch64_regmap): Remove.
3053 (aarch64_usrregs_info): Remove.
3054 (regs_info): Set field usrregs to NULL.
3056 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3058 * linux-low.c: Include "rsp-low.h"
3059 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3060 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3061 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3062 (handle_btrace_enable_pt): New.
3063 (handle_btrace_general_set): Support "pt".
3064 (handle_btrace_conf_general_set): Support "pt:size".
3066 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3068 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3071 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3073 * linux-aarch64-low.c: Remove comment about endianness.
3074 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3075 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3078 2015-06-24 Gary Benson <gbenson@redhat.com>
3080 * linux-i386-ipa.c (stdint.h): Do not include.
3081 * lynx-i386-low.c (stdint.h): Likewise.
3082 * lynx-ppc-low.c (stdint.h): Likewise.
3083 * mem-break.c (stdint.h): Likewise.
3084 * thread-db.c (stdint.h): Likewise.
3085 * tracepoint.c (stdint.h): Likewise.
3086 * win32-low.c (stdint.h): Likewise.
3088 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3090 * server.c (write_qxfer_response): Update call to
3091 remote_escape_output.
3093 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3094 Jan Kratochvil <jan.kratochvil@redhat.com>
3096 Merge multiple hex conversions.
3097 * gdbreplay.c (tohex): Rename to 'fromhex'.
3098 (logchar): Use fromhex.
3100 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3102 * server.c (handle_qxfer_libraries): Set `version' attribute for
3105 2015-06-10 Gary Benson <gbenson@redhat.com>
3107 * target.h (struct target_ops) <multifs_open>: New field.
3108 <multifs_unlink>: Likewise.
3109 <multifs_readlink>: Likewise.
3110 * linux-low.c (nat/linux-namespaces.h): New include.
3111 (linux_target_ops): Initialize the_target->multifs_open,
3112 the_target->multifs_unlink and the_target->multifs_readlink.
3113 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3114 * hostio.c (hostio_fs_pid): New static variable.
3115 (hostio_handle_new_gdb_connection): New function.
3116 (handle_setfs): Likewise.
3117 (handle_open): Use the_target->multifs_open as appropriate.
3118 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3119 (handle_readlink): Use the_target->multifs_readlink as
3121 (handle_vFile): Handle vFile:setfs packets.
3122 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3123 after target_handle_new_gdb_connection.
3125 2015-06-10 Gary Benson <gbenson@redhat.com>
3127 * configure.ac (AC_CHECK_FUNCS): Add setns.
3128 * config.in: Regenerate.
3129 * configure: Likewise.
3130 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3131 (linux-namespaces.o): New rule.
3132 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3134 2015-06-09 Gary Benson <gbenson@redhat.com>
3136 * hostio.c (handle_open): Process mode argument with
3137 fileio_to_host_mode.
3139 2015-06-01 Yao Qi <yao.qi@linaro.org>
3141 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3142 * linux-x86-low.c: Likewise.
3144 2015-05-28 Don Breazeal <donb@codesourcery.com>
3146 * linux-low.c (handle_extended_wait): Initialize
3147 thread_info.last_resume_kind for new fork children.
3149 2015-05-15 Pedro Alves <palves@redhat.com>
3151 * target.h (target_handle_new_gdb_connection): Rewrite using if
3152 wrapped in do/while.
3154 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3156 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3157 * configure, config.in: Regenerate.
3158 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3161 2015-05-12 Don Breazeal <donb@codesourcery.com>
3163 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3164 PTRACE_EVENT_VFORK_DONE.
3165 (linux_low_ptrace_options, extended_event_reported): Add vfork
3167 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3168 and "vforkdone" for RSP 'T' Stop Reply Packet.
3169 * server.h (report_vfork_events): Declare
3172 2015-05-12 Don Breazeal <donb@codesourcery.com>
3174 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3175 (the_low_target) <new_fork>: Initialize new member.
3176 * linux-arm-low.c (arm_new_fork): New function.
3177 (the_low_target) <new_fork>: Initialize new member.
3178 * linux-low.c (handle_extended_wait): Call new target function
3180 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3181 * linux-mips-low.c (mips_add_watchpoint): New function
3182 extracted from mips_insert_point.
3183 (the_low_target) <new_fork>: Initialize new member.
3184 (mips_linux_new_fork): New function.
3185 (mips_insert_point): Call mips_add_watchpoint.
3186 * linux-x86-low.c (x86_linux_new_fork): New function.
3187 (the_low_target) <new_fork>: Initialize new member.
3189 2015-05-12 Don Breazeal <donb@codesourcery.com>
3191 * linux-low.c (handle_extended_wait): Implement return value,
3192 rename argument 'event_child' to 'event_lwp', handle
3193 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3194 (linux_low_ptrace_options): New function.
3195 (linux_low_filter_event): Call linux_low_ptrace_options,
3196 use different argument fo linux_enable_event_reporting,
3197 use return value from handle_extended_wait.
3198 (extended_event_reported): New function.
3199 (linux_wait_1): Call extended_event_reported and set
3200 status to report fork events.
3201 (linux_write_memory): Add pid to debug message.
3202 (reset_lwp_ptrace_options_callback): New function.
3203 (linux_handle_new_gdb_connection): New function.
3204 (linux_target_ops): Initialize new structure member.
3205 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3206 * lynx-low.c: Initialize new structure member.
3207 * remote-utils.c (prepare_resume_reply): Implement stop reason
3208 "fork" for "T" stop message.
3209 * server.c (handle_query): Call handle_new_gdb_connection.
3210 * server.h (report_fork_events): Declare global flag.
3211 * target.h (struct target_ops) <handle_new_gdb_connection>:
3213 (target_handle_new_gdb_connection): New macro.
3214 * win32-low.c: Initialize new structure member.
3216 2015-05-12 Don Breazeal <donb@codesourcery.com>
3218 * mem-break.c (APPEND_TO_LIST): Define macro.
3219 (clone_agent_expr): New function.
3220 (clone_one_breakpoint): New function.
3221 (clone_all_breakpoints): New function.
3222 * mem-break.h: Declare new functions.
3224 2015-05-12 Don Breazeal <donb@codesourcery.com>
3226 * linux-low.c (linux_supports_fork_events): New function.
3227 (linux_supports_vfork_events): New function.
3228 (linux_target_ops): Initialize new structure members.
3229 (initialize_low): Call linux_check_ptrace_features.
3230 * lynx-low.c (lynx_target_ops): Initialize new structure
3232 * server.c (report_fork_events, report_vfork_events):
3234 (handle_query): Add new features to qSupported packet and
3236 (captured_main): Initialize new global variables.
3237 * target.h (struct target_ops) <supports_fork_events>:
3239 <supports_vfork_events>: New member.
3240 (target_supports_fork_events): New macro.
3241 (target_supports_vfork_events): New macro.
3242 * win32-low.c (win32_target_ops): Initialize new structure
3245 2015-05-12 Gary Benson <gbenson@redhat.com>
3247 * server.c (handle_qxfer_exec_file): Use current process
3250 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3252 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3253 Remove HAVE_PTRACE_GETREGS conditionals.
3254 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3255 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3257 2015-05-08 Yao Qi <yao.qi@linaro.org>
3259 * linux-low.c (linux_supports_conditional_breakpoints): New
3261 (linux_target_ops): Install new target method.
3262 * lynx-low.c (lynx_target_ops): Install NULL hook for
3263 supports_conditional_breakpoints.
3264 * nto-low.c (nto_target_ops): Likewise.
3265 * spu-low.c (spu_target_ops): Likewise.
3266 * win32-low.c (win32_target_ops): Likewise.
3267 * server.c (handle_query): Check
3268 target_supports_conditional_breakpoints.
3269 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3271 (target_supports_conditional_breakpoints): New macro.
3273 2015-05-06 Pedro Alves <palves@redhat.com>
3276 * server.c (start_inferior): If the process exits, mourn it.
3278 2015-04-21 Gary Benson <gbenson@redhat.com>
3280 * hostio.c (fileio_open_flags_to_host): Factored out to
3281 fileio_to_host_openflags in common/fileio.c. Single use
3284 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3286 * linux-xtensa-low.c (xtensa_fill_gregset)
3287 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3290 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3292 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3293 (regs_info): Replace usrregs pointer with NULL.
3295 2015-04-17 Gary Benson <gbenson@redhat.com>
3297 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3298 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3299 * server.c (handle_qxfer_exec_file): New function.
3300 (qxfer_packets): Add exec-file entry.
3301 (handle_query): Report qXfer:exec-file:read as supported packet.
3303 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3305 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3307 2015-04-09 Gary Benson <gbenson@redhat.com>
3309 * hostio-errno.c (errno_to_fileio_error): Remove function.
3310 Update caller to use remote_fileio_to_fio_error.
3312 2015-04-09 Yao Qi <yao.qi@linaro.org>
3314 * linux-low.c (linux_insert_point): Call
3315 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3316 (linux_remove_point): Call remove_memory_breakpoint if type is
3318 * linux-x86-low.c (x86_insert_point): Don't call
3319 insert_memory_breakpoint.
3320 (x86_remove_point): Don't call remove_memory_breakpoint.
3322 2015-04-01 Pedro Alves <palves@redhat.com>
3323 Cleber Rosa <crosa@redhat.com>
3325 * server.c (gdbserver_usage): Reorganize and extend the usage
3328 2015-03-24 Pedro Alves <palves@redhat.com>
3330 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3331 output. Also dump TRAP_TRACE.
3332 (linux_low_filter_event): In debug output, distinguish a
3333 resume_stop SIGSTOP from a delayed SIGSTOP.
3335 2015-03-24 Gary Benson <gbenson@redhat.com>
3337 * linux-x86-low.c (x86_linux_new_thread): Moved to
3339 (x86_linux_prepare_to_resume): Likewise.
3341 2015-03-24 Gary Benson <gbenson@redhat.com>
3343 * Makefile.in (x86-linux-dregs.o): New rule.
3344 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3345 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3346 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3347 (x86_linux_dr_get): Likewise.
3348 (x86_linux_dr_set): Likewise.
3349 (update_debug_registers_callback): Likewise.
3350 (x86_linux_dr_set_addr): Likewise.
3351 (x86_linux_dr_get_addr): Likewise.
3352 (x86_linux_dr_set_control): Likewise.
3353 (x86_linux_dr_get_control): Likewise.
3354 (x86_linux_dr_get_status): Likewise.
3355 (x86_linux_update_debug_registers): Likewise.
3357 2015-03-24 Gary Benson <gbenson@redhat.com>
3359 * linux-x86-low.c (x86_linux_update_debug_registers):
3360 New function, factored out from...
3361 (x86_linux_prepare_to_resume): ...this.
3363 2015-03-24 Gary Benson <gbenson@redhat.com>
3365 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3366 (x86_linux_dr_set): Likewise.
3367 (update_debug_registers_callback): Likewise.
3368 (x86_linux_dr_set_addr): Likewise.
3369 (x86_linux_dr_get_addr): Likewise.
3370 (x86_linux_dr_set_control): Likewise.
3371 (x86_linux_dr_get_control): Likewise.
3372 (x86_linux_dr_get_status): Likewise.
3373 (x86_linux_prepare_to_resume): Likewise.
3375 2015-03-24 Gary Benson <gbenson@redhat.com>
3377 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3378 Use perror_with_name. Pass string through gettext.
3379 (x86_linux_dr_set): Likewise.
3381 2015-03-24 Gary Benson <gbenson@redhat.com>
3383 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3384 (x86_linux_dr_set_addr): ...this.
3385 (x86_dr_low_get_addr): Rename to...
3386 (x86_linux_dr_get_addr): ...this.
3387 (x86_dr_low_set_control): Rename to...
3388 (x86_linux_dr_set_control): ...this.
3389 (x86_dr_low_get_control): Rename to...
3390 (x86_linux_dr_get_control): ...this.
3391 (x86_dr_low_get_status): Rename to...
3392 (x86_linux_dr_get_status): ...this.
3393 (x86_dr_low): Update with new function names.
3395 2015-03-24 Gary Benson <gbenson@redhat.com>
3397 * Makefile.in (x86-linux.o): New rule.
3398 * configure.srv: Add x86-linux.o to relevant targets.
3399 * linux-low.c (lwp_set_arch_private_info): New function.
3400 (lwp_arch_private_info): Likewise.
3401 * linux-x86-low.c: Include nat/x86-linux.h.
3402 (arch_lwp_info): Removed structure.
3403 (update_debug_registers_callback):
3404 Use lwp_set_debug_registers_changed.
3405 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3406 and lwp_set_debug_registers_changed.
3407 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3409 2015-03-24 Gary Benson <gbenson@redhat.com>
3411 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3412 * linux-arm-low.c (arm_new_thread): Likewise.
3413 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3414 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3415 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3416 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3418 2015-03-24 Gary Benson <gbenson@redhat.com>
3420 * linux-low.c (ptid_of_lwp): New function.
3421 (lwp_is_stopped): Likewise.
3422 (lwp_stop_reason): Likewise.
3423 * linux-x86-low.c (update_debug_registers_callback):
3425 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3428 2015-03-24 Gary Benson <gbenson@redhat.com>
3430 * linux-low.h (linux_stop_lwp): Remove declaration.
3432 2015-03-24 Gary Benson <gbenson@redhat.com>
3434 * linux-low.h: Include nat/linux-nat.h.
3435 * linux-low.c (iterate_over_lwps_args): New structure.
3436 (iterate_over_lwps_filter): New function.
3437 (iterate_over_lwps): Likewise.
3438 * linux-x86-low.c (update_debug_registers_callback):
3439 Update signature to what iterate_over_lwps expects.
3440 Remove PID check that iterate_over_lwps now performs.
3441 (x86_dr_low_set_addr): Use iterate_over_lwps.
3442 (x86_dr_low_set_control): Likewise.
3444 2015-03-24 Gary Benson <gbenson@redhat.com>
3446 * linux-x86-low.c (x86_debug_reg_state): New function.
3447 (x86_linux_prepare_to_resume): Use the above.
3449 2015-03-24 Gary Benson <gbenson@redhat.com>
3451 * linux-low.c (current_lwp_ptid): New function.
3452 * linux-x86-low.c: Include nat/linux-nat.h.
3453 (x86_dr_low_get_addr): Use current_lwp_ptid.
3454 (x86_dr_low_get_control): Likewise.
3455 (x86_dr_low_get_status): Likewise.
3457 2015-03-20 Pedro Alves <palves@redhat.com>
3459 * tracepoint.c (cmd_qtstatus): Make "str" const.
3461 2015-03-20 Pedro Alves <palves@redhat.com>
3463 * server.c (handle_general_set): Make "req_str" const.
3465 2015-03-19 Pedro Alves <palves@redhat.com>
3467 * linux-low.c (linux_resume_one_lwp): Rename to ...
3468 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3469 instead call perror_with_name.
3470 (check_ptrace_stopped_lwp_gone): New function.
3471 (linux_resume_one_lwp): Reimplement as wrapper around
3472 linux_resume_one_lwp_throw that swallows errors if the LWP is
3475 2015-03-19 Pedro Alves <palves@redhat.com>
3477 * linux-low.c (count_events_callback, select_event_lwp_callback):
3478 No longer check whether the thread has resume_stop as last resume
3481 2015-03-19 Pedro Alves <palves@redhat.com>
3483 * linux-low.c (count_events_callback, select_event_lwp_callback):
3484 Use the lwp's status_pending_p field, not the thread's.
3486 2015-03-19 Pedro Alves <palves@redhat.com>
3488 * linux-low.c (select_event_lwp_callback): Update comments to
3489 no longer mention SIGTRAP.
3491 2015-03-18 Gary Benson <gbenson@redhat.com>
3493 * server.c (handle_query): Do not report vFile:fstat as supported.
3495 2015-03-11 Gary Benson <gbenson@redhat.com>
3497 * hostio.c (sys/types.h): New include.
3498 (sys/stat.h): Likewise.
3499 (common-remote-fileio.h): Likewise.
3500 (handle_fstat): New function.
3501 (handle_vFile): Handle vFile:fstat packets.
3503 2015-03-11 Gary Benson <gbenson@redhat.com>
3505 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3506 struct stat.st_blocks and struct stat.st_blksize.
3507 * configure: Regenerate.
3508 * config.in: Likewise.
3509 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3510 (OBS): Add common-remote-fileio.o.
3511 (common-remote-fileio.o): New rule.
3513 2015-03-09 Pedro Alves <palves@redhat.com>
3515 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3516 'struct sockaddr' pointer in 'accept' call.
3518 2015-03-09 Pedro Alves <palves@redhat.com>
3521 2015-03-07 Pedro Alves <palves@redhat.com>
3522 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3523 or <winsock2.h> here. Instead include "gdb_socket.h".
3524 (remote_open): Use union gdb_sockaddr_u.
3525 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3526 or <winsock2.h> here. Instead include "gdb_socket.h".
3527 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3528 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3530 (init_named_socket, gdb_agent_helper_thread): Use union
3533 2015-03-07 Pedro Alves <palves@redhat.com>
3535 * configure.ac (build_warnings): Move
3536 -Wdeclaration-after-statement to the C-specific set.
3537 * configure: Regenerate.
3539 2015-03-07 Pedro Alves <palves@redhat.com>
3541 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3542 or <winsock2.h> here. Instead include "gdb_socket.h".
3543 (remote_open): Use union gdb_sockaddr_u.
3544 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3545 or <winsock2.h> here. Instead include "gdb_socket.h".
3546 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3547 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3549 (init_named_socket, gdb_agent_helper_thread): Use union
3552 2015-03-07 Pedro Alves <palves@redhat.com>
3554 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3557 2015-03-06 Yao Qi <yao.qi@linaro.org>
3559 * linux-aarch64-low.c (aarch64_insert_point): Use
3560 show_debug_regs as a boolean.
3561 (aarch64_remove_point): Likewise.
3563 2015-03-05 Pedro Alves <palves@redhat.com>
3565 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3566 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3567 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3568 * nto-low.c (nto_target_ops): Likewise.
3569 * spu-low.c (spu_target_ops): Likewise.
3570 * win32-low.c (win32_target_ops): Likewise.
3572 2015-03-04 Pedro Alves <palves@redhat.com>
3574 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3575 Decide whether a breakpoint triggered based on the SIGTRAP's
3577 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3578 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3579 (linux_low_filter_event): Check for breakpoints before checking
3581 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3583 (linux_stopped_by_sw_breakpoint)
3584 (linux_supports_stopped_by_sw_breakpoint)
3585 (linux_stopped_by_hw_breakpoint)
3586 (linux_supports_stopped_by_hw_breakpoint): New functions.
3587 (linux_target_ops): Install new target methods.
3589 2015-03-04 Pedro Alves <palves@redhat.com>
3591 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3592 * server.c (swbreak_feature, hwbreak_feature): New globals.
3593 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3594 (captured_main): Clear swbreak_feature and hwbreak_feature.
3595 * server.h (swbreak_feature, hwbreak_feature): Declare.
3596 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3597 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3598 supports_stopped_by_hw_breakpoint>: New fields.
3599 (target_supports_stopped_by_sw_breakpoint)
3600 (target_stopped_by_sw_breakpoint)
3601 (target_supports_stopped_by_hw_breakpoint)
3602 (target_stopped_by_hw_breakpoint): Declare.
3604 2015-03-04 Pedro Alves <palves@redhat.com>
3606 enum lwp_stop_reason -> enum target_stop_reason
3607 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3608 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3609 (linux_wait_1, stuck_in_jump_pad_callback)
3610 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3611 (linux_stopped_by_watchpoint):
3612 * linux-low.h (enum lwp_stop_reason): Delete.
3613 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3614 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3616 2015-03-04 Yao Qi <yao.qi@linaro.org>
3618 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3620 2015-03-03 Gary Benson <gbenson@redhat.com>
3622 * hostio.c (handle_vFile): Fix prefix lengths.
3624 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3626 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3629 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3631 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3632 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3633 (clean): Add "rm -f" for above C files.
3634 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3635 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3636 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3637 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3638 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3639 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3640 (init_registers_s390x_vx_linux64)
3641 (init_registers_s390x_tevx_linux64)
3642 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3643 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3645 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3646 (s390_store_vxrs_high): New functions.
3647 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3649 (s390_arch_setup): Add logic for selecting one of the new target
3650 descriptions. Activate the new vector regsets if applicable.
3651 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3652 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3653 and init_registers_s390x_tevx_linux64.
3655 2015-03-01 Pedro Alves <palves@redhat.com>
3657 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3660 2015-02-27 Pedro Alves <palves@redhat.com>
3662 * linux-x86-low.c (u_debugreg_offset): New function.
3663 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3665 2015-02-27 Pedro Alves <palves@redhat.com>
3667 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3668 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3669 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3670 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3671 (ps_lsetfpregs, ps_getpid)
3672 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3673 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3674 (ps_lsetxregs, ps_plog): Declare.
3676 2015-02-27 Pedro Alves <palves@redhat.com>
3678 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3679 IP_AGENT_EXPORT_FUNC.
3680 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3681 IP_AGENT_EXPORT_FUNC.
3682 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3683 (IP_AGENT_EXPORT): Delete.
3684 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3685 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3686 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3687 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3688 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3689 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3690 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3691 (traceframe_read_count, traceframe_write_count)
3692 (traceframes_created, trace_state_variables, get_raw_reg)
3693 (get_trace_state_variable_value, set_trace_state_variable_value)
3694 (ust_loaded, helper_thread_id, cmd_buf): Use
3695 IPA_SYM_EXPORTED_NAME.
3696 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3697 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3698 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3699 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3700 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3701 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3702 EXTERN_C_PUSH/EXTERN_C_POP.
3703 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3704 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3705 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3706 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3707 (traceframe_write_count, traceframe_read_count)
3708 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3709 (about_to_request_buffer_space, get_trace_state_variable_value)
3710 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3711 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3712 EXTERN_C_PUSH/EXTERN_C_POP.
3713 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3714 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3715 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3716 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3717 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3718 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3719 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3720 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3722 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3723 (IP_AGENT_EXPORT_VAR_DECL): Define.
3725 (gdb_agent_get_raw_reg): Declare.
3727 2015-02-27 Tom Tromey <tromey@redhat.com>
3728 Pedro Alves <palves@redhat.com>
3730 Rename symbols whose names are reserved C++ keywords throughout.
3732 2015-02-27 Pedro Alves <palves@redhat.com>
3734 * Makefile.in (COMPILER): New, get it from autoconf.
3735 (CXX): Get from autoconf instead.
3736 (COMPILE.pre): Use COMPILER.
3737 (CC-LD): Rename to ...
3738 (CC_LD): ... this. Use COMPILER.
3739 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3740 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3741 * acinclude.m4: Include build-with-cxx.m4.
3742 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3743 Disable -Werror by default if building in C++ mode.
3744 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3745 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3746 the C++ compiler. Save/restore CXXFLAGS too.
3747 * configure: Regenerate.
3749 2015-02-27 Pedro Alves <palves@redhat.com>
3751 * acinclude.m4: Include libiberty.m4.
3752 * configure.ac: Call libiberty_INIT.
3753 * config.in, configure: Regenerate.
3755 2015-02-26 Pedro Alves <palves@redhat.com>
3757 * linux-low.c (linux_wait_1): When incrementing the PC past a
3758 program breakpoint always use the_low_target.breakpoint_len as
3759 increment, rather than the maximum between that and
3760 the_low_target.decr_pc_after_break.
3762 2015-02-23 Pedro Alves <palves@redhat.com>
3764 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3765 thread was doing a step-over; always adjust the PC if
3766 we stepped over a permanent breakpoint.
3767 (linux_wait_1): If we stepped over breakpoint that was on top of a
3768 permanent breakpoint, manually advance the PC past it.
3770 2015-02-23 Pedro Alves <palves@redhat.com>
3772 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3774 (x86_fill_gregset, x86_store_gregset): Use it when handling
3777 2015-02-20 Pedro Alves <palves@redhat.com>
3779 * thread-db.c: Include "nat/linux-procfs.h".
3780 (thread_db_init): Skip listing new threads if the kernel supports
3781 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3783 2015-02-20 Pedro Alves <palves@redhat.com>
3785 * linux-low.c (status_pending_p_callback): Use ptid_match.
3787 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3789 PR breakpoints/16812
3790 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3791 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3792 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3794 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3796 PR breakpoints/15956
3797 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3799 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3801 * linux-low.c (linux_low_btrace_conf): Print size.
3802 * server.c (handle_btrace_conf_general_set): New.
3803 (hanle_general_set): Call handle_btrace_conf_general_set.
3804 (handle_query): Report Qbtrace-conf:bts:size as supported.
3806 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3808 * linux-low.c (linux_low_enable_btrace): Update parameters.
3809 (linux_low_btrace_conf): New.
3810 (linux_target_ops)<to_btrace_conf>: Initialize.
3811 * server.c (current_btrace_conf): New.
3812 (handle_btrace_enable): Rename to ...
3813 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
3814 to target_enable_btrace. Update comment. Update users.
3815 (handle_qxfer_btrace_conf): New.
3816 (qxfer_packets): Add btrace-conf entry.
3817 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3818 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3819 (target_ops)<read_btrace_conf>: New.
3820 (target_enable_btrace): Update parameters.
3821 (target_read_btrace_conf): New.
3823 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3825 * server.c (handle_btrace_general_set): Remove call to
3826 target_supports_btrace.
3827 (supported_btrace_packets): New.
3828 (handle_query): Call supported_btrace_packets.
3829 * target.h: include btrace-common.h.
3830 (btrace_target_info): Removed.
3831 (supports_btrace, target_supports_btrace): Update parameters.
3833 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3835 * Makefile.in (SFILES): Add common/btrace-common.c.
3836 (OBS): Add common/btrace-common.o.
3837 (btrace-common.o): Add build rules.
3838 * linux-low: Include btrace-common.h.
3839 (linux_low_read_btrace): Use struct btrace_data. Call
3840 btrace_data_init and btrace_data_fini.
3842 2015-02-06 Pedro Alves <palves@redhat.com>
3844 * thread-db.c (find_new_threads_callback): Add debug output.
3846 2015-02-04 Pedro Alves <palves@redhat.com>
3848 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3849 (resume_stopped_resumed_lwps): New function.
3850 (linux_wait_for_event_filtered): Use it.
3852 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3854 * Makefile.in (SFILES): Add linux-personality.c.
3855 (linux-personality.o): New rule.
3856 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3857 list of objects to be built.
3858 * linux-low.c: Include nat/linux-personality.h.
3859 (linux_create_inferior): Remove code to disable address space
3860 randomization (moved to ../nat/linux-personality.c). Create
3861 cleanup to disable address space randomization.
3863 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3865 * Makefile.in (posix-strerror.o): New rule.
3866 (mingw-strerror.o): Likewise.
3867 * configure: Regenerated.
3868 * configure.ac: Source file ../common/common.host. Initialize new
3869 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3871 2015-01-14 Yao Qi <yao@codesourcery.com>
3873 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3874 (ppc-linux.o): New rule.
3875 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3876 * configure.ac: AC_CHECK_FUNCS(getauxval).
3877 * config.in: Re-generated.
3878 * configure: Re-generated.
3879 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3880 ppc64_64bit_inferior_p
3882 2015-01-14 Yao Qi <yao@codesourcery.com>
3884 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3885 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3886 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3887 (PT_ORIG_R3, PT_TRAP): Likewise.
3888 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3889 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3890 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3892 2015-01-10 Joel Brobecker <brobecker@adacore.com>
3894 * i387-fp.c (i387_cache_to_xsave): In look over
3895 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3896 zmmh_low_space field by use of zmmh_high_space.
3898 2015-01-09 Pedro Alves <palves@redhat.com>
3900 * linux-low.c (step_over_bkpt): Move higher up in the file.
3901 (handle_extended_wait): Don't store the stop_pc here.
3902 (get_stop_pc): Adjust comments and rename to ...
3903 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3904 stopped for a software breakpoint or hardware breakpoint.
3905 (thread_still_has_status_pending_p): New function.
3906 (status_pending_p_callback): Use
3907 thread_still_has_status_pending_p. If the event is no longer
3908 interesting, resume the LWP.
3909 (handle_tracepoints): Add assert.
3910 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3911 (wstatus_maybe_breakpoint): New function.
3912 (cancel_breakpoint): Delete function.
3913 (check_stopped_by_watchpoint): New function, factored out from
3914 linux_low_filter_event.
3915 (lp_status_maybe_breakpoint): Delete function.
3916 (linux_low_filter_event): Remove filter_ptid argument.
3917 Leave thread group exits pending here. Store the LWP's stop PC.
3918 Always leave events pending.
3919 (linux_wait_for_event_filtered): Pull all events out of the
3920 kernel, and leave them all pending.
3921 (count_events_callback, select_event_lwp_callback): Consider all
3923 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3924 (select_event_lwp): Only give preference to the stepping LWP in
3925 all-stop mode. Adjust comments.
3926 (ignore_event): New function.
3927 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3928 references to cancel_breakpoints. Adjust to renames. Also give
3929 equal priority to all LWPs that have had events in non-stop mode.
3930 If reporting a software breakpoint event, unadjust the LWP's PC.
3931 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3932 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3934 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3935 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3936 (linux_stopped_by_watchpoint): Adjust.
3937 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3938 * linux-low.h (enum lwp_stop_reason): New.
3939 (struct lwp_info) <stop_pc>: Adjust comment.
3940 <stopped_by_watchpoint>: Delete field.
3941 <stop_reason>: New field.
3942 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3943 * mem-break.c (software_breakpoint_inserted_here)
3944 (hardware_breakpoint_inserted_here): New function.
3945 * mem-break.h (software_breakpoint_inserted_here)
3946 (hardware_breakpoint_inserted_here): Declare.
3947 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3948 (cancel_breakpoints): Delete.
3949 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3950 (upload_fast_traceframes): Remove references to
3953 2015-01-09 Pedro Alves <palves@redhat.com>
3955 * thread-db.c (find_new_threads_callback): Ignore thread if the
3956 kernel thread ID is -1.
3958 2015-01-09 Pedro Alves <palves@redhat.com>
3960 * linux-low.c (linux_attach_fail_reason_string): Move to
3961 nat/linux-ptrace.c, and rename.
3962 (linux_attach_lwp): Update comment.
3963 (attach_proc_task_lwp_callback): New function.
3964 (linux_attach): Adjust to rename and use
3965 linux_proc_attach_tgid_threads.
3966 (linux_attach_fail_reason_string): Delete declaration.
3968 2015-01-01 Joel Brobecker <brobecker@adacore.com>
3970 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3971 * server.c (gdbserver_version): Likewise.
3973 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3975 * remote-utils.c: Include ctype.h.
3976 (input_interrupt): Explicitly handle the case when the char
3977 received is the NUL byte. Improve the printing of non-ASCII
3980 2014-12-16 Joel Brobecker <brobecker@adacore.com>
3982 * linux-low.c (linux_low_filter_event): Update call to
3983 linux_enable_event_reporting following the addition of
3984 a new parameter to that function.
3986 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
3989 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3990 (AARCH64_FPCR_REGNO): Likewise.
3991 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3992 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3993 (aarch64_store_fpregset): Likewise.
3995 2014-12-15 Joel Brobecker <brobecker@adacore.com>
3997 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3998 Remove FIXME comment about assumption about N.
4000 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4002 * configure.ac: If large-file support is disabled in GDBserver,
4003 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4004 * configure: Regenerate.
4006 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4008 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4009 warning upon ENODATA from ptrace.
4010 * linux-s390-low.c (s390_store_tdb): New.
4011 (s390_regsets): Add regset for NT_S390_TDB.
4013 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4015 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4016 without a fill_function.
4017 * linux-s390-low.c (s390_fill_last_break): Remove.
4018 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4019 (s390_arch_setup): Use regset's size instead of fill_function for
4022 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4024 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4025 the regset's store function when ptrace returned an error.
4026 * regcache.c (get_thread_regcache): Invalidate register cache
4027 before fetching inferior's registers.
4029 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4031 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4032 while-loop as for-loop.
4033 (regsets_store_inferior_registers): Likewise.
4035 2014-11-28 Yao Qi <yao@codesourcery.com>
4037 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4038 * config.in, configure: Re-generate.
4039 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4042 2014-11-21 Yao Qi <yao@codesourcery.com>
4044 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4045 (AC_CHECK_HEADERS): Remove malloc.h.
4046 * configure: Re-generated.
4047 * config.in: Re-generated.
4048 * server.h: Don't include alloca.h and malloc.h.
4049 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4050 Don't include malloc.h.
4052 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4054 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4055 corresponding ERRNO check in same block.
4057 2014-11-12 Pedro Alves <palves@redhat.com>
4059 * server.c (cont_thread): Update comment.
4060 (start_inferior, attach_inferior): No longer clear cont_thread.
4061 (handle_v_cont): No longer set cont_thread.
4062 (captured_main): Clear cont_thread each time a GDB connects.
4064 2014-11-12 Pedro Alves <palves@redhat.com>
4066 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4067 thread, and don't resume all threads if the Hc thread has exited.
4069 2014-11-12 Pedro Alves <palves@redhat.com>
4071 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4072 the process group instead of to a specific LWP.
4074 2014-10-15 Pedro Alves <palves@redhat.com>
4077 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4079 (arm_set_thread_context): Delete.
4080 (the_low_target): Adjust.
4081 * win32-i386-low.c (debug_registers_changed)
4082 (debug_registers_used): Delete.
4083 (update_debug_registers_callback): New function.
4084 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4085 needing to update their debug registers.
4086 (win32_get_current_dr): New function.
4087 (x86_dr_low_get_addr, x86_dr_low_get_control)
4088 (x86_dr_low_get_status): Fetch the debug register from the thread
4090 (i386_initial_stuff): Adjust.
4091 (i386_get_thread_context): Remove current_event parameter. Don't
4092 clear debug_registers_changed nor copy DR values to
4094 (i386_set_thread_context): Delete.
4095 (i386_prepare_to_resume): New function.
4096 (i386_thread_added): Mark the thread as needing to update irs
4098 (the_low_target): Remove i386_set_thread_context and install
4099 i386_prepare_to_resume.
4100 * win32-low.c (win32_get_thread_context): Adjust.
4101 (win32_set_thread_context): Use SetThreadContext
4103 (win32_prepare_to_resume): New function.
4104 (win32_require_context): New function, factored out from ...
4105 (thread_rec): ... this.
4106 (continue_one_thread): Call win32_prepare_to_resume on each thread
4107 we're about to continue.
4108 (win32_resume): Call win32_prepare_to_resume on the event thread.
4109 * win32-low.h (struct win32_thread_info)
4110 <debug_registers_changed>: New field.
4111 (struct win32_target_ops): Change prototype of set_thread_context,
4112 delete set_thread_context and add prepare_to_resume.
4113 (win32_require_context): New declaration.
4115 2014-10-08 Gary Benson <gbenson@redhat.com>
4117 * server.h: Do not include common-exceptions.h.
4119 2014-10-08 Gary Benson <gbenson@redhat.com>
4121 * server.h: Do not include cleanups.h.
4123 2014-09-30 James Hogan <james.hogan@imgtec.com>
4125 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4128 2014-09-23 Yao Qi <yao@codesourcery.com>
4130 * linux-low.c (lp_status_maybe_breakpoint): New function.
4131 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4132 (count_events_callback): Likewise.
4133 (select_event_lwp_callback): Likewise.
4134 (cancel_breakpoints_callback): Likewise.
4136 2014-09-19 Don Breazeal <donb@codesourcery.com>
4138 * linux-low.c (handle_extended_wait): Call
4139 linux_ptrace_get_extended_event.
4140 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4141 linux_is_extended_waitstatus.
4143 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4145 * Makefile.in (CPPFLAGS): Define.
4146 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4147 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4149 2014-09-16 Gary Benson <gbenson@redhat.com>
4151 * inferiors.h (current_inferior): Renamed as...
4152 (current_thread): New variable. All uses updated.
4153 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4154 (maybe_move_out_of_jump_pad): Likewise.
4155 (cancel_breakpoint): Likewise.
4156 (linux_low_filter_event): Likewise.
4157 (wait_for_sigstop): Likewise.
4158 (linux_resume_one_lwp): Likewise.
4159 (need_step_over_p): Likewise.
4160 (start_step_over): Likewise.
4161 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4162 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4163 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4164 and save_inferior as saved_thread.
4165 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4167 (regcache_invalidate_thread): Likewise.
4168 * remote-utils.c (prepare_resume_reply): Likewise.
4169 * thread-db.c (thread_db_get_tls_address): Likewise.
4170 (disable_thread_event_reporting): Likewise.
4171 (remove_thread_event_breakpoints): Likewise.
4172 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4174 * target.h (set_desired_inferior): Renamed as...
4175 (set_desired_thread): New declaration. All uses updated.
4176 * server.c (myresume): Updated comment to reference thread instead
4178 (handle_serial_event): Likewise.
4179 (handle_target_event): Likewise.
4181 2014-09-12 Tom Tromey <tromey@redhat.com>
4182 Gary Benson <gbenson@redhat.com>
4184 * regcache.h: Include common-regcache.h.
4185 (regcache_read_pc): Don't declare.
4186 * regcache.c (get_thread_regcache_for_ptid): New function.
4188 2014-09-11 Tom Tromey <tromey@redhat.com>
4189 Gary Benson <gbenson@redhat.com>
4191 * symbol.c: New file.
4192 * Makefile.in (SFILES): Add symbol.c.
4193 (OBS): Add symbol.o.
4195 2014-09-11 Gary Benson <gbenson@redhat.com>
4197 * target.c (target_stop_ptid, target_continue_ptid): New
4200 2014-09-11 Tom Tromey <tromey@redhat.com>
4201 Gary Benson <gbenson@redhat.com>
4203 * target.h: Include target/target.h.
4204 * target.c (target_read_memory, target_read_uint32)
4205 (target_write_memory): New functions.
4207 2014-09-11 Gary Benson <gbenson@redhat.com>
4209 * server.h (debug_hw_points): Don't declare.
4210 * server.c (debug_hw_points): Don't define. Replace all uses
4211 with show_debug_regs.
4212 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4213 all uses with show_debug_regs.
4215 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4217 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4218 endianness into account.
4219 (ppc_supply_ptrace_register): Likewise.
4221 2014-09-03 James Hogan <james.hogan@imgtec.com>
4223 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4224 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4226 2014-09-03 Gary Benson <gbenson@redhat.com>
4228 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4229 ALL_DEBUG_ADDRESS_REGISTERS.
4231 2014-09-02 Gary Benson <gbenson@redhat.com>
4233 * i386-low.h: Renamed as...
4234 * x86-low.h: New file. All type, function and variable name
4235 prefixes changed from "i386_" to "x86_". All references updated.
4236 * i386-low.c: Renamed as...
4237 * x86-low.c: New file. All type, function and variable name
4238 prefixes changed from "i386_" to "x86_". All references updated.
4240 2014-09-02 Gary Benson <gbenson@redhat.com>
4242 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4243 (x86_linux_new_thread): Likewise.
4245 2014-08-29 Gary Benson <gbenson@redhat.com>
4247 * server.h (setjmp.h): Do not include.
4248 (toplevel): Do not declare.
4249 (common-exceptions.h): Include.
4250 (cleanups.h): Likewise.
4251 * server.c (toplevel): Do not define.
4252 (exit_code): New static global.
4253 (detach_or_kill_for_exit_cleanup): New function.
4254 (main): New function. Original main renamed to...
4255 (captured_main): New function.
4256 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4258 2014-08-29 Gary Benson <gbenson@redhat.com>
4260 * Makefile.in (SFILES): Add common/common-exceptions.c.
4261 (OBS): Add common-exceptions.o.
4262 (common-exceptions.o): New rule.
4263 * utils.c (prepare_to_throw_exception): New function.
4265 2014-08-29 Gary Benson <gbenson@redhat.com>
4267 * config.in: Regenerate.
4268 * configure: Likewise.
4270 2014-08-29 Gary Benson <gbenson@redhat.com>
4272 * Makefile.in (SFILES): Add common/cleanups.c.
4274 (cleanups.o): New rule.
4276 2014-08-29 Gary Benson <gbenson@redhat.com>
4278 * utils.c (internal_vwarning): New function.
4280 2014-08-28 Gary Benson <gbenson@redhat.com>
4282 * utils.h (fatal): Remove declaration.
4283 * utils.c (fatal): Remove function.
4285 2014-08-28 Gary Benson <gbenson@redhat.com>
4287 * tracepoint.c (gdb_agent_init): Replace fatal with
4289 (initialize_tracepoint): Likewise.
4291 2014-08-28 Gary Benson <gbenson@redhat.com>
4293 * remote-utils.c (remote_prepare): Replace fatal with error.
4295 2014-08-28 Gary Benson <gbenson@redhat.com>
4297 * linux-low.c (linux_async): Replace fatal with warning.
4299 (linux_start_non_stop): Return -1 if linux_async failed.
4301 2014-08-28 Gary Benson <gbenson@redhat.com>
4303 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4305 (i386_dr_low_get_addr): Remove vague comment.
4306 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4309 2014-08-28 Gary Benson <gbenson@redhat.com>
4311 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4312 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4314 (linux_resume_one_lwp): Likewise.
4315 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4317 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4318 with internal_error.
4319 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4320 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4321 (find_register_by_name): Replace fatal with internal_error.
4322 (find_regno): Likewise.
4323 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4324 * thread-db.c (thread_db_create_event): Likewise.
4325 (thread_db_load_search): Likewise.
4326 (try_thread_db_load_1): Likewise.
4327 * tracepoint.c (get_jump_space_head): Replace fatal with
4329 (claim_trampoline_space): Likewise.
4330 (have_fast_tracepoint_trampoline_buffer): Likewise.
4331 (cmd_qtstart): Likewise.
4332 (stop_tracing): Likewise.
4333 (fast_tracepoint_collecting): Likewise.
4334 (target_malloc): Likewise.
4335 (download_tracepoint): Likewise.
4336 (download_trace_state_variables): Replace check with gdb_assert.
4337 (upload_fast_traceframes): Replace fatal with internal_error.
4339 2014-08-19 Tom Tromey <tromey@redhat.com>
4340 Gary Benson <gbenson@redhat.com>
4342 * Makefile.in (SFILES): Add common/common-debug.c.
4343 (OBS): Add common-debug.o.
4344 (common-debug.o): New rule.
4345 * debug.h (debug_printf): Don't declare.
4346 * debug.c (debug_printf): Renamed and rewritten as...
4347 (debug_vprintf): New function.
4349 2014-08-19 Gary Benson <gbenson@redhat.com>
4351 * utils.h: Do not include print-utils.h.
4353 2014-08-19 Tom Tromey <tromey@redhat.com>
4354 Gary Benson <gbenson@redhat.com>
4356 * server.h: Add static assertion.
4357 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4359 2014-08-19 Tom Tromey <tromey@redhat.com>
4360 Gary Benson <gbenson@redhat.com>
4362 * Makefile.in (SFILES): Add common/errors.c.
4363 (OBS): Add errors.o.
4364 (IPA_OBS): Add errors-ipa.o.
4365 (errors.o): New rule.
4366 (errors-ipa.o): Likewise.
4367 * utils.h (perror_with_name, error, warning): Don't declare.
4368 * utils.c (warning): Renamed and rewritten as...
4369 (vwarning): New function.
4370 (error): Renamed and rewritten as...
4371 (verror): New function.
4372 (internal_error): Renamed and rewritten as...
4373 (internal_verror): New function.
4375 2014-08-07 Gary Benson <gbenson@redhat.com>
4377 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4378 * configure: Regenerate.
4379 * config.in: Likewise.
4380 * server.h: Do not include errno.h.
4381 * event-loop.c: Likewise.
4382 * hostio-errno.c: Likewise.
4383 * linux-low.c: Likewise.
4384 * remote-utils.c: Likewise.
4385 * spu-low.c: Likewise.
4386 * utils.c: Likewise.
4387 * gdbreplay.c: Unconditionally include errno.h.
4389 2014-08-07 Gary Benson <gbenson@redhat.com>
4391 * server.h: Do not include string.h.
4392 * event-loop.c: Likewise.
4393 * linux-low.c: Likewise.
4394 * regcache.c: Likewise.
4395 * remote-utils.c: Likewise.
4396 * spu-low.c: Likewise.
4397 * utils.c: Likewise.
4399 2014-08-07 Gary Benson <gbenson@redhat.com>
4401 * server.h: Do not include gdb_assert.h.
4403 2014-08-07 Gary Benson <gbenson@redhat.com>
4405 * server.h: Do not include common-utils.h.
4407 2014-08-07 Gary Benson <gbenson@redhat.com>
4409 * server.h: Do not include ptid.h.
4410 * notif.h: Likewise.
4412 2014-08-07 Gary Benson <gbenson@redhat.com>
4414 * server.h: Do not include gdb_locale.h.
4416 2014-08-07 Gary Benson <gbenson@redhat.com>
4418 * server.h: Do not include gdb/signals.h.
4419 * win32-low.c: Likewise.
4421 2014-08-07 Gary Benson <gbenson@redhat.com>
4423 * server.h: Do not include pathmax.h.
4425 2014-08-07 Gary Benson <gbenson@redhat.com>
4427 * server.h: Do not include libiberty.h.
4428 * linux-bfin-low.c: Likewise.
4430 2014-08-07 Gary Benson <gbenson@redhat.com>
4432 * server.h: Do not include ansidecl.h.
4434 2014-08-07 Gary Benson <gbenson@redhat.com>
4436 * linux-x86-low.c: Do not include stddef.h.
4437 * lynx-ppc-low.c: Likewise.
4438 * tracepoint.c: Likewise.
4440 2014-08-07 Gary Benson <gbenson@redhat.com>
4442 * server.h: Do not include stdarg.h.
4443 * nto-low.c: Likewise.
4445 2014-08-07 Gary Benson <gbenson@redhat.com>
4447 * server.h: Do not include stdlib.h.
4448 * inferiors.c: Likewise.
4449 * linux-low.c: Likewise.
4450 * regcache.c: Likewise.
4451 * spu-low.c: Likewise.
4452 * tracepoint.c: Likewise.
4453 * utils.c: Likewise.
4455 2014-08-07 Gary Benson <gbenson@redhat.com>
4457 * server.h: Do not include stdio.h.
4458 * linux-low.c: Likewise.
4459 * remote-utils.c: Likewise.
4460 * spu-low.c: Likewise.
4461 * utils.c: Likewise.
4462 * wincecompat.c: Likewise.
4464 2014-08-06 Gary Benson <gbenson@redhat.com>
4466 * regcache.c (init_register_cache): Move conditionals inside if.
4468 2014-08-06 Gary Benson <gbenson@redhat.com>
4470 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4472 2014-07-31 Gary Benson <gbenson@redhat.com>
4474 * ax.h: Do not include server.h.
4475 * gdbthread.h: Likewise.
4476 * lynx-low.h: Likewise.
4477 * notif.h: Likewise.
4479 2014-07-30 Gary Benson <gbenson@redhat.com>
4481 * server.h: Include common-defs.h.
4482 Do not include config.h or build-gnulib-gdbserver/config.h.
4484 2014-07-30 Gary Benson <gbenson@redhat.com>
4486 * hostio-errno.c: Move server.h to top of includes list.
4487 * inferiors.c: Likewise.
4488 * linux-x86-low.c: Likewise.
4489 * notif.c: Include server.h.
4491 2014-07-24 Tom Tromey <tromey@redhat.com>
4492 Gary Benson <gbenson@redhat.com>
4494 * server.h (CORE_ADDR): Now unsigned.
4496 2014-07-16 Pedro Alves <palves@redhat.com>
4498 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4500 2014-07-15 Pedro Alves <palves@redhat.com>
4502 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4505 2014-07-11 Pedro Alves <palves@redhat.com>
4507 * linux-low.c (kill_wait_lwp): New function, based on
4508 kill_one_lwp_callback, but use my_waitpid directly.
4509 (kill_one_lwp_callback, linux_kill): Use it.
4511 2014-06-23 Pedro Alves <palves@redhat.com>
4513 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4514 before setting DR0..DR3.
4516 2014-06-20 Gary Benson <gbenson@redhat.com>
4518 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4519 * configure: Regenerated.
4520 * config.in: Likewise.
4522 2014-06-20 Gary Benson <gbenson@redhat.com>
4524 * Makefile.in (SFILES): Update locations for files moved
4526 (object file files): Reordered.
4528 2014-06-20 Gary Benson <gbenson@redhat.com>
4530 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4531 (i386_dr_low_set_addr): Likewise.
4532 (i386_dr_low_get_addr): Likewise.
4533 (i386_dr_low_can_set_control): Likewise.
4534 (i386_dr_low_set_control): Likewise.
4535 (i386_dr_low_get_control): Likewise.
4536 (i386_dr_low_get_status): Likewise.
4537 (i386_get_debug_register_length): Likewise.
4538 * linux-x86-low.c (i386_dr_low_set_addr):
4539 Changed signature. Made static.
4540 (i386_dr_low_get_addr): Likewise.
4541 (i386_dr_low_set_control): Likewise.
4542 (i386_dr_low_get_control): Likewise.
4543 (i386_dr_low_get_status): Likewise.
4544 (i386_dr_low): New global variable.
4545 * win32-i386-low.c (i386_dr_low_set_addr):
4546 Changed signature. Made static.
4547 (i386_dr_low_get_addr): Likewise.
4548 (i386_dr_low_set_control): Likewise.
4549 (i386_dr_low_get_control): Likewise.
4550 (i386_dr_low_get_status): Likewise.
4551 (i386_dr_low): New global variable.
4553 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4555 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4556 * Makefile.in (AR, AR_FLAGS): Define.
4557 * configure: Regenerate.
4559 2014-06-19 Gary Benson <gbenson@redhat.com>
4561 * Makefile.in (i386-dregs.o): New rule.
4562 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4563 * i386-low.c (target.h): Remove include.
4564 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4565 (DR_CONTROL_SHIFT): Likewise.
4566 (DR_CONTROL_SIZE): Likewise.
4567 (DR_RW_EXECUTE): Likewise.
4568 (DR_RW_WRITE): Likewise.
4569 (DR_RW_READ): Likewise.
4570 (DR_RW_IORW): Likewise.
4571 (DR_LEN_1): Likewise.
4572 (DR_LEN_2): Likewise.
4573 (DR_LEN_4): Likewise.
4574 (DR_LEN_8): Likewise.
4575 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4576 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4577 (DR_ENABLE_SIZE): Likewise.
4578 (DR_LOCAL_SLOWDOWN): Likewise.
4579 (DR_GLOBAL_SLOWDOWN): Likewise.
4580 (DR_CONTROL_RESERVED): Likewise.
4581 (I386_DR_CONTROL_MASK): Likewise.
4582 (I386_DR_VACANT): Likewise.
4583 (I386_DR_LOCAL_ENABLE): Likewise.
4584 (I386_DR_GLOBAL_ENABLE): Likewise.
4585 (I386_DR_DISABLE): Likewise.
4586 (I386_DR_SET_RW_LEN): Likewise.
4587 (I386_DR_GET_RW_LEN): Likewise.
4588 (I386_DR_WATCH_HIT): Likewise.
4589 (i386_wp_op_t): Likewise.
4590 (i386_show_dr): Likewise.
4591 (i386_length_and_rw_bits): Likewise.
4592 (i386_insert_aligned_watchpoint): Likewise.
4593 (i386_remove_aligned_watchpoint): Likewise.
4594 (i386_handle_nonaligned_watchpoint): Likewise.
4595 i386_update_inferior_debug_regs(): Likewise.
4596 (i386_dr_insert_watchpoint): Likewise.
4597 (i386_dr_remove_watchpoint): Likewise.
4598 (i386_dr_region_ok_for_watchpoint): Likewise.
4599 (i386_dr_stopped_data_address): Likewise.
4600 (i386_dr_stopped_by_watchpoint): Likewise.
4602 2014-06-19 Gary Benson <gbenson@redhat.com>
4604 * i386-low.c (i386_dr_show): Renamed to
4605 i386_show_dr and made static. All uses updated.
4606 (i386_dr_length_and_rw_bits): Renamed to
4607 i386_length_and_rw_bits and made static.
4609 (i386_dr_insert_aligned_watchpoint): Renamed to
4610 i386_insert_aligned_watchpoint and made static.
4612 (i386_dr_remove_aligned_watchpoint): Renamed to
4613 i386_remove_aligned_watchpoint and made static.
4615 (i386_dr_update_inferior_debug_regs): Renamed to
4616 i386_update_inferior_debug_regs and made static.
4619 2014-06-18 Gary Benson <gbenson@redhat.com>
4621 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4622 (i386_dr_low_can_set_control): Likewise.
4623 (i386_get_debug_register_length): Likewise.
4624 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4625 (i386_dr_low_can_set_control): Likewise.
4626 (i386_get_debug_register_length): Likewise.
4628 2014-06-17 Gary Benson <gbenson@redhat.com>
4630 * i386-low.h (i386-dregs.h): New include.
4631 (DR_FIRSTADDR): Now in i386-dregs.h.
4632 (DR_LASTADDR): Likewise.
4633 (DR_NADDR): Likewise.
4634 (DR_STATUS): Likewise.
4635 (DR_CONTROL): Likewise.
4636 (i386_debug_reg_state): Likewise.
4637 (i386_dr_insert_watchpoint): Likewise.
4638 (i386_dr_remove_watchpoint): Likewise.
4639 (i386_dr_region_ok_for_watchpoint): Likewise.
4640 (i386_dr_stopped_data_address): Likewise.
4641 (i386_dr_stopped_by_watchpoint): Likewise.
4642 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4644 2014-06-18 Gary Benson <gbenson@redhat.com>
4646 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4647 i386_dr_insert_watchpoint.
4648 (i386_low_remove_watchpoint): Renamed to
4649 i386_dr_remove_watchpoint.
4650 (i386_low_region_ok_for_watchpoint): Renamed to
4651 i386_dr_region_ok_for_watchpoint.
4652 (i386_low_stopped_data_address): Renamed to
4653 i386_dr_stopped_data_address.
4654 (i386_low_stopped_by_watchpoint): Renamed to
4655 i386_dr_stopped_by_watchpoint.
4656 * i386-low.c (i386_show_dr): Renamed to
4657 i386_dr_show and made nonstatic. All uses updated.
4658 (i386_length_and_rw_bits): Renamed to
4659 i386_dr_length_and_rw_bits and made nonstatic.
4661 (i386_insert_aligned_watchpoint): Renamed to
4662 i386_dr_insert_aligned_watchpoint and made nonstatic.
4664 (i386_remove_aligned_watchpoint): Renamed to
4665 i386_dr_remove_aligned_watchpoint and made nonstatic.
4667 (i386_update_inferior_debug_regs): Renamed to
4668 i386_dr_update_inferior_debug_regs and made nonstatic.
4670 (i386_low_insert_watchpoint): Renamed to
4671 i386_dr_insert_watchpoint. All uses updated.
4672 (i386_low_remove_watchpoint): Renamed to
4673 i386_dr_remove_watchpoint. All uses updated.
4674 (i386_low_region_ok_for_watchpoint): Renamed to
4675 i386_dr_region_ok_for_watchpoint. All uses updated.
4676 (i386_low_stopped_data_address): Renamed to
4677 i386_dr_stopped_data_address. All uses updated.
4678 (i386_low_stopped_by_watchpoint): Renamed to
4679 i386_dr_stopped_by_watchpoint. All uses updated.
4681 2014-06-18 Gary Benson <gbenson@redhat.com>
4683 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4684 (i386_dr_low_can_set_control): Likewise.
4685 (i386_insert_aligned_watchpoint): New check.
4687 2014-06-18 Gary Benson <gbenson@redhat.com>
4689 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4692 2014-06-18 Gary Benson <gbenson@redhat.com>
4694 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4695 instead of fatal and error.
4696 (i386_handle_nonaligned_watchpoint): Likewise.
4698 2014-06-18 Gary Benson <gbenson@redhat.com>
4700 * i386-low.c (i386_get_debug_register_length): New macro.
4701 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4702 (i386_show_dr): Use debug_printf instead of fprintf. Use
4703 phex to format values.
4705 2014-06-18 Gary Benson <gbenson@redhat.com>
4707 * i386-low.h: Comment changes.
4708 * i386-low.c: Likewise.
4710 2014-06-18 Gary Benson <gbenson@redhat.com>
4712 * i386-low.c: Whitespace changes.
4714 2014-06-12 Tom Tromey <tromey@redhat.com>
4716 * utils.c (freeargv): Remove.
4718 2014-06-12 Tom Tromey <tromey@redhat.com>
4720 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4721 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4722 (parse_debug_format_options): Likewise.
4723 (gdbserver_usage): Likewise.
4724 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4725 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4726 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4728 ($(LIBGNU)): Depend on libiberty.
4729 (all-lib): Recurse into all subdirs.
4730 (install-only): Invoke "install" target in subdirs.
4731 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4733 * configure: Rebuild.
4734 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4735 for vasprintf, vsnprintf, or gettimeofday.
4736 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4739 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4741 * development.sh: Delete.
4742 * Makefile.in (config.status): Adjust dependency on development.sh.
4743 * configure.ac: Adjust development.sh source call.
4744 * configure: Regenerate.
4746 2014-06-02 Pedro Alves <palves@redhat.com>
4748 * ax.c (gdb_free_agent_expr): New function.
4749 * ax.h (gdb_free_agent_expr): New declaration.
4750 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4752 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4754 (clear_breakpoint_conditions_and_commands): New function.
4755 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4756 (clear_breakpoint_conditions_and_commands): New declaration.
4758 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4760 * linux-aarch64-low.c (asm/ptrace.h): Include.
4762 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4764 Fix TLS access for -static -pthread.
4765 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4766 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4767 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4769 2014-05-20 Pedro Alves <palves@redhat.com>
4771 * linux-aarch64-low.c (aarch64_insert_point)
4772 (aarch64_remove_point): No longer check whether the type is
4773 supported here. Adjust to new interface.
4774 (the_low_target): Install aarch64_supports_z_point_type as
4775 supports_z_point_type method.
4776 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4777 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4778 instead of a Z packet char. Adjust.
4779 (arm_supports_z_point_type): New function.
4780 (arm_insert_point, arm_remove_point): Adjust to new interface.
4781 (the_low_target): Install arm_supports_z_point_type.
4782 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4783 (cris_insert_point, cris_remove_point): Adjust to new interface.
4784 Don't check whether the type is supported here.
4785 (the_low_target): Install cris_supports_z_point_type.
4786 * linux-low.c (linux_supports_z_point_type): New function.
4787 (linux_insert_point, linux_remove_point): Adjust to new interface.
4788 * linux-low.h (struct linux_target_ops) <insert_point,
4789 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4790 raw_breakpoint pointer parameter.
4791 <supports_z_point_type>: New method.
4792 * linux-mips-low.c (mips_supports_z_point_type): New function.
4793 (mips_insert_point, mips_remove_point): Adjust to new interface.
4794 Use mips_supports_z_point_type.
4795 (the_low_target): Install mips_supports_z_point_type.
4796 * linux-ppc-low.c (the_low_target): Install NULL as
4797 supports_z_point_type method.
4798 * linux-s390-low.c (the_low_target): Install NULL as
4799 supports_z_point_type method.
4800 * linux-sparc-low.c (the_low_target): Install NULL as
4801 supports_z_point_type method.
4802 * linux-x86-low.c (x86_supports_z_point_type): New function.
4803 (x86_insert_point): Adjust to new insert_point interface. Use
4804 insert_memory_breakpoint. Adjust to new
4805 i386_low_insert_watchpoint interface.
4806 (x86_remove_point): Adjust to remove_point interface. Use
4807 remove_memory_breakpoint. Adjust to new
4808 i386_low_remove_watchpoint interface.
4809 (the_low_target): Install x86_supports_z_point_type.
4810 * lynx-low.c (lynx_target_ops): Install NULL as
4811 supports_z_point_type callback.
4812 * nto-low.c (nto_supports_z_point_type): New.
4813 (nto_insert_point, nto_remove_point): Adjust to new interface.
4814 (nto_target_ops): Install nto_supports_z_point_type.
4815 * mem-break.c: Adjust intro comment.
4816 (struct raw_breakpoint) <raw_type, size>: New fields.
4817 <inserted>: Update comment.
4818 <shlib_disabled>: Delete field.
4819 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4820 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4821 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4822 (raw_bkpt_type_to_target_hw_bp_type): New function.
4823 (find_enabled_raw_code_breakpoint_at): New function.
4824 (find_raw_breakpoint_at): New type and size parameters. Use them.
4825 (insert_memory_breakpoint): New function, based off
4826 set_raw_breakpoint_at.
4827 (remove_memory_breakpoint): New function.
4828 (set_raw_breakpoint_at): Reimplement.
4829 (set_breakpoint): New, based on set_breakpoint_at.
4830 (set_breakpoint_at): Reimplement.
4831 (delete_raw_breakpoint): Go through the_target->remove_point
4832 instead of assuming memory breakpoints.
4833 (find_gdb_breakpoint_at): Delete.
4834 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4835 (find_gdb_breakpoint): New function.
4836 (set_gdb_breakpoint_at): Delete.
4837 (z_type_supported): New function.
4838 (set_gdb_breakpoint_1): New function, loosely based off
4839 set_gdb_breakpoint_at.
4840 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4841 (delete_gdb_breakpoint_at): Delete.
4842 (delete_gdb_breakpoint_1): New function, loosely based off
4843 delete_gdb_breakpoint_at.
4844 (delete_gdb_breakpoint): New function.
4845 (clear_gdb_breakpoint_conditions): Rename to ...
4846 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4848 (add_condition_to_breakpoint): Make static.
4849 (add_breakpoint_condition): Take a struct breakpoint pointer
4850 instead of an address. Adjust.
4851 (gdb_condition_true_at_breakpoint): Rename to ...
4852 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4854 (gdb_condition_true_at_breakpoint): Reimplement.
4855 (add_breakpoint_commands): Take a struct breakpoint pointer
4856 instead of an address. Adjust.
4857 (gdb_no_commands_at_breakpoint): Rename to ...
4858 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4859 parameter. Return true if no breakpoint was found. Change debug
4861 (gdb_no_commands_at_breakpoint): Reimplement.
4862 (run_breakpoint_commands): Rename to ...
4863 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4864 and change return type to boolean.
4865 (run_breakpoint_commands): New function.
4866 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4867 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4868 breakpoint. Go through the_target->remove_point instead of
4869 assuming memory breakpoint.
4870 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4871 software and hardware breakpoints.
4872 (reinsert_raw_breakpoint): Go through the_target->insert_point
4873 instead of assuming memory breakpoint.
4874 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4875 software and hardware breakpoints.
4876 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4877 Check both software and hardware breakpoints.
4878 (validate_inserted_breakpoint): Assert the breakpoint is a
4879 software breakpoint. Set the inserted flag to -1 instead of
4880 setting shlib_disabled.
4881 (delete_disabled_breakpoints): Adjust.
4882 (validate_breakpoints): Only validate software breakpoints.
4883 Adjust to inserted flag change.
4884 (check_mem_read, check_mem_write): Skip breakpoint types other
4885 than software breakpoints. Adjust to inserted flag change.
4886 * mem-break.h (enum raw_bkpt_type): New enum.
4887 (raw_breakpoint, struct process_info): Forward declare.
4888 (Z_packet_to_target_hw_bp_type): Delete declaration.
4889 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4890 (set_gdb_breakpoint, delete_gdb_breakpoint)
4891 (clear_breakpoint_conditions): New declarations.
4892 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4893 (breakpoint_inserted_here): Update comment.
4894 (add_breakpoint_condition, add_breakpoint_commands): Replace
4895 address parameter with a breakpoint pointer parameter.
4896 (gdb_breakpoint_here): Update comment.
4897 (delete_gdb_breakpoint_at): Delete.
4898 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4899 * server.c (process_point_options): Take a struct breakpoint
4900 pointer instead of an address. Adjust.
4901 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4902 delete_gdb_breakpoint.
4903 * spu-low.c (spu_target_ops): Install NULL as
4904 supports_z_point_type method.
4905 * target.h: Include mem-break.h.
4906 (struct target_ops) <prepare_to_access_memory>: Update comment.
4907 <supports_z_point_type>: New field.
4908 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4909 instead of a char. Also take a raw breakpoint pointer.
4910 * win32-arm-low.c (the_low_target): Install NULL as
4911 supports_z_point_type.
4912 * win32-i386-low.c (i386_supports_z_point_type): New function.
4913 (i386_insert_point, i386_remove_point): Adjust to new interface.
4914 (the_low_target): Install i386_supports_z_point_type.
4915 * win32-low.c (win32_supports_z_point_type): New function.
4916 (win32_insert_point, win32_remove_point): Adjust to new interface.
4917 (win32_target_ops): Install win32_supports_z_point_type.
4918 * win32-low.h (struct win32_target_ops):
4919 <supports_z_point_type>: New method.
4920 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4921 instead of a char. Also take a raw breakpoint pointer.
4923 2014-05-20 Pedro Alves <palves@redhat.com>
4925 * mem-break.h: Include break-common.h.
4926 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4927 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4928 (Z_packet_to_target_hw_bp_type): New declaration.
4929 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4930 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4931 (Z_PACKET_ACCESS_WP): Delete macros.
4932 (Z_packet_to_hw_type): Delete function.
4933 * i386-low.h: Don't include break-common.h here.
4934 (Z_packet_to_hw_type): Delete declaration.
4935 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4936 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4937 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4938 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4939 * linux-aarch64-low.c: Don't include break-common.h here.
4940 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4941 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4942 (Z_packet_to_target_hw_bp_type): Delete function.
4943 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4945 (mips_insert_point, mips_remove_point): Use
4946 Z_packet_to_target_hw_bp_type.
4948 2014-05-20 Pedro Alves <palves@redhat.com>
4950 * linux-aarch64-low.c: Include break-common.h.
4951 (enum target_point_type): Delete.
4952 (Z_packet_to_point_type): Rename to ...
4953 (Z_packet_to_target_hw_bp_type): ... this, and return a
4954 target_hw_bp_type instead.
4955 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4956 instead of an enum target_point_type.
4957 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4959 (aarch64_dr_state_insert_one_point)
4960 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4961 (aarch64_handle_aligned_watchpoint)
4962 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4963 Take an enum target_hw_bp_type instead of an enum
4965 (aarch64_supports_z_point_type): New function.
4966 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4967 use Z_packet_to_target_hw_bp_type.
4969 2014-05-20 Joel Brobecker <brobecker@adacore.com>
4971 * configure.ac: Only use -Werror by default when DEVELOPMENT
4973 * configure: Regenerate.
4975 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4977 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4978 * linux-x86-low.c (X86_64_USER_REGS): New.
4979 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4981 2014-04-28 Yao Qi <yao@codesourcery.com>
4983 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4986 2014-04-25 Pedro Alves <palves@redhat.com>
4989 * linux-low.c (linux_attach_fail_reason_string): New function.
4990 (linux_attach_lwp): Delete.
4991 (linux_attach_lwp_1): Rename to ...
4992 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4993 argument. Remove "initial" parameter. Return int instead of
4994 void. Don't error or warn here.
4995 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4996 failure to attach to the tgid. Call warning when failing to
4998 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4999 argument. Remove "initial" parameter. Return int instead of
5000 void. Don't error or warn here.
5001 (linux_attach_fail_reason_string): New declaration.
5002 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5003 interface change. Use linux_attach_fail_reason_string.
5005 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5006 Walfred Tedeschi <walfred.tedeschi@intel.com>
5008 * Makefile.in: Added rules to handle new files
5009 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5010 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5011 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5012 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5013 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5014 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5016 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5017 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5018 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5019 i386/x32-avx512.xml.
5020 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5021 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5022 i386/x32-avx512-linux.xml.
5023 * i387-fp.c (num_avx512_k_registers): New constant for number
5025 (num_avx512_zmmh_low_registers): New constant for number of
5026 lower ZMM registers (0-15).
5027 (num_avx512_zmmh_high_registers): New constant for number of
5028 higher ZMM registers (16-31).
5029 (num_avx512_ymmh_registers): New contant for number of higher
5030 YMM registers (ymm16-31 added by avx521 on x86_64).
5031 (num_avx512_xmm_registers): New constant for number of higher
5032 XMM registers (xmm16-31 added by AVX512 on x86_64).
5033 (struct i387_xsave): Add space for AVX512 registers.
5034 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5035 Add code to handle AVX512 registers.
5036 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5037 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5038 prototypei from generated file.
5039 (tdesc_amd64_avx512_linux): Likewise.
5040 (init_registers_x32_avx512_linux): Likewise.
5041 (tdesc_x32_avx512_linux): Likewise.
5042 (init_registers_i386_avx512_linux): Likewise.
5043 (tdesc_i386_avx512_linux): Likewise.
5044 (x86_64_regmap): Add AVX512 registers.
5045 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5047 (initialize_low_arch): Add code to initialize AVX512 registers.
5049 2014-04-23 Pedro Alves <palves@redhat.com>
5051 * mem-break.c (find_gdb_breakpoint_at): Make static.
5052 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5054 2014-04-23 Pedro Alves <palves@redhat.com>
5056 * i386-low.c: Don't include break-common.h here.
5057 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5058 prototype to take target_hw_bp_type as argument instead of a Z
5060 * i386-low.h: Include break-common.h here.
5061 (Z_packet_to_hw_type): Declare.
5062 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5064 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5065 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5066 (x86_remove_point): Convert the packet number to a
5067 target_hw_bp_type before calling i386_low_remove_watchpoint.
5068 * win32-i386-low.c (i386_insert_point): Convert the packet number
5069 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5070 (i386_remove_point): Convert the packet number to a
5071 target_hw_bp_type before calling i386_low_remove_watchpoint.
5073 2014-04-23 Pedro Alves <palves@redhat.com>
5075 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5077 2014-04-10 Pedro Alves <palves@redhat.com>
5079 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5080 Check if the condition or command is NULL before checking if the
5081 breakpoint is known. On success, return true.
5082 * mem-break.h (add_breakpoint_condition): Document return.
5083 (add_breakpoint_commands): Add describing comment.
5084 * server.c (skip_to_semicolon): New function.
5085 (process_point_options): Use it.
5087 2014-04-09 Pedro Alves <palves@redhat.com>
5089 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5092 2014-02-27 Pedro Alves <palves@redhat.com>
5095 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5097 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5099 (last_thread_of_process_p): Take a PID argument instead of a
5101 (linux_wait_for_lwp): Delete.
5102 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5104 (linux_low_filter_event): New function, party factored out from
5105 linux_wait_for_event.
5106 (linux_wait_for_event): Rename to ...
5107 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5108 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5109 sigsuspend. Check for zombie leaders.
5110 (linux_wait_for_event): Reimplement as wrapper around
5111 linux_wait_for_event_filtered.
5112 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5113 a normal or signal exit is seen, it's the whole process exiting.
5114 (wait_for_sigstop): No longer a for_each_inferior callback.
5115 Rewrite on top of linux_wait_for_event_filtered.
5116 (stop_all_lwps): Call wait_for_sigstop directly.
5117 * server.c (resume, handle_target_event): Handle
5118 TARGET_WAITKIND_NO_RESUMED.
5120 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5122 * win32-low.c (psapi_get_dll_name,
5123 * win32_CreateToolhelp32Snapshot): Delete.
5124 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5125 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5127 (handle_load_dll): Add function description.
5128 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5130 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5132 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5134 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5135 base address when calling win32_add_one_solib.
5136 (handle_load_dll): Delete local variable load_addr.
5137 Remove 0x1000 offset applied to DLL base address when calling
5138 win32_add_one_solib.
5139 (handle_unload_dll): Add comment.
5141 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5143 * win32-low.c (win32_add_all_dlls): Renames
5144 win32_ensure_ntdll_loaded. Rewrite function documentation.
5145 Adjust implementation to always load all DLLs.
5146 Add 0x1000 offset to DLL base address when calling
5147 win32_add_one_solib.
5148 (child_initialization_done): New static global.
5149 (do_initial_child_stuff): Set child_initialization_done to
5150 zero during child initialization, and 1 after. Replace call
5151 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5153 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5154 (handle_unload_dll): Add function documentation.
5155 (get_child_debug_event): Ignore load and unload DLL events
5156 during child initialization.
5158 2014-02-20 Doug Evans <dje@google.com>
5160 Remove global all_lwps.
5161 * inferiors.h (ptid_of): Move here from linux-low.h.
5162 (pid_of, lwpid_of): Ditto.
5163 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5164 parameter is a struct thread_info * now.
5165 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5166 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5167 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5169 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5170 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5171 * linux-arm-low.c (update_registers_callback): Update, "entry"
5172 parameter is a struct thread_info * now.
5173 Fetch lwpid from current_inferior directly.
5174 (arm_insert_point): Pass &all_threads to find_inferior instead of
5176 (arm_remove_point): Ditto.
5177 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5178 (arm_prepare_to_resume): Fetch pid from thread.
5179 (arm_read_description): Fetch lwpid from current_inferior directly.
5180 * linux-low.c (all_lwps): Delete.
5181 (delete_lwp): Delete call to remove_inferior.
5182 (handle_extended_wait): Fetch lwpid from thread.
5183 (add_lwp): Don't set lwp->entry.id. Remove call to
5184 add_inferior_to_list.
5185 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5186 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5187 (kill_one_lwp_callback): Ditto.
5188 (linux_kill): Don't dereference NULL pointer.
5189 Fetch ptid,lwpid from thread.
5190 (get_detach_signal): Fetch ptid from thread.
5191 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5192 Simplify call to regcache_invalidate_thread.
5193 (delete_lwp_callback): Update, "entry" parameter is a
5194 struct thread_info * now. Fetch pid from thread.
5195 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5196 (status_pending_p_callback): Update, "entry" parameter is a
5197 struct thread_info * now. Fetch ptid from thread.
5198 (find_lwp_pid): Update, "entry" parameter is a
5199 struct thread_info * now.
5200 (linux_wait_for_lwp): Fetch pid from thread.
5201 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5202 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5203 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5204 (dequeue_one_deferred_signal): Ditto.
5205 (cancel_breakpoint): Fetch ptid from current_inferior.
5206 (linux_wait_for_event): Pass &all_threads to find_inferior,
5207 not &all_lwps. Fetch ptid, lwpid from thread.
5208 (count_events_callback): Update, "entry" parameter is a
5209 struct thread_info * now.
5210 (select_singlestep_lwp_callback): Ditto.
5211 (select_event_lwp_callback): Ditto.
5212 (cancel_breakpoints_callback): Ditto.
5213 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5215 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5216 (unsuspend_one_lwp): Update, "entry" parameter is a
5217 struct thread_info * now.
5218 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5220 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5221 Fetch lwpid from thread, not lwp.
5222 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5223 Pass &all_threads to find_inferior, not &all_lwps.
5224 (send_sigstop): Fetch lwpid from thread, not lwp.
5225 (send_sigstop_callback): Update, "entry" parameter is a
5226 struct thread_info * now.
5227 (suspend_and_send_sigstop_callback): Ditto.
5228 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5229 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5230 struct thread_info * now.
5231 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5233 (lwp_running): Update, "entry" parameter is a
5234 struct thread_info * now.
5235 (stop_all_lwps): Fetch ptid from thread.
5236 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5237 (linux_resume_one_lwp): Fetch lwpid from thread.
5238 (linux_set_resume_request): Update, "entry" parameter is a
5239 struct thread_info * now. Fetch pid, lwpid from thread.
5240 (resume_status_pending_p): Update, "entry" parameter is a
5241 struct thread_info * now.
5242 (need_step_over_p): Ditto. Fetch lwpid from thread.
5243 (start_step_over): Fetch lwpid from thread.
5244 (linux_resume_one_thread): Update, "entry" parameter is a
5245 struct thread_info * now. Fetch lwpid from thread.
5246 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5247 (proceed_one_lwp): Update, "entry" parameter is a
5248 struct thread_info * now. Fetch lwpid from thread.
5249 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5250 struct thread_info * now.
5251 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5252 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5253 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5255 (regsets_store_inferior_registers): Ditto.
5256 (fetch_register, store_register): Ditto.
5257 (linux_read_memory, linux_write_memory): Ditto.
5258 (linux_request_interrupt): Ditto.
5259 (linux_read_auxv): Ditto.
5260 (linux_xfer_siginfo): Ditto.
5261 (linux_qxfer_spu): Ditto.
5262 (linux_qxfer_libraries_svr4): Ditto.
5263 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5264 moved to inferiors.h.
5266 (get_thread_lwp): Update.
5267 (struct lwp_info): Delete member "entry". Simplify comment for
5270 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5271 current_inferior directly.
5272 (update_watch_registers_callback): Update, "entry" parameter is a
5273 struct thread_info * now. Fetch pid from thread.
5274 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5275 (mips_insert_point): Fetch lwpid from current_inferior.
5276 Pass &all_threads to find_inferior, not &all_lwps.
5277 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5278 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5280 (mips_stopped_data_address): Ditto.
5281 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5283 * linux-tile-low.c (tile_arch_setup): Ditto.
5284 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5285 (update_debug_registers_callback): Update, "entry" parameter is a
5286 struct thread_info * now. Fetch pid from thread.
5287 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5288 Pass &all_threads to find_inferior, not &all_lwps.
5289 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5290 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5291 Pass &all_threads to find_inferior, not &all_lwps.
5292 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5293 (i386_dr_low_get_status): Ditto.
5294 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5295 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5296 (x86_linux_read_description): Ditto.
5297 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5299 2014-02-20 Doug Evans <dje@google.com>
5301 * inferiors.c (get_first_inferior): Fix buglet.
5303 2014-02-19 Doug Evans <dje@google.com>
5305 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5306 * inferiors.c (add_thread): Change result type to struct thread_info *.
5307 All callers updated.
5308 (add_lwp): Call add_thread here instead of in callers.
5309 All callers updated.
5310 * linux-low.h (get_lwp_thread): Rewrite.
5311 (struct lwp_info): New member "thread".
5313 2014-02-19 Doug Evans <dje@google.com>
5315 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5316 All callers updated.
5318 2014-02-19 Doug Evans <dje@google.com>
5320 * inferiors.c (add_thread): Fix whitespace.
5322 2014-02-19 Doug Evans <dje@google.com>
5324 * dll.c (clear_dlls): Replace accessing list implemention details
5326 * gdbthread.h (get_first_thread): Declare.
5327 * inferiors.c (for_each_inferior_with_data): New function.
5328 (get_first_thread): New function.
5329 (find_thread_ptid): Simplify.
5330 (get_first_inferior): New function.
5331 (clear_list): Delete.
5332 (one_inferior_p): New function.
5333 (clear_inferior_list): New function.
5334 (clear_inferiors): Update.
5335 * inferiors.h (for_each_inferior_with_data): Declare.
5336 (clear_inferior_list): Declare.
5337 (one_inferior_p): Declare.
5338 (get_first_inferior): Declare.
5339 * linux-low.c (linux_wait_for_event): Replace accessing list
5340 implemention details with API function.
5341 * server.c (target_running): Ditto.
5342 (accumulate_file_name_length): New function.
5343 (emit_dll_description): New function.
5344 (handle_qxfer_libraries): Replace accessing list implemention
5345 details with API function.
5346 (handle_qxfer_threads_worker): New function.
5347 (handle_qxfer_threads_proper): Replace accessing list implemention
5348 details with API function.
5349 (handle_query): Ditto.
5350 (visit_actioned_threads_callback_ftype): New typedef.
5351 (visit_actioned_threads_data): New struct.
5352 (visit_actioned_threads): Rewrite to be find_inferior callback.
5353 (resume): Call find_inferior.
5354 (handle_status): Replace accessing list implemention
5355 details with API function.
5356 (process_serial_event): Replace accessing list implemention details
5358 * target.c (set_desired_inferior): Replace accessing list implemention
5359 details with API function.
5360 * tracepoint.c (same_process_p): New function.
5361 (gdb_agent_about_to_close): Replace accessing list implemention
5362 details with API function.
5363 * win32-low.c (child_delete_thread): Replace accessing list
5364 implemention details with API function.
5365 (match_dll_by_basename): New function.
5366 (dll_is_loaded_by_basename): New function.
5367 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5368 details call to dll_is_loaded_by_basename.
5370 2014-02-19 Doug Evans <dje@google.com>
5372 * dll.h (struct dll_info): Add comment.
5373 * gdbthread.h (struct thread_info): Add comment.
5374 (current_ptid): Simplify.
5375 * inferiors.c (add_process): Update.
5376 (remove_process): Update.
5377 * inferiors.h (struct process_info): Rename member "head" to "entry".
5378 * linux-low.c (delete_lwp): Update.
5380 (last_thread_of_process_p): Update.
5381 (kill_one_lwp_callback, linux_kill): Update.
5382 (status_pending_p_callback): Update.
5383 (wait_for_sigstop): Update. Simplify read of ptid.
5384 (start_step_over): Update.
5385 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5386 (get_lwp_thread): Update.
5387 (struct lwp_info): Rename member "head" to "entry".
5388 * regcache.h (inferior_list_entry): Delete.
5389 * server.c (kill_inferior_callback): Update.
5390 (detach_or_kill_inferior_callback): Update.
5391 (print_started_pid): Update.
5392 (print_attached_pid): Update.
5393 (process_serial_event): Simplify read of ptid.
5394 * thread-db.c (thread_db_create_event): Update.
5395 (thread_db_get_tls_address): Update.
5396 * win32-low.c (current_inferior_ptid): Simplify.
5398 2014-02-19 Tom Tromey <tromey@redhat.com>
5400 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5402 (target_supports_btrace): Update.
5404 2014-02-14 Yao Qi <yao@codesourcery.com>
5406 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5407 (rsp-low-ipa.o): New target.
5409 2014-02-12 Tom Tromey <tromey@redhat.com>
5411 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5412 convert_ascii_to_int.
5413 * regcache.c (registers_to_string): Likewise.
5414 * remote-utils.c (decode_M_packet): Likewise.
5415 * server.c (process_serial_event): Likewise.
5417 2014-02-12 Tom Tromey <tromey@redhat.com>
5419 * server.c (handle_query, handle_v_run): Use hex2bin, not
5421 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5423 2014-02-12 Tom Tromey <tromey@redhat.com>
5425 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5426 convert_int_to_ascii.
5427 * regcache.c (registers_to_string, collect_register_as_string):
5429 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5431 * server.c (process_serial_event): Likewise.
5432 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5433 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5435 2014-02-12 Tom Tromey <tromey@redhat.com>
5437 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5438 bin2hex, not hexify.
5439 * tracepoint.c (cmd_qtstatus): Likewise.
5441 2014-02-12 Tom Tromey <tromey@redhat.com>
5443 * remote-utils.c (monitor_output): Pass explicit length to
5446 2014-02-12 Tom Tromey <tromey@redhat.com>
5448 * tracepoint.c: Include rsp-low.h.
5449 * server.c: Include rsp-low.h.
5450 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5451 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5453 * remote-utils.c: Include rsp-low.h.
5454 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5455 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5456 (convert_int_to_ascii, convert_ascii_to_int): Move to
5458 * regcache.c: Include rsp-low.h.
5459 * ax.c: Include rsp-low.h.
5460 * Makefile.in (SFILES): Add common/rsp-low.c.
5461 (OBS): Add rsp-low.o.
5462 (rsp-low.o): New target.
5464 2014-02-12 Tom Tromey <tromey@redhat.com>
5466 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5467 Include print-utils.h.
5468 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5469 (plongest, thirty_two, phex_nz): Remove.
5470 * Makefile.in (SFILES): Add common/print-utils.c.
5471 (OBS): Add print-utils.o.
5472 (print-utils-ipa.o): New target.
5473 (print-utils.o): New target.
5474 (IPA_OBJS): Add print-utils-ipa.o.
5476 2014-02-06 Tom Tromey <tromey@redhat.com>
5478 * Makefile.in (SFILES): Fix indentation.
5480 2014-02-05 Doug Evans <dje@google.com>
5482 * linux-low.c (linux_wait_for_event): Improve comment.
5483 (linux_wait_1): Keep current_inferior in sync with event_child.
5485 2014-01-22 Doug Evans <dje@google.com>
5487 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5489 2014-01-22 Doug Evans <dje@google.com>
5491 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5492 * configure: Regenerate.
5493 * config.in: Regenerate.
5494 * Makefile.in (SFILES): Add debug.c.
5496 * debug.c: New file.
5497 * debug.h: New file.
5498 * linux-aarch64-low.c (*): Update all debugging printfs to use
5499 debug_printf instead of fprintf.
5500 * linux-arm-low.c (*): Ditto.
5501 * linux-cris-low.c (*): Ditto.
5502 * linux-crisv32-low.c (*): Ditto.
5503 * linux-m32r-low.c (*): Ditto.
5504 * linux-sparc-low.c (*): Ditto.
5505 * linux-x86.c (*): Ditto.
5506 * linux-low.c (*): Ditto.
5507 (linux_wait_1): Add calls to debug_enter, debug_exit.
5508 (linux_wait): Remove redundant debugging printf.
5509 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5510 (linux_resume, unstop_all_lwps): Ditto.
5511 * mem-break.c (*): Update all debugging printfs to use
5512 debug_printf instead of fprintf.
5513 * remote-utils.c (*): Ditto.
5514 * thread-db.c (*): Ditto.
5515 * server.c #include <ctype.h>, "gdb_vecs.h".
5516 (debug_threads): Moved to debug.c.
5517 (*): Update all debugging printfs to use debug_printf instead of
5519 (start_inferior): Replace call to fflush with call to debug_flush.
5520 (monitor_show_help): Mention set debug-format.
5521 (parse_debug_format_options): New function.
5522 (handle_monitor_command): Handle "monitor set debug-format".
5523 (gdbserver_usage): Mention --debug-format.
5524 (main): Parse --debug-format.
5525 * server.h (debug_threads): Declaration moved to debug.h.
5527 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5528 trace_debug_1 that uses debug_printf.
5529 (tracepoint_look_up_symbols): Update all debugging printfs to use
5530 debug_printf instead of fprintf.
5532 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5534 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5537 2014-01-17 Pedro Alves <palves@redhat.com>
5540 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5541 defined after including gdb_proc_service.h.
5543 2014-01-16 Doug Evans <dje@google.com>
5545 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5546 (match_dll): Use it.
5548 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5550 * target.h (target_ops) <read_btrace>: Change parameters and
5551 return type to allow error reporting.
5552 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5553 trace reading errors on.
5554 * linux-low.c (linux_low_read_btrace): Pass trace reading
5556 (linux_low_disable_btrace): New.
5558 2014-01-15 Doug Evans <dje@google.com>
5560 * inferiors.c (thread_id_to_gdb_id): Delete.
5561 * inferiors.h (thread_id_to_gdb_id): Delete.
5563 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5565 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5566 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5569 2014-01-08 Pedro Alves <palves@redhat.com>
5571 * server.c (handle_status): Don't discard previous queued stop
5572 replies or thread's pending status here.
5573 (main) <disconnection>: Do it here instead.
5575 2014-01-08 Pedro Alves <palves@redhat.com>
5577 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5578 * server.c (visit_actioned_threads, handle_pending_status): New
5580 (handle_v_cont): Factor out parts to ...
5581 (resume): ... this new function. If in all-stop, and a thread
5582 being resumed has a pending status, report it without actually
5584 (myresume): Adjust to use the new 'resume' function.
5585 (clear_pending_status_callback, set_pending_status_callback)
5586 (find_status_pending_thread_callback): New functions.
5587 (handle_status): Handle the case of multiple threads having
5588 interesting statuses to report. Report threads' real last signal
5589 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5590 with an interesting thread to report the status for, instead of
5591 always reporting the status of the first thread.
5593 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5595 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5596 * gdbreplay.c (gdbreplay_version): Likewise.
5598 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5600 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5601 iov.iov_len with the real length in use.
5603 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5605 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5606 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5607 for all targets that use win32-low.c.
5608 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5609 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5611 2013-12-13 Pedro Alves <palves@redhat.com>
5613 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5614 if equal to TARGET_WAITKIND_LOADED.
5615 * win32-low.c (cached_status): New static global.
5616 (win32_wait): Add declaration.
5617 (do_initial_child_stuff): Flush all initial pending debug events
5618 up to the initial breakpoint.
5619 (win32_wait): If CACHED_STATUS was set, return that instead
5620 of doing a real wait. Remove the code resuming the execution
5621 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5622 during the initial phase. Also remove the code changing
5623 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5624 TARGET_WAITKIND_STOPPED.
5626 2013-12-11 Yao Qi <yao@codesourcery.com>
5628 * notif.c (handle_notif_ack): Return 0 if no notification
5631 2013-11-20 Doug Evans <dje@google.com>
5633 * linux-low.c (linux_set_resume_request): Fix comment.
5635 2013-11-20 Doug Evans <dje@google.com>
5637 * linux-low.c (resume_status_pending_p): Tweak comment.
5639 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5641 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5642 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5643 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5644 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5645 (srv_amd64_regobj): Add amd64-mpx.o.
5646 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5647 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5648 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5649 * i387-fp.c (num_pl_bnd_register) Added constant.
5650 (num_pl_bnd_cfg_registers) Added constant.
5651 (struct i387_xsave) Added reserved area and MPX fields.
5652 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5653 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5655 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5656 (init_registers_amd64_mpx_linux): Declare new function.
5657 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5658 (x86_64_regmap): Add MPX registers.
5659 (x86_linux_read_description): Add MPX case.
5660 (initialize_low_arch): Initialize MPX targets.
5662 2013-11-18 Tom Tromey <tromey@redhat.com>
5664 * configure: Rebuild.
5665 * configure.ac: Don't check for stdlib.h.
5666 * gdbreplay.c: Unconditionally include stdlib.h.
5668 2013-11-18 Tom Tromey <tromey@redhat.com>
5670 * config.in: Rebuild.
5671 * configure: Rebuild.
5672 * configure.ac: Don't use AC_HEADER_DIRENT.
5674 2013-11-18 Tom Tromey <tromey@redhat.com>
5676 * server.h: Don't check HAVE_STRING_H.
5677 * gdbreplay.c: Don't check HAVE_STRING_H.
5678 * configure: Rebuild.
5680 2013-11-18 Tom Tromey <tromey@redhat.com>
5682 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5685 2013-11-08 Tom Tromey <tromey@redhat.com>
5687 * configure, config.in: Rebuild.
5688 * configure.ac: Remove unused configury.
5690 2013-11-08 Tom Tromey <tromey@redhat.com>
5692 * acinclude.m4: Include common.m4, codeset.m4.
5693 * configure, config.in: Rebuild.
5694 * configure.ac: Use GDB_AC_COMMON.
5696 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5698 * linux-s390-low.c (HWCAP_S390_TE): New define.
5699 (s390_arch_setup): Consider the TE field in the HWCAP for
5700 determining 'have_regset_tdb'.
5702 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5705 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5708 2013-10-02 Pedro Alves <palves@redhat.com>
5710 * server.c (process_serial_event): Don't output "GDBserver
5711 exiting" if GDB is connected through stdio.
5712 * target.c (mywait): Likewise, be silent if GDB is connected
5715 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5717 * lynx-low.c (lynx_add_threads_after_attach): New function.
5718 (lynx_attach): Remove call to add_thread. Add call to
5719 lynx_add_threads_after_attach instead.
5721 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5723 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5724 * config.in, configure: Regenerated.
5726 2013-09-18 Yao Qi <yao@codesourcery.com>
5729 * server.c (start_inferior): Clear 'resume_info'.
5731 2013-09-16 Jiong Wang <jiwang@tilera.com>
5733 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5736 2013-09-16 Jiong Wang <jiwang@tilera.com>
5738 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5739 linux-tile-low.o to srv_tgtobj.
5741 2013-09-16 Will Newton <will.newton@linaro.org>
5743 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5746 2013-09-06 Pedro Alves <palves@redhat.com>
5748 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5749 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5750 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5751 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5752 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5753 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5755 2013-09-06 Pedro Alves <palves@redhat.com>
5757 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5758 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5760 2013-09-06 Pedro Alves <palves@redhat.com>
5762 * linux-amd64-ipa.c: Include tracepoint.h.
5763 * linux-i386-ipa.c: Include tracepoint.h.
5765 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5767 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5768 (ps_get_thread_area): New function.
5770 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5772 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5773 (initialize_low_arch): Call init_registers_crisv32 rather than
5774 init_register_crisv32.
5776 2013-09-05 Pedro Alves <palves@redhat.com>
5778 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5780 * hostio.h: ... this new file.
5781 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5782 win32-low.c: Include hostio.h.
5784 2013-09-05 Pedro Alves <palves@redhat.com>
5786 * server.h (gdb_client_data, handler_func, callback_handler_func)
5787 (delete_file_handler, add_file_handler, append_callback_event)
5788 (delete_callback_event, start_event_loop, initialize_event_loop):
5789 Move to event-loop.h and include it.
5790 * event-loop.h: New file.
5792 2013-09-05 Pedro Alves <palves@redhat.com>
5794 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5795 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5796 (loaded_dll, unloaded_dll): Move to ...
5797 * dll.h: ... this new file.
5798 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5800 2013-09-05 Pedro Alves <palves@redhat.com>
5802 * server.h (current_process, get_thread_process, all_processes)
5803 (add_inferior_to_list, for_each_inferior, current_inferior)
5804 (remove_inferior, add_process, remove_process, find_process_pid)
5805 (have_started_inferiors_p, have_attached_inferiors_p)
5806 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5807 (clear_inferiors, find_inferior, find_inferior_id)
5808 (inferior_target_data, set_inferior_target_data)
5809 (inferior_regcache_data, set_inferior_regcache_data): Move to
5810 inferiors.h, and include it.
5811 * inferiors.h: New file.
5813 2013-09-05 Pedro Alves <palves@redhat.com>
5815 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5819 2013-09-05 Pedro Alves <palves@redhat.com>
5821 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5823 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5824 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5825 (handle_tracepoint_general_set, handle_tracepoint_query)
5826 (tracepoint_finished_step, tracepoint_was_hit)
5827 (release_while_stepping_state_list, current_traceframe)
5828 (in_readonly_region, traceframe_read_mem)
5829 (fetch_traceframe_registers, traceframe_read_sdata)
5830 (traceframe_read_info, struct fast_tpoint_collect_status)
5831 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5832 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5833 (supply_fast_tracepoint_registers)
5834 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5835 (ipa_tdesc, claim_trampoline_space)
5836 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5837 (agent_mem_read, agent_get_trace_state_variable_value)
5838 (agent_set_trace_state_variable_value, agent_tsv_read)
5839 (agent_mem_read_string, get_raw_reg_func_addr)
5840 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5841 * tracepoint.h: ... this new file.
5843 2013-09-05 Pedro Alves <palves@redhat.com>
5845 * server.h (perror_with_name, error, fatal, warning, paddress)
5846 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5848 * utils.h: New file.
5850 2013-09-05 Pedro Alves <palves@redhat.com>
5852 * server.h (remote_debug, noack_mode, transport_is_reliable)
5853 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5854 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5855 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5856 (write_enn, initialize_async_io, enable_async_io)
5857 (disable_async_io, check_remote_input_interrupt_request)
5858 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5859 (dead_thread_notify, prepare_resume_reply)
5860 (decode_address_to_semicolon, decode_address, decode_m_packet)
5861 (decode_M_packet, decode_X_packet, decode_xfer_write)
5862 (decode_search_memory_packet, unhexify, hexify)
5863 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5864 (look_up_one_symbol, relocate_instruction)
5865 (monitor_output): Move to remote-utils.h, and include it.
5866 * remote-utils.h: New file.
5868 2013-09-05 Pedro Alves <palves@redhat.com>
5870 * server.h (_): Delete.
5872 2013-09-02 Pedro Alves <palves@redhat.com>
5874 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5875 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5877 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5879 2013-09-02 Pierre Muller <muller@sourceware.org>
5881 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5882 or WriteProcessMemory complete successfully and handle
5883 ERROR_PARTIAL_COPY error.
5885 2013-09-02 Pedro Alves <palves@redhat.com>
5887 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5888 error instead of EIO.
5890 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5893 * linux-low.c: Include filestuff.h.
5894 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5895 * lynx-low.c: Include filestuff.h.
5896 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5897 * server.c: Include filestuff.h.
5898 (main): Call notice_open_fds.
5899 * spu-low.c: Include filestuff.h.
5900 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5902 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
5904 * Makefile.in: Explain why ../target and ../nat are not
5905 listed as include file search paths.
5906 (linux-waitpid.o): New object file rule.
5907 * configure.srv (srv_native_linux_obj): New variable.
5908 Replace all occurrences of linux native object files with
5909 $srv_native_linux_obj.
5910 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5911 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5912 (linux_enable_event_reporting): Remove declaration.
5913 (my_waitpid): Moved to common/linux-waitpid.c.
5914 (linux_wait_for_event): Pass ptid when calling
5915 linux_enable_event_reporting.
5916 (linux_supports_tracefork_flag): Remove.
5917 (linux_enable_event_reporting): Likewise.
5918 (linux_tracefork_grandchild): Remove.
5919 (STACK_SIZE): Moved to common/linux-ptrace.c.
5920 (linux_tracefork_child): Remove.
5921 (linux_test_for_tracefork): Remove.
5922 (linux_look_up_symbols): Call linux_supports_traceclone.
5923 (initialize_low): Remove call to linux_test_for_tracefork.
5924 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5925 common/linux-ptrace.h.
5926 (PTRACE_TYPE_ARG4): Likewise.
5927 Include linux-ptrace.h.
5929 2013-08-21 Pedro Alves <palves@redhat.com>
5931 * config.in: Renegerate.
5933 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
5935 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5936 (SFILES): Remove $(srcdir)/common/target-common.c and
5937 add $(srcdir)/target/waitstatus.c.
5938 (OBS): Remove target-common.o and add waitstatus.o.
5939 (server_h): Remove $(srcdir)/../common/target-common.h and
5940 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5941 and $(srcdir)/../target/waitstatus.h.
5942 (target-common.o): Remove.
5943 (waitstatus.o): New target object file.
5944 * target.h: Do not include target-common.h and
5945 include target/resume.h, target/wait.h and
5946 target/waitstatus.h.
5948 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
5950 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5951 to PTRACE_TYPE_ARG3.
5952 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5953 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5955 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5956 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5958 2013-07-27 Jie Zhang <jie@codesourcery.com>
5959 Daniel Jacobowitz <dan@codesourcery.com>
5960 Yao Qi <yao@codesourcery.com>
5962 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5963 (mips-linux-watch.o): New rule.
5964 (mips_linux_watch_h): New variable.
5965 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5967 * linux-mips-low.c: Include mips-linux-watch.h.
5968 (struct arch_process_info, struct arch_lwp_info): New.
5969 (update_watch_registers_callback): New function.
5970 (mips_linux_new_process, mips_linux_new_thread) New functions.
5971 (mips_linux_prepare_to_resume, mips_insert_point): New
5973 (mips_remove_point, mips_stopped_by_watchpoint): New
5975 (rsp_bp_type_to_target_hw_bp_type): New function.
5976 (mips_stopped_data_address): New function.
5977 (the_low_target): Add watchpoint support functions.
5979 2013-07-27 Yao Qi <yao@codesourcery.com>
5981 * i386-low.c: Include break-common.h.
5982 (enum target_hw_bp_type): Remove.
5984 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
5986 * Makefile.in (SFILES): /common/target-common.c.
5987 (OBS): Add target-common.o.
5988 (server_h): Add $(srcdir)/../common/target-common.h.
5989 (target-common.o): New target.
5990 * server.c (queue_stop_reply_callback): Free
5991 status string after use.
5992 * target.c (target_waitstatus_to_string): Remove.
5993 * target.h: Include target-common.h.
5994 (resume_kind): Likewise.
5995 (target_waitkind): Likewise.
5996 (target_waitstatus): Likewise.
5997 (TARGET_WNOHANG): Likewise.
5999 2013-07-04 Yao Qi <yao@codesourcery.com>
6001 * Makefile.in (host_alias): Use @host_noncanonical@.
6002 (target_alias): Use @target_noncanonical@.
6003 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6004 ACX_NONCANONICAL_HOST.
6005 * configure: Regenerated.
6008 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6010 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6011 * configure: Rebuild.
6012 * Makefile.in (version_host, version_target): Get from configure.
6013 (version.c): Use $(version_host) and $(version_target).
6015 2013-07-03 Pedro Alves <palves@redhat.com>
6017 * Makefile.in (config.status): Depend on development.sh.
6018 * acinclude.m4: Include libmcheck.m4.
6019 * configure: Regenerate.
6021 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6023 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6024 attribute inside the parentheses.
6025 (winapi_DebugSetProcessKillOnExit): Ditto.
6026 (winapi_DebugBreakProcess): Ditto.
6027 (winapi_GenerateConsoleCtrlEvent): Ditto.
6029 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6031 * notif.h (notif_event): Add a dummy member to avoid compiler
6034 2013-07-01 Pedro Alves <palves@redhat.com>
6036 * hostio.c (HOSTIO_PATH_MAX): Define.
6037 (require_filename, handle_open, handle_unlink, handle_readlink):
6040 2013-07-01 Pedro Alves <palves@redhat.com>
6042 * server.h: Include "pathmax.h".
6043 * linux-low.c: Don't include sys/param.h.
6044 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6046 * win32-low.c: Don't include sys/param.h.
6047 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6049 2013-07-01 Pedro Alves <palves@redhat.com>
6051 * event-loop.c: Don't check HAVE_UNISTD_H before including
6053 * gdbreplay.c: Likewise.
6054 * remote-utils.c: Likewise.
6055 * server.c: Likewise.
6056 * configure.ac: Don't check for unistd.h.
6057 * configure: Regenerate.
6059 2013-06-28 Tom Tromey <tromey@redhat.com>
6061 * Makefile.in (version.c): Use version.in, not
6064 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6066 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6067 * configure: Rebuild.
6068 * Makefile.in (version_host, version_target): Get from configure.
6069 (version.c): Use $(version_host) and $(version_target).
6071 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6073 Fix trace-status to output user name without trailing colon.
6074 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6076 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6078 Fix trace-status to output proper start-time and stop-time.
6079 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6080 output start time and stop time in hex as gdb expects.
6082 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6084 * tracepoint.c (build_traceframe_info_xml): Output trace state
6085 variables present in the trace buffer.
6087 2013-06-24 Tom Tromey <tromey@redhat.com>
6089 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6091 (version.o): Remove.
6092 * gdbreplay.c: Include version.h.
6093 (version, host_name): Don't declare.
6094 * server.h: Include version.h.
6095 (version, host_name): Don't declare.
6097 2013-06-12 Pedro Alves <palves@redhat.com>
6099 * linux-x86-low.c (linux_is_elf64): Delete global.
6100 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6101 with local linux_pid_exe_is_elf_64_file use.
6103 2013-06-11 Pedro Alves <palves@redhat.com>
6105 * linux-low.c (regset_disabled, disable_regset): New functions.
6106 (regsets_fetch_inferior_registers)
6107 (regsets_store_inferior_registers): Use them.
6108 (initialize_regsets_info); Don't allocate the disabled_regsets
6110 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6113 2013-06-11 Pedro Alves <palves@redhat.com>
6115 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6118 2013-06-11 Pedro Alves <palves@redhat.com>
6120 * linux-x86-low.c (initialize_low_arch): Call
6121 init_registers_x32_avx_linux.
6123 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6125 Fix compatibility with Android Bionic.
6126 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6129 2013-06-07 Pedro Alves <palves@redhat.com>
6132 * Makefile.in (OBS): Add tdesc.o.
6133 (IPA_OBJS): Add tdesc-ipa.o.
6134 (tdesc-ipa.o): New rule.
6135 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6137 * linux-low.c (new_inferior): Delete.
6138 (disabled_regsets, num_regsets): Delete.
6139 (linux_add_process): Adjust to set the new per-process
6141 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6142 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6143 was a stop. When calling arch_setup, switch the current inferior
6144 to the thread that got an event.
6145 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6146 (regsets_fetch_inferior_registers)
6147 (regsets_store_inferior_registers): New regsets_info parameter.
6149 (linux_register_in_regsets): New regs_info parameter. Adjust to
6151 (register_addr, fetch_register, store_register): New usrregs_info
6152 parameter. Adjust to use it.
6153 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6154 parameter regs_info. Adjust to use it.
6155 (linux_fetch_registers): Get the current inferior's regs_info, and
6157 (linux_store_registers): Ditto.
6158 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6159 (initialize_low): Don't initialize the target_regsets here. Call
6160 initialize_low_arch.
6161 * linux-low.h (target_regsets): Delete declaration.
6162 (struct regsets_info): New.
6163 (struct usrregs_info): New.
6164 (struct regs_info): New.
6165 (struct process_info_private) <new_inferior>: New field.
6166 (struct linux_target_ops): Delete the num_regs, regmap, and
6167 regset_bitmap fields. New field regs_info.
6168 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6169 * i387-fp.c (num_xmm_registers): Delete.
6170 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6171 calls to new interface.
6172 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6173 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6174 Infer the number of xmm registers from the regcache's target
6176 * i387-fp.h (num_xmm_registers): Delete.
6177 * inferiors.c (add_thread): Don't install the thread's regcache
6179 * proc-service.c (gregset_info): Fetch the current inferior's
6180 regs_info. Adjust to use it.
6181 * regcache.c: Include tdesc.h.
6182 (register_bytes, reg_defs, num_registers)
6183 (gdbserver_expedite_regs): Delete.
6184 (get_thread_regcache): If the thread doesn't have a regcache yet,
6185 create one, instead of aborting gdbserver.
6186 (regcache_invalidate_one): Rename to ...
6187 (regcache_invalidate_thread): ... this.
6188 (regcache_invalidate_one): New.
6189 (regcache_invalidate): Only invalidate registers of the current
6191 (init_register_cache): Add target_desc parameter, and use it.
6192 (new_register_cache): Ditto. Assert the target description has a
6193 non zero registers_size.
6194 (regcache_cpy): Add assertions. Adjust.
6195 (realloc_register_cache, set_register_cache): Delete.
6196 (registers_to_string, registers_from_string): Adjust.
6197 (find_register_by_name, find_regno, find_register_by_number)
6198 (register_cache_size): Add target_desc parameter, and use it.
6199 (free_register_cache_thread, free_register_cache_thread_one)
6200 (regcache_release, register_cache_size): New.
6201 (register_size): Add target_desc parameter, and use it.
6202 (register_data, supply_register, supply_register_zeroed)
6203 (supply_regblock, supply_register_by_name, collect_register)
6204 (collect_register_as_string, collect_register_by_name): Adjust.
6205 * regcache.h (struct target_desc): Forward declare.
6206 (struct regcache) <tdesc>: New field.
6207 (init_register_cache, new_register_cache): Add target_desc
6209 (regcache_invalidate_thread): Declare.
6210 (regcache_invalidate_one): Delete declaration.
6211 (regcache_release): Declare.
6212 (find_register_by_number, register_cache_size, register_size)
6213 (find_regno): Add target_desc parameter.
6214 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6216 * remote-utils.c: Include tdesc.h.
6217 (outreg, prepare_resume_reply): Adjust.
6218 * server.c: Include tdesc.h.
6219 (gdbserver_xmltarget): Delete declaration.
6220 (get_features_xml, process_serial_event): Adjust.
6221 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6223 (struct process_info) <tdesc>: New field.
6224 (ipa_tdesc): Declare.
6225 * tdesc.c: New file.
6226 * tdesc.h: New file.
6227 * tracepoint.c: Include tdesc.h.
6228 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6229 (get_context_regcache): Adjust to pass ipa_tdesc down.
6230 (do_action_at_tracepoint): Adjust to get the register cache size
6231 from the context regcache's description.
6232 (traceframe_walk_blocks): Adjust to get the register cache size
6233 from the current trace frame's description.
6234 (traceframe_get_pc): Adjust to get current trace frame's
6235 description and pass it down.
6236 (gdb_collect): Adjust to get the register cache size from the
6238 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6239 (gdbserver_xmltarget): Delete.
6240 (initialize_low_tracepoint): Set the ipa's target description.
6241 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6242 (initialize_low_tracepoint): Set the ipa's target description.
6243 * linux-x86-low.c: Include tdesc.h.
6244 [__x86_64__] (is_64bit_tdesc): New.
6245 (ps_get_thread_area, x86_get_thread_area): Use it.
6246 (i386_cannot_store_register): Rename to ...
6247 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6248 (i386_cannot_fetch_register): Rename to ...
6249 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6250 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6252 (target_regsets): Rename to ...
6253 (x86_regsets): ... this.
6254 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6256 (x86_siginfo_fixup): Use is_64bit_tdesc.
6257 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6258 (tdesc_x32_avx_linux, tdesc_x32_linux)
6259 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6261 (x86_linux_update_xmltarget): Delete.
6262 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6263 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6264 (AMD64_LINUX_USER64_CS): New.
6265 (x86_linux_read_description): New, based on
6266 x86_linux_update_xmltarget.
6267 (same_process_callback): New.
6268 (x86_arch_setup_process_callback): New.
6269 (x86_linux_update_xmltarget): New.
6270 (x86_regsets_info): New.
6271 (amd64_linux_regs_info): New.
6272 (i386_linux_usrregs_info): New.
6273 (i386_linux_regs_info): New.
6274 (x86_linux_regs_info): New.
6275 (x86_arch_setup): Reimplement.
6276 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6277 (x86_emit_ops): Ditto.
6278 (the_low_target): Adjust. Install x86_linux_regs_info,
6279 x86_cannot_fetch_register, and x86_cannot_store_register.
6280 (initialize_low_arch): New.
6281 * linux-ia64-low.c (tdesc_ia64): Declare.
6282 (ia64_fetch_register): Adjust.
6283 (ia64_usrregs_info, regs_info): New globals.
6284 (ia64_regs_info): New function.
6285 (the_low_target): Adjust.
6286 (initialize_low_arch): New function.
6287 * linux-sparc-low.c (tdesc_sparc64): Declare.
6288 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6290 (sparc_arch_setup): New function.
6291 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6292 (the_low_target): Adjust.
6293 (initialize_low_arch): New function.
6294 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6295 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6296 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6297 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6298 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6299 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6300 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6301 (tdesc_powerpc_isa205_vsx64l): Declare.
6302 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6303 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6304 (ppc_set_pc, ppc_get_hwcap): Adjust.
6305 (ppc_usrregs_info): Forward declare.
6306 (!__powerpc64__) ppc_regmap_adjusted: New global.
6307 (ppc_arch_setup): Adjust to the current process'es target
6309 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6310 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6311 (ppc_store_evrregset): Adjust.
6312 (target_regsets): Rename to ...
6313 (ppc_regsets): ... this, and make static.
6314 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6315 (ppc_regs_info): New function.
6316 (the_low_target): Adjust.
6317 (initialize_low_arch): New function.
6318 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6319 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6320 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6321 (tdesc_s390x_linux64v2): Declare.
6322 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6323 (s390_fill_gregset, s390_store_last_break): Adjust.
6324 (target_regsets): Rename to ...
6325 (s390_regsets): ... this, and make static.
6326 (s390_get_pc, s390_set_pc): Adjust.
6327 (s390_get_hwcap): New target_desc parameter, and use it.
6328 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6329 (s390_arch_setup): Adjust to set the current process'es target
6330 description. Don't adjust the regmap.
6331 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6332 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6333 (regs_info_3264): New globals.
6334 (s390_regs_info): New function.
6335 (the_low_target): Adjust.
6336 (initialize_low_arch): New function.
6337 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6338 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6339 [__mips64] (init_registers_mips_linux)
6340 (init_registers_mips_dsp_linux): Delete defines.
6341 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6342 (have_dsp): New global.
6343 (mips_read_description): New, based on mips_arch_setup.
6344 (mips_arch_setup): Reimplement.
6345 (get_usrregs_info): New function.
6346 (mips_cannot_fetch_register, mips_cannot_store_register)
6347 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6348 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6349 (target_regsets): Rename to ...
6350 (mips_regsets): ... this, and make static.
6351 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6352 (dsp_regs_info, regs_info): New globals.
6353 (mips_regs_info): New function.
6354 (the_low_target): Adjust.
6355 (initialize_low_arch): New function.
6356 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6357 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6359 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6360 (arm_read_description): New, with bits factored from
6362 (arm_arch_setup): Reimplement.
6363 (target_regsets): Rename to ...
6364 (arm_regsets): ... this, and make static.
6365 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6366 (arm_regs_info): New function.
6367 (the_low_target): Adjust.
6368 (initialize_low_arch): New function.
6369 * linux-m68k-low.c (tdesc_m68k): Declare.
6370 (target_regsets): Rename to ...
6371 (m68k_regsets): ... this, and make static.
6372 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6373 (m68k_regs_info): New function.
6374 (m68k_arch_setup): New function.
6375 (the_low_target): Adjust.
6376 (initialize_low_arch): New function.
6377 * linux-sh-low.c (tdesc_sharch): Declare.
6378 (target_regsets): Rename to ...
6379 (sh_regsets): ... this, and make static.
6380 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6381 (sh_regs_info, sh_arch_setup): New functions.
6382 (the_low_target): Adjust.
6383 (initialize_low_arch): New function.
6384 * linux-bfin-low.c (tdesc_bfin): Declare.
6385 (bfin_arch_setup): New function.
6386 (bfin_usrregs_info, regs_info): New globals.
6387 (bfin_regs_info): New function.
6388 (the_low_target): Adjust.
6389 (initialize_low_arch): New function.
6390 * linux-cris-low.c (tdesc_cris): Declare.
6391 (cris_arch_setup): New function.
6392 (cris_usrregs_info, regs_info): New globals.
6393 (cris_regs_info): New function.
6394 (the_low_target): Adjust.
6395 (initialize_low_arch): New function.
6396 * linux-cris-low.c (tdesc_crisv32): Declare.
6397 (cris_arch_setup): New function.
6398 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6399 (cris_regs_info): New function.
6400 (the_low_target): Adjust.
6401 (initialize_low_arch): New function.
6402 * linux-m32r-low.c (tdesc_m32r): Declare.
6403 (m32r_arch_setup): New function.
6404 (m32r_usrregs_info, regs_info): New globals.
6405 (m32r_regs_info): Adjust.
6406 (initialize_low_arch): New function.
6407 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6408 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6409 (tic6x_usrregs_info): Forward declare.
6410 (tic6x_read_description): New function, based on ...
6411 (tic6x_arch_setup): ... this. Reimplement.
6412 (target_regsets): Rename to ...
6413 (tic6x_regsets): ... this, and make static.
6414 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6415 (tic6x_regs_info): New function.
6416 (the_low_target): Adjust.
6417 (initialize_low_arch): New function.
6418 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6419 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6420 (target_regsets): Rename to ...
6421 (xtensa_regsets): ... this, and make static.
6422 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6424 (xtensa_arch_setup, xtensa_regs_info): New functions.
6425 (the_low_target): Adjust.
6426 (initialize_low_arch): New function.
6427 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6428 (nios2_arch_setup): Set the current process'es tdesc.
6429 (target_regsets): Rename to ...
6430 (nios2_regsets): ... this.
6431 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6432 (nios2_regs_info): New function.
6433 (the_low_target): Adjust.
6434 (initialize_low_arch): New function.
6435 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6436 (aarch64_arch_setup): Set the current process'es tdesc.
6437 (target_regsets): Rename to ...
6438 (aarch64_regsets): ... this.
6439 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6440 (aarch64_regs_info): New function.
6441 (the_low_target): Adjust.
6442 (initialize_low_arch): New function.
6443 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6445 (target_regsets): Rename to ...
6446 (tile_regsets): ... this.
6447 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6448 (tile_regs_info): New function.
6449 (tile_arch_setup): Set the current process'es tdesc.
6450 (the_low_target): Adjust.
6451 (initialize_low_arch): New function.
6452 * spu-low.c (tdesc_spu): Declare.
6453 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6454 * win32-arm-low.c (tdesc_arm): Declare.
6455 (arm_arch_setup): New function.
6456 (the_low_target): Install arm_arch_setup instead of
6458 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6459 (init_windows_x86): Rename to ...
6460 (i386_arch_setup): ... this. Set `win32_tdesc'.
6461 (the_low_target): Adjust.
6462 * win32-low.c (win32_tdesc): New global.
6463 (child_add_thread): Don't create the thread cache here.
6464 (do_initial_child_stuff): Set the new process'es tdesc.
6465 * win32-low.h (struct target_desc): Forward declare.
6466 (win32_tdesc): Declare.
6467 * lynx-i386-low.c (tdesc_i386): Declare global.
6468 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6469 * lynx-low.c (lynx_tdesc): New global.
6470 (lynx_add_process): Set the new process'es tdesc.
6471 * lynx-low.h (struct target_desc): Forward declare.
6472 (lynx_tdesc): Declare global.
6473 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6474 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6475 * nto-low.c (nto_tdesc): New global.
6476 (do_attach): Set the new process'es tdesc.
6477 * nto-low.h (struct target_desc): Forward declare.
6478 (nto_tdesc): Declare.
6479 * nto-x86-low.c (tdesc_i386): Declare.
6480 (nto_x86_arch_setup): Set `nto_tdesc'.
6482 2013-06-04 Gary Benson <gbenson@redhat.com>
6484 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6485 to qSupported response when appropriate.
6486 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6487 with nonzero-length annex.
6488 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6489 arguments supplied in annex.
6491 2013-05-31 Doug Evans <dje@google.com>
6494 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6495 64 bits in 64-cross-32 environment.
6497 2013-05-28 Pedro Alves <palves@redhat.com>
6499 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6500 (aarch64-without-fpu.c): Delete rule.
6501 * configure.srv (aarch64*-*-linux*): Remove references to
6502 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6503 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6506 2013-05-24 Pedro Alves <palves@redhat.com>
6508 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6509 instead of strchr/decode_address. Error if the range isn't split
6510 with a ','. Don't assume there's be a ':' in the action.
6512 2013-05-23 Yao Qi <yao@codesourcery.com>
6513 Pedro Alves <palves@redhat.com>
6515 * linux-low.c (lwp_in_step_range): New function.
6516 (linux_wait_1): If the thread was range stepping and stopped
6517 outside the stepping range, report the stop to GDB. Otherwise,
6518 continue stepping. Add range stepping debug output.
6519 (linux_set_resume_request): Copy the step range from the resume
6521 (linux_supports_range_stepping): New.
6522 (linux_target_ops) <supports_range_stepping>: Set to
6523 linux_supports_range_stepping.
6524 * linux-low.h (struct linux_target_ops)
6525 <supports_range_stepping>: New field.
6526 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6527 * linux-x86-low.c (x86_supports_range_stepping): New.
6528 (the_low_target) <supports_range_stepping>: Set to
6529 x86_supports_range_stepping.
6530 * server.c (handle_v_cont): Handle 'r' action.
6531 (handle_v_requests): Append ";r" if the target supports range
6533 * target.h (struct thread_resume) <step_range_start,
6534 step_range_end>: New fields.
6535 (struct target_ops) <supports_range_stepping>:
6537 (target_supports_range_stepping): New macro.
6539 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6541 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6542 confusion in comment.
6544 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6546 * lynx-low.c (struct process_info_private): New type.
6547 (lynx_add_process): New function.
6548 (lynx_create_inferior, lynx_attach): Replace calls to
6549 add_process by calls to lynx_add_process.
6550 (lynx_resume): If PTID is null, then try using
6551 current_process()->private->last_wait_event_ptid.
6553 (lynx_clear_inferiors): Delete. The contents of that function
6554 has been inlined in lynx_mourn;
6555 (lynx_wait_1): Save the ptid in the process's private data.
6556 (lynx_mourn): Free the process' private data. Replace call
6557 to lynx_clear_inferiors by call to clear_inferiors.
6559 2013-05-17 Yao Qi <yao@codesourcery.com>
6561 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6564 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6566 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6567 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6568 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6569 PT_TEXT_END_ADDR guards. Update comments.
6570 (linux_target_op) <read_offsets>: Conditionally define to
6571 linux_read_offsets if the target is UCLIBC and if it defines
6572 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6574 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6575 Andrew Jenner <andrew@codesourcery.com>
6577 * Makefile.in (SFILES): Add linux-nios2-low.c.
6578 (clean): Add action to delete nios2-linux.c.
6579 (nios2-linux.c): New rule.
6580 * configure.srv: Add nios2*-*-linux*.
6581 * linux-nios2-low.c: New.
6583 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6585 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6587 2013-04-25 Hui Zhu <hui@codesourcery.com>
6590 * ax.c (ax_printf): Add fflush.
6592 2013-04-22 Tom Tromey <tromey@redhat.com>
6594 * Makefile.in (SFILES): Add filestuff.c.
6595 (OBS): Add filestuff.o.
6596 (filestuff.o): New target.
6597 * config.in, configure: Rebuild.
6598 * configure.ac: Check for fdwalk, pipe2.
6600 2013-04-17 Pedro Alves <palves@redhat.com>
6602 * configure.ac (USE_THREAD_DB): Delete variable.
6603 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6604 Don't AC_SUBST USE_THREAD_DB.
6605 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6606 * config.in, configure: Regenerate.
6608 2013-04-16 Pedro Alves <palves@redhat.com>
6610 * linux-low.h (struct lwp_info) <thread_known>: Move under
6611 the USE_THREAD_DB #ifdef.
6613 2013-04-16 Pedro Alves <palves@redhat.com>
6615 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6616 (linux-low.o): Delete rule.
6617 * linux-low.h: Always include "gdb_thread_db.h" instead of
6618 conditionally including thread_db.h.
6619 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6622 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6624 * Makefile.in (install-only): Fix make install regression.
6626 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6628 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6629 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6631 * gdbserver.1: Remove.
6633 2013-03-22 Pedro Alves <palves@redhat.com>
6635 * linux-low.c (handle_extended_wait): Don't call
6636 linux_enable_event_reporting.
6638 2013-03-15 Tony Theodore <tonyt@logyst.com>
6641 * Makefile.in (SHELL): Use @SHELL@.
6643 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6645 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6648 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6650 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6651 Remove extraneous NULL element.
6653 2013-03-13 Yao Qi <yao@codesourcery.com>
6655 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6656 'V' block in trace frame.
6658 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6660 * target.h (struct target_ops): Add btrace ops.
6661 (target_supports_btrace): New macro.
6662 (target_enable_btrace): New macro.
6663 (target_disable_btrace): New macro.
6664 (target_read_btrace): New macro.
6665 * gdbthread.h (struct thread_info): Add btrace field.
6666 * server.c: Include btrace-common.h.
6667 (handle_btrace_general_set): New function.
6668 (handle_btrace_enable): New function.
6669 (handle_btrace_disable): New function.
6670 (handle_general_set): Call handle_btrace_general_set.
6671 (handle_qxfer_btrace): New function.
6672 (struct qxfer qxfer_packets[]): Add btrace entry.
6673 * inferiors.c (remove_thread): Disable btrace.
6674 * linux-low: Include linux-btrace.h.
6675 (linux_low_enable_btrace): New function.
6676 (linux_low_read_btrace): New function.
6677 (linux_target_ops): Add btrace ops.
6678 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6679 Add srv_linux_btrace=yes.
6680 (x86_64-*-linux*): Add linux-btrace.o.
6681 Add srv_linux_btrace=yes.
6682 * configure.ac: Define HAVE_LINUX_BTRACE.
6683 * config.in: Regenerated.
6684 * configure: Regenerated.
6686 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6688 * server.c (handle_qxfer): Preserve error message if -3 is
6690 (qxfer): Document the -3 return value.
6692 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6694 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6695 (linux_btrace_h): New variable.
6696 (linux-btrace.o): New rule.
6698 2013-03-08 Stan Shebs <stan@codesourcery.com>
6699 Hafiz Abid Qadeer <abidh@codesourcery.com>
6701 * tracepoint.c (trace_buffer_size): New global.
6702 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6703 (init_trace_buffer): Change to one-argument function. Allocate
6704 trace buffer memory.
6705 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6706 handle QTBuffer:size packet.
6707 (cmd_bigqtbuffer_size): New function.
6708 (initialize_tracepoint): Call init_trace_buffer with
6709 DEFAULT_TRACE_BUFFER_SIZE.
6710 * server.c (handle_query): Add QTBuffer:size in the
6713 2013-03-07 Yao Qi <yao@codesourcery.com>
6715 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6716 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6718 (cmd_qtsp): Adjust condition. Do post increment.
6719 Set cur_action and cur_step_action back to 0.
6721 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6724 * linux-low.c (linux_write_memory): Return early success if LEN is
6727 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6729 * configure.srv: Add x86_64-*-cygwin* as target.
6731 2013-02-28 Tom Tromey <tromey@redhat.com>
6733 * configure.ac: Invoke AC_SYS_LARGEFILE.
6734 * configure, config.in: Rebuild.
6736 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6738 * win32-low.c: Throughout, fix format strings and casts of
6739 printf-like functions to avoid type related warnings on all
6741 (get_child_debug_event): Print dwDebugEventCode as hex since
6742 that's how it's usually documented.
6744 2013-02-28 Yao Qi <yao@codesourcery.com>
6746 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6749 2013-02-27 Jiong Wang <jiwang@tilera.com>
6751 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6752 (reg-tilegx32.c): New rule.
6753 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6754 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6755 different register info initializer according to elf class.
6756 (init_registers_tilgx32): New function. The tilegx32 register info
6758 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6759 (tile_store_gregset): Likewise.
6761 2013-02-27 Yao Qi <yao@codesourcery.com>
6763 * server.c (process_point_options): Print debug message when
6764 debug_threads is true.
6766 2013-02-26 Yao Qi <yao@codesourcery.com>
6768 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6770 2013-02-19 Pedro Alves <palves@redhat.com>
6771 Kai Tietz <ktietz@redhat.com>
6775 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6776 instead of strtoul to extract address from packet.
6777 (process_serial_event) <'z'>: Likewise.
6779 2013-02-18 Yao Qi <yao@codesourcery.com>
6781 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6783 2013-02-14 Pedro Alves <palves@redhat.com>
6787 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6788 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6790 2013-02-14 Pedro Alves <palves@redhat.com>
6792 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6794 2013-02-14 Pedro Alves <palves@redhat.com>
6796 * tracepoint.c (save_string): Delete.
6797 (add_tracepoint_action): Use savestring instead of save_string.
6799 2013-02-12 Pedro Alves <palves@redhat.com>
6801 * linux-xtensa-low.c: Ditto.
6802 * xtensa-xtregs.c: Ditto.
6804 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6806 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6809 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6811 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6812 aarch64_num_wp_regs and aarch64_num_bp_regs to
6813 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6815 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6817 * linux-aarch64-low.c (ps_get_thread_area): Replace
6818 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6820 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6821 Marcus Shawcroft <marcus.shawcroft@arm.com>
6822 Nigel Stephens <nigel.stephens@arm.com>
6823 Yufeng Zhang <yufeng.zhang@arm.com>
6825 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6826 (aarch64.c, aarch64-without-fpu.c): New targets.
6827 * configure.srv (aarch64*-*-linux*): New.
6828 * linux-aarch64-low.c: New file.
6830 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6832 * linux-low.c (handle_extended_wait, linux_create_inferior)
6833 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6834 (dequeue_one_deferred_signal, linux_resume_one_thread)
6835 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6836 (linux_tracefork_grandchild, linux_test_for_tracefork)
6837 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6838 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6839 where the argument is 0.
6841 2013-01-25 Yao Qi <yao@codesourcery.com>
6843 * event-loop.c: Include "queue.h".
6844 (gdb_event_p): New typedef.
6845 (struct gdb_event) <next_event>: Remove.
6846 (event_queue): Change to QUEUE(gdb_event_p).
6847 (async_queue_event): Remove.
6848 (gdb_event_xfree): New.
6849 (initialize_event_loop): New.
6850 (process_event): Use API from QUEUE.
6851 (wait_for_event): Likewise.
6852 * server.c (main): Call initialize_event_loop.
6853 * server.h (initialize_event_loop): Declare.
6855 2013-01-18 Yao Qi <yao@codesourcery.com>
6857 * ax.h (struct eval_agent_expr_context): New.
6858 (gdb_eval_agent_expr): Update declaration.
6859 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6860 TFRAME. Add new argument CTX.
6861 * server.h (struct eval_agent_expr_context): Declare.
6862 (agent_mem_read, agent_tsv_read): Update declaration.
6863 (agent_mem_read_string): Likewise.
6864 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6865 (add_traceframe_block): Add new argument TPOINT.
6866 Increase TPOINT->traceframe_usage.
6867 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6868 eval_tracepoint_agent_expr.
6869 (condition_true_at_tracepoint): Likewise.
6870 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6871 (agent_mem_read_string, agent_tsv_read): Likewise.
6873 2013-01-16 Yao Qi <yao@codesourcery.com>
6875 * linux-low.c (linux_resume_one_lwp): Don't check
6876 'lwp->bp_reinsert != 0'.
6878 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6879 Pedro Alves <palves@redhat.com>
6881 * lynx-low.c (ptrace_request_to_str): Define a temporary
6882 macro and use it to simplify this function's implementation.
6884 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6886 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6889 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6891 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6893 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6895 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6897 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6899 * lynx-low.c (lynx_resume): Use the resume_info parameter
6900 to determine the ptid for the lynx_ptrace call, unless
6901 it is equal to minus_one_ptid, in which case we use the
6902 ptid of the current_inferior.
6903 (lynx_wait_1): After having received a thread create/exit
6904 event, resume the inferior's execution using the signaling
6905 thread's ptid, rather than the old ptid.
6907 2013-01-07 Joel Brobecker <brobecker@adacore.com>
6909 * lynx-low.c (lynx_resume): Delete variable ret.
6911 2013-01-01 Joel Brobecker <brobecker@adacore.com>
6913 * gdbreplay.c (gdbreplay_version): Update copyright year.
6914 * server.c (gdbserver_version): Likewise.
6916 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6918 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6921 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6923 * lynx-low.c (ptrace_request_to_str): Add handling for
6926 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6928 * lynx-low.c (lynx_attach): Delete variable new_process.
6930 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6932 * lynx-low.c (lynx_create_inferior): Delete variable
6935 2012-12-17 Joel Brobecker <brobecker@adacore.com>
6937 * lynx-low.c (ptrace_request_to_str): Do not handle
6938 PTRACE_GETTHREADLIST if this macro does not exist.
6940 2012-12-15 Yao Qi <yao@codesourcery.com>
6942 * Makefile.in (OBS): Add notif.o.
6943 * notif.c, notif.h: New.
6944 * server.c: Include "notif.h".
6945 (struct vstop_notif) <next>: Remove.
6947 (queue_stop_reply): Update.
6948 (push_event, send_next_stop_reply): Remove.
6949 (discard_queued_stop_replies): Update.
6950 (notif_stop): New variable.
6951 (handle_v_stopped): Remove.
6952 (handle_v_requests): Don't call handle_v_stopped. Call
6953 handle_ack_notif instead.
6954 (queue_stop_reply_callback): Call notif_event_enque instead
6955 of queue_stop_reply.
6956 (handle_status): Don't call send_next_stop_reply, call
6957 notif_write_event instead.
6958 (kill_inferior_callback): Likewise.
6959 (detach_or_kill_inferior_callback): Likewise.
6960 (main): Call initialize_notif.
6961 (process_serial_event): Call QUEUE_is_empty.
6962 (handle_target_event): Call notif_push instead of push event.
6963 * server.h (push_event): Remove declaration.
6965 2012-12-10 Tom Tromey <tromey@redhat.com>
6967 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6968 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6971 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6972 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6973 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6974 (amd64-linux-ipa.o, ax.o): Rewrite.
6975 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6976 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6977 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6978 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6979 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6980 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6981 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6982 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6983 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6984 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6985 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6986 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6987 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6988 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6989 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6990 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6991 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6992 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6993 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6994 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6995 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6996 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6997 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6998 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6999 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7000 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7001 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7002 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7003 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7004 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7005 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7006 (reg-tilegx.o): Remove.
7007 (all_object_files): New macro.
7008 Include .deps files.
7009 * aclocal.m4, configure: Rebuild.
7010 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7011 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7012 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7014 2012-12-05 Tom Tromey <tromey@redhat.com>
7017 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7019 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7021 * configure.ac: Check for linux/perf_event.h.
7022 * config.in: Regenerated.
7023 * configure: Regenerated.
7025 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7027 * hostio.c (handle_readlink): Decrease buffer size
7028 parameter passed to readlink by one byte.
7030 2012-11-26 Yao Qi <yao@codesourcery.com>
7032 * configure.ac (build_warnings): Append '-Wempty-body'.
7033 * configure: Regenerated.
7034 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7037 2012-11-15 Pierre Muller <muller@sourceware.org>
7039 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7040 * config.in: Regenerate.
7041 * configure: Regenerate.
7042 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7043 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7044 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7045 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7047 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7048 instead of <sys/wait.h> header.
7049 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7051 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7053 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7054 (various make rules): Remove -DGDBSERVER
7056 2012-11-09 Yao Qi <yao@codesourcery.com>
7058 * spu-low.c (current_ptid): Move it to ..
7059 * gdbthread.h: ... here. New.
7060 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7061 * server.c (myresume, process_serial_event): Likewise.
7062 * thread-db.c (thread_db_find_new_threads): Likewise.
7063 * tracepoint.c (run_inferior_command): Likewise.
7065 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7067 * server.c (handle_search_memory_1): Include access length in
7070 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7072 * linux-crisv32-low.c: Fix compile errors.
7074 2012-09-04 Yao Qi <yao@codesourcery.com>
7076 * tracepoint.c (cmd_qtsv): Adjust debug message.
7077 Don't check CUR_TPOINT.
7079 2012-08-28 Yao Qi <yao@codesourcery.com>
7081 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7082 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7083 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7084 Remove declarations of xmalloc, xreallloc, xstrdup and
7086 * Makefile.in (libiberty_h): New.
7087 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7088 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7090 2012-08-23 Yao Qi <yao@codesourcery.com>
7092 * server.h: Remove declaration of 'xsnprintf'.
7094 2012-08-22 Keith Seitz <keiths@redhat.com>
7096 * server.h: Include build-gnulib-gbserver/config.h.
7097 * gdbreplay.c: Likewise.
7099 2012-08-08 Doug Evans <dje@google.com>
7101 * Makefile.in (SFILES): Add gdb_vecs.c.
7102 (OBS): Add gdb_vecs.o.
7103 (gdb_vecs_h, host_defs_h): New variables.
7104 (thread-db.o): Add $(gdb_vecs_h) dependency.
7105 (gdb_vecs.o): New rule.
7106 * thread-db.c: #include "gdb_vecs.h".
7107 (thread_db_load_search): Use a vector to iterate over path elements.
7108 Handle text appearing after "$pdir".
7110 * configure.ac: Add check for strstr.
7111 * config.in: Regenerate.
7112 * configure: Regenerate.
7114 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7116 * hostio.c (handle_pread): If pread fails, fall back to attempting
7118 (handle_pwrite): Likewise for pwrite.
7120 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7122 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7123 between unsupported TYPE and unimplementable ADDR/LEN combination.
7124 (arm_insert_point): Act on new return value.
7126 2012-07-31 Pedro Alves <palves@redhat.com>
7128 * server.c (process_point_options): Only skip tokens if we find
7129 one that is unrecognized. Don't treat 'X' specially while
7130 skipping unrecognized tokens.
7132 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7134 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7135 to 4-byte-align HW breakpoint addresses for Thumb.
7137 2012-07-27 Yao Qi <yao@codesourcery.com>
7141 * server.h: Declare gdb_agent_about_to_close.
7142 * target.c (kill_inferior): Include "agent.h".
7143 New. Send command 'kill'.
7144 * target.h (kill_inferior): Removed macro.
7145 * tracepoint.c (gdb_agent_about_to_close): New.
7146 (gdb_agent_helper_thread): Handle command 'close'.
7147 Wait endlessly until the inferior stops.
7148 Install gdb_agent_remove_socket to atexit hook.
7149 (agent_socket_name): New static variable.
7150 (gdb_agent_socket_init): Replace local variable 'name' with
7151 'agent_socket_name'.
7152 (gdb_agent_remove_socket): New.
7154 2012-07-27 Yao Qi <yao@codesourcery.com>
7156 * server.c (process_point_options): Stop at 'X' when parsing.
7158 2012-07-19 Michael Eager <eager@eagercon.com>
7160 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7162 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7163 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7164 hardware breakpoint.
7166 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7168 * gdbserver/linux-low.c (initialize_low): Call
7169 linux_ptrace_init_warnings.
7171 2012-07-02 Doug Evans <dje@google.com>
7173 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7176 2012-07-02 Stan Shebs <stan@codesourcery.com>
7178 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7179 (ax.o): Add it to build rule.
7181 (OBS): Add format.o.
7182 (IPA_OBS): Add format.o.
7183 * server.c (handle_query): Claim support for breakpoint commands.
7184 (process_point_options): Add command case.
7185 (process_serial_event): Leave running if there are printfs in
7187 * mem-break.h (any_persistent_commands): Declare.
7188 (add_breakpoint_commands): Declare.
7189 (gdb_no_commands_at_breakpoint): Declare.
7190 (run_breakpoint_commands): Declare.
7191 * mem-break.c (struct point_command_list): New struct.
7192 (struct breakpoint): New field command_list.
7193 (any_persistent_commands): New function.
7194 (add_commands_to_breakpoint): New function.
7195 (add_breakpoint_commands): New function.
7196 (gdb_no_commands_at_breakpoint): New function.
7197 (run_breakpoint_commands): New function.
7198 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7200 * ax.c: Include format.h.
7201 (ax_printf): New function.
7202 (gdb_eval_agent_expr): Add printf opcode.
7204 2012-06-13 Yao Qi <yao@codesourcery.com>
7206 * server.c (start_inferior): Remove duplicated writes to fields
7207 'last_resume_kind' and 'last_status' of 'current_inferior'.
7209 2012-06-12 Yao Qi <yao@codesourcery.com>
7210 Pedro Alves <palves@redhat.com>
7212 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7214 * server.c (handle_v_cont): Extend comment.
7216 2012-06-11 Yao Qi <yao@codesourcery.com>
7218 * linux-low.c (linux_attach): Add 'static'.
7220 2012-06-06 Yao Qi <yao@codesourcery.com>
7222 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7224 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7226 Fix gcc -flto compilation warning.
7227 * server.c (main): Make variable multi_mode and attach volatile.
7229 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7231 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7232 if the platform doesn't know about it.
7234 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7236 * Makefile.in (SFILES): Add linux-tile-low.c.
7237 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7238 * configure.srv: Handle tilegx-*-linux*.
7239 * linux-tile-low.c: New file.
7241 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7243 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7245 2012-05-24 Pedro Alves <palves@redhat.com>
7249 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7251 2012-05-24 Pedro Alves <palves@redhat.com>
7255 Replace target_signal with gdb_signal throughout.
7257 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7259 * linux-low.c (linux_store_registers): Avoid the copying sequence
7260 when no data has been retrieved by ptrace.
7262 2012-05-22 Will Deacon <will.deacon@arm.com>
7264 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7265 Include asm/ptrace.h.
7266 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7269 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7271 * linux-low.c (linux_store_registers): Don't re-retrieve data
7272 with ptrace that has already been obtained from /proc. Always
7273 copy any data retrieved with ptrace to the buffer supplied.
7275 2012-05-11 Yao Qi <yao@codesourcery.com>
7276 Pedro Alves <palves@redhat.com>
7278 * linux-low.c (enum stopping_threads_kind): New.
7279 (stopping_threads): Change type to `enum stopping_threads_kind'.
7280 (handle_extended_wait): If stopping and suspending threads, leave
7281 the new_lwp suspended too.
7282 (linux_wait_for_event): Adjust.
7283 (stop_all_lwps): Set `stopping_threads' to
7284 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7285 whether we're suspending threads or just stopping them. Assert no
7288 2012-04-29 Yao Qi <yao@codesourcery.com>
7290 * server.h: Move some code to ...
7291 * gdbthread.h: ... here. New.
7292 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7293 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7294 (nto-low.o, win32-low.o): Likewise.
7295 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7296 * regcache.c, remote-utils.c, server.c: Likewise.
7297 * target.c, tracepoint.c, win32-low.c: Likewise.
7299 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7301 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7302 (PTRACE_ARG4_TYPE): Likewise.
7303 (PTRACE_XFER_TYPE): Likewise.
7304 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7305 ptrace to PTRACE_ARG3_TYPE.
7306 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7307 (PTRACE_ARG4_TYPE): Likewise.
7308 (PTRACE_XFER_TYPE): Likewise.
7309 (linux_detach_one_lwp): Cast fourth argument of
7310 ptrace to long then PTRACE_ARG4_TYPE.
7311 (regsets_fetch_inferior_registers): Cast third argument of
7312 ptrace to long then PTRACE_ARG3_TYPE.
7313 (regsets_store_inferior_registers): Likewise.
7315 2012-04-20 Pedro Alves <palves@redhat.com>
7317 * configure: Regenerate.
7319 2012-04-19 Pedro Alves <palves@redhat.com>
7321 * Makefile.in (GNULIB_BUILDDIR): New.
7322 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7323 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7324 (all, install-only, uninstall, clean-info, all-lib, clean): No
7325 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7326 (maintainer-clean realclean distclean): Use subdir_do.
7328 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7329 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7330 * acinclude.m4: Include acx_configure_dir.m4.
7331 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7332 calls. Call AC_PROG_RANLIB. Configure gnulib using
7335 (GNULIB_STDINT_H): Adjust.
7336 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7337 * gdbreplay.c: Include build-gnulib/config.h.
7338 * server.h: Likewise.
7339 * aclocal.m4: Regenerate.
7340 * config.in: Regenerate.
7341 * configure: Regenerate.
7343 2012-04-19 Pedro Alves <palves@redhat.com>
7345 * Makefile.in (LIBGNU, INCGNU): Adjust.
7346 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7347 (all, install-only, uninstall, clean-info, all-lib, clean)
7348 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7349 * configure.ac: Adjust AC_OUTPUT output.
7350 * aclocal.m4: Regenerate.
7351 * configure: Regenerate.
7353 2012-04-19 Pedro Alves <palves@redhat.com>
7355 * Makefile.in (generated_files): New.
7356 (server_h): Remove the explicit dependency on config.h, and depend
7357 on $generated_files.
7359 2012-04-19 Pedro Alves <palves@redhat.com>
7361 * Makefile.in (INCGNU): Add -Ignulib.
7363 2012-04-19 Pedro Alves <palves@redhat.com>
7365 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7366 (INCGNU): ... this, and spell out -I here.
7367 (GNULIB_LIB): Rename to ...
7369 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7371 2012-04-19 Pedro Alves <palves@redhat.com>
7373 * config.in: Regenerate.
7375 2012-04-19 Pedro Alves <palves@redhat.com>
7377 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7378 * server.h (memmem): Remove declaration.
7379 * config.in: Regenerate.
7380 * configure: Regenerate.
7382 2012-04-19 Yao Qi <yao@codesourcery.com>
7384 * Makefile.in (SFILES): Add common/vec.c.
7388 2012-04-19 Yao Qi <yao@codesourcery.com>
7390 * remote-utils.c (prepare_resume_reply): Replace with macro
7391 target_core_of_thread.
7392 * server.c (handle_qxfer_threads_proper): Likewise.
7393 * target.h (traget_core_of_thread): New macro.
7395 2012-04-18 Pedro Alves <palves@redhat.com>
7397 * aclocal.m4: Regenerate.
7398 * configure: Regenerate.
7400 2012-04-16 Yao Qi <yao@codesourcery.com>
7402 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7403 duplicated on address.
7405 2012-04-16 Yao Qi <yao@codesourcery.com>
7407 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7408 (struct tracepoint_action_ops) <send>: New field.
7409 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7410 (agent_expr_send, x_tracepoint_action_send): New.
7411 (l_tracepoint_action_send): New.
7412 (cmd_qtdp): Download and install tracepoint
7413 according to `use_agent'.
7414 (run_inferior_command): Add one more parameter `len'.
7416 (tracepoint_send_agent): New.
7417 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7419 2012-04-16 Yao Qi <yao@codesourcery.com>
7421 * tracepoint.c (download_tracepoints): Moved to ...
7422 (cmd_qtstart): ... here.
7424 2012-04-14 Yao Qi <yao@codesourcery.com>
7426 * tracepoint.c: Include inttypes.h.
7427 (struct collect_memory_action): Use sized types.
7428 (struct tracepoint): Likewise.
7429 (cmd_qtdp, stop_tracing): Update print specifiers.
7430 (cmd_qtp, response_tracepoint): Likewise.
7431 (collect_data_at_tracepoint): Likewise.
7432 (collect_data_at_step): Likewise.
7434 2012-04-14 Yao Qi <yao@codesourcery.com>
7436 Import gnulib module inttypes.
7437 * aclocal.m4, config.in, configure: Regenerated.
7439 2012-04-14 Yao Qi <yao@codesourcery.com>
7441 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7442 Makefile and config.status at last.
7444 2012-04-13 Yao Qi <yao@codesourcery.com>
7446 * tracepoint.c: Include stdint.h unconditionally.
7448 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7450 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7451 on BFD_HAVE_SYS_PROCFS_TYPE.
7452 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7453 * configure: Regenerate.
7454 * config.in: Likewise.
7456 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7458 * Makefile.in (clean): Also remove x32.c x32-linux.c
7459 x32-avx.c x32-avx-linux.c.
7460 (x32.o): New target.
7462 (x32-linux.o): Likewise.
7463 (x32-linux.c): Likewise.
7464 (x32-avx.o): Likewise.
7465 (x32-avx.c): Likewise.
7466 (x32-avx-linux.o): Likewise.
7467 (x32-avx-linux.c): Likewise.
7469 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7470 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7471 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7472 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7473 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7474 i386/x32-avx-linux.xml.
7476 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7477 (init_registers_x32_avx_linux): Likwise.
7478 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7479 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7481 2012-04-13 Pedro Alves <palves@redhat.com>
7483 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7484 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7485 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7486 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7489 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7491 * linux-x86-low.c (compat_x32_clock_t): New.
7492 (compat_x32_siginfo_t): Likewise.
7493 (compat_x32_siginfo_from_siginfo): Likewise.
7494 (siginfo_from_compat_x32_siginfo): Likewise.
7495 (linux_is_elf64): Likewise.
7496 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7497 and siginfo_from_compat_x32_siginfo for x32.
7498 (x86_arch_setup): Set linux_is_elf64.
7500 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7503 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7505 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7506 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7507 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7508 compatible with process.
7510 2012-04-12 Yao Qi <yao@codesourcery.com>
7512 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7513 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7514 (install-only, install-info, clean): Handle sub dir gnulib.
7515 (all-lib, am--refresh): New targets.
7516 (memmem.o): Remove target.
7517 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7518 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7519 (AC_REPLACE_FUNCS): Remove memmem.
7520 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7521 (AC_OUTPUT): Generate Makefile in gnulib/.
7522 * aclocal.m4, config.in, configure: Regenerated.
7524 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7526 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7528 2012-04-05 Pedro Alves <palves@redhat.com>
7530 -Werror=strict-aliasing
7532 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7535 2012-04-04 Pedro Alves <palves@redhat.com>
7537 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7538 (sparc_store_gregset_from_stack, sparc_store_gregset)
7539 (sparc_breakpoint_at): Fix formatting.
7541 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7543 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7545 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7546 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7547 * config.in: Regenerate.
7548 * configure: Likewise.
7550 2012-03-29 Pedro Alves <palves@redhat.com>
7552 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7553 Correct ptrace arguments.
7555 2012-03-28 Pedro Alves <palves@redhat.com>
7557 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7558 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7559 (IA64_FR1_REGNUM): New defines.
7560 (ia64_fetch_register): New.
7561 (the_low_target): Install it.
7562 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7564 * linux-low.c (linux_fetch_registers): Try the
7565 the_low_target.fetch_register hook first.
7567 * linux-arm-low.c (the_low_target): Adjust.
7568 * linux-bfin-low.c (the_low_target): Adjust.
7569 * linux-cris-low.c (the_low_target): Adjust.
7570 * linux-crisv32-low.c (the_low_target): Adjust.
7571 * linux-m32r-low.c (the_low_target): Adjust.
7572 * linux-m68k-low.c (the_low_target): Adjust.
7573 * linux-mips-low.c (the_low_target): Adjust.
7574 * linux-ppc-low.c (the_low_target): Adjust.
7575 * linux-s390-low.c (the_low_target): Adjust.
7576 * linux-sh-low.c (the_low_target): Adjust.
7577 * linux-sparc-low.c (the_low_target): Adjust.
7578 * linux-tic6x-low.c (the_low_target): Adjust.
7579 * linux-x86-low.c (the_low_target): Adjust.
7580 * linux-xtensa-low.c (the_low_target): Adjust.
7582 2012-03-26 Pedro Alves <palves@redhat.com>
7584 * server.c (handle_qxfer_libraries): Don't bail early if
7585 the_target->qxfer_libraries_svr4 is not NULL.
7587 2012-03-26 Pedro Alves <palves@redhat.com>
7589 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7591 2012-03-23 Pedro Alves <palves@redhat.com>
7593 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7594 "library-list-svr4" element's start tag when the the DSO list is
7597 2012-03-23 Pedro Alves <palves@redhat.com>
7599 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7600 a variable whose type size is the same as the inferior's pointer
7603 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7605 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7607 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7608 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7609 * linux-low.h: Include <signal.h>.
7610 (struct siginfo): Remove forward declaration.
7611 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7614 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7616 * .gitignore: Ignore more files.
7618 2012-03-19 Pedro Alves <palves@redhat.com>
7619 Jan Kratochvil <jan.kratochvil@redhat.com>
7621 * server.c (cont_thread, general_thread): Add describing comments.
7622 (start_inferior): Clear `cont_thread'.
7623 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7626 2012-03-15 Yao Qi <yao@codesourcery.com>
7628 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7630 (cmd_qtdp): ... here.
7632 2012-03-15 Yao Qi <yao@codesourcery.com>
7634 * tracepoint.c (struct tracepoint_action_ops): New.
7635 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7636 (m_tracepoint_action_download): New.
7637 (r_tracepoint_action_download): New.
7638 (x_tracepoint_action_download): New.
7639 (l_tracepoint_action_download): New.
7640 (add_tracepoint_action): Install `action->ops' according type.
7641 (download_tracepoint_1): Move code `download' function pointer
7642 of various tracepoint_action_ops.
7644 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7646 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7647 linux_ptrace_attach_warnings.
7649 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7651 * Makefile.in (linux-ptrace.o): New.
7652 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7653 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7654 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7655 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7656 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7658 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7660 2012-03-08 Yao Qi <yao@codesourcery.com>
7661 Pedro Alves <palves@redhat.com>
7663 Fix PR server/13392.
7664 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7666 * tracepoint.c (remove_tracepoint): New.
7667 (cmd_qtdp): Call remove_tracepoint when failed to install.
7669 2012-03-07 Pedro Alves <palves@redhat.com>
7671 * linux-low.c (get_detach_signal): New.
7672 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7673 Pass on pending signals to PTRACE_DETACH. Check the result of the
7675 * server.c (program_signals, program_signals_p): New.
7676 (handle_general_set): Handle QProgramSignals.
7677 * server.h (program_signals, program_signals_p): Declare.
7679 2012-03-05 Pedro Alves <palves@redhat.com>
7680 Jan Kratochvil <jan.kratochvil@redhat.com>
7682 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7685 2012-03-03 Yao Qi <yao@codesourcery.com>
7687 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7688 agent_look_up_symbols.
7690 2012-03-03 Yao Qi <yao@codesourcery.com>
7692 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7693 (linux-x86-low.o): Likewise.
7694 * server.h: Remove in_process_agent_loaded.
7695 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7699 2012-03-03 Yao Qi <yao@codesourcery.com>
7701 * tracepoint.c (gdb_agent_capability): New global.
7702 (in_process_agent_loaded_ust): Renamed to
7703 `in_process_agent_supports_ust'.
7705 (in_process_agent_supports_ust): Call agent_capability_check.
7706 (clear_installed_tracepoints): Assert that agent supports
7709 2012-03-03 Yao Qi <yao@codesourcery.com>
7711 * linux-low.c (linux_supports_agent): New.
7712 (linux_target_ops): Initialize field `supports_agent' with
7713 linux_supports_agent.
7714 * target.h (struct target_ops) <supports_agent>: New.
7715 (target_supports_agent): New macro.
7716 * server.c (handle_general_set): Handle packet 'QAgent'.
7717 (handle_query): Send `QAgent+'.
7718 * Makefile.in (server.o): Depends on agent.h.
7720 2012-03-03 Yao Qi <yao@codesourcery.com>
7722 * Makefile.in (OBS): Add agent.o.
7723 Add new rule for agent.o.
7724 Track dependence of tracepoint.c on agent.h.
7725 * tracepoint.c (run_inferior_command_1):
7726 (run_inferior_command): Call agent_run_command.
7727 (gdb_ust_connect_sync_socket): Deleted. Move it to
7729 (resume_thread, stop_thread): Likewise.
7730 (gdb_ust_socket_init): Renamed to ...
7731 (gdb_agent_socket_init): ... New.
7732 (gdb_ust_thread): Renamed to ...
7733 (gdb_agent_helper_thread): ... New.
7734 (gdb_ust_init): Move some code to ...
7735 (gdb_agent_init): ... here. New.
7736 [HAVE_UST]: Call gdb_ust_init.
7737 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7738 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7739 * config.in, configure: Regenerated.
7741 2012-03-02 Pedro Alves <palves@redhat.com>
7743 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7744 * linux-low.c (struct simple_pid_list): New.
7745 (stopped_pids): New a struct simple_pid_list pointer.
7746 (add_to_pid_list, pull_pid_from_list): New.
7747 (handle_extended_wait): Don't assume the first signal new children
7748 report is SIGSTOP. Adjust call to pull_pid_from_list.
7749 (linux_wait_for_lwp): Adjust.
7751 2012-03-02 Yao Qi <yao@codesourcery.com>
7753 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7756 2012-03-02 Yao Qi <yao@codesourcery.com>
7758 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7759 `stop_pc' and `tpoint'. Update caller.
7761 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7763 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7764 * linux-low.c (use_linux_regsets): New macro.
7765 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7766 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7767 (linux_register_in_regsets): New function.
7768 (usr_fetch_inferior_registers): Skip registers covered by
7770 (usr_store_inferior_registers): Likewise.
7771 (usr_fetch_inferior_registers): New macro.
7772 (usr_store_inferior_registers): Likewise.
7773 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7774 (linux_store_registers): Likewise.
7775 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7777 (init_registers_mips64_dsp_linux): Likewise.
7778 (init_registers_mips_linux): New macro.
7779 (init_registers_mips_dsp_linux): Likewise.
7780 (mips_dsp_num_regs): Likewise.
7781 (DSP_BASE, DSP_CONTROL): New fallback macros.
7782 (mips_base_regs): New macro.
7783 (mips_regmap): Use it. Fix the size.
7784 (mips_dsp_regmap): New variable.
7785 (mips_dsp_regset_bitmap): Likewise.
7786 (mips_arch_setup): New function.
7787 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7789 (mips_cannot_store_register): Likewise.
7790 (the_low_target): Update .arch_setup, .num_regs and .regmap
7791 initializers. Add .regset_bitmap initializer.
7792 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7794 * linux-bfin-low.c (the_low_target): Likewise.
7795 * linux-cris-low.c (the_low_target): Likewise.
7796 * linux-crisv32-low.c (the_low_target): Likewise.
7797 * linux-ia64-low.c (the_low_target): Likewise.
7798 * linux-m32r-low.c (the_low_target): Likewise.
7799 * linux-m68k-low.c (the_low_target): Likewise.
7800 * linux-ppc-low.c (the_low_target): Likewise.
7801 * linux-s390-low.c (the_low_target): Likewise.
7802 * linux-sh-low.c (the_low_target): Likewise.
7803 * linux-sparc-low.c (the_low_target): Likewise.
7804 * linux-tic6x-low.c (the_low_target): Likewise.
7805 * linux-x86-low.c (the_low_target): Likewise.
7806 * linux-xtensa-low.c (the_low_target): Likewise.
7807 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7808 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7809 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7811 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7812 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7814 2012-02-29 Yao Qi <yao@codesourcery.com>
7815 Pedro Alves <palves@redhat.com>
7817 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7818 `step_over_finished' is true.
7820 2012-02-27 Pedro Alves <palves@redhat.com>
7822 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7823 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7825 2012-02-27 Pedro Alves <palves@redhat.com>
7828 * linux-low.c (pid_is_stopped): New.
7829 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7831 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
7833 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7836 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7838 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7840 2012-02-24 Luis Machado <lgustavo@codesourcery>
7842 * server.c (handle_query): Advertise support for target-side
7843 breakpoint condition evaluation.
7844 (process_point_options): New function.
7845 (process_serial_event): When inserting a breakpoint, check for
7846 a target-side condition that should be evaluated.
7848 * mem-break.c: Include regcache.h and ax.h.
7849 (point_cond_list_t): New data structure.
7850 (breakpoint) <cond_list>: New field.
7851 (find_gdb_breakpoint_at): Make non-static.
7852 (delete_gdb_breakpoint_at): Clear any target-side
7854 (clear_gdb_breakpoint_conditions): New function.
7855 (add_condition_to_breakpoint): Likewise.
7856 (add_breakpoint_condition): Likewise.
7857 (gdb_condition_true_at_breakpoint): Likewise.
7858 (gdb_breakpoint_here): Return result directly instead
7859 of going through a local variable.
7861 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7862 (clear_gdb_breakpoint_conditions): Likewise.
7863 (add_breakpoint_condition): Likewise.
7864 (gdb_condition_true_at_breakpoint): Likewise.
7866 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7867 (need_step_over_p): Take target-side breakpoint condition into
7870 2012-02-24 Luis Machado <lgustavo@codesourcery>
7872 * server.h: Include tracepoint.h.
7873 (agent_mem_read, agent_get_trace_state_variable_value,
7874 agent_set_trace_state_variable_value,
7875 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7876 get_set_tsv_func_addr): New prototypes.
7878 * ax.h: New include file.
7879 * ax.c: New source file.
7881 * tracepoint.c: Include ax.h.
7882 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7883 agent_expr, eval_result_type): Move to ax.h.
7884 (parse_agent_expr): Rename to ...
7885 (gdb_parse_agent_expr): ... this, make it non-static and move
7887 (unparse_agent_expr) Rename to ...
7888 (gdb_unparse_agent_expr): ... this, make it non-static and move
7890 (eval_agent_expr): Rename to ...
7891 (eval_tracepoint_agent_expr): ... this.
7892 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7893 forward declarations.
7894 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7895 (agent_get_trace_state_variable_value): New function.
7896 (agent_set_trace_state_variable_value): New function.
7897 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7898 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7899 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7900 (condition_true_at_tracepoint): Likewise.
7901 (parse_agent_expr): Rename to ...
7902 (gdb_parse_agent_expr): ... this and move to ax.c.
7903 (unparse_agent_expr): Rename to ...
7904 (gdb_unparse_agent_expr): ... this and move to ax.c.
7905 (gdb_agent_op_name): Move to ax.c.
7906 (eval_agent_expr): Rename to ...
7907 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7909 (eval_tracepoint_agent_expr): New function.
7910 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7912 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7914 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7915 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7916 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7917 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7918 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7919 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7920 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7921 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7922 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7923 (compile_bytecodes): Remove forward declaration.
7924 (is_goto_target): Move to ax.c.
7925 (compile_bytecodes): Move to ax.c and call
7926 agent_get_trace_state_variable_value (...) and
7927 agent_set_trace_state_variable_value (...).
7929 * Makefile.in: Update ax.c and IPA dependencies.
7931 2012-02-24 Pedro Alves <palves@redhat.com>
7933 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7934 (cmd_bigqtbuffer_circular): ... this. Only handle
7935 'QTBuffer:circular:'.
7936 (handle_tracepoint_general_set): Adjust.
7938 2012-02-16 Yao Qi <yao@codesourcery.com>
7940 * inferiors.c: Move code to ...
7941 * dll.c: .... here. New.
7942 * server.h: Declare clear_dlls.
7943 * Makefile.in (SFILES): Add dll.c.
7947 2012-02-11 Yao Qi <yao@codesourcery.com>
7949 * server.c: (handle_monitor_command): Add a new parameter
7951 (handle_query): Update caller.
7953 2012-02-09 Joel Brobecker <brobecker@adacore.com>
7955 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7956 * configure, config.in: Regenerate.
7957 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7960 2012-02-02 Pedro Alves <palves@redhat.com>
7962 Try SIGKILL first, then PTRACE_KILL.
7963 * linux-low.c (linux_kill_one_lwp): New.
7964 (linux_kill_one_lwp): Rename to ...
7965 (kill_one_lwp_callback): ... this. Use the new
7968 2012-02-02 Pedro Alves <palves@redhat.com>
7970 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7973 2012-01-27 Pedro Alves <palves@redhat.com>
7975 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7976 (elf_64_file_p): Make static.
7977 (linux_pid_exe_is_elf_64_file): New.
7978 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7979 Delete declarations.
7980 (linux_pid_exe_is_elf_64_file): Declare.
7981 * linux-x86-low.c (x86_arch_setup): Use
7982 linux_pid_exe_is_elf_64_file.
7984 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7986 * linux-low.c (linux_wait_for_event_1): Rename to ...
7987 (linux_wait_for_event): ... here and merge it with former
7988 linux_wait_for_event - new variable wait_ptid, use it.
7989 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7991 2012-01-23 Pedro Alves <palves@redhat.com>
7993 * server.c (main): Avoid yet another case of infinite loop while
7994 detaching/killing after a longjmp.
7996 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7999 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8001 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8003 * hostio.c (handle_readlink): New function.
8004 (handle_vFile): Call it to handle "vFile:readlink" packets.
8006 2012-01-20 Pedro Alves <palves@redhat.com>
8007 Ulrich Weigand <ulrich.weigand@linaro.org>
8009 * server.c (handle_v_requests): Only support vAttach and vRun to
8010 start multiple processes when in extended protocol mode.
8012 2012-01-17 Pedro Alves <palves@redhat.com>
8014 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8015 memalign plus mprotect to allocate the scratch buffer.
8017 2012-01-13 Pedro Alves <palves@redhat.com>
8019 * server.c (attach_inferior): Clear `cont_thread'.
8021 2012-01-13 Pedro Alves <palves@redhat.com>
8023 * server.c (main): Avoid infinite loop while detaching/killing
8026 2012-01-09 Doug Evans <dje@google.com>
8028 * server.c (start_inferior): Set last_ptid in --wrapper case.
8030 2012-01-06 Yao Qi <yao@codesourcery.com>
8032 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8034 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8036 2012-01-04 Yao Qi <yao@codesourcery.com>
8038 * tracepoint.c (cmd_qtdp): Print debug message
8039 for static tracepoint.
8041 2012-01-04 Yao Qi <yao@codesourcery.com>
8043 * tracepoint.c (trace_vdebug): Differentiate debug message
8044 between gdbserver and IPA.
8046 2012-01-03 Yao Qi <yao@codesourcery.com>
8048 * tracepoint.c (tracepoint_was_hit): Don't collect for
8051 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8053 * terminal.h: Reformat copyright header.
8055 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8057 * server.c (gdbserver_version): Update copyright year.
8058 * gdbreplay.c (gdbreplay_version): Likewise.
8060 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8062 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8065 2011-12-18 Hui Zhu <teawater@gmail.com>
8066 * linux-low.c (linux_create_inferior): Save return value to ret.
8068 2011-12-18 Hui Zhu <teawater@gmail.com>
8070 * linux-low.c (linux_create_inferior): Save return value to ret.
8072 2011-12-16 Doug Evans <dje@google.com>
8074 * linux-low.c (linux_create_inferior): If stdio connection,
8075 redirect stdin from /dev/null, stdout to stderr.
8076 * remote-utils.c (remote_is_stdio): New static global.
8077 (remote_connection_is_stdio): New function.
8078 (remote_prepare): Handle stdio connection.
8079 (remote_open): Ditto.
8080 (remote_close): Don't close stdin for stdio connections.
8081 (read_prim,write_prim): New functions. Replace all calls to
8082 read/write to these.
8083 * server.c (main): Watch for "-" argument. Move call to
8084 remote_prepare before start_inferior.
8085 * server.h (STDIO_CONNECTION_NAME): New macro.
8086 (remote_connection_is_stdio): Declare.
8088 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8089 in debugging output.
8091 2011-12-15 Yao Qi <yao@codesourcery.com>
8093 * tracepoint.c: Include sys/syscall.h.
8094 (gdb_ust_thread): Remove preprocessor conditional.
8096 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8098 * linux-low.c (linux_detach_one_lwp): Call
8099 the_low_target.prepare_to_resume before detaching.
8101 2011-12-14 Yao Qi <yao@codesourcery.com>
8103 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8106 2011-12-14 Yao Qi <yao@codesourcery.com>
8108 * i386-low.c (i386_low_stopped_data_address): Initialize local
8111 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8115 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8116 DR_CONTROL unless necessary. Extend comments.
8117 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8118 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8120 2011-12-13 Yao Qi <yao@codesourcery.com>
8122 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8124 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8126 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8128 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8129 Print new debug message for such case.
8131 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8133 Fix overlapping memcpy.
8134 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8135 the read_inferior_memory transfer.
8136 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8137 write_inferior_memory transfer.
8138 (set_fast_tracepoint_jump): New variable buf. Use it for the
8139 read_inferior_memory and write_inferior_memory transfers.
8140 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8141 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8142 Use it for the write_inferior_memory transfer.
8143 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8146 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8148 * linux-low.c (fetch_register, store_register): Make code
8149 consistent, fix formatting.
8151 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8153 * linux-low.c (usr_store_inferior_registers): Factor out code
8154 to handle individual registers into...
8155 (store_register): ... this new function.
8157 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8159 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8160 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8161 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8162 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8163 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8164 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8165 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8166 (srv_xmlfiles): Add new XML files.
8168 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8170 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8171 (init_registers_s390_linux32v1): Add prototype.
8172 (init_registers_s390_linux32v2): Likewise.
8173 (init_registers_s390_linux64v1): Likewise.
8174 (init_registers_s390_linux64v2): Likewise.
8175 (init_registers_s390x_linux64v1): Likewise.
8176 (init_registers_s390x_linux64v2): Likewise.
8177 (s390_num_regs): Increment to 52.
8178 (s390_regmap): Add orig_r2 register.
8179 (s390_num_regs_3264): Increment to 68.
8180 (s390_regmap_3264): Add orig_r2 register.
8181 (s390_collect_ptrace_register): Handle orig_r2 register.
8182 (s390_supply_ptrace_register): Likewise.
8183 (s390_fill_last_break): New function.
8184 (s390_store_last_break): Likewise.
8185 (s390_fill_system_call): New function.
8186 (s390_store_system_call): Likewise.
8187 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8189 (s390_check_regset): New function.
8190 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8191 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8192 Update target_regsets for available register sets.
8194 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8195 Jan Kratochvil <jan.kratochvil@redhat.com>
8197 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8198 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8200 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8201 * linux-low.h (struct process_info_private): New member r_debug.
8202 * server.c (handle_qxfer_libraries): Call
8203 the_target->qxfer_libraries_svr4.
8204 (handle_qxfer_libraries_svr4): New function.
8205 (qxfer_packets): New entry "libraries-svr4".
8206 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8207 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8208 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8209 PACKET_qXfer_libraries_svr4.
8211 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8213 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8214 PSW address/mask between 8-byte and 16-byte formats.
8215 (s390_supply_ptrace_register): Likewise.
8216 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8217 basic addressing mode bit.
8219 2011-11-24 Stan Shebs <stan@codesourcery.com>
8221 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8223 2011-11-17 Stan Shebs <stan@codesourcery.com>
8225 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8226 (tracing_start_time): New global.
8227 (tracing_stop_time): New global.
8228 (tracing_user_name): New global.
8229 (tracing_notes): New global.
8230 (tracing_stop_note): New global.
8231 (cmd_qtstart): Set traceframe_usage, start_time.
8232 (stop_tracing): Set stop_time.
8233 (cmd_qtstatus): Report additional status.
8234 (cmd_qtp): New function.
8235 (handle_tracepoint_query): Call it.
8236 (cmd_qtnotes): New function.
8237 (handle_tracepoint_general_set): Call it.
8238 (get_timestamp): Rename from tsv_get_timestamp.
8240 2011-11-14 Stan Shebs <stan@codesourcery.com>
8241 Kwok Cheung Yeung <kcy@codesourcery.com>
8243 * linux-x86-low.c (small_jump_insn): New.
8244 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8245 trampoline and error message, build a trampoline and issue a small
8246 jump instruction to it.
8247 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8248 trampoline and error message.
8249 (x86_get_min_fast_tracepoint_insn_len): New.
8250 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8251 * linux-low.h (struct linux_target_ops): Add arguments to
8252 install_fast_tracepoint_jump_pad operation, add new operation.
8253 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8255 (linux_get_min_fast_tracepoint_insn_len): New function.
8256 (linux_target_op): Add new operation.
8257 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8258 (gdb_trampoline_buffer_end): Ditto.
8259 (gdb_trampoline_buffer_error): Ditto.
8260 (struct ipa_sym_addresses): Add fields for new IPA variables.
8261 (symbol_list): Add entries for new IPA variables.
8262 (struct tracepoint): Add fields to hold the address range of the
8263 trampoline used by the tracepoint.
8264 (trampoline_buffer_head): New static variable.
8265 (trampoline_buffer_tail): Ditto.
8266 (claim_trampoline_space): New function.
8267 (have_fast_tracepoint_trampoline_buffer): New function.
8268 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8270 (install_fast_tracepoint): Ditto, also add error buffer argument.
8271 (cmd_qtminftpilen): New function.
8272 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8273 (fast_tracepoint_from_trampoline_address): New function.
8274 (fast_tracepoint_collecting): Handle trampoline as part of jump
8276 (set_trampoline_buffer_space): New function.
8277 (initialize_tracepoint): Initialize new IPA variables.
8278 * target.h (struct target_ops): Add arguments to
8279 install_fast_tracepoint_jump_pad operation, add new
8280 get_min_fast_tracepoint_insn_len operation.
8281 (target_get_min_fast_tracepoint_insn_len): New.
8282 (install_fast_tracepoint_jump_pad): Add arguments.
8283 * server.h (IPA_BUFSIZ): Define.
8284 * linux-i386-ipa.c: Include extra header files.
8285 (initialize_fast_tracepoint_trampoline_buffer): New function.
8286 (initialize_low_tracepoint): Call it.
8287 * server.h (set_trampoline_buffer_space): Declare.
8288 (claim_trampoline_space): Ditto.
8289 (have_fast_tracepoint_trampoline_buffer): Ditto.
8291 2011-11-14 Yao Qi <yao@codesourcery.com>
8293 * server.c (handle_query): Handle InstallInTrace for qSupported.
8294 * tracepoint.c (add_tracepoint): Sort list.
8295 (install_tracepoint, download_tracepoint): New.
8296 (cmd_qtdp): Call them to install and download tracepoints.
8297 (sort_tracepoints): Removed.
8298 (cmd_qtstart): Update.
8300 2011-11-14 Yao Qi <yao@codesourcery.com>
8302 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8303 * mem-break.h: Declare.
8304 * tracepoint.c (cmd_qtstart): Move some code to ...
8305 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8307 (download_tracepoints): Move some code to ...
8308 (download_tracepoint_1): ... here. New.
8310 2011-11-08 Yao Qi <yao@codesourcery.com>
8312 * remote-utils.c (relocate_instruction): A comment fix.
8314 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8316 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8317 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8318 dr_status_mirror and dr_control_mirror from debug_reg_state.
8319 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8320 (i386_initial_stuff): Remove use of deleted globals.
8321 (i386_get_thread_context, i386_set_thread_context,
8322 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8323 from debug_reg_state.
8325 2011-11-05 Yao Qi <yao@codesourcery.com>
8327 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8328 address as TPOINT's.
8330 2011-11-02 Stan Shebs <stan@codesourcery.com>
8332 * tracepoint.c (agent_mem_read_string): New function.
8333 (eval_agent_expr): Call it for tracenz.
8334 * server.c (handle_query): Report support for tracenz.
8336 2011-11-02 Yao Qi <yao@codesourcery.com>
8338 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8340 2011-11-02 Yao Qi <yao@codesourcery.com>
8342 * target.h: Fix a typo in comment.
8344 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8346 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8347 clobber the breakpoints' shadows with fast tracepoint jumps.
8348 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8349 * target.c (write_inferior_memory): Also pass MYADDR down to
8352 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8354 * configure.ac: Check support for personality routine.
8355 * configure: Regenerate.
8356 * config.in: Likewise.
8357 * linux-low.c: Include <sys/personality.h>.
8358 Define ADDR_NO_RANDOMIZE if necessary.
8359 (linux_create_inferior): Disable address space randomization when
8360 forking inferior, if requested.
8361 (linux_supports_disable_randomization): New function.
8362 (linux_target_ops): Install it.
8363 * server.h (disable_randomization): Declare.
8364 * server.c (disable_randomization): New global variable.
8365 (handle_general_set): Handle QDisableRandomization.
8366 (handle_query): Likewise for qSupported.
8367 (main): Support --disable-randomization and --no-disable-randomization
8368 command line arguments.
8369 * target.h (struct target_ops): Add supports_disable_randomization.
8370 (target_supports_disable_randomization): New macro.
8372 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8374 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8376 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8377 [!PT_GETDSBT] (target_loadmap): New definition.
8378 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8379 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8380 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8381 and PT_GETDSBT to LINUX_LOADMAP.
8382 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8383 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8385 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8387 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8388 (arm_linux_hwbp_cap): New static variable.
8389 (arm_linux_get_hwbp_cap): Replace by ...
8390 (arm_linux_init_hwbp_cap): ... this new function.
8391 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8392 (arm_linux_get_hw_watchpoint_count): Likewise.
8393 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8394 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8395 (arm_prepare_to_resume): Use perror_with_name instead of error.
8397 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8399 * linux-arm-low.c: Include <signal.h>.
8400 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8401 (struct arm_linux_hwbp_cap): New data type.
8402 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8403 (struct arm_linux_hw_breakpoint): New data type.
8404 (MAX_BPTS, MAX_WPTS): Define.
8405 (struct arch_process_info, struct arch_lwp_info): New data types.
8406 (arm_linux_get_hwbp_cap): New function.
8407 (arm_linux_get_hw_breakpoint_count): Likewise.
8408 (arm_linux_get_hw_watchpoint_count): Likewise.
8409 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8410 (arm_hwbp_control_initialize): Likewise.
8411 (arm_hwbp_control_is_enabled): Likewise.
8412 (arm_hwbp_control_is_initialized): Likewise.
8413 (arm_hwbp_control_disable): Likewise.
8414 (arm_linux_hw_breakpoint_equal): Likewise.
8415 (arm_linux_hw_point_initialize): Likewise.
8416 (struct update_registers_data): New data structure.
8417 (update_registers_callback: New function.
8418 (arm_insert_point): Likewise.
8419 (arm_remove_point): Likewise.
8420 (arm_stopped_by_watchpoint): Likewise.
8421 (arm_stopped_data_address): Likewise.
8422 (arm_new_process): Likewise.
8423 (arm_new_thread): Likewise.
8424 (arm_prepare_to_resume): Likewise.
8425 (the_low_target): Register arm_insert_point, arm_remove_point,
8426 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8427 arm_new_thread, and arm_prepare_to_resume.
8429 2011-09-15 Stan Shebs <stan@codesourcery.com>
8431 * server.h (struct emit_ops): Add compare-goto fields.
8432 * tracepoint.c (gdb_agent_op_sizes): New table.
8433 (emit_eq_goto): New function.
8434 (emit_ne_goto): New function.
8435 (emit_lt_goto): New function.
8436 (emit_le_goto): New function.
8437 (emit_gt_goto): New function.
8438 (emit_ge_goto): New function.
8439 (is_goto_target): New function.
8440 (compile_bytecodes): Recognize special cases of compare-goto
8441 combinations and call specialized emitters for them.
8442 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8443 (amd64_emit_ne_goto): New function.
8444 (amd64_emit_lt_goto): New function.
8445 (amd64_emit_le_goto): New function.
8446 (amd64_emit_gt_goto): New function.
8447 (amd64_emit_ge_goto): New function.
8448 (amd64_emit_ops): Add the new functions.
8449 (i386_emit_eq_goto): New function.
8450 (i386_emit_ne_goto): New function.
8451 (i386_emit_lt_goto): New function.
8452 (i386_emit_le_goto): New function.
8453 (i386_emit_gt_goto): New function.
8454 (i386_emit_ge_goto): New function.
8455 (i386_emit_ops): Add the new functions.
8457 2011-09-08 Stan Shebs <stan@codesourcery.com>
8459 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8460 (i386_emit_epilogue): Restore %ebx.
8462 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8464 * server.c (step_thread): Remove definition.
8465 (process_serial_event): Don't handle Hs.
8466 * server.h (step_thread): Remove declaration.
8467 * target.c (set_desired_inferior): Remove use of step_thread.
8469 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8471 * linux-low.c: Include linux-procfs.h.
8472 (linux_attach_lwp_1): Update comments.
8473 (linux_attach): Scan for existing threads when attaching to a
8474 process that is the tgid.
8475 * Makefile.in: Update dependencies.
8477 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8479 * configure.srv: Add linux-procfs.o dependencies.
8481 2011-08-14 Yao Qi <yao@codesourcery.com>
8483 * target.h (struct target_ops): Fix indent.
8484 * win32-low.c (win32_target_ops): Fix comment.
8486 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8487 Yao Qi <yao@codesourcery.com>
8489 * Makefile.in (clean): Remove tic6x-*.c files.
8490 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8491 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8492 (tic6x-c64xp-linux.c): Likewise.
8493 * configure.srv: Add support for tic6x-*-uclinux.
8494 * linux-tic6x-low.c: New.
8495 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8497 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8498 Yao Qi <yao@codesourcery.com>
8500 * target.h (struct target_ops): Add read_loadmap.
8501 * linux-low.c (struct target_loadseg): New type.
8502 (struct target_loadmap): New type.
8503 (linux_read_loadmap): New function.
8504 (linux_target_ops): Add linux_read_loadmap.
8505 * server.c (handle_query): Support qXfer:fdpic:read packet.
8506 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8509 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8511 * win32-low.c: Include <stdint.h>.
8513 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8515 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8516 to the inferior here.
8517 (i386_remove_aligned_watchpoint): Ditto.
8518 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8519 fit part of the watchpoint in the debug registers.
8520 (i386_update_inferior_debug_regs): New.
8521 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8522 registers, and only update the inferior on success.
8523 (i386_low_remove_watchpoint): Ditto.
8525 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8527 * linux-low.c (compare_ints, unique, list_threads, show_process,
8528 linux_core_of_thread): Delete.
8529 (linux_target_ops): Change linux_core_of_thread to
8530 linux_common_core_of_thread.
8531 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8532 * utils.c (malloc_failure): Change type of argument.
8533 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8534 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8535 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8536 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8537 (IPA_OBJS): Add common-utils-ipa.o.
8538 (ptid_h, linux_osdata_h): New macros.
8539 (server_h): Add common/common-utils.h, common/xml-utils.h,
8540 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8542 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8543 ptid.o, buffer.o): New rules.
8544 (linux-low.o): Add common/linux-osdata.h as a dependency.
8545 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8546 * configure.ac: Add AC_HEADER_DIRENT check.
8547 * config.in: Regenerate.
8548 * configure: Regenerate.
8549 * remote-utils.c (xml_escape_text): Delete.
8550 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8551 buffer_xml_printf): Move to common/buffer.c.
8552 * server.c (main): Remove call to initialize_inferiors.
8553 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8554 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8555 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8556 internal_error, gdb_assert, gdb_assert_fail): Delete.
8557 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8558 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8560 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8561 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8562 initialize_inferiors): Delete.
8564 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8566 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8569 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8571 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8573 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8575 2011-05-26 Yao Qi <yao@codesourcery.com>
8577 * Makefile.in (thread-db.o): Track dependence to
8578 common/gdb_thread_db.h.
8579 * thread-db.c: include gdb_thread_db.h from right place.
8581 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8583 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8584 __FILE__ and __LINE__ to internal_error.
8586 2011-05-13 Doug Evans <dje@google.com>
8588 * thread-db.c (try_thread_db_load_from_sdir): New function.
8589 (try_thread_db_load_from_dir): New function.
8590 (thread_db_load_search): Handle $sdir, ignore $pdir.
8591 Remove trying of system directories if search of
8592 libthread-db-search-path fails, that is now done via $sdir.
8594 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8596 * server.c (handle_query): Add EnableDisableTracepoints to the list
8597 of supported features.
8598 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8600 (cmd_qtenable_disable): New.
8601 (cmd_qtstart): Install tracepoints even if disabled.
8602 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8603 receiving a QTEnable or QTDisable packet.
8604 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8605 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8607 (gdb_probe): Skip data collection if static tracepoint is disabled.
8609 2011-05-10 Doug Evans <dje@google.com>
8611 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8613 2011-05-04 Doug Evans <dje@google.com>
8615 * linux-low.c (linux_join): Skip process lookup.
8616 * spu-low.c (spu_join): Ditto.
8617 * server.c (join_inferiors_callback): Delete.
8618 (process_serial_event): For 'D' packet (detach) call join_inferior
8621 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8623 * README: Don't mention xscale*-*-linux*.
8624 * configure.srv (xscale*-*-linux*): Don't handle target.
8626 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8628 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8630 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8631 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8632 (i386_emit_void_call_2): Likewise.
8634 2011-04-26 Yao Qi <yao@codesourcery.com>
8636 * linux-low.c: Move common macros to linux-ptrace.h.
8637 Include linux-ptrace.h.
8638 * Makefile.in (linux_ptrace_h): New.
8639 (linux-low.o): Depends on linux-ptrace.h.
8641 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8643 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8644 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8645 (remote_prepare): New function with most of the TCP code from ...
8646 (remote_open): ... here. Detect PORT here unconditionally. Move also
8647 setting transport_is_reliable.
8648 * server.c (run_once): New variable.
8649 (gdbserver_usage): Document it.
8650 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8651 the first run if RUN_ONCE.
8652 * server.h (run_once, remote_prepare): New declarations.
8654 2011-04-19 Tom Tromey <tromey@redhat.com>
8656 * win32-low.c (handle_load_dll): Remove duplicate "the".
8658 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8660 Remove support for old Cygwin 1.5 versions.
8661 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8662 function to avoid warning.
8663 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8666 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8668 * gdbserver/server.h (Macro _): Define it if not available.
8670 2011-03-14 Michael Snyder <msnyder@vmware.com>
8672 * hostio.c (handle_close): Remove unnecessary null test.
8674 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8676 * Makefile.in (maintainer-clean realclean distclean): Remove
8677 "make ... subdir_do" command.
8679 2011-03-10 Michael Snyder <msnyder@vmware.com>
8681 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8683 * server.c (handle_v_run): Free alloced buffer on early return.
8685 2011-03-09 Yao Qi <yao@codesourcery.com>
8688 2011-03-04 Yao Qi <yao@codesourcery.com>
8690 * Makefile.in: Remove GNU make feature --directory.
8692 2011-03-05 Yao Qi <yao@codesourcery.com>
8694 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8695 (subdir_do): New make target. Copied from gdb/Makefile.
8696 (maintainer-clean, realclean, distclean, clean): Call corresponding
8697 make targets in common/Makefile.
8699 2011-02-11 Yao Qi <yao@codesourcery.com>
8701 * configure.ac: Call AC_PROG_RANLIB.
8702 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8703 * configure: Regenerate.
8705 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8707 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8709 2011-03-06 Yao Qi <yao@codesourcery.com>
8711 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8713 2011-03-05 Yao Qi <yao@codesourcery.com>
8715 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8716 (subdir_do): New make target. Copied from gdb/Makefile.
8717 (maintainer-clean, realclean, distclean, clean): Call corresponding
8718 make targets in common/Makefile.
8720 2011-03-04 Yao Qi <yao@codesourcery.com>
8722 * Makefile.in: Remove GNU make feature --directory.
8724 2011-03-04 Michael Snyder <msnyder@vmware.com>
8726 * server.c (queue_stop_reply): Call xmalloc not malloc.
8728 2011-03-02 Michael Snyder <msnyder@vmware.com>
8730 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8732 2011-02-28 Michael Snyder <msnyder@vmware.com>
8734 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8735 (cmd_qtframe): Ditto.
8736 (cmd_qtbuffer): Ditto.
8737 (cmd_bigqtbuffer): Ditto.
8739 * utils.c (decimal2str): Initialize 'width' to nine, then
8742 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8744 * hostio.c (require_data): Free *data, not data.
8746 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8748 * hostio.c (require_data): Use free, not xfree.
8750 2011-02-27 Michael Snyder <msnyder@vmware.com>
8752 * server.c (handle_query): Discard unused value.
8754 * hostio.c (require_data): Free malloc memory before returning
8757 2011-02-26 Michael Snyder <msnyder@vmware.com>
8759 * linux-low.c (list_threads): Call closedir for dirent.
8761 2011-02-27 Michael Snyder <msnyder@vmware.com>
8763 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8764 a case statement falls through.
8766 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8768 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8771 2011-02-26 Michael Snyder <msnyder@vmware.com>
8773 * utils.c (decimal2str): Eliminate dead code and dead param.
8774 (pulongest): Drop dead param from call to decimal2str.
8777 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8779 Revert the following patch (not approved yet):
8780 2011-02-21 Hui Zhu <teawater@gmail.com>
8781 * tracepoint.c (tp_printf): New function.
8782 (eval_agent_expr): Handle gdb_agent_op_printf.
8784 2011-02-21 Hui Zhu <teawater@gmail.com>
8786 * tracepoint.c (tp_printf): New function.
8787 (eval_agent_expr): Handle gdb_agent_op_printf.
8789 2011-02-18 Tom Tromey <tromey@redhat.com>
8791 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8792 (tracepoint.o): Likewise.
8793 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8794 (gdb_agent_op_names): Likewise.
8796 2011-02-18 Tom Tromey <tromey@redhat.com>
8798 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8799 gdb_agent_op_rot>: New constants.
8800 (gdb_agent_op_names): Add pick and roll.
8801 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8804 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8806 * aclocal.m4: Regenerated with aclocal-1.11.1.
8808 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8810 * server.c (handle_qxfer_traceframe_info): New.
8811 (qxfer_packets): Register "traceframe-info".
8812 (handle_query): Report support for qXfer:traceframe-info:read+.
8813 * tracepoint.c (match_blocktype): New.
8814 (traceframe_find_block_type): Rename to ...
8815 (traceframe_walk_blocks): ... this. Add callback filter argument,
8817 (traceframe_find_block_type): New, reimplemented on top of
8818 traceframe_walk_blocks.
8819 (build_traceframe_info_xml): New.
8820 (traceframe_read_info): New.
8821 * server.h (traceframe_read_info): Declare.
8823 2011-02-11 Yao Qi <yao@codesourcery.com>
8825 * configure.ac: Call AC_PROG_RANLIB.
8826 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8827 * configure: Regenerate.
8829 2011-02-07 Pedro Alves <pedro@codesourcery.com>
8831 * server.c (gdb_read_memory): Change return semantics to allow
8833 (handle_search_memory_1): Adjust.
8834 (process_serial_event) <'m' packet>: Handle partial transfers.
8835 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8837 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8839 * regcache.c (init_register_cache): Initialize
8840 regcache->register_status.
8841 (free_register_cache): Release regcache->register_status.
8842 (regcache_cpy): Copy register_status.
8843 (registers_to_string): Print 'x's for unavailable registers.
8844 (supply_register): Mark the register's status valid or
8845 unavailable, depending on whether a buffer was passed in or not.
8846 (supply_register_zeroed): New.
8847 (supply_regblock): Mark the registers' status valid or
8848 unavailable, depending on whether a buffer was passed in or not.
8849 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8850 (struct regcache): New `register_status' field.
8851 (supply_register_zeroed): Declare.
8852 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8853 supply_register_zeroed, rather than passing a NULL buffer to
8855 * tracepoint.c (fetch_traceframe_registers): Update comment.
8857 2011-01-28 Pedro Alves <pedro@codesourcery.com>
8859 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8862 2011-01-25 Pedro Alves <pedro@codesourcery.com>
8864 * server.h (decode_xfer_write): Change prototype.
8865 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8866 and don't extract the annex here.
8867 * server.c (decode_xfer_read): Remove `annex' parameter,
8868 and don't extract the annex here.
8870 (struct qxfer): New.
8871 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8872 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8873 (handle_qxfer_statictrace): New functions, abstracted out from
8874 handle_query, and made to use the struct qxfer interface.
8875 (handle_threads_qxfer_proper): Rename to ...
8876 (handle_qxfer_threads_proper): ... this.
8877 (handle_threads_qxfer): Rename to ...
8878 (handle_qxfer_threads): ... this. Adjust.
8879 (qxfer_packets): New array.
8880 (handle_qxfer): New function.
8881 (handle_query): Use handle_qxfer.
8883 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8885 * gdbreplay.c: Shorten lines of >= 80 columns.
8886 * linux-low.c: Ditto.
8887 * linux-ppc-low.c: Ditto.
8888 * linux-s390-low.c: Ditto.
8889 * linux-sparc-low.c: Ditto.
8890 * linux-x86-low.c: Ditto.
8891 * linux-xtensa-low.c: Ditto.
8892 * mem-break.c: Ditto.
8894 * regcache.h: Ditto.
8895 * remote-utils.c: Ditto.
8898 * thread-db.c: Ditto.
8899 * tracepoint.c: Ditto.
8901 * win32-low.h: Ditto.
8903 2011-01-05 Joel Brobecker <brobecker@adacore.com>
8905 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8908 2011-01-01 Joel Brobecker <brobecker@adacore.com>
8910 * server.c (gdbserver_version): Update copyright year in version
8912 * gdbreplay.c (gdbreplay_version): Ditto.
8914 2010-12-29 Jie Zhang <jie.zhang@analog.com>
8916 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8917 * linux-bfin-low.c: New file.
8918 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8919 PT_DATA_ADDR for BFIN targets.
8920 * Makefile.in (SFILES): Add linux-bfin-low.c.
8921 (clean): Remove reg-bfin.c.
8922 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8923 * README: Mention supported Blackfin targets.
8925 2010-12-23 Mike Frysinger <vapier@gentoo.org>
8927 * .gitignore: New file.
8929 2010-11-16 Mike Frysinger <vapier@gentoo.org>
8931 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8933 2010-10-22 Jie Zhang <jie@codesourcery.com>
8935 * Makefile.in: Add FLAGS_TO_PASS variable.
8936 (install): Remove dependency of install-only and recursively
8937 invoke make for install-only.
8939 2010-10-04 Doug Evans <dje@google.com>
8941 * Makefile.in (uninstall): Use $(DESTDIR).
8943 2010-09-24 Pedro Alves <pedro@codesourcery.com>
8947 * linux-x86-low.c (compat_siginfo_from_siginfo)
8948 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8949 si_code is < 0. Check for si_code == SI_TIMER before checking for
8952 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8954 * lynx-i386-low.c: New file.
8955 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8957 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8959 * lynx-low.c (ptrace_request_to_str): Remove handling for
8960 request values that have been removed in LynxOS 5.x.
8962 2010-09-13 Joel Brobecker <brobecker@adacore.com>
8964 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8967 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8969 * configure.ac: Add --enable-inprocess-agent option.
8970 * configure: Rebuilt.
8972 2010-09-06 Yao Qi <yao@codesourcery.com>
8974 * linux-low.c (linux_kill): Remove unused variable.
8975 (linux_stabilize_threads): Likewise.
8976 * server.c (start_inferior): Likewise.
8977 (queue_stop_reply_callback): Likewise.
8978 * tracepoint.c (do_action_at_tracepoint): Likewise.
8980 2010-09-06 Yao Qi <yao@codesourcery.com>
8982 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8985 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8987 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8989 2010-09-06 Pedro Alves <pedro@codesourcery.com>
8991 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8994 2010-09-01 Joel Brobecker <brobecker@adacore.com>
8996 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8997 gdbserver/lynx-ppc-low.c: New files.
8998 * Makefile.in (lynx_low_h): New variable.
8999 (lynx-low.o, lynx-ppc-low.o): New rules.
9000 * configure.ac: On LynxOS, link with -lnetinet.
9001 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9002 * configure: regenerate.
9004 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9006 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9007 * configure.ac: Add check for vasprintf and vsnprintf.
9008 * configure, config.in: Regenerate.
9009 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9011 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9013 * gdbreplay.c: Move include of alloca.h up, next to include of
9015 * server.h: Add include of malloc.h.
9016 * mem-break.c: Remove include of malloc.h.
9017 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9019 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9021 * Makefile.in (memmem.o): Build with -Wno-error.
9023 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9025 * utils.c (xsnprintf): Make non-static.
9026 * server.h: Add xsnprintf declaration.
9027 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9028 replace calls to snprintf by calls to xsnprintf throughout.
9030 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9032 * configure.ac: Add configure check for alloca.
9033 * configure, config.in: Regenerate.
9034 * server.h: Include alloca.h if it exists.
9035 * gdbreplay.c: Include alloca.h if it exists.
9037 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9039 * linux-low.c (__SIGRTMIN): Define if not already defined.
9040 (linux_create_inferior): Check for __ANDROID__ rather than
9042 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9043 are already deferred.
9044 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9045 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9046 stopped and already has a pending signal to report.
9047 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9048 a pending signal to report or is moving out of a jump pad.
9049 (linux_init_signals): Check for __ANDROID__ rather than
9052 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9054 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9055 debug_threads check. Avoid a linear search when not doing debug
9058 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9060 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9061 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9062 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9063 (process_event): Change local fd's type to gdb_fildes_t.
9064 (create_file_handler): Adjust prototype.
9065 (delete_file_handler): Adjust prototype.
9066 (handle_file_event): Adjust prototype. Use pfildes.
9067 (create_file_event): Adjsut prototype.
9068 * remote-utils.c (remote_desc, listen_desc): Change type to
9070 * server.h: New gdb_fildes_t typedef.
9071 [USE_WIN32API]: Include winsock2.h.
9072 (delete_file_handler, add_file_handler): Adjust prototypes.
9074 * utils.c (pfildes): New.
9076 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9078 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9079 * configure: Regenerate.
9081 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9083 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9084 (linux_done_accessing_memory): ... this.
9085 (linux_target_ops): Adjust.
9086 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9087 * nto-low.c (nto_target_ops): Adjust comment.
9088 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9089 * spu-low.c (spu_target_ops): Adjust comment.
9090 * target.h (target_ops): Rename unprepare_to_access_memory field
9091 to done_accessing_memory.
9092 (unprepare_to_access_memory): Rename to ...
9093 (done_accessing_memory): ... this.
9095 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9097 * linux-low.c (linux_prepare_to_access_memory): New.
9098 (linux_unprepare_to_access_memory): New.
9099 (linux_target_ops): Install them.
9100 * server.c (read_memory): Rename to ...
9101 (gdb_read_memory): ... this. Use
9102 prepare_to_access_memory/prepare_to_access_memory.
9103 (write_memory): Rename to ...
9104 (gdb_write_memory): ... this. Use
9105 prepare_to_access_memory/prepare_to_access_memory.
9106 (handle_search_memory_1): Adjust.
9107 (process_serial_event): Adjust.
9108 * target.h (struct target_ops): New fields
9109 prepare_to_access_memory and unprepare_to_access_memory.
9110 (prepare_to_access_memory, unprepare_to_access_memory): New.
9111 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9112 prepare_to_access_memory/prepare_to_access_memory.
9113 * nto-low.c (nto_target_ops): Adjust.
9114 * spu-low.c (spu_target_ops): Adjust.
9115 * win32-low.c (win32_target_ops): Adjust.
9117 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9119 * Makefile.in (WARN_CFLAGS): Get it from configure.
9120 (WERROR_CFLAGS): New.
9121 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9122 * configure.ac: Introduce --enable-werror, which adds -Werror to
9123 the compiler command line. Enabled by default. Disable with
9124 --disable-werror. Add -Wdeclaration-after-statement
9125 Wpointer-arith and -Wformat-nonliteral to warning flags.
9126 * configure: Regenerate.
9128 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9130 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9132 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9134 * gdbreplay.c (remote_error): New.
9136 (expect): Use gdbchar. Check for error reading from GDB.
9137 Clarify sync error output.
9138 (play): Check for errors writing to GDB.
9139 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9140 * remote-utils.c (getpkt): Check for errors writing to the remote
9143 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9145 * linux-low.c (linux_wait_1): Move non-debugging code out of
9146 `debug_threads' control.
9148 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9150 * linux-low.c (linux_wait_1): Don't set last_status here.
9151 * server.c (push_event, queue_stop_reply_callback): Assert we're
9152 not pushing a TARGET_WAITKIND_IGNORE event.
9153 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9154 (myresume, handle_target_event): Set the thread's last_resume_kind
9155 and last_status from the target returned status.
9157 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9161 * linux-x86-low.c (update_debug_registers_callback): New.
9162 (i386_dr_low_set_addr): Use it.
9163 (i386_dr_low_get_addr): New.
9164 (i386_dr_low_set_control): Use update_debug_registers_callback.
9165 (i386_dr_low_get_control): New.
9166 (i386_dr_low_get_status): Adjust.
9167 * linux-low.c (linux_stop_lwp): New.
9168 * linux-low.h (linux_stop_lwp): Declare.
9170 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9171 argument instead of a i386_debug_reg_state.
9172 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9173 a i386_debug_reg_state.
9174 (i386_insert_aligned_watchpoint): Adjust.
9175 (i386_remove_aligned_watchpoint): Adjust.
9176 (i386_low_stopped_data_address): Read the debug registers from the
9177 inferior instead of from the mirrors.
9178 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9179 (i386_dr_low_get_addr): Declare.
9180 (i386_dr_low_get_control): Declare.
9181 (i386_dr_low_get_status): Change prototype.
9183 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9184 (i386_dr_low_get_addr): New.
9185 (i386_dr_low_get_control): New.
9186 (i386_dr_low_get_status): Adjust prototype. Return
9188 (i386_initial_stuff): Clear dr_status_mirror and
9190 (i386_get_thread_context): Adjust.
9191 (i386_set_thread_context): Adjust.
9192 (i386_thread_added): Adjust.
9194 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9196 * linux-low.h (linux_thread_area): Delete declaration.
9198 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9200 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9201 after its termination.
9203 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9205 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9206 (gdb_wants_all_stopped): Delete.
9207 (linux_wait_1): Don't call them.
9208 * server.c (handle_v_cont): Tag all threads as want-stopped.
9209 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9210 stopped as "client-wants-stopped".
9212 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9214 * Makefile.in (signals_h): New.
9215 (server_h): Depend on it.
9216 (server.o): Don't depend on $(signals_def).
9217 (signals.o): Depend on $(signals_def).
9219 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9221 * Makefile.in (signals_def): New.
9222 (server_h): Append include/gdb/signals.h and signals_def.
9223 (server.o): Append signals_def.
9225 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9227 * server.c (handle_target_event): Use target_signal_to_host for
9228 resume_info.sig initialization.
9229 * target.h (struct thread_resume) <sig>: New comment.
9231 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9233 * server.c (handle_query): strcpy() the returned string from paddress()
9234 instead of sprintf().
9235 * utils.c (paddress): Return phex_nz().
9237 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9239 * server.c (handle_v_cont): Call mourn_inferior if process
9241 (myresume): Likewise.
9243 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9245 Static tracepoints, and integration with UST.
9247 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9248 * mem-break.c (uninsert_all_breakpoints)
9249 (reinsert_all_breakpoints): New.
9250 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9251 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9252 (gdb_agent_ust_loaded, helper_thread_id)
9253 (gdb_agent_helper_thread_id): New macros.
9254 (struct ipa_sym_addresses): Add addr_ust_loaded,
9255 addr_helper_thread_id, addr_cmd_buf.
9256 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9257 (in_process_agent_loaded_ust): New.
9258 (write_e_ust_not_loaded): New.
9259 (maybe_write_ipa_ust_not_loaded): New.
9260 (struct collect_static_trace_data_action): New.
9261 (enum tracepoint_type) <static_tracepoint>: New.
9262 (struct tracepoint) <handle>: Mention static tracepoints.
9263 (struct static_tracepoint_ctx): New.
9264 (CMD_BUF_SIZE): New.
9265 (add_tracepoint_action): Handle static tracepoint actions.
9266 (unprobe_marker_at): New.
9267 (clear_installed_tracepoints): Handle static tracepoints.
9268 (cmd_qtdp): Handle static tracepoints.
9269 (probe_marker_at): New.
9270 (cmd_qtstart): Handle static tracepoints.
9271 (response_tracepoint): Handle static tracepoints.
9272 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9273 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9274 (get_context_regcache): Handle static tracepoints.
9275 (do_action_at_tracepoint): Handle static tracepoint actions.
9276 (traceframe_find_block_type): Handle static trace data blocks.
9277 (traceframe_read_sdata): New.
9278 (download_tracepoints): Download static tracepoint actions.
9279 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9280 (GDB_PROBE_NAME): New.
9285 (ust_marker_to_static_tracepoint): New.
9287 (collect_ust_data_at_tracepoint): New.
9288 (gdb_ust_probe): New.
9289 (UNIX_PATH_MAX, SOCK_DIR): New.
9290 (gdb_ust_connect_sync_socket): New.
9291 (resume_thread, stop_thread): New.
9292 (run_inferior_command): New.
9293 (init_named_socket): New.
9294 (gdb_ust_socket_init): New.
9295 (cstr_to_hexstr): New.
9297 (first_marker, next_marker): New.
9298 (response_ust_marker): New.
9299 (cmd_qtfstm, cmd_qtsstm): New.
9300 (unprobe_marker_at, probe_marker_at): New.
9301 (cmd_qtstmat, gdb_ust_thread): New.
9302 (gdb_ust_init): New.
9303 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9304 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9306 (x86_64_st_collect_regmap): New.
9307 (X86_64_NUM_ST_COLLECT_GREGS): New.
9308 (AMD64_RIP_REGNUM): New.
9309 (supply_static_tracepoint_registers): New.
9310 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9312 (i386_st_collect_regmap): New.
9313 (i386_NUM_ST_COLLECT_GREGS): New.
9314 (supply_static_tracepoint_registers): New.
9315 * server.c (handle_query): Handle qXfer:statictrace:read.
9316 <qSupported>: Report support for StaticTracepoints, and
9317 qXfer:statictrace:read features.
9318 * server.h (traceframe_read_sdata)
9319 (supply_static_tracepoint_registers): Declare.
9320 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9321 (unpack_varlen_hex): Include in IPA build.
9322 * Makefile.in (ustlibs, ustinc): New.
9323 (IPA_OBJS): Add remote-utils-ipa.o.
9324 ($(IPA_LIB)): Link -ldl and -lpthread.
9326 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9327 * config.in, configure: Regenerate.
9329 2010-06-20 Ian Lance Taylor <iant@google.com>
9330 Pedro Alves <pedro@codesourcery.com>
9332 * linux-x86-low.c (always_true): Delete.
9333 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9334 trying to fool the compiler with always_true.
9336 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9338 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9339 conditions in gdbserver.
9341 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9343 * spu-low.c (spu_read_memory): Wrap around local store limit.
9344 (spu_write_memory): Likewise.
9346 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9348 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9349 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9351 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9353 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9354 uses with LONGEST uses.
9356 2010-06-14 Stan Shebs <stan@codesourcery.com>
9357 Pedro Alves <pedro@codesourcery.com>
9361 * linux-x86-low.c: Include limits.h.
9366 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9367 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9368 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9369 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9370 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9371 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9372 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9373 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9374 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9375 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9376 (amd64_emit_void_call_2): New.
9377 (amd64_emit_ops): New.
9378 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9379 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9380 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9381 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9382 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9383 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9384 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9385 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9386 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9387 (i386_emit_stack_adjust, i386_emit_int_call_1)
9388 (i386_emit_void_call_2): New.
9389 (i386_emit_ops): New.
9390 (x86_emit_ops): New.
9391 (the_low_target): Install x86_emit_ops.
9392 * server.h (struct emit_ops): New.
9393 (get_raw_reg_func_addr): Declare.
9394 (current_insn_ptr, emit_error): Declare.
9395 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9396 (set_trace_state_variable_value): New defines.
9397 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9398 addr_get_trace_state_variable_value and
9399 addr_set_trace_state_variable_value.
9400 (symbol_list): New fields for get_raw_reg,
9401 get_trace_state_variable_value and set_trace_state_variable_value.
9402 (condfn): New typedef.
9403 (struct tracepoint): New field `compiled_cond'.
9404 (do_action_at_tracepoint): Clear compiled_cond.
9405 (get_trace_state_variable_value, set_trace_state_variable_value):
9407 (condition_true_at_tracepoint): If there's a compiled condition,
9409 (current_insn_ptr, emit_error): New globals.
9410 (struct bytecode_address): New.
9411 (get_raw_reg_func_addr): New.
9412 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9413 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9414 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9415 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9416 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9417 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9418 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9419 (compile_tracepoint_condition, compile_bytecodes): New.
9420 * target.h (emit_ops): Forward declare.
9421 (struct target_ops): New field emit_ops.
9422 (target_emit_ops): New.
9423 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9424 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9425 * linux-low.c (linux_emit_ops): New.
9426 (linux_target_ops): Install it.
9427 * linux-low.h (struct linux_target_ops): New field emit_ops.
9429 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9431 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9432 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9434 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9435 Stan Shebs <stan@codesourcery.com>
9437 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9438 (all): Depend on $(extra_libraries).
9439 (install-only): Install the IPA.
9440 (IPA_OBJS, IPA_LIB): New.
9441 (clean): Remove the IPA lib.
9442 (IPAGENT_CFLAGS): New.
9443 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9444 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9445 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9446 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9447 * configure.ac: Check for atomic builtins support in the compiler.
9448 (IPA_DEPFILES, extra_libraries): Define.
9449 * configure.srv (ipa_obj): Add description.
9450 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9451 (i[34567]86-*-linux*): Set ipa_obj.
9452 (x86_64-*-linux*): Set ipa_obj.
9453 * linux-low.c (stabilizing_threads): New.
9454 (supports_fast_tracepoints): New.
9455 (linux_detach): Stabilize threads before detaching.
9456 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9457 the lwp is either not stabilizing, or is moving out of a jump pad.
9458 (linux_fast_tracepoint_collecting): New.
9459 (maybe_move_out_of_jump_pad): New.
9460 (enqueue_one_deferred_signal): New.
9461 (dequeue_one_deferred_signal): New.
9462 (linux_wait_for_event_1): If moving out of a jump pad, defer
9463 pending signals to later.
9464 (linux_stabilize_threads): New.
9465 (linux_wait_1): Check if threads need moving out of jump pads, and
9467 (stuck_in_jump_pad_callback): New.
9468 (move_out_of_jump_pad_callback): New.
9470 (linux_resume_one_lwp): Handle moving out of jump pads.
9471 (linux_set_resume_request): Dequeue deferred signals.
9472 (need_step_over_p): Also step over fast tracepoint jumps.
9473 (start_step_over): Also uninsert fast tracepoint jumps.
9474 (finish_step_over): Also reinsert fast tracepoint jumps.
9475 (linux_install_fast_tracepoint_jump): New.
9476 (linux_target_ops): Install linux_stabilize_threads and
9477 linux_install_fast_tracepoint_jump_pad.
9478 * linux-low.h (linux_target_ops) <get_thread_area,
9479 install_fast_tracepoint_jump_pad>: New fields.
9480 (struct lwp_info) <collecting_fast_tracepoint,
9481 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9482 (linux_get_thread_area): Declare.
9483 * linux-x86-low.c (jump_insn): New.
9484 (x86_get_thread_area): New.
9485 (append_insns): New.
9487 (amd64_install_fast_tracepoint_jump_pad): New.
9488 (i386_install_fast_tracepoint_jump_pad): New.
9489 (x86_install_fast_tracepoint_jump_pad): New.
9490 (the_low_target): Install x86_get_thread_area and
9491 x86_install_fast_tracepoint_jump_pad.
9492 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9493 (struct fast_tracepoint_jump): New.
9494 (fast_tracepoint_jump_insn): New.
9495 (fast_tracepoint_jump_shadow): New.
9496 (find_fast_tracepoint_jump_at): New.
9497 (fast_tracepoint_jump_here): New.
9498 (delete_fast_tracepoint_jump): New.
9499 (set_fast_tracepoint_jump): New.
9500 (uninsert_fast_tracepoint_jumps_at): New.
9501 (reinsert_fast_tracepoint_jumps_at): New.
9502 (set_breakpoint_at): Use write_inferior_memory.
9503 (uninsert_raw_breakpoint): Use write_inferior_memory.
9504 (check_mem_read): Mask out fast tracepoint jumps.
9505 (check_mem_write): Mask out fast tracepoint jumps.
9506 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9507 (set_fast_tracepoint_jump): Declare.
9508 (delete_fast_tracepoint_jump)
9509 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9510 (reinsert_fast_tracepoint_jumps_at): Declare.
9511 * regcache.c: Don't compile many functions when building the
9512 in-process agent library.
9513 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9514 the register buffer in the heap.
9515 (free_register_cache): If the register buffer isn't owned by the
9516 regcache, don't free it.
9517 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9518 pre-existing register caches.
9519 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9521 (convert_ascii_to_int): : Constify `from' parameter type.
9522 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9523 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9524 the needed buffer in-place.
9525 (relocate_instruction): New.
9526 * server.c (handle_query) <qSymbols>: If the target supports
9527 tracepoints, give it a chance of looking up symbols. Report
9528 support for fast tracepoints.
9529 (handle_status): Stabilize threads.
9530 (process_serial_event): Adjust.
9531 * server.h (struct fast_tracepoint_jump): Forward declare.
9532 (struct process_info) <fast_tracepoint_jumps>: New field.
9533 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9534 (decode_X_packet, decode_M_packet): Adjust.
9535 (relocate_instruction): Declare.
9536 (in_process_agent_loaded): Declare.
9537 (tracepoint_look_up_symbols): Declare.
9538 (struct fast_tpoint_collect_status): Declare.
9539 (fast_tracepoint_collecting): Declare.
9540 (force_unlock_trace_buffer): Declare.
9541 (handle_tracepoint_bkpts): Declare.
9542 (initialize_low_tracepoint)
9543 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9544 * target.h (struct target_ops) <stabilize_threads,
9545 install_fast_tracepoint_jump_pad>: New fields.
9546 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9547 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9548 [HAVE_STDINT_H]: Include stdint.h.
9549 (trace_debug_1): Rename to ...
9550 (trace_vdebug): ... this.
9551 (trace_debug): Rename to ...
9552 (trace_debug_1): ... this. Add `level' parameter.
9554 (ATTR_USED, ATTR_NOINLINE): New.
9555 (IP_AGENT_EXPORT): New.
9556 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9557 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9558 (about_to_request_buffer_space, trace_buffer_is_full)
9559 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9560 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9561 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9562 (traceframe_write_count, traceframes_created)
9563 (trace_state_variables)
9564 New renaming defines.
9565 (struct ipa_sym_addresses): New.
9566 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9568 (ipa_sym_addrs): New.
9569 (all_tracepoint_symbols_looked_up): New.
9570 (in_process_agent_loaded): New.
9571 (write_e_ipa_not_loaded): New.
9572 (maybe_write_ipa_not_loaded): New.
9573 (tracepoint_look_up_symbols): New.
9574 (debug_threads) [IN_PROCESS_AGENT]: New.
9575 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9576 (UNKNOWN_SIDE_EFFECTS): New.
9577 (stop_tracing): New.
9578 (flush_trace_buffer): New.
9579 (stop_tracing_bkpt): New.
9580 (flush_trace_buffer_bkpt): New.
9581 (read_inferior_integer): New.
9582 (read_inferior_uinteger): New.
9583 (read_inferior_data_pointer): New.
9584 (write_inferior_data_pointer): New.
9585 (write_inferior_integer): New.
9586 (write_inferior_uinteger): New.
9587 (struct collect_static_trace_data_action): Delete.
9588 (enum tracepoint_type): New.
9589 (struct tracepoint) <type>: New field `type'.
9590 <actions_str, step_actions, step_actions_str>: Only include in
9592 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9593 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9594 (tracepoints): Use IP_AGENT_EXPORT.
9595 (last_tracepoint): Don't include in the IPA.
9596 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9597 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9598 (alloced_trace_state_variables): New.
9599 (trace_state_variables): Use IP_AGENT_EXPORT.
9600 (traceframe_t): Delete unused variable.
9601 (circular_trace_buffer): Don't include in the IPA.
9602 (trace_buffer_start): Delete.
9603 (struct trace_buffer_control): New.
9604 (trace_buffer_free): Delete.
9605 (struct ipa_trace_buffer_control): New.
9606 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9607 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9609 (trace_buffer_ctrl): New.
9610 (TRACE_BUFFER_CTRL_CURR): New.
9611 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9612 Reimplement as macros.
9613 (trace_buffer_wrap): Delete.
9614 (traceframe_write_count, traceframe_read_count)
9615 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9616 (struct tracepoint_hit_ctx) <type>: New field.
9617 (struct fast_tracepoint_ctx): New.
9618 (memory_barrier): New.
9620 (record_tracepoint_error): Update atomically in the IPA.
9621 (clear_inferior_trace_buffer): New.
9622 (about_to_request_buffer_space): New.
9623 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9624 updating the same buffer.
9625 (add_tracepoint): Default the tracepoint's type to trap
9626 tracepoint, and orig_size to -1.
9627 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9629 (create_trace_state_variable): New parameter `gdb'. Handle it.
9630 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9631 (cmd_qtdp): Handle fast tracepoints.
9633 (max_jump_pad_size): New.
9634 (gdb_jump_pad_head): New.
9635 (get_jump_space_head): New.
9636 (claim_jump_space): New.
9637 (sort_tracepoints): New.
9638 (MAX_JUMP_SIZE): New.
9639 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9641 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9642 support. Upload fast traceframes, and delete internal IPA
9644 (stop_tracing_handler): New.
9645 (flush_trace_buffer_handler): New.
9646 (cmd_qtstop): Upload fast tracepoints.
9647 (response_tracepoint): Handle fast tracepoints.
9648 (tracepoint_finished_step): Upload fast traceframes. Set the
9649 tracepoint hit context's tracepoint type.
9650 (handle_tracepoint_bkpts): New.
9651 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9652 type. Add comment about fast tracepoints.
9653 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9654 non-existing action_str field.
9655 (get_context_regcache): Handle fast tracepoints.
9656 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9658 (fast_tracepoint_from_jump_pad_address): New.
9659 (fast_tracepoint_from_ipa_tpoint_address): New.
9660 (collecting_t): New.
9661 (force_unlock_trace_buffer): New.
9662 (fast_tracepoint_collecting): New.
9665 (write_inferior_data_ptr): New.
9666 (target_tp_heap): New.
9667 (target_malloc): New.
9668 (download_agent_expr): New.
9670 (download_tracepoints): New.
9671 (download_trace_state_variables): New.
9672 (upload_fast_traceframes): New.
9673 (IPA_FIRST_TRACEFRAME): New.
9674 (IPA_NEXT_TRACEFRAME_1): New.
9675 (IPA_NEXT_TRACEFRAME): New.
9676 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9677 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9678 (gdb_jump_pad_buffer_end): New.
9679 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9680 (initialize_tracepoint): Adjust.
9681 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9682 buffer. Initialize the low module.
9683 * utils.c (PREFIX, TOOLNAME): New.
9684 (malloc_failure): Use PREFIX.
9685 (error): In the IPA, an error causes an exit.
9686 (fatal, warning): Use PREFIX.
9687 (internal_error): Use TOOLNAME.
9688 (NUMCELLS): Increase to 10.
9689 * configure, config.in: Regenerate.
9691 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9693 * server.c (handle_query) <qSupported>: Do two passes over the
9694 qSupported string to avoid nesting strtok.
9696 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9698 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9700 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9702 * configure: Regenerate.
9703 * proc-service.list: New.
9705 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9707 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9710 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9712 * gdbreplay.c (remote_open): Check error return from socket() call by
9713 its equality to -1 not by it being negative.
9714 * remote-utils.c (remote_open): Likewise.
9716 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9718 * config.h: Regenerate.
9720 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9722 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9723 doesn't provide PTRACE_GET_THREAD_AREA.
9725 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9727 * linux-m68k-low.c: Include <asm/ptrace.h>
9728 (ps_get_thread_area): Implement.
9730 2010-05-03 Doug Evans <dje@google.com>
9732 * event-loop.c (struct callback_event): New struct.
9733 (callback_list): New global.
9734 (append_callback_event, delete_callback_event): New functions.
9735 (process_callback): New function.
9736 (start_event_loop): Call it.
9737 * remote-utils.c (NOT_SCHEDULED): Define.
9738 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9739 moved out of readchar.
9740 (readchar): Rewrite. Call reschedule before returning.
9741 (reset_readchar): New function.
9742 (remote_close): Call it.
9743 (process_remaining, reschedule): New functions.
9744 * server.h (callback_handler_func): New typedef.
9745 (append_callback_event, delete_callback_event): Declare.
9747 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9749 * proc-service.c (ps_pglobal_lookup): Use
9750 thread_db_look_up_one_symbol.
9751 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9752 parameter. Use it instead of all_symbols_looked_up.
9753 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9755 (all_symbols_looked_up): Don't declare.
9756 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9757 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9759 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9760 Set all_symbols_looked_up here.
9761 (thread_db_look_up_one_symbol): New.
9762 (thread_db_get_tls_address): Adjust.
9763 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9764 thread_db object on the heap, and tentatively set it in the
9766 (thread_db_init): Don't set all_symbols_looked_up here.
9767 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9769 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9771 * linux-low.c (linux_kill, linux_detach): Adjust.
9772 (status_pending_p_callback): Remove redundant statement. Check
9773 for !TARGET_WAITIKIND_IGNORE, instead of
9774 TARGET_WAITKIND_STOPPED.
9775 (handle_tracepoints): Make sure LWP is locked. Adjust.
9776 (linux_wait_for_event_1): Adjust.
9777 (linux_cancel_breakpoints): New.
9778 (unsuspend_one_lwp): New.
9779 (unsuspend_all_lwps): New.
9780 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9781 (send_sigstop_callback): Change return type to int, add new
9782 `except' parameter and handle it.
9783 (suspend_and_send_sigstop_callback): New.
9784 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9785 pass them down. If SUSPEND, also increment the lwp's suspend
9787 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9788 (need_step_over_p): Don't consider suspended LWPs.
9789 (start_step_over): Adjust.
9790 (proceed_one_lwp): Change return type to int, add new `except'
9791 parameter and handle it.
9792 (unsuspend_and_proceed_one_lwp): New.
9793 (proceed_all_lwps): Use find_inferior instead of
9795 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9796 also decrement the suspend count of LWPs. Pass `except' down,
9797 instead of hacking its suspend count.
9798 (linux_pause_all): Add `freeze' parameter. Adjust.
9799 (linux_unpause_all): New.
9800 (linux_target_ops): Install linux_unpause_all.
9801 * server.c (handle_status): Adjust.
9802 * target.h (struct target_ops): New fields `unpause_all' and
9803 `cancel_breakpoints'. Add new parameter to `pause_all'.
9804 (pause_all): Add new `freeze' parameter.
9806 (cancel_breakpoints): New.
9807 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9809 (cmd_qtstart): Pause threads.
9810 (stop_tracing): Pause threads, and cancel breakpoints.
9811 * win32-low.c (win32_target_ops): Adjust.
9813 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9815 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9816 the inferior right away from here...
9817 (linux_wait_1): ... to here, and adjust to check the thread's
9818 last_resume_kind instead of the lwp's step or stop_expected flags.
9820 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9822 * README: Use consistent `GDB' and `GDBserver' spellings.
9824 2010-05-02 Pedro Alves <pedro@codesourcery.com>
9826 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9827 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9828 (linux_detach_one_lwp): Assume the lwp is stopped.
9829 (any_thread_of): Delete.
9830 (linux_detach): Stop all lwps here. Don't blindly delete all
9832 (delete_lwp_callback): New.
9833 (linux_mourn): Delete all lwps of the process that is gone.
9834 (linux_wait_1): Don't delete the last lwp of the process here.
9835 * mem-break.h (mark_breakpoints_out): Declare.
9836 * mem-break.c (mark_breakpoints_out): New.
9837 (free_all_breakpoints): Use it.
9838 * server.c (handle_target_event): If the process is gone, mark
9840 * thread-db.c (struct thread_db) <create_bp>: New field.
9841 (thread_db_enable_reporting): Fix prototype. Store a thread event
9842 breakpoint reference in the thread_db struct.
9843 (thread_db_load_search): Clear the thread_db object.
9844 (try_thread_db_load_1): Ditto.
9845 (switch_to_process): New.
9846 (disable_thread_event_reporting): Use it.
9847 (remove_thread_event_breakpoints): New.
9848 (thread_db_detach, thread_db_mourn): Use it.
9850 2010-05-01 Pedro Alves <pedro@codesourcery.com>
9852 * linux-low.c (linux_enable_event_reporting): New.
9853 (linux_wait_for_event_1, handle_extended_wait): Use it.
9855 2010-04-30 Pedro Alves <pedro@codesourcery.com>
9857 * linux-low.c (linux_kill_one_lwp, linux_kill)
9858 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9859 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9860 SIGSTOP even if the LWP is stopped.
9861 (send_sigstop_callback): New.
9862 (stop_all_lwps): Use send_sigstop_callback instead.
9863 (linux_resume_one_thread): Adjust.
9864 (proceed_one_lwp): Still proceed an LWP that the client has
9865 requested to stop, if we haven't reported it as stopped yet. Make
9866 sure that LWPs the client want stopped, have a pending SIGSTOP.
9868 2010-04-26 Doug Evans <dje@google.com>
9870 * server.c (handle_general_set): Make static.
9872 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9873 Print received char after testing for error/eof instead of before.
9874 (input_interrupt): Tweak comment.
9876 2010-04-23 Doug Evans <dje@google.com>
9878 * server.c (start_inferior): Print inferior argv if --debug.
9880 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9882 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9883 * nto-x86-low.c: Include server.h
9885 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9887 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9888 be consistent with other sources of this directory.
9889 (init_registers_amd64): Correct name of source file of this function
9892 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9894 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9897 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9899 * win32-i386-low.c: Add 64-bit support.
9900 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9901 (init_registers_amd64): Declare.
9902 (mappings): Add 64-bit version of array.
9903 (init_windows_x86): New function.
9904 (the_low_target): Change init_arch field to init_windows_x86.
9906 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9908 * win32-low.c: Adapt to support also 64-bit architecture.
9909 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9910 (get_image_name): Use SIZE_T type for local variable `done'.
9911 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9912 (toolhelp_get_dll_name): Idem.
9913 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9914 Use uintptr_t typecast to avoid warning.
9915 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9916 (handle_exception): Use phex_nz to avoid warning.
9917 (win32_wait): Remove unused local variable `process'.
9919 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9921 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9924 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9926 * configure.ac: Use `ws2_32' library for srv_mingw.
9927 * configure: Regenerate.
9928 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9929 * remote-utils.c: Likewise.
9931 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9933 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9934 if __x86_64__ is defined.
9936 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9938 * configure: Regenerate.
9940 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9942 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9943 * target.h (target_ops): New get_tib_address field.
9944 * win32-low.h (win32_thread_info): Add thread_local_base field.
9945 * win32-low.c (child_add_thread): Add tlb argument.
9946 Set thread_local_base field to TLB.
9947 (get_child_debug_event): Adapt to child_add_thread change.
9948 (win32_get_tib_address): New function.
9949 (win32_target_ops): Set get_tib_address field to
9950 win32_get_tib_address.
9951 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9953 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9955 * linux-low.c (linux_mourn): Also remove the process.
9956 * server.c (handle_target_event): Don't remove the process here.
9957 * nto-low.c (nto_mourn): New.
9958 (nto_target_ops): Install it.
9959 * spu-low.c (spu_mourn): New.
9960 (spu_target_ops): Install it.
9961 * win32-low.c (win32_mourn): New.
9962 (win32_target_ops): Install it.
9964 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9966 * server.h (buffer_xml_printf): Remove redundant `;'.
9968 2010-04-12 Pedro Alves <pedro@codesourcery.com>
9970 * regcache.c (set_register_cache): Invalidate regcaches before
9971 changing the register cache layout.
9972 (regcache_invalidate_one): Allow a NULL regcache.
9973 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9974 regcaches before changing the register cache layout or the target
9977 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9979 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9980 variable warning on Linux/x86-64.
9982 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9984 GDBserver disconnected tracing support.
9986 * linux-low.c (linux_remove_process): Delete.
9987 (add_lwp): Don't set last_resume_kind here.
9988 (linux_kill): Use `mourn'.
9989 (linux_detach): Use `thread_db_detach', and `mourn'.
9991 (linux_attach_lwp_1): Adjust comment.
9992 (linux_attach): last_resume_kind moved the thread_info; adjust.
9993 (status_pending_p_callback): Adjust.
9994 (linux_wait_for_event_1): Adjust.
9995 (count_events_callback, select_singlestep_lwp_callback)
9996 (select_event_lwp_callback, cancel_breakpoints_callback)
9997 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9998 (proceed_one_lwp): Adjust.
9999 (linux_async): Add debug output.
10000 (linux_thread_stopped): New.
10001 (linux_pause_all): New.
10002 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10004 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10005 (thread_db_free): Delete declaration.
10006 (thread_db_detach, thread_db_mourn): Declare.
10007 * thread-db.c (thread_db_init): Use thread_db_mourn.
10008 (thread_db_free): Delete, split in two.
10009 (disable_thread_event_reporting): New.
10010 (thread_db_detach): New.
10011 (thread_db_mourn): New.
10013 * server.h (struct thread_info) <last_resume_kind>: New field.
10014 <attached>: Add comment.
10015 <gdb_detached>: New field.
10016 (handler_func): Change return type to int.
10017 (handle_serial_event, handle_target_event): Ditto.
10018 (gdb_connected): Declare.
10020 (disconnected_tracing): Declare.
10021 (stop_tracing): Declare.
10023 * server.c (handle_query) <qSupported>: Report support for
10024 disconnected tracing.
10025 (queue_stop_reply_callback): Account for running threads.
10026 (gdb_wants_thread_stopped): New.
10027 (gdb_wants_all_threads_stopped): New.
10028 (gdb_reattached_process): New.
10029 (handle_status): Clear the `gdb_detached' flag of all processes.
10030 In all-stop, stop all threads.
10031 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10032 (process_serial_event): If the remote connection breaks, or if an
10033 exit was forced with "monitor exit", force an event loop exit.
10034 Handle disconnected tracing on detach.
10035 (handle_serial_event): Adjust.
10036 (handle_target_event): If GDB isn't connected, forward events back
10037 to the inferior, unless the last process exited, in which case,
10038 exit gdbserver. Adjust interface.
10040 * remote-utils.c (remote_open): Don't block in accept. Instead
10041 register an event loop source on the listen socket file
10042 descriptor. Refactor bits into ...
10043 (listen_desc): ... this new global.
10044 (gdb_connected): ... this new function.
10045 (enable_async_notification): ... this new function.
10046 (handle_accept_event): ... this new function.
10047 (remote_close): Clear remote_desc.
10049 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10051 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10053 (mourn_inferior): Define.
10054 (target_process_qsupported): Avoid the dangling else problem.
10055 (thread_stopped): Define.
10056 (pause_all): Define.
10057 (target_waitstatus_to_string): Declare.
10058 * target.c (target_waitstatus_to_string): New.
10060 * tracepoint.c (tracing): Make extern.
10061 (disconnected_tracing): New.
10062 (stop_tracing): Make extern. Handle tracing stops due to GDB
10064 (cmd_qtdisconnected): New.
10065 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10066 (handle_tracepoint_general_set): Handle QTDisconnected.
10068 * event-loop.c (event_handler_func): Change return type to int.
10069 (process_event): Bail out if the event handler wants the event
10071 (handle_file_event): Ditto.
10072 (start_event_loop): Bail out if the event handler wants the event
10075 * nto-low.c (nto_target_ops): Adjust.
10076 * spu-low.c (spu_wait): Don't remove the process here.
10077 (spu_target_ops): Adjust.
10078 * win32-low.c (win32_wait): Don't remove the process here.
10079 (win32_target_ops): Adjust.
10081 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10083 * regcache.c (realloc_register_cache): Invalidate inferior's
10084 regcache before recreating it.
10086 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10088 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10090 2010-04-09 Stan Shebs <stan@codesourcery.com>
10091 Pedro Alves <pedro@codesourcery.com>
10093 * server.h (LONGEST): New.
10094 (struct thread_info) <while_stepping>: New field.
10095 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10097 (initialize_tracepoint, handle_tracepoint_general_set)
10098 (handle_tracepoint_query, tracepoint_finished_step)
10099 (tracepoint_was_hit, release_while_stepping_state_list):
10100 (current_traceframe): Declare.
10101 * server.c (handle_general_set): Handle tracepoint packets.
10102 (read_memory): New.
10103 (write_memory): New.
10104 (handle_search_memory_1): Use read_memory.
10105 (handle_query): Report support for conditional tracepoints, trace
10106 state variables, and tracepoint sources. Handle tracepoint
10108 (main): Initialize the tracepoints module.
10109 (process_serial_event): Handle traceframe reads/writes.
10111 * linux-low.c (handle_tracepoints): New.
10112 (linux_wait_1): Call it.
10113 (linux_resume_one_lwp): Handle while-stepping.
10114 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10115 (linux_target_ops): Install them.
10116 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10118 * linux-x86-low.c (x86_supports_tracepoints): New.
10119 (the_low_target). Install it.
10121 * mem-break.h (delete_breakpoint): Declare.
10122 * mem-break.c (delete_breakpoint): Make external.
10124 * target.h (struct target_ops): Add `supports_tracepoints',
10125 `read_pc', and `write_pc' fields.
10126 (target_supports_tracepoints): Define.
10127 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10130 * regcache.h (struct regcache) <registers_owned>: New field.
10131 (init_register_cache, regcache_cpy): Declare.
10132 (regcache_read_pc, regcache_write_pc): Declare.
10133 (register_cache_size): Declare.
10134 (supply_regblock): Declare.
10135 * regcache.c (init_register_cache): New.
10136 (new_register_cache): Use it.
10137 (regcache_cpy): New.
10138 (register_cache_size): New.
10139 (supply_regblock): New.
10140 (regcache_read_pc, regcache_write_pc): New.
10142 * tracepoint.c: New.
10144 * Makefile.in (OBS): Add tracepoint.o.
10145 (tracepoint.o): New rule.
10147 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10149 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10151 (i386-mmx.c): Likewise.
10152 (i386-mmx-linux.o): Likewise.
10153 (i386-mmx-linux.c): Likewise.
10155 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10156 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10157 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10158 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10160 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10161 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10162 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10164 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10166 * Makefile.in (clean): Updated.
10168 (i386-avx.c): Likewise.
10169 (i386-avx-linux.o): Likewise.
10170 (i386-avx-linux.c): Likewise.
10171 (amd64-avx.o): Likewise.
10172 (amd64-avx.c): Likewise.
10173 (amd64-avx-linux.o): Likewise.
10174 (amd64-avx-linux.c): Likewise.
10176 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10177 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10178 (srv_amd64_regobj): Add amd64-avx.o.
10179 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10180 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10181 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10182 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10183 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10184 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10185 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10187 * i387-fp.c: Include "i386-xstate.h".
10189 (i387_cache_to_xsave): Likewise.
10190 (i387_xsave_to_cache): Likewise.
10191 (x86_xcr0): Likewise.
10193 * i387-fp.h (i387_cache_to_xsave): Likewise.
10194 (i387_xsave_to_cache): Likewise.
10195 (x86_xcr0): Likewise.
10197 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10198 * linux-crisv32-low.c (target_regsets): Likewise.
10199 * linux-m68k-low.c (target_regsets): Likewise.
10200 * linux-mips-low.c (target_regsets): Likewise.
10201 * linux-ppc-low.c (target_regsets): Likewise.
10202 * linux-s390-low.c (target_regsets): Likewise.
10203 * linux-sh-low.c (target_regsets): Likewise.
10204 * linux-sparc-low.c (target_regsets): Likewise.
10205 * linux-xtensa-low.c (target_regsets): Likewise.
10207 * linux-low.c: Include <sys/uio.h>.
10208 (regsets_fetch_inferior_registers): Support nt_type.
10209 (regsets_store_inferior_registers): Likewise.
10210 (linux_process_qsupported): New.
10211 (linux_target_ops): Add linux_process_qsupported.
10213 * linux-low.h (regset_info): Add nt_type.
10214 (linux_target_ops): Add process_qsupported.
10216 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10218 (init_registers_i386_avx_linux): New.
10219 (init_registers_amd64_avx_linux): Likewise.
10220 (xmltarget_i386_linux_no_xml): Likewise.
10221 (xmltarget_amd64_linux_no_xml): Likewise.
10222 (PTRACE_GETREGSET): Likewise.
10223 (PTRACE_SETREGSET): Likewise.
10224 (x86_fill_xstateregset): Likewise.
10225 (x86_store_xstateregset): Likewise.
10226 (use_xml): Likewise.
10227 (x86_linux_update_xmltarget): Likewise.
10228 (x86_linux_process_qsupported): Likewise.
10229 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10230 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10231 init_registers_i386_linux here. Call
10232 x86_linux_update_xmltarget.
10233 (the_low_target): Add x86_linux_process_qsupported.
10235 * server.c (handle_query): Call target_process_qsupported.
10237 * target.h (target_ops): Add process_qsupported.
10238 (target_process_qsupported): New.
10240 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10242 * inferiors.c (add_thread): Set last_status kind to
10243 TARGET_WAITKIND_IGNORE.
10244 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10245 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10246 (linux_wait_1): Move `thread' local definition to block that uses
10247 it. Don't NULL initialize `event_child'.
10248 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10249 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10250 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10252 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10254 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10255 an extended waitstatus, or by a watchpoint.
10256 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10257 thread was stepping or has been stopped by a watchpoint.
10259 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10261 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10262 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10263 of another, then delete the previous, and validate all
10265 (validate_inserted_breakpoint): New.
10266 (delete_disabled_breakpoints): New.
10267 (validate_breakpoints): New.
10268 (check_mem_read): Validate breakpoints before trusting their
10269 shadow. Delete disabled breakpoints.
10270 (check_mem_write): Validate breakpoints before trusting they
10271 should be inserted. Delete disabled breakpoints.
10272 * mem-break.h (validate_breakpoints):
10273 * server.c (handle_query): Validate breakpoints when we see a
10276 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10278 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10279 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10280 if we could tell there's a GDB breakpoint at stop_pc.
10281 (need_step_over_p): Don't do a step over if we find a GDB
10282 breakpoint at the resume PC.
10284 * mem-break.c (struct raw_breakpoint): New.
10285 (enum bkpt_type): New type `gdb_breakpoint'.
10286 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10287 fields. New field `raw'.
10288 (find_raw_breakpoint_at): New.
10289 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10290 breakpoint instead.
10291 (set_breakpoint_at): Adjust.
10292 (delete_raw_breakpoint): New.
10293 (release_breakpoint): New.
10294 (delete_breakpoint): Rename to...
10295 (delete_breakpoint_1): ... this. Add proc parameter. Use
10296 release_breakpoint. Return ENOENT.
10297 (delete_breakpoint): Reimplement.
10298 (find_breakpoint_at): Delete.
10299 (find_gdb_breakpoint_at): New.
10300 (delete_breakpoint_at): Delete.
10301 (set_gdb_breakpoint_at): New.
10302 (delete_gdb_breakpoint_at): New.
10303 (gdb_breakpoint_here): New.
10304 (set_reinsert_breakpoint): Use release_breakpoint.
10305 (uninsert_breakpoint): Rename to ...
10306 (uninsert_raw_breakpoint): ... this.
10307 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10308 (reinsert_raw_breakpoint): Change parameter type to
10310 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10312 (check_breakpoints): Adjust. Use release_breakpoint.
10313 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10314 (breakpoint_inserted_here): Ditto.
10315 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10316 Don't trust the breakpoint's shadow if it is not inserted.
10317 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10318 (delete_all_breakpoints): Adjust.
10319 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10320 use delete_breakpoint_1.
10322 * mem-break.h (breakpoints_supported): Delete declaration.
10323 (set_gdb_breakpoint_at): Declare.
10324 (gdb_breakpoint_here): Declare.
10325 (delete_breakpoint_at): Delete.
10326 (delete_gdb_breakpoint_at): Declare.
10328 * server.h (struct raw_breakpoint): Forward declare.
10329 (struct process_info): New field `raw_breakpoints'.
10331 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10334 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10336 * linux-low.c (status_pending_p_callback): Fix comment.
10337 (linux_wait_for_event_1): Move most of the internal breakpoint
10338 handling from here...
10339 (linux_wait_1): ... to here.
10340 (count_events_callback): New.
10341 (select_singlestep_lwp_callback): New.
10342 (select_event_lwp_callback): New.
10343 (cancel_breakpoints_callback): New.
10344 (select_event_lwp): New.
10345 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10346 priority to all LWPs that have had events that should be reported
10347 to the client. Cancel breakpoints when about to reporting the
10348 event to the client, not while stopping lwps. No longer cancel
10349 finished single-steps here.
10350 (cancel_finished_single_step): Delete.
10351 (cancel_finished_single_steps): Delete.
10353 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10355 * mem-break.c (enum bkpt_type): New.
10356 (struct breakpoint): New field `type'.
10357 (set_breakpoint_at): Change return type to struct breakpoint
10358 pointer. Set type to `other_breakpoint' by default.
10359 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10360 in the breakpoint list.
10361 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10362 (reinsert_breakpoint): Rename to ...
10363 (reinsert_raw_breakpoint): ... this.
10364 (reinsert_breakpoints_at): Adjust.
10365 * mem-break.h (struct breakpoint): Declare.
10366 (set_breakpoint_at): Change return type to struct breakpoint
10369 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10371 * server.c (handle_query): Assign, not compare.
10373 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10375 Teach linux gdbserver to step-over-breakpoints.
10377 * linux-low.c (can_hardware_single_step): New.
10378 (supports_breakpoints): New.
10379 (handle_extended_wait): If stopping threads, read the stop pc of
10380 the new cloned LWP.
10382 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10383 low target doesn't support retrieving the PC.
10384 (add_lwp): Set last_resume_kind to resume_continue.
10385 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10386 (linux_attach): Don't clear stop_expected. Set the lwp's
10387 last_resume_kind to resume_stop.
10388 (linux_detach_one_lwp): Don't check for removed breakpoints.
10389 (check_removed_breakpoint): Delete.
10390 (status_pending_p): Rename to ...
10391 (status_pending_p_callback): ... this. Don't check for removed
10392 breakpoints. Don't consider threads that are stopped from GDB's
10394 (linux_wait_for_lwp): Always read the stop_pc here.
10395 (cancel_breakpoint): New.
10396 (step_over_bkpt): New global.
10397 (linux_wait_for_event_1): Implement stepping over breakpoints.
10398 (gdb_wants_lwp_stopped): New.
10399 (gdb_wants_all_stopped): New.
10400 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10401 single-step traps here. Store the thread's last reported target
10403 (send_sigstop): Don't clear stop_expected. Always set it,
10405 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10406 (cancel_finished_single_step): New.
10407 (cancel_finished_single_steps): New.
10408 (wait_for_sigstop): Don't cancel finished single-step traps here.
10409 (linux_resume_one_lwp): Don't check for removed breakpoints.
10410 Don't set `step' on non-hardware step archs.
10411 (linux_set_resume_request): Ignore resume_stop requests if already
10412 stopping or stopped. Set the lwp's last_resume_kind.
10413 (resume_status_pending_p): Don't check for removed breakpoints.
10414 (need_step_over_p): New.
10415 (start_step_over): New.
10416 (finish_step_over): New.
10417 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10418 requests. Clear the thread's last reported target waitstatus.
10419 Don't use the `suspended' flag. Don't consider pending breakpoints.
10420 (linux_resume): Start a step-over if necessary.
10421 (proceed_one_lwp): New.
10422 (proceed_all_lwps): New.
10423 (unstop_all_lwps): New.
10424 * linux-low.h (struct lwp_info): Rewrite comment for the
10425 `suspended' flag. Add the `stop_pc' field. Delete the
10426 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10427 Add `'last_resume_kind' and `need_step_over' fields.
10428 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10429 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10430 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10431 (set_raw_breakpoint_at): New.
10432 (set_breakpoint_at): Rewrite to use it.
10433 (reinsert_breakpoint_handler): Delete.
10434 (set_reinsert_breakpoint): New.
10435 (reinsert_breakpoint_by_bp): Delete.
10436 (delete_reinsert_breakpoints): New.
10437 (uninsert_breakpoint): Rewrite.
10438 (uninsert_breakpoints_at): New.
10439 (reinsert_breakpoint): Rewrite.
10440 (reinsert_breakpoints_at): New.
10441 (check_breakpoints): Rewrite.
10442 (breakpoint_here): New.
10443 (breakpoint_inserted_here): New.
10444 (check_mem_read): Adjust.
10445 * mem-break.h (breakpoints_supported, breakpoint_here)
10446 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10447 (reinsert_breakpoint_by_bp): Delete declaration.
10448 (delete_reinsert_breakpoints): Declare.
10449 (reinsert_breakpoint): Delete declaration.
10450 (reinsert_breakpoints_at): Declare.
10451 (uninsert_breakpoint): Delete declaration.
10452 (uninsert_breakpoints_at): Declare.
10453 (check_breakpoints): Adjust prototype.
10454 * server.h: Adjust include order.
10455 (struct thread_info): Declare here. Add a `last_status' field.
10457 2010-03-23 Michael Snyder <msnyder@vmware.com>
10459 * server.c (crc32): New function.
10460 (handle_query): Add handling for 'qCRC:' request.
10462 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10464 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10465 lwp had been stopped by a watchpoint.
10467 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10469 * server.h (internal_error): Declare.
10470 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10471 * utils.c (internal_error): New function.
10473 2010-03-15 Andreas Schwab <schwab@redhat.com>
10475 * configure.srv: Fix typo setting srv_regobj.
10477 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10479 * linux-low.c (fetch_register): Avoid passing a non string literal
10481 (usr_store_inferior_registers): Ditto.
10483 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10485 * linux-low.c (linux_write_memory): Bail out early if peeking
10488 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10490 * linux-low.h (struct lwp_info): New fields
10491 `stopped_by_watchpoint' and `stopped_data_address'.
10492 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10493 here, and cache them in the lwp object.
10494 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10496 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10498 (linux_stopped_by_watchpoint): Rewrite.
10499 (linux_stopped_data_address): Rewrite.
10501 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10503 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10504 switching the current inferior, not before.
10506 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10508 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10509 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10510 i386-linux.c and amd64-linux.c.
10511 (reg-i386.o): Removed.
10512 (reg-i386.c): Likewise.
10513 (reg-i386-linux.o): Likewise.
10514 (reg-i386-linux.c): Likewise.
10515 (reg-x86-64.o): Likewise.
10516 (reg-x86-64.c): Likewise.
10517 (reg-x86-64-linux.o): Likewise.
10518 (reg-x86-64-linux.c): Likewise.
10520 (i386.c): Likewise.
10521 (i386-linux.o): Likewise.
10522 (i386-linux.c): Likewise.
10523 (amd64.o): Likewise.
10524 (amd64.c): Likewise.
10525 (amd64-linux.o): Likewise.
10526 (amd64-linux.c): Likewise.
10528 * configure.srv (srv_i386_regobj): New.
10529 (srv_i386_linux_regobj): Likewise.
10530 (srv_amd64_regobj): Likewise.
10531 (srv_amd64_linux_regobj): Likewise.
10532 (srv_i386_32bit_xmlfiles): Likewise.
10533 (srv_i386_64bit_xmlfiles): Likewise.
10534 (srv_i386_xmlfiles): Likewise.
10535 (srv_amd64_xmlfiles): Likewise.
10536 (srv_i386_linux_xmlfiles): Likewise.
10537 (srv_amd64_linux_xmlfiles): Likewise.
10538 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10539 srv_xmlfiles to $srv_i386_xmlfiles.
10540 (i[34567]86-*-mingw32ce*): Likewise.
10541 (i[34567]86-*-mingw*): Likewise.
10542 (i[34567]86-*-nto*): Likewise.
10543 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10544 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10545 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10546 (x86_64-*-linux*): Likewise.
10548 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10549 (init_registers_amd64_linux): New.
10550 (x86_arch_setup): Replace init_registers_x86_64_linux with
10551 init_registers_amd64_linux.
10553 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10555 * configure.ac: Check for libdl. If it is not available link against
10556 static libthread_db.
10557 * configure: Regenerate.
10559 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10563 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10564 handing a read watchpoint.
10565 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10567 2010-02-12 Doug Evans <dje@google.com>
10569 * linux-low.c (linux_supports_tracefork_flag): Document.
10570 (linux_look_up_symbols): Add comment.
10572 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10574 * regcache.c (supply_register): Clear regcache if buf is NULL.
10576 2010-02-02 Nicolas Roche <roche@sourceware.org>
10577 Joel Brobecker <brobecker@adacore.com>
10579 * inferiors.c (find_inferior): Add function documentation.
10580 (unloaded_dll): Handle the case where the unloaded dll has not
10581 been previously registered in the dll list.
10583 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10585 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10586 (thumb2_breakpoint): New.
10587 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10589 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10591 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10592 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10595 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10597 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10599 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10601 * linux-s390-low.c (s390_collect_ptrace_register)
10602 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10604 2010-01-21 Doug Evans <dje@google.com>
10606 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10607 (PTRACE_ARG4_TYPE): New macro.
10608 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10609 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10610 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10611 (usr_store_inferior_registers): Ditto.
10612 (linux_read_memory, linux_write_memory): Ditto.
10613 (linux_test_for_tracefork): Ditto.
10615 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10616 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10618 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10620 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10623 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10625 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10626 prototype to take a regcache. Adjust.
10628 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10630 * regcache.h (struct thread_info): Forward declare.
10631 (struct regcache): New.
10632 (new_register_cache): Adjust prototype.
10633 (get_thread_regcache): Declare.
10634 (free_register_cache): Adjust prototype.
10635 (registers_to_string, registers_from_string): Ditto.
10636 (supply_register, supply_register_by_name, collect_register)
10637 (collect_register_as_string, collect_register_by_name): Ditto.
10638 * regcache.c (struct inferior_regcache_data): Delete.
10639 (get_regcache): Rename to ...
10640 (get_thread_regcache): ... this. Adjust. Switch inferior before
10641 fetching registers.
10642 (regcache_invalidate_one): Adjust.
10643 (regcache_invalidate): Fix prototype.
10644 (new_register_cache): Return the new register cache.
10645 (free_register_cache): Change prototype.
10646 (realloc_register_cache): Adjust.
10647 (registers_to_string): Change prototype to take a regcache. Adjust.
10648 (registers_from_string): Ditto.
10649 (register_data): Ditto.
10650 (supply_register): Ditto.
10651 (supply_register_by_name): Ditto.
10652 (collect_register): Ditto.
10653 (collect_register_as_string): Ditto.
10654 (collect_register_by_name): Ditto.
10655 * server.c (process_serial_event): Adjust.
10656 * linux-low.h (regset_fill_func, regset_store_func): Change
10658 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10660 * linux-low.c (get_stop_pc): Adjust.
10661 (check_removed_breakpoint): Adjust.
10662 (linux_wait_for_event): Adjust.
10663 (linux_resume_one_lwp): Adjust.
10664 (fetch_register): Add regcache parameter. Adjust.
10665 (usr_store_inferior_registers): Ditto.
10666 (regsets_fetch_inferior_registers): Ditto.
10667 (regsets_store_inferior_registers): Ditto.
10668 (linux_fetch_registers, linux_store_registers): Ditto.
10669 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10671 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10673 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10674 prototype to take a regcache.
10675 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10676 * remote-utils.c (convert_ascii_to_int, outreg)
10677 (prepare_resume_reply): Change prototype to take a regcache.
10679 * target.h (struct target_ops) <fetch_registers, store_registers>:
10680 Change prototype to take a regcache.
10681 (fetch_inferior_registers, store_inferior_registers): Change
10682 prototype to take a regcache. Adjust.
10683 * proc-service.c (ps_lgetregs): Adjust.
10684 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10685 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10686 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10687 take a regcache. Adjust.
10688 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10689 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10690 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10691 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10692 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10693 (cris_cannot_fetch_register):
10694 (cris_breakpoint_at): Change prototype to take a regcache.
10696 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10697 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10698 to take a regcache. Adjust.
10699 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10701 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10702 take a regcache. Adjust.
10703 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10704 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10705 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10706 * linux-mips-low.c (mips_get_pc):
10707 (mips_set_pc): Change prototype to take a regcache. Adjust.
10708 (mips_reinsert_addr): Adjust.
10709 (mips_collect_register): Change prototype to take a regcache.
10711 (mips_supply_register):
10712 (mips_collect_register_32bit, mips_supply_register_32bit)
10713 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10714 (mips_store_fpregset): Ditto.
10715 * linux-ppc-low.c (ppc_supply_ptrace_register)
10716 (ppc_supply_ptrace_register): Ditto.
10717 (parse_spufs_run): Adjust.
10718 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10719 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10720 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10721 take a regcache. Adjust.
10722 * linux-s390-low.c (s390_collect_ptrace_register)
10723 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10724 (s390_set_pc): Change prototype to take a regcache. Adjust.
10725 (s390_arch_setup): Adjust.
10726 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10727 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10728 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10729 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10730 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10732 (sparc_breakpoint_at): Adjust.
10733 * linux-xtensa-low.c (xtensa_fill_gregset):
10734 (xtensa_store_gregset):
10735 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10736 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10737 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10738 prototype to take a regcache. Adjust.
10739 * win32-arm-low.c (arm_fetch_inferior_register)
10740 (arm_store_inferior_register): Change prototype to take a
10742 * win32-i386-low.c (i386_fetch_inferior_register)
10743 (i386_store_inferior_register): Change prototype to take a
10745 * win32-low.c (child_fetch_inferior_registers)
10746 (child_store_inferior_registers): Change prototype to take a
10748 (win32_wait): Adjust.
10749 (win32_fetch_inferior_registers): Change prototype to take a
10751 (win32_store_inferior_registers): Adjust.
10752 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10753 store_inferior_register>: Change prototype to take a regcache.
10755 2010-01-20 Doug Evans <dje@google.com>
10757 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10759 (linux_wait_for_event1, linux_init_signals): Ditto.
10760 (W_STOPCODE): Provide definition if missing.
10762 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10764 * linux-low.c (linux_core_of_thread): New.
10765 (compare_ints, show_process, list_threads): New.
10766 (linux_qxfer_osdata): Report threads and cores.
10767 (linux_target_op): Register linux_core_of_thread.
10768 * remote-utils.c (prepare_resume_reply): Report the core.
10769 (buffer_xml_printf): Support %d specifier.
10770 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10772 (handle_query): Handle qXfer:threads. Announce availability
10774 * target.h (struct target_ops): New field core_of_thread.
10776 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10778 * Makefile.in (clean): Remove new generated files.
10779 (reg-s390.o, reg-s390.c): Remove rules.
10780 (reg-s390x.o, reg-s390x.c): Likewise.
10781 (s390-linux32.o, s390-linux32.c): Add rules.
10782 (s390-linux64.o, s390-linux64.c): Likewise.
10783 (s390x-linux64.o, s390x-linux64.c): Likewise.
10784 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10785 * linux-s390-low.c: Include <elf.h>.
10786 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10787 (init_registers_s390): Remove prototype.
10788 (init_registers_s390x): Likewise.
10789 (init_registers_s390_linux32): Add prototype.
10790 (init_registers_s390_linux64): Likewise.
10791 (init_registers_s390x_linux64): Likewise.
10792 (s390_num_regs_3264): New define.
10793 (s390_regmap_3264): New global variable.
10794 (s390_cannot_fetch_register): Remove obsolete check.
10795 (s390_cannot_store_register): Likewise.
10796 (s390_collect_ptrace_register): Handle upper/lower register halves.
10797 (s390_supply_ptrace_register): Likewise.
10798 (s390_fill_gregset): Update to register number changes.
10799 (s390_get_hwcap): New routine.
10800 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10801 Install appropriate regmap and register set.
10803 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10805 * server.c (gdbserver_version): Update copyright year to 2010.
10806 * gdbreplay.c (gdbreplay_version): Likewise.
10808 2009-12-28 Doug Evans <dje@google.com>
10810 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10811 elf/external.h. Include <elf.h> instead but only if necessary.
10813 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10815 * linux-low.c (linux_remove_process): Remove `detaching'
10816 parameter. Don't release/detach from thread_db here.
10817 (linux_kill): Release/detach from thread_db here, ...
10818 (linux_detach): ... and here, before actually detaching.
10819 (linux_wait_1): ... and here, when a process exits.
10820 * thread-db.c (any_thread_of): New.
10821 (thread_db_free): Switch the current inferior to a thread of the
10824 2009-12-21 Doug Evans <dje@google.com>
10826 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10828 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10829 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10830 warning ifndef __NR_tkill. Move setting of errno there too.
10831 Delete unnecessary resetting of errno after syscall.
10832 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10834 * configure.ac: Check for dladdr.
10835 * config.in: Regenerate.
10836 * configure: Regenerate.
10837 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10838 (try_thread_db_load): Update.
10840 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10842 2009-12-18 Doug Evans <dje@google.com>
10844 * event-loop.c: Include unistd.h if it exists.
10846 * linux-low.c (my_waitpid): Move definition away from being in
10847 between linux_tracefork_child/linux_test_for_tracefork.
10849 * gdb_proc_service.h (psaddr_t): Fix type.
10850 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10851 signature to match glibc.
10853 2009-12-16 Doug Evans <dje@google.com>
10855 * linux-low.c (linux_read_memory): Fix argument to read.
10857 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10859 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10860 events, don't leave current_inferior pointing at null.
10862 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10864 * win32-low.c (LOG): Delete.
10865 (OUTMSG): Output to stderr.
10866 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10867 on compile time LOG macro.
10868 (win32_wait): Fix debug output.
10870 2009-11-26 Pedro Alves <pedro@codesourcery.com>
10872 * win32-low.c (win32_add_one_solib): If the dll name is
10873 "ntdll.dll", prepend the system directory to the dll path.
10875 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10877 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10879 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10880 Vladimir Prus <vladimir@codesourcery.com>
10882 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10883 * configure.ac: Check for __mcoldfire__ and set
10884 gdb_cv_m68k_is_coldfire.
10885 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10886 reg-cf.o and reg-m68k.o.
10887 * configure: Regenerated.
10889 2009-11-16 Pedro Alves <pedro@codesourcery.com>
10891 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10892 Pass it to thread_db_free.
10893 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10894 proper `detaching' argument to linux_remove_process.
10895 * linux-low.h (thread_db_free): Add `detaching' parameter.
10896 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10898 (thread_db_free): Add `detaching' parameter. Only
10899 call td_ta_clear_event if detaching from process.
10901 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10903 * thread-db.c (thread_db_free): Fix typo.
10905 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10908 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10910 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10912 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10913 with an i686 compiler.
10914 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10916 * configure: Rebuilt.
10918 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10922 * server.c (handle_search_memory_1): Correct read_addr initialization
10923 in loop for searching subsequent chunks.
10925 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10927 * configure.ac: New --with-libthread-db option.
10928 * thread-db.c: Allow direct dependence on libthread_db.
10929 (thread_db_free): Adjust.
10930 * config.in: Regenerate.
10931 * configure: Likewise.
10933 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10936 * thread-db.c (attach_thread): New function.
10937 (maybe_attach_thread): Return success/failure.
10938 (find_new_threads_callback): Adjust.
10939 (thread_db_find_new_threads): Loop until no new threads.
10941 2009-10-13 Pedro Alves <pedro@codesourcery.com>
10943 * proc-service.c (ps_lgetregs): Formatting.
10945 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10947 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10948 * configure.ac: Adjust.
10949 * linux-low.h (struct process_info_private): Move members to struct
10951 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10952 * linux-low.c (linux_remove_process): Adjust.
10953 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10954 * server.c (handle_query): Move code ...
10955 (handle_monitor_command): ... here. New function.
10956 * target.h (struct target_ops): New member.
10957 * thread-db.c (struct thread_db): New.
10958 (libthread_db_search_path): New variable.
10959 (thread_db_create_event, thread_db_enable_reporting)
10960 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10961 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10962 (try_thread_db_load_1, dladdr_to_soname): New functions.
10963 (try_thread_db_load, thread_db_load_search): New functions.
10964 (thread_db_init): Search for libthread_db.
10965 (thread_db_free): New function.
10966 (thread_db_handle_monitor_command): Likewise.
10967 * config.in: Regenerate.
10968 * configure: Regenerate.
10970 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10972 * spu-low.c (spu_kill): Wait for inferior to terminate.
10973 Call clear_inferiors.
10974 (spu_detach): Call clear_inferiors.
10976 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10978 * aclocal.m4: Regenerate.
10979 * config.in: Likewise.
10980 * configure: Likewise.
10982 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10984 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10985 (parse_spufs_run): New function.
10986 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10987 (ppc_breakpoint_at): Handle SPU breakpoints.
10989 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10991 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10992 (SPUFS_MAGIC): Define.
10993 (spu_enumerate_spu_ids): New function.
10994 (linux_qxfer_spu): New function.
10995 (linux_target_ops): Install linux_qxfer_spu.
10997 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10999 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11000 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11001 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11002 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11003 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11004 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11005 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11006 (init_registers_powerpc_cell32l): Add prototype.
11007 (init_registers_powerpc_cell64l): Likewise.
11008 (ppc_arch_setup): Detect Cell/B.E. architecture.
11010 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11012 * Makefile.in (datarootdir): New variable.
11014 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11016 * linux-low.c (linux_write_memory): Update debugging output.
11017 * Makefile.in (clean): Add new descriptions.
11018 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11019 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11020 * configure.srv: Add new files for arm*-*-linux*.
11021 * linux-arm-low.c: Add new declarations.
11022 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11023 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11024 (HWCAP_VFPv3D16): New.
11025 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11026 instead of __IWMMXT__.
11027 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11028 (arm_arch_setup): New.
11029 (target_regsets): Remove #ifdef. Add VFP regset.
11030 (the_low_target): Use arm_arch_setup.
11032 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11034 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11035 the main thread again.
11037 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11039 Adding Neutrino gdbserver.
11040 * configure: Regenerated.
11041 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11042 * configure.srv (i[34567]86-*-nto*): New target.
11043 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11044 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11045 (nto_comctrl) [__QNX__]: New function.
11046 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11048 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11050 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11053 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11054 Pedro Alves <pedro@codesourcery.com>
11056 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11057 don't support CONTEXT_EXTENDED_REGISTERS.
11058 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11059 (the_low_target): Install them.
11060 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11061 failing with ERROR_PIPE_NOT_CONNECTED.
11063 2009-06-30 Doug Evans <dje@google.com>
11064 Pierre Muller <muller@ics.u-strasbg.fr>
11066 Add h/w watchpoint support to x86-linux, win32-i386.
11067 * Makefile.in (SFILES): Add i386-low.c
11068 (i386_low_h): Define.
11069 (i386-low.o): Add dependencies.
11070 (linux-x86-low.o): Add i386-low.h dependency.
11071 (win32-i386-low.o): Ditto.
11072 * i386-low.c: New file.
11073 * i386-low.h: New file.
11074 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11075 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11076 * linux-low.c (linux_add_process): Initialize arch_private.
11077 (linux_remove_process): Free arch_private.
11078 (add_lwp): Initialize arch_private.
11079 (delete_lwp): Free arch_private.
11080 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11082 * linux-low.h (process_info_private): New member arch_private.
11083 (lwp_info): New member arch_private.
11084 (linux_target_ops): New members new_process, new_thread,
11086 (ptid_of): New macro.
11087 * linux-x86-low.c: Include stddef.h, i386-low.h.
11088 (arch_process_info): New struct.
11089 (arch_lwp_info): New struct.
11090 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11091 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11092 (i386_dr_low_get_status): New function.
11093 (x86_insert_point, x86_remove_point): New functions.
11094 (x86_stopped_by_watchpoint): New function.
11095 (x86_stopped_data_address): New function.
11096 (x86_linux_new_process, x86_linux_new_thread): New functions.
11097 (x86_linux_prepare_to_resume): New function.
11098 (the_low_target): Add entries for insert_point, remove_point,
11099 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11101 * server.c (debug_hw_points): New global.
11102 (monitor_show_help): Document set debug-hw-points.
11103 (handle_query): Process "set debug-hw-points".
11104 * server.h (debug_hw_points): Declare.
11105 (paddress): Declare.
11106 * utils.c (NUMCELLS, CELLSIZE): New macros.
11107 (get_sell, xsnprintf, paddress): New functions.
11108 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11109 remove_point, stopped_by_watchpoint, stopped_data_address.
11110 * win32-i386-low.c: Include i386-low.h.
11111 (debug_reg_state): Replaces dr.
11112 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11113 (i386_dr_low_get_status): New function.
11114 (i386_insert_point, i386_remove_point): New functions.
11115 (i386_stopped_by_watchpoint): New function.
11116 (i386_stopped_data_address): New function.
11117 (i386_initial_stuff): Update.
11118 (get_thread_context,set_thread_context,i386_thread_added): Update.
11119 (the_low_target): Add entries for insert_point,
11120 remove_point, stopped_by_watchpoint, stopped_data_address.
11121 * win32-low.c (win32_insert_watchpoint): New function.
11122 (win32_remove_watchpoint): New function.
11123 (win32_stopped_by_watchpoint): New function.
11124 (win32_stopped_data_address): New function.
11125 (win32_target_ops): Add entries for insert_watchpoint,
11126 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11127 * win32-low.h (win32_target_ops): New members insert_point,
11128 remove_point, stopped_by_watchpoint, stopped_data_address.
11130 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11132 * server.c (process_serial_event): Re-return unsupported, not
11133 error, if the type isn't recognized. Re-allow supporting only
11134 insert or remove packets. Also call require_running for
11135 breakpoints. Add missing break statement to default case. Tidy.
11136 * target.h (struct target_ops): Rename insert_watchpoint to
11137 insert_point, and remove_watchpoint to remove_point.
11139 * linux-low.h (struct linux_target_ops): Likewise.
11140 * linux-low.c (linux_insert_watchpoint): Rename to ...
11141 (linux_insert_point): ... this. Adjust.
11142 (linux_remove_watchpoint): Rename to ...
11143 (linux_remove_point): ... this. Adjust.
11144 (linux_target_ops): Adjust.
11145 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11146 (cris_insert_point): ... this.
11147 (cris_remove_watchpoint): Rename to ...
11148 (cris_remove_point): ... this.
11149 (the_low_target): Adjust.
11151 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11153 * server.c (handle_v_kill): Pass signal_pid to
11154 kill_inferior if multi_process is zero.
11156 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11158 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11159 * target.h (target_ops): Comment for *_watchpoint to make it clear
11160 the functions can get types '0' and '1'.
11162 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11164 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11165 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11166 * regcache.c (get_regcache): Likewise.
11167 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11168 * win32-low.c (child_fetch_inferior_registers): Remove check for
11171 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11172 Pedro Alves <pedro@codesourcery.com>
11174 * target.h (struct target_ops) <supports_multi_process>: New
11176 (target_supports_multi_process): New.
11177 * server.c (handle_query): Even if GDB reports support, only
11178 enable multi-process if the target also supports it. Report
11179 multi-process support only if the target backend supports it.
11180 * linux-low.c (linux_supports_multi_process): New function.
11181 (linux_target_ops): Install it as target_supports_multi_process
11184 2009-05-24 Doug Evans <dje@google.com>
11186 Global renaming of find_thread_pid to find_thread_ptid.
11187 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11188 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11189 All callers updated.
11191 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11192 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11195 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11196 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11197 (linux_resume_one_lwp): Ditto.
11199 2009-05-23 Doug Evans <dje@google.com>
11201 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11202 from struct inferior_list_entry * to struct lwp_info *.
11203 All callers updated.
11205 2009-05-13 Doug Evans <dje@google.com>
11207 * linux-x86-low.c: Don't include assert.h.
11208 (x86_siginfo_fixup): Use fatal, not assert.
11209 (x86_arch_setup): Fix comment.
11211 2009-05-12 Doug Evans <dje@google.com>
11213 Biarch support for i386/amd64 gdbserver.
11214 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11215 Add linux-x86-low.c.
11216 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11217 (linux-x86-low.o): Add.
11218 * linux-x86-64-low.c: Delete.
11219 * linux-i386-low.c: Delete.
11220 * linux-x86-low.c: New file.
11221 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11223 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11225 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11226 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11227 (linux_child_pid_to_exec_file): New function.
11228 (elf_64_header_p, elf_64_file_p): New functions.
11229 (siginfo_fixup): New function.
11230 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11231 give target a chance to convert layout.
11232 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11233 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11235 2009-05-07 Doug Evans <dje@google.com>
11237 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11238 (regsets_store_inferior_registers): Ditto.
11240 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11244 * linux-low.c (must_set_ptrace_flags): Delete.
11245 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11247 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11248 `lwp->must_set_ptrace_flags' instead.
11249 (linux_wait_for_event_1): Set ptrace options here.
11250 (linux_wait_1): ... not here.
11252 2009-04-30 Doug Evans <dje@google.com>
11254 * inferiors.c (started_inferior_callback): New function.
11255 (attached_inferior_callback): New function.
11256 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11257 * server.c (print_started_pid, print_attached_pid): New functions.
11258 (detach_or_kill_for_exit): New function.
11259 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11260 * server.h (have_started_inferiors_p): Declare.
11261 (have_attached_inferiors_p): Declare.
11263 * inferiors.c (remove_process): Fix memory leak, free process.
11264 * linux-low.c (linux_remove_process): New function.
11265 (linux_kill): Call it instead of remove_process.
11266 (linux_detach, linux_wait_1): Ditto.
11268 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11270 * configure.srv: Add x86 Windows CE target.
11272 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11274 * inferiors.c (get_thread_process): Make global.
11275 * server.h (get_thread_process): Add prototype.
11276 * thread-db.c (find_one_thread): Use get_thread_process
11277 instead of current_process.
11278 (thread_db_get_tls_address): Do not crash if called when
11279 thread layer is not yet initialized.
11281 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11283 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11284 * spu-low.c (current_tid): Rename to ...
11285 (current_ptid): ... this.
11286 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11287 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11288 ptid_get_lwp (current_ptid) instead of current_tid.
11289 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11290 instead of current_tid. Use find_process_pid to verify pid
11291 argument is valid. Pass proper argument to remove_process.
11292 (spu_thread_alive): Compare current_ptid instead of current_tid.
11293 (spu_resume): Likewise.
11295 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11297 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11300 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11302 Implement the multiprocess extensions, and add linux multiprocess
11305 * server.h (ULONGEST): Declare.
11306 (struct ptid, ptid_t): New.
11307 (minus_one_ptid, null_ptid): Declare.
11308 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11309 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11310 (struct inferior_list_entry): Change `id' type from unsigned from
11312 (struct sym_cache, struct breakpoint, struct
11313 process_info_private): Forward declare.
11314 (struct process_info): Declare.
11315 (current_process): Declare.
11316 (all_processes): Declare.
11317 (initialize_inferiors): Declare.
11318 (add_thread): Adjust to use ptid_t.
11319 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11320 (add_process, remove_process, find_thread_pid): Declare.
11321 (find_inferior_id): Adjust to use ptid_t.
11322 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11323 (multi_process): Declare.
11324 (push_event): Adjust to use ptid_t.
11325 (read_ptid, write_ptid): Declare.
11326 (prepare_resume_reply): Adjust to use ptid_t.
11327 (clear_symbol_cache): Declare.
11328 * inferiors.c (all_processes): New.
11329 (null_ptid, minus_one_ptid): New.
11330 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11331 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11332 (add_thread): Change unsigned long to ptid. Remove gdb_id
11334 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11335 (gdb_id_to_thread): Rename to ...
11336 (find_thread_pid): ... this. Change unsigned long to ptid.
11337 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11338 (loaded_dll, pull_pid_from_list): Adjust.
11339 (add_process, remove_process, find_process_pid)
11340 (get_thread_process, current_process, initialize_inferiors): New.
11341 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11342 (struct target_waitstatus) <related_pid>: Ditto.
11343 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11344 return type to int.
11345 (struct target_ops) <join>: Add `pid' argument.
11346 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11347 (struct target_ops) <wait>: Add `ptid' field. Change return type
11349 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11350 (mywait): Add `ptid' argument. Change return type to ptid_t.
11351 (target_pid_to_str): Declare.
11352 * target.c (set_desired_inferior): Adjust to use ptids.
11353 (mywait): Add new `ptid' argument. Adjust.
11354 (target_pid_to_str): New.
11355 * mem-break.h (free_all_breakpoints): Declare.
11356 * mem-break.c (breakpoints): Delelete.
11357 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11358 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11359 to use per-process breakpoint list.
11360 (free_all_breakpoints): New.
11361 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11362 (symbol_cache, all_symbols_looked_up): Delete.
11364 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11366 (prepare_resume_reply): Change ptid argument's type from unsigned
11367 long to ptid_t. Adjust. Implement W;process and X;process.
11368 (free_sym_cache, clear_symbol_cache): New.
11369 (look_up_one_symbol): Adjust to per-process symbol cache. *
11370 * server.c (cont_thread, general_thread, step_thread): Change type
11372 (attached): Delete.
11373 (multi_process): New.
11374 (last_ptid): Change type to ptid_t.
11375 (struct vstop_notif) <ptid>: Change type to ptid_t.
11376 (queue_stop_reply, push_event): Change `ptid' argument's type to
11378 (discard_queued_stop_replies): Add `pid' argument.
11379 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11380 changes. Don't reference the `attached' global.
11381 (attach_inferior): Adjust to mywait interface changes.
11382 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11383 features. Handle and report "multiprocess+". Handle
11385 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11387 (handle_v_kill): New.
11388 (handle_v_stopped): Adjust to use target_pid_to_str.
11389 (handle_v_requests): Allow multiple attaches and runs when
11390 multiprocess extensions are in effect. Handle "vKill".
11391 (myresume): Adjust to use ptids.
11392 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11393 (handle_status): Adjust to discard_queued_stop_replies interface
11395 (first_thread_of, kill_inferior_callback)
11396 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11397 (main): Call initialize_inferiors. Adjust to use ptids, killing
11398 and detaching from all inferiors. Handle multiprocess packet
11400 * linux-low.h: Include gdb_proc_service.h.
11401 (struct process_info_private): New.
11402 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11403 <lwpid_of>: Use ptid_get_lwp.
11404 (get_lwp_thread): Adjust.
11405 (struct lwp_info): Add `dead' member.
11406 (find_lwp_pid): Declare.
11407 * linux-low.c (thread_db_active): Delete.
11408 (new_inferior): Adjust comment.
11409 (inferior_pid): Delete.
11410 (linux_add_process): New.
11411 (handle_extended_wait): Adjust.
11412 (add_lwp): Change unsigned long to ptid.
11413 (linux_create_inferior): Add process to processes table. Adjust
11414 to use ptids. Don't set new_inferior here.
11415 (linux_attach_lwp): Rename to ...
11416 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11417 it. Adjust to use ptids.
11418 (linux_attach_lwp): New.
11419 (linux_attach): Add process to processes table. Don't set
11421 (struct counter): New.
11422 (second_thread_of_pid_p, last_thread_of_process_p): New.
11423 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11424 multiple processes.
11425 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11426 processes. Remove process from process table.
11427 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11428 to multiple processes.
11429 (any_thread_of): New.
11430 (linux_detach): Add `pid' argument, and handle it. Remove process
11431 from processes table.
11432 (linux_join): Add `pid' argument. Handle it.
11433 (linux_thread_alive): Change unsighed long argument to ptid_t.
11434 Consider dead lwps as not being alive.
11435 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11436 threads we're not interested in.
11437 (same_lwp, find_lwp_pid): New.
11438 (linux_wait_for_lwp): Change `pid' argument's type from int to
11440 (linux_wait_for_event): Rename to ...
11441 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11442 from int to ptid_t. Adjust.
11443 (linux_wait_for_event): New.
11444 (linux_wait_1): Add `ptid' argument. Change return type to
11445 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11446 that exit from the process table.
11447 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11449 (mark_lwp_dead): New.
11450 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11451 stopping all threads, mark its main lwp as dead.
11452 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11454 (fetch_register, usr_store_inferior_registers)
11455 (regsets_fetch_inferior_registers)
11456 (regsets_store_inferior_registers, linux_read_memory)
11457 (linux_write_memory): Inline `inferior_pid'.
11458 (linux_look_up_symbols): Adjust to use per-process
11459 `thread_db_active'.
11460 (linux_request_interrupt): Adjust to use ptids.
11461 (linux_read_auxv): Inline `inferior_pid'.
11462 (initialize_low): Don't reference thread_db_active.
11463 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11464 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11465 (ps_getpid): Return the pid of the current inferior.
11466 * thread-db.c (proc_handle, thread_agent): Delete.
11467 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11469 (find_one_thread): Change argument type to ptid_t. Adjust to
11471 (maybe_attach_thread): Adjust to per-process data and ptids.
11472 (thread_db_find_new_threads): Ditto.
11473 (thread_db_init): Ditto.
11474 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11475 processes table. Adjust to use ptids.
11476 (spu_kill, spu_detach): Adjust interface. Remove process from
11478 (spu_join, spu_thread_alive): Adjust interface.
11479 (spu_wait): Adjust interface. Remove process from processes
11480 table. Adjust to use ptids.
11481 * win32-low.c (current_inferior_tid): Delete.
11482 (current_inferior_ptid): New.
11483 (debug_event_ptid): New.
11484 (thread_rec): Take a ptid. Adjust.
11485 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11486 (child_delete_thread): Ditto.
11487 (do_initial_child_stuff): Add `attached' argument. Add process to
11489 (child_fetch_inferior_registers, child_store_inferior_registers):
11491 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11492 (win32_attach): Pass 1 to do_initial_child_stuff.
11493 (win32_kill): Adjust interface. Remove process from processes
11495 (win32_detach): Ditto.
11496 (win32_join): Adjust interface.
11497 (win32_thread_alive): Take a ptid.
11498 (win32_resume): Adjust to use ptids.
11499 (get_child_debug_event): Ditto.
11500 (win32_wait): Adjust interface. Remove exiting process from
11503 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11505 Non-stop mode support.
11507 * server.h (non_stop): Declare.
11508 (gdb_client_data, handler_func): Declare.
11509 (delete_file_handler, add_file_handler, start_event_loop):
11511 (handle_serial_event, handle_target_event, push_event)
11512 (putpkt_notif): Declare.
11513 * target.h (enum resume_kind): New.
11514 (struct thread_resume): Replace `step' field by `kind' field.
11515 (TARGET_WNOHANG): Define.
11516 (struct target_ops) <wait>: Add `options' argument.
11517 <supports_non_stop, async, start_non_stop>: New fields.
11518 (target_supports_non_stop, target_async): New.
11519 (start_non_stop): Declare.
11520 (mywait): Add `options' argument.
11521 * target.c (mywait): Add `options' argument. Print child exit
11522 notifications here.
11523 (start_non_stop): New.
11524 * server.c (non_stop, own_buf, mem_buf): New globals.
11525 (struct vstop_notif): New.
11526 (notif_queue): New global.
11527 (queue_stop_reply, push_event, discard_queued_stop_replies)
11528 (send_next_stop_reply): New.
11529 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11531 (attach_inferior): In non-stop mode, don't wait for the target
11533 (handle_general_set): Handle QNonStop.
11534 (handle_query): When handling qC, return the current general
11535 thread, instead of the first thread of the list.
11536 (handle_query): If the backend supports non-stop mode, include
11537 QNonStop+ in the qSupported query response.
11538 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11540 (handle_v_attach, handle_v_run): Handle non-stop mode.
11541 (handle_v_stopped): New.
11542 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11543 (myresume): Adjust to use resume_kind. Handle non-stop.
11544 (queue_stop_reply_callback): New.
11545 (handle_status): Handle non-stop mode.
11546 (main): Clear non_stop flag on reconnection. Use the event-loop.
11547 Refactor serial protocol handling from here ...
11548 (process_serial_event): ... to this new function. When GDB
11549 selects any thread, select one here. In non-stop mode, wait until
11550 GDB acks all pending events before exiting.
11551 (handle_serial_event, handle_target_event): New.
11552 * remote-utils.c (remote_open): Install remote_desc in the event
11554 (remote_close): Remove remote_desc from the event loop.
11555 (putpkt_binary): Rename to...
11556 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11557 (putpkt_binary): New as wrapper around putpkt_binary_1.
11558 (putpkt_notif): New.
11559 (prepare_resume_reply): In non-stop mode, don't change the
11561 * event-loop.c: New.
11562 * Makefile.in (OBJ): Add event-loop.o.
11563 (event-loop.o): New rule.
11565 * linux-low.h (pid_of): Moved here.
11567 (get_lwp_thread): Use lwpid_of.
11568 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11569 * linux-low.c (pid_of): Delete.
11570 (inferior_pid): Use lwpid_of.
11571 (linux_event_pipe): New.
11572 (target_is_async_p): New.
11574 (handle_extended_wait): Use lwpid_of.
11575 (add_lwp): Don't set lwpid field.
11576 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11577 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11578 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11579 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11580 first. Adjust to linux_wait_for_event interface changes. Use
11582 (linux_detach): Don't delete the main lwp here.
11583 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11584 (status_pending_p): Don't consider explicitly suspended lwps.
11585 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11586 pointer. Add OPTIONS argument. Change return type to int. Use
11587 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11588 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11589 pointer. Add status pointer argument. Return a pid instead of a
11590 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11591 changes. In non-stop mode, don't switch to a random thread.
11592 (linux_wait): Rename to...
11593 (linux_wait_1): ... this. Add target_options argument, and handle
11594 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11595 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11596 clean exit and signal exit code. Don't stop all threads in
11597 non-stop mode. In all-stop mode, only stop all threads when
11598 reporting a stop to GDB. Handle explicit thread stop requests.
11599 (async_file_flush, async_file_mark): New.
11601 (send_sigstop): Use lwpid_of.
11602 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11603 interface changes. In non-stop mode, don't switch to a random
11605 (linux_resume_one_lwp): Use lwpid_of.
11606 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11607 (linux_resume_one_thread): ... this. Handle resume_stop. In
11608 non-stop mode, don't look for pending flag in all threads.
11609 (resume_status_pending_p): Don't consider explicitly suspended
11611 (my_waitpid): Reimplement. Emulate __WALL.
11612 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11614 (sigchld_handler, linux_supports_non_stop, linux_async)
11615 (linux_start_non_stop): New.
11616 (linux_target_ops): Register linux_supports_non_stop, linux_async
11617 and linux_start_non_stop.
11618 (initialize_low): Install SIGCHLD handler.
11619 * thread-db.c (thread_db_create_event, find_one_thread)
11620 (thread_db_get_tls_address): Use lwpid_of.
11621 * win32-low.c (win32_detach): Adjust to use resume_kind.
11622 (win32_wait): Add `options' argument.
11623 * spu-low.c (spu_resume): Adjust to use resume_kind.
11624 (spu_wait): Add `options' argument.
11626 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11628 Decouple target code from remote protocol.
11630 * target.h (enum target_waitkind): New.
11631 (struct target_waitstatus): New.
11632 (struct target_ops) <wait>: Return an unsigned long. Take a
11633 target_waitstatus pointer instead of a char pointer.
11634 (mywait): Likewise.
11635 * target.c (mywait): Change prototype to return an unsigned long.
11636 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11637 * server.h (thread_from_wait, old_thread_from_wait): Delete
11639 (prepare_resume_reply): Change prototype to take a
11641 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11642 (last_status, last_ptid): New.
11643 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11644 pid instead of a signal.
11645 (attach_inferior): Remove "status" and "signal" parameters.
11647 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11649 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11650 (handle_v_requests, myresume): Remove "status" and "signal"
11651 parameters. Adjust.
11652 (handle_status): New.
11653 (main): Delete local `status'. Adjust.
11654 * remote-utils.c: Include target.h.
11655 (prepare_resume_reply): Change prototype to take a
11656 target_waitstatus. Adjust.
11658 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11660 * spu-low.c (spu_wait): Adjust.
11661 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11663 (win32_wait): Adjust.
11665 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11667 * target.h (struct thread_resume): Delete leave_stopped member.
11668 (struct target_ops): Add a `n' argument to the `resume' callback.
11669 * server.c (start_inferior): Adjust.
11670 (handle_v_cont, myresume): Adjust.
11671 * linux-low.c (check_removed_breakpoint): Adjust to resume
11672 interface change, and to removed leave_stopped field.
11673 (resume_ptr): Delete.
11674 (struct thread_resume_array): New.
11675 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11676 resume interface change.
11677 (linux_continue_one_thread, linux_queue_one_thread)
11678 (resume_status_pending_p): Check if the resume field is NULL
11679 instead of checking the leave_stopped member.
11680 (linux_resume): Adjust to the target resume interface change.
11681 * spu-low.c (spu_resume): Adjust to the target resume interface
11683 * win32-low.c (win32_detach, win32_resume): Ditto.
11685 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11687 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11689 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11691 (linux_continue_one_thread): Only preserve the stepping flag if
11692 there's a pending breakpoint.
11694 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11696 * server.c (main): After the inferior having exited, call
11697 remote_close before exiting gdbserver.
11699 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11701 Fix size of FPSCR in Power 7 processors.
11702 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11703 (PPC_FEATURE_HAS_DFP): New #define.
11704 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11707 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11709 * server.c (handle_query) Whitespace and formatting.
11711 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11713 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11714 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11715 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11716 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11717 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11718 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11719 Makefile.in, configure.ac: Fix whitespace throughout.
11720 * configure: Regenerate.
11722 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11724 * inferiors.c (find_inferior): Make it safe for the callback
11725 function to delete the currently iterated inferior.
11727 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11729 * Makefile.in (linuw_low_h): Move higher.
11730 (thread-db.o): Depend on $(linux_low_h).
11732 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11734 Rename "process" to "lwp" throughout.
11736 * linux-low.c (all_processes): Rename to...
11737 (all_lwps): ... this.
11738 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11739 (add_process): Rename to ...
11740 (add_lwp): ... this. Adjust.
11741 (linux_create_inferior): Adjust.
11742 (linux_attach_lwp): Adjust.
11743 (linux_attach): Adjust.
11744 (linux_kill_one_process): Rename to ...
11745 (linux_kill_one_lwp): ... this. Adjust.
11746 (linux_kill): Adjust.
11747 (linux_detach_one_process): Rename to ...
11748 (linux_detach_one_lwp): ... this. Adjust.
11749 (linux_detach): Adjust.
11750 (check_removed_breakpoint): Adjust.
11751 (status_pending_p): Adjust.
11752 (linux_wait_for_process): Rename to ...
11753 (linux_wait_for_lwp): ... this. Adjust.
11754 (linux_wait_for_event): Adjust.
11755 (send_sigstop): Adjust.
11756 (wait_for_sigstop): Adjust.
11757 (stop_all_processes): Rename to ...
11758 (stop_all_lwps): ... this.
11759 (linux_resume_one_process): Rename to ...
11760 (linux_resume_one_lwp): ... this. Adjust.
11761 (linux_set_resume_request, linux_continue_one_thread)
11762 (linux_queue_one_thread, resume_status_pending_p)
11763 (usr_store_inferior_registers, regsets_store_inferior_registers)
11764 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11766 * linux-low.h (get_process): Rename to ...
11767 (get_lwp): ... this. Adjust.
11768 (get_thread_process): Rename to ...
11769 (get_thread_lwp): ... this. Adjust.
11770 (get_process_thread): Rename to ...
11771 (get_lwp_thread): ... this. Adjust.
11772 (struct process_info): Rename to ...
11773 (struct lwp_info): ... this.
11774 (all_processes): Rename to ...
11775 (all_lwps): ... this.
11776 * proc-service.c (ps_lgetregs): Adjust.
11777 * thread-db.c (thread_db_create_event, find_one_thread)
11778 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11780 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11782 * server.c (handle_query): Handle "qAttached".
11784 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11786 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11787 GPLv3, update license URL.
11789 2009-03-01 Doug Evans <dje@google.com>
11791 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11792 (server_h): Add gdb_signals.h.
11793 (signals.o): Update.
11794 * server.h (target_signal_from_host,target_signal_to_host_p)
11795 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11797 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11799 * remote-utils.c (getpkt): Also generate remote-debug
11800 information if noack_mode is set.
11802 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11804 * server.c (handle_query): Report qXfer:siginfo:read and
11805 qXfer:siginfo:write as supported and handle them.
11806 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11807 * linux-low.c (linux_xfer_siginfo): New.
11808 (linux_target_ops): Set it.
11810 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11812 * server.c (gdbserver_usage): Mention --remote-debug.
11813 (main): Accept '--remote-debug' switch.
11815 2009-01-18 Doug Evans <dje@google.com>
11817 * regcache.c (new_register_cache): No need to check result of xcalloc.
11818 * server.c (handle_search_memory): Back out calls to xmalloc,
11819 result is checked and error is returned to user upon failure.
11820 (handle_query): Ditto. Add more checks for result of malloc.
11821 (handle_v_cont): Check result of malloc, report error back to
11823 (handle_v_run): Ditto. Call freeargv.
11824 * server.h (freeargv): Declare.
11825 * utils.c (freeargv): New fn.
11827 2009-01-15 Doug Evans <dje@google.com>
11829 * gdbreplay.c (perror_with_name): Make arg const char *.
11830 * server.h (target_signal_to_name): Make return type const char *.
11831 * thread-db.c (thread_db_err_str): Make return type const char *.
11832 * utils.c (perror_with_name): Make arg const char *.
11834 2009-01-14 Pedro Alves <pedro@codesourcery.com>
11836 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11837 when handling a EXIT_PROCESS_DEBUG_EVENT.
11839 2009-01-06 Joel Brobecker <brobecker@adacore.com>
11841 * gdbreplay.c (gdbreplay_version): Update copyright year.
11842 * server.c (gdbserver_version): Likewise.
11844 2009-01-05 Doug Evans <dje@google.com>
11846 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11847 (handle_extended_wait): Improve comment.
11849 2008-12-13 Doug Evans <dje@google.com>
11851 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11852 * server.h (ATTR_MALLOC): New macro.
11853 (xmalloc,xcalloc,xstrdup): Declare.
11854 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11855 * inferiors.c: Ditto.
11856 * linux-low.c: Ditto.
11857 * mem-break.c: Ditto.
11858 * regcache.c: Ditto.
11859 * remote-utils.c: Ditto.
11862 * win32-low.c: Ditto.
11864 2008-12-12 Doug Evans <dje@google.com>
11866 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11867 in debugging printf.
11869 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11871 2008-12-09 Doug Evans <dje@google.com>
11873 * linux-low.h (struct process_info): Delete member tid, unused.
11874 * thread-db.c (find_one_thread): Update.
11875 (maybe_attach_thread): Update.
11877 2008-12-02 Pedro Alves <pedro@codesourcery.com>
11879 * target.h (struct target_ops): Add qxfer_osdata member.
11880 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11882 (linux_qxfer_osdata): New functions.
11883 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11885 * server.c (handle_query): Handle "qXfer:osdata:read:".
11886 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11887 (buffer_xml_printf): New functions.
11888 * server.h (struct buffer): New.
11889 (buffer_grow_str, buffer_grow_str0): New macros.
11890 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11891 (buffer_xml_printf): Declare.
11893 2008-11-24 Doug Evans <dje@google.com>
11895 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11897 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11899 * server.c (handle_v_run): Always use the supplied argument list.
11901 2008-11-19 Bob Wilson <bob.wilson@acm.org>
11903 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11904 (xtensa_regmap_table): Add entry for scompare1.
11906 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11908 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11909 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11910 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11911 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11912 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11913 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11914 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11915 XML target descriptions.
11916 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11917 when inferior is running on an ISA 2.05 or later processor. Add
11918 special case to return offset for full 64-bit slot of FPSCR when
11921 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11923 * Makefile.in (SFILES, clean): Added sparc64 files.
11924 (reg-sparc64.o, reg-sparc64.c): New.
11925 * configure.srv (sparc*-*-linux*): New configuration.
11926 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11927 syscall arguments for SPARC.
11928 (regsets_store_inferior_registers): Likewise.
11929 * linux-sparc-low.c: New file.
11931 2008-10-21 Doug Evans <dje@google.com>
11933 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11934 (READLINE_DIR,READLINE_DEP): Delete.
11935 (INTERNAL_CFLAGS): Update.
11936 (LINTFLAGS): Update.
11938 2008-10-10 Pedro Alves <pedro@codesourcery.com>
11940 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11941 whole argv from the last run, not just argv[0].
11943 2008-09-08 Pedro Alves <pedro@codesourcery.com>
11945 * regcache.c (new_register_cache): Return NULL if the register
11946 cache size isn't known yet.
11947 (free_register_cache): Avoid dereferencing a NULL regcache.
11949 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11951 * configure.srv: Merge MIPS and MIPS64.
11953 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11955 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11957 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
11959 * Makefile.in: Add required vsx dependencies.
11961 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11962 Declare init_registers_powerpc_vsx32l.
11963 Declare init_registers_powerpc_vsx64l.
11964 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11965 (ppc_arch_setup): Check for VSX in hwcap.
11966 (ppc_fill_vsxregset): New function.
11967 (ppc_store_vsxregset): New function.
11968 Add new VSX entry in regset_info target_regsets.
11970 * configure.srv: Add new VSX dependencies.
11972 2008-08-12 Pedro Alves <pedro@codesourcery.com>
11974 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11975 (remote_open): Set or clear transport_is_reliable.
11976 (putpkt_binary): Don't expect acks in noack mode.
11977 (getpkt): Don't send ack/nac in noack mode.
11978 * server.c (handle_general_set): Handle QStartNoAckMode.
11979 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11981 (main): Reset noack_mode on every connection.
11982 * server.h (noack_mode): Declare.
11984 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11986 * Makefile.in (GDBREPLAY_OBS): New variable.
11987 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11989 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11990 Daniel Jacobowitz <dan@codesourcery.com>
11992 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11993 (usr_store_inferior_registers): Likewise.
11994 (regsets_store_inferior_registers): Likewise.
11996 2008-07-31 Rolf Jansen <rj@surtec.com>
11997 Pedro Alves <pedro@codesourcery.com>
11999 * configure.ac: Check for memmem declaration.
12000 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12001 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12002 (disable_packet_qfThreadInfo): Unconditionally compile.
12003 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12004 * configure, config.in: Regenerate.
12006 2008-07-28 Doug Kwan <dougkwan@google.com>
12008 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12009 (linux_write_memory): Remove declaration of errno.
12011 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12013 * linux-low.c (handle_extended_wait): Do not use "status"
12014 variable uninitialized.
12016 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12018 * server.c (handle_v_attach): Inhibit reporting dll changes.
12020 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12022 * remote-utils.c (prepare_resume_reply): If requested, don't
12023 output "thread:TID" in the T stop reply.
12025 * server.c (disable_packet_vCont, disable_packet_Tthread)
12026 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12027 (handle_query): If requested, disable support for qC, qfThreadInfo
12029 (handle_v_requests): If requested, disable support for vCont.
12030 (gdbserver_show_disableable): New.
12031 (main): Handle --disable-packet and --disable-packet=LIST.
12033 * server.h (disable_packet_vCont, disable_packet_Tthread)
12034 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12036 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12038 * server.c (gdbserver_usage): Mention --version.
12040 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12042 * Makefile.in (gdbreplay.o): New rule.
12044 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12046 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12047 message, not gdbserver.
12049 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12050 Nathan Sidwell <nathan@codesourcery.com>
12051 Joseph Myers <joseph@codesourcery.com>
12053 * acinclude.m4: Include ../../config/acx.m4.
12054 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12055 * configure, config.in: Regenerate.
12056 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12057 * server.c (gdbserver_version): Print PKGVERSION.
12058 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12059 (main): Adjust gdbserver_usage calls.
12060 * gdbreplay.c (version, host_name): Add declarations.
12061 (gdbreplay_version, gdbreplay_usage): New.
12062 (main): Accept --version and --help options.
12064 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12066 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12067 (arm_breakpoint_at): Handle Thumb.
12068 (the_low_target): Add comment.
12070 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12072 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12074 2008-05-09 Doug Evans <dje@google.com>
12076 * server.h (decode_search_memory_packet): Declare.
12077 * remote-utils.c (decode_search_memory_packet): New fn.
12078 * server.c (handle_search_memory_1): New fn.
12079 (handle_search_memory): New fn.
12080 (handle_query): Process qSearch:memory packets.
12082 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12084 * regcache.c (registers_length): Remove.
12085 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12086 full register packet.
12087 * regcache.h (registers_length): Remove prototype.
12088 * server.h (PBUFSIZ): Define to 16384.
12090 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12092 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12093 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12094 powerpc-64l.o, and powerpc-altivec64l.o.
12095 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12096 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12097 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12098 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12099 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12102 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12103 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12104 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12105 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12106 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12107 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12108 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12109 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12110 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12111 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12114 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12115 (init_registers_powerpc_32l): ... this new prototype.
12116 (init_registers_powerpc_32): Remove, replace by ...
12117 (init_registers_powerpc_altivec32l): ... this new prototype.
12118 (init_registers_powerpc_e500): Remove, replace by ...
12119 (init_registers_powerpc_e500l): ... this new prototype.
12120 (init_registers_ppc64): Remove, replace by ...
12121 (init_registers_powerpc_64l): ... this new prototype.
12122 (init_registers_powerpc_64): Remove, replace by ...
12123 (init_registers_powerpc_altivec64l): ... this new prototype.
12124 (ppc_num_regs): Set to 73.
12125 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12126 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12127 (ppc_cannot_store_register): Handle orig_r3 and trap.
12128 (ppc_arch_setup): Update init_registers_... calls.
12129 (ppc_fill_gregset): Handle orig_r3 and trap.
12131 * inferiors.c (clear_inferiors): Reset current_inferior.
12133 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12135 * acinclude.m4: Add override.m4.
12136 * configure: Regenerate.
12138 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12140 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12141 initial call to init_register_ppc64.
12143 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12145 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12146 single powerpc*-*-linux* case.
12147 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12149 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12151 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12152 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12154 * linux-ppc-low.c: Include <elf.h>.
12155 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12156 (ppc_hwcap): New global variable.
12157 (ppc_regmap): Remove __SPE__ #ifdef sections.
12158 (ppc_regmap_e500): New global variable.
12159 (ppc_cannot_store_register): Update __SPE__ special case.
12160 (ppc_get_hwcap): New function.
12161 (ppc_arch_setup): Use it to determine whether inferior supports
12162 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12163 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12164 Do not access registers if target does not support AltiVec.
12165 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12166 Do not access registers if target does not support SPE.
12167 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12169 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12171 * linux-low.c (disabled_regsets, num_regsets): New.
12172 (use_regsets_p): Delete.
12173 (linux_wait_for_process): Clear disabled_regsets.
12174 (regsets_fetch_inferior_registers): Check and set it.
12175 (regsets_store_inferior_registers): Likewise.
12176 (linux_fetch_registers, linux_store_registers): Do not use
12178 (initialize_low): Allocate disabled_regsets.
12180 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12182 * Makefile.in (LIBOBJS): New.
12183 (OBS): Use LIBOBJS.
12184 (memmem.o): New rule.
12185 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12186 * configure: Regenerated.
12188 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12190 * server.c (handle_query): Never return "unsupported" for
12191 qXfer:features:read queries.
12193 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12195 * server.c (get_features_xml): Fix inverted condition.
12196 (handle_query): Always support qXfer:feature:read.
12198 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12200 * server.c (wrapper_argv): New.
12201 (start_inferior): Handle wrapper_argv. If set, expect an extra
12203 (gdbserver_usage): Document --wrapper.
12204 (main): Parse --wrapper.
12206 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12208 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12209 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12210 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12211 (ppc_set_pc): Likewise.
12212 (ppc_arch_setup): New function.
12213 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12214 of collect_register.
12215 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12217 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12219 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12220 instead of linux-ppc64-low.o.
12221 * linux-ppc64-low.c: Remove file.
12222 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12223 (linux-ppc64-low.o): Remove rule.
12225 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12226 (init_registers_powerpc_64): Likewise.
12227 (ppc_regmap): Conditionally define depending on __powerpc64__.
12228 (ppc_cannot_store_register): Do not special-case "fpscr" when
12229 compiled on __powerpc64__.
12230 (ppc_collect_ptrace_register): New function.
12231 (ppc_supply_ptrace_register): New function.
12232 (ppc_breakpoint): Change type to "unsigned int".
12233 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12234 (the_low_target): Conditionally provide initializers for the
12235 arch_setup member depending on __powerpc64__. Install
12236 collect_ptrace_register and supply_ptrace_register members.
12238 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12240 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12241 * server.c (gdbserver_xmltarget): Define.
12242 (get_features_xml): Use it to replace "target.xml" and arch_string.
12244 * configure.srv: Remove srv_xmltarget. Add XML files that were
12245 mentioned there to srv_xmlfiles instead. Remove conditional tests
12246 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12247 srv_xmlfiles and srv_regobj to include all possible choices.
12248 * configure.ac (srv_xmltarget): Remove.
12249 (srv_xmlfiles): Do not add "target.xml".
12250 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12251 checks for supplementary target information.
12252 * configure: Regenerate.
12253 * Makefile.in (XML_TARGET): Remove.
12254 (target.xml): Remove rule.
12255 (clean): Do not clean up target.xml.
12256 (.PRECIOUS): Do not mention target.xml.
12258 * target.h (struct target_ops): Remove arch_string member.
12259 * linux-low.c (linux_arch_string): Remove.
12260 (linux_target_ops): Remove arch_string initializer.
12261 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12262 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12263 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12264 * spu-low.c (spu_arch_string): Remove.
12265 (spu_target_ops): Remove arch_string initializer.
12266 * win32-low.c (win32_arch_string): Remove.
12267 (win32_target_ops): Remove arch_string initializer.
12268 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12269 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12270 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12272 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12274 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12275 by collect_ptrace_register and supply_ptrace_register hooks.
12276 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12277 instead of checking for the_low_target.left_pad_xfer.
12278 (usr_store_inferior_registers): Use collect_ptrace_register callback
12279 instead of checking for the_low_target.left_pad_xfer.
12281 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12282 (s390_supply_ptrace_register): Likewise.
12283 (s390_fill_gregset): Call s390_collect_ptrace_register.
12284 (the_low_target): Update.
12286 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12287 (ppc_supply_ptrace_register): Likewise.
12288 (the_low_target): Update.
12290 * linux-i386-low.c (the_low_target): Update.
12291 * linux-x86-64-low.c (the_low_target): Update.
12293 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12295 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12296 reg-s390.o and reg-s390x.o.
12298 * linux-low.c (new_inferior): New global variable.
12299 (linux_create_inferior, linux_attach): Set it.
12300 (linux_wait_for_process): Call the_low_target.arch_setup after the
12301 target has stopped for the first time.
12302 (initialize_low): Do not call the_low_target.arch_setup.
12304 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12305 (s390_set_pc): Likewise.
12306 (s390_arch_setup): New function.
12307 (the_low_target): Use s390_arch_setup as arch_setup routine.
12309 * regcache.c (realloc_register_cache): New function.
12310 (set_register_cache): Call it for each existing regcache.
12312 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12314 * server.h (init_registers): Remove prototype.
12316 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12317 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12318 instead of init_registers ().
12319 * linux-arm-low.c (init_registers_arm): Add prototype.
12320 (init_registers_arm_with_iwmmxt): Likewise.
12321 (the_low_target): Add initializer for arch_setup field.
12322 * linux-cris-low.c (init_registers_cris): Add prototype.
12323 (the_low_target): Add initializer for arch_setup field.
12324 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12325 (the_low_target): Add initializer for arch_setup field.
12326 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12327 (the_low_target): Add initializer for arch_setup field.
12328 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12329 (the_low_target): Add initializer for arch_setup field.
12330 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12331 (the_low_target): Add initializer for arch_setup field.
12332 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12333 (the_low_target): Add initializer for arch_setup field.
12334 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12335 (init_registers_mips64_linux): Likewise.
12336 (the_low_target): Add initializer for arch_setup field.
12337 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12338 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12339 (the_low_target): Add initializer for arch_setup field.
12340 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12341 (init_registers_powerpc_64): Likewise.
12342 (the_low_target): Add initializer for arch_setup field.
12343 * linux-s390-low.c (init_registers_s390): Add prototype.
12344 (init_registers_s390x): Likewise.
12345 (the_low_target): Add initializer for arch_setup field.
12346 * linux-sh-low.c (init_registers_sh): Add prototype.
12347 (the_low_target): Add initializer for arch_setup field.
12348 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12349 (the_low_target): Add initializer for arch_setup field.
12350 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12351 (the_low_target): Add initializer for arch_setup field.
12353 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12354 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12355 instead of init_registers ().
12356 * win32-arm-low.c (init_registers_arm): Add prototype.
12357 (the_low_target): Add initializer for arch_setup field.
12358 * win32-i386-low.c (init_registers_i386): Add prototype.
12359 (the_low_target): Add initializer for arch_setup field.
12361 * spu-low.c (init_registers_spu): Add prototype.
12362 (initialize_low): Call initialie_registers_spu () instead of
12363 initialize_registers ().
12365 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12367 * server.c (handle_v_requests): When handling the vRun and vAttach
12368 packets, if already debugging a process, don't kill it. Return an
12371 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12373 * server.c (handle_query): Correct length check.
12375 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12377 * win32-low.c (do_initial_child_stuff): Add process handle
12378 parameter. Set current_process_handle and current_process_id from the
12379 parameters. Clear globals.
12380 (win32_create_inferior): Don't set current_process_handle and
12381 current_process_id here. Instead pass them on the call to
12382 do_initial_child_stuff.
12383 (win32_attach): Likewise.
12384 (win32_clear_inferiors): New.
12385 (win32_kill): Don't close the current process handle or the
12386 current thread handle here. Instead call win32_clear_inferiors.
12387 (win32_detach): Don't open a new handle to the process. Call
12388 win32_clear_inferiors.
12389 (win32_join): Don't rely on current_process_handle; open a new
12390 handle using the process id.
12391 (win32_wait): Call win32_clear_inferiors when the inferior process
12394 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12396 * server.c (monitor_show_help): Add "exit".
12398 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12400 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12401 (clean): Add reg-xtensa.c.
12402 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12403 * configure.srv (xtensa*-*-linux*) New target.
12404 * linux-xtensa-low.c: New.
12405 * xtensa-xtregs.c: New.
12407 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12409 * hostio.c: Don't include errno.h.
12410 (errno_to_fileio_errno): Move to hostio-errno.
12411 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12412 error number outputting to the target->hostio_last_error callback.
12413 (hostio_packet_error): Use FILEIO_EINVAL directly.
12414 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12415 calls to hostio_error.
12416 * hostio-errno.c: New.
12417 * server.h (hostio_last_error_from_errno): Declare.
12418 * target.h (target_ops): Add hostio_last_error member.
12419 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12420 as hostio_last_error handler.
12421 * spu-low.c (spu_target_ops): Likewise.
12422 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12423 (wince_hostio_last_error): New functions.
12424 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12425 as hostio_last_error handler.
12426 (win32_target_ops) [!_WIN32_WCE]: Register
12427 hostio_last_error_from_errno as hostio_last_error handler.
12428 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12429 (hostio-errno.o): New rule.
12430 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12431 * configure.srv (srv_hostio_err_objs): New variable. Default to
12433 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12434 * configure: Regenerate.
12436 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12438 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12439 (linux_kill, linux_detach): Clean up the process list.
12440 * remote-utils.c (remote_open): Improve port number parsing.
12441 (putpkt_binary, input_interrupt): Only send interrupts if the target
12443 * server.c (extended_protocol): Make static.
12444 (attached): Define earlier.
12445 (exit_requested, response_needed, program_argv): New variables.
12446 (target_running): New.
12447 (start_inferior): Clear attached here.
12448 (attach_inferior): Set attached here.
12449 (require_running): Define.
12450 (handle_query): Use require_running and target_running. Implement
12452 (handle_v_attach, handle_v_run): New.
12453 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12454 (gdbserver_usage): Update.
12455 (main): Redo argument parsing. Handle --debug and --multi. Handle
12456 --attach along with other options or after the port. Save
12457 program_argv. Support no initial program. Resynchronize
12458 communication with GDB after an error. Handle "monitor exit".
12459 Use require_running and target_running. Always allow the extended
12460 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12461 restart in extended mode.
12462 * README: Refer to the GDB manual. Update --attach usage.
12464 2007-12-20 Andreas Schwab <schwab@suse.de>
12466 * linux-low.c (STACK_SIZE): Define.
12467 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12468 (linux_test_for_tracefork): Likewise.
12470 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12472 * linux-low.c (linux_wait_for_event): Update messages. Do not
12473 reinsert auto-delete breakpoints.
12474 * mem-break.c (struct breakpoint): Change return type of handler to
12476 (set_breakpoint_at): Update handler type.
12477 (reinsert_breakpoint_handler): Return 1 instead of calling
12479 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12481 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12482 * mem-break.h (set_breakpoint_at): Update handler type.
12483 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12484 * win32-low.c (auto_delete_breakpoint): New.
12485 (get_child_debug_event): Use it.
12487 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12489 * configure.ac: Check for pread and pwrite.
12490 * hostio.c (handle_pread): Fall back to lseek and read.
12491 (handle_pwrite): Fall back to lseek and write.
12492 * config.in, configure: Regenerated.
12494 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12496 * server.c (myresume): Add own_buf argument.
12497 (main): Update calls.
12499 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12501 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12502 * remote-utils.c (remote_open): Do not call disable_async_io.
12503 (block_async_io): Delete.
12504 (unblock_async_io): Make static.
12505 (initialize_async_io): New.
12506 * server.c (handle_v_cont): Handle async I/O here.
12507 (myresume): Likewise. Move other common resume tasks here...
12508 (main): ... from here. Call initialize_async_io. Disable async
12509 I/O before the main loop.
12510 * server.h (initialize_async_io): Declare.
12511 (block_async_io, unblock_async_io): Delete prototypes.
12512 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12514 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12516 * remote-utils.c (readchar): Allow binary data in received messages.
12518 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12520 * win32-low.c (attaching): New global.
12521 (win32_create_inferior): Clear the `attaching' global.
12522 (win32_attach): Set the `attaching' global.
12523 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12524 attaching. Only set a breakpoint at the entry point if not
12527 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12529 * server.c (main): Don't report dll events on the initial
12530 connection on attaches.
12532 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12534 * server.c (main): Relax numerical bases supported for the pid of
12535 the --attach command line argument.
12537 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12539 * win32-low.c (win32_attach): Call OpenProcess before
12540 DebugActiveProcess, not after. Add last error output to error
12543 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12545 * win32-low.c (win32_get_thread_context)
12546 (win32_set_thread_context): New functions.
12547 (thread_rec): Use win32_get_thread_context.
12548 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12549 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12552 2007-12-03 Leo Zayas
12553 Pedro Alves <pedro_alves@portugalmail.pt>
12555 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12557 (child_add_thread): Minor cleanup.
12558 (child_continue): Resume artificially suspended threads before
12559 calling ContinueDebugEvent.
12560 (suspend_one_thread): New.
12561 (fake_breakpoint_event): New.
12562 (get_child_debug_event): Change return type to int. Check here if
12563 gdb sent an interrupt request. If a soft interrupt was requested,
12564 fake a breakpoint event. Return 0 if there is no event to handle,
12566 (win32_wait): Don't check here if gdb sent an interrupt request.
12567 Ensure there is a valid event to handle.
12568 (win32_request_interrupt): Add soft interruption method as last
12571 2007-12-03 Leo Zayas
12572 Pedro Alves <pedro_alves@portugalmail.pt>
12574 * win32-low.h (win32_thread_info): Add descriptions to the
12575 structure members. Replace `suspend_count' counter by a
12577 * win32-low.c (thread_rec): Update condition of when to get the
12578 context from the inferior. Rely on ContextFlags being set if it
12579 has already been retrieved. Only suspend the inferior thread if
12580 we haven't already. Warn if that fails.
12581 (continue_one_thread): s/suspend_count/suspended/. Only call
12582 ResumeThread once. Warn if that fails.
12584 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12586 * win32-low.c (win32_wait): Don't read from the inferior when it
12587 has already exited.
12589 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12591 * Makefile.in (win32_low_h): New variable.
12592 (win32-low.o): Add dependency on $(win32_low_h).
12593 (win32-arm-low.o, win32-i386-low.o): New rules.
12595 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12597 * hostio.c: Correct copyright year.
12599 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12601 * Makefile.in (OBS): Add hostio.o.
12602 (hostio.o): New rule.
12603 * server.h (handle_vFile): Declare.
12604 * hostio.c: New file.
12605 * server.c (handle_v_requests): Take packet_len and new_packet_len
12606 for binary packets. Call handle_vFile.
12607 (main): Update call to handle_v_requests.
12609 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12611 * linux-low.c: Include <sched.h>.
12613 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12615 * linux-low.c (linux_tracefork_grandchild): New.
12616 (linux_tracefork_child): Use clone.
12617 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12619 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12621 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12623 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12625 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12627 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12629 * inferiors.c (change_inferior_id): Delete.
12630 (add_pid_to_list, pull_pid_from_list): New.
12631 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12632 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12633 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12634 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12635 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12636 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12637 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12638 (using_threads): Always set to 1.
12639 (handle_extended_wait): New.
12640 (add_process): Do not set TID.
12641 (linux_create_inferior): Set must_set_ptrace_flags.
12642 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12643 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12644 (linux_thread_alive): Rename TID argument to LWPID.
12645 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12646 (linux_wait_for_event): Do not use TID or check using_threads. Update
12647 call to dead_thread_notify. Call handle_extended_wait.
12648 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12649 (send_sigstop): Delete sigstop_sent.
12650 (wait_for_sigstop): Avoid TID.
12651 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12652 (linux_test_for_tracefork): New.
12653 (linux_lookup_signals): Use thread_db_active and
12654 linux_supports_tracefork_flag.
12655 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12656 * linux-low.h (get_process_thread): Avoid TID.
12657 (struct process_ifo): Move thread_known and tid to the end. Remove
12659 (linux_attach_lwp, thread_db_init): Update prototypes.
12660 * server.h (change_inferior_id): Delete prototype.
12661 (add_pid_to_list, pull_pid_from_list): New prototypes.
12662 * thread-db.c (thread_db_use_events): New.
12663 (find_first_thread): Rename to...
12664 (find_one_thread): ...this. Update callers and messages. Do not
12665 call fatal. Check thread_db_use_events. Do not call
12666 change_inferior_id or new_thread_notify.
12667 (maybe_attach_thread): Update. Do not call new_thread_notify.
12668 (thread_db_init): Set thread_db_use_events. Check use_events.
12669 * utils.c (fatal, warning): Correct message prefix.
12671 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12673 * Makefile.in (clean): Remove new files.
12674 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12675 (powerpc-64.o, powerpc-64.c): New rules.
12676 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12677 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12679 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12681 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12682 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12683 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12684 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12685 (target_regsets): Add AltiVec and SPE register sets.
12686 * configure.ac: Check for AltiVec and SPE.
12687 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12688 (ppc_fill_vrregset, ppc_store_vrregset): New.
12689 (target_regsets): Add AltiVec register set.
12690 * configure: Regenerated.
12692 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12694 * linux-low.c (O_LARGEFILE): Define.
12695 (linux_read_memory): Use /proc/PID/mem.
12696 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12697 * configure, config.in: Regenerated.
12699 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12701 * linux-low.c (linux_wait_for_event): Do not pass signals while
12704 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12706 * win32-low.c (create_process): New.
12707 (win32_create_inferior): Use create_process instead of
12708 CreateProcess. If create_process failed retry appending an ".exe"
12709 suffix. Store the GetLastError result immediatelly after
12710 create_process calls and use it on the call to error.
12712 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12714 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12716 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12718 * configure.ac: Switch license to GPLv3.
12720 2007-08-01 Michael Snyder <msnyder@access-company.com>
12722 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12724 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12726 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12728 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12729 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12730 CloseToolhelp32Snapshot.
12731 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12732 CloseToolhelp32Snapshot.
12734 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12736 * server.c (main): Check for inferior exit before main loop.
12738 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12740 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12741 instead of on tmp_desc.
12743 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12744 Daniel Jacobowitz <dan@codesourcery.com>
12746 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12747 (add_thread): Minor cleanups.
12748 (clear_inferiors): Move lower in the file. Clear the DLL
12750 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12751 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12752 (xml_escape_text): New.
12753 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12755 (handle_v_cont): Report errors.
12756 (gdbserver_version): Update.
12757 (main): Correct size of own_buf. Do not report initial DLL events.
12758 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12759 (unloaded_dll, xml_escape_text): New.
12760 * win32-low.c (enum target_waitkind): Update comments.
12761 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12762 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12763 (win32_EnumProcessModules, win32_GetModuleInformation)
12764 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12765 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12766 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12767 (win32_Module32First, win32_Module32Next, load_toolhelp)
12768 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12769 (get_child_debug_event): Handle DLL events.
12770 (win32_wait): Likewise.
12772 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12774 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12775 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12777 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12779 * win32-low.c (handle_output_debug_string): Ignore event if not
12782 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12784 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12786 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12788 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12790 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12792 * inferiors.c (change_inferior_id): Add comment.
12793 * linux-low.c (check_removed_breakpoint): Add an early
12794 prototype. Improve debug output.
12795 (linux_attach): Doc update.
12796 (linux_detach_one_process, linux_detach): Clean up before releasing
12798 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12799 * linux-low.h (struct process_info): Doc improvement.
12800 * mem-break.c (delete_all_breakpoints): New.
12801 * mem-break.h (delete_all_breakpoints): New prototype.
12802 * thread-db.c (find_first_thread): New.
12803 (thread_db_create_event): Call it instead of
12804 thread_db_find_new_threads. Clean up unused variables.
12805 (maybe_attach_thread): Remove first thread handling.
12806 (thread_db_find_new_threads): Use find_first_thread.
12807 (thread_db_get_tls_address): Likewise.
12809 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12811 * thread-db.c (thread_db_find_new_threads): Add prototype.
12812 (thread_db_create_event): Check for the main thread before adding
12814 (maybe_attach_thread): Only enable event reporting if TID == 0.
12815 (thread_db_get_tls_address): Check for new threads.
12817 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12819 * linux-low.c (linux_create_inferior): Try execv before execvp.
12820 * spu-low.c (spu_create_inferior): Likewise.
12822 2007-06-13 Mike Frysinger <vapier@gentoo.org>
12824 * linux-low.c (linux_create_inferior): Change execv to execvp.
12825 * spu-low.c (spu_create_inferior): Likewies.
12827 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12829 * Makefile.in (clean): Clean new files instead of deleted ones.
12830 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12831 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12833 * configure.srv: Specify XML files and new regformats for MIPS and
12835 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12836 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12837 an entry for the restart register.
12838 (mips_cannot_fetch_register, mips_cannot_store_register)
12839 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12840 register names to match the XML descriptions.
12841 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12842 restart register instead of $0.
12844 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12845 Markus Deuling <deuling@de.ibm.com>
12847 * remote-utils.c (decode_xfer_write): New function.
12848 * server.h (decode_xfer_write): Add prototype.
12849 * server.c (handle_query): Add PACKET_LEN argument. Support
12850 qXfer:spu:read and qXfer:spu:write packets.
12851 (main): Pass packet_len to handle_query.
12852 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12853 * target.h (target_ops): Add qxfer_spu.
12855 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12857 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12858 accessing non-seekable spufs files.
12860 2007-05-16 Markus Deuling <deuling@de.ibm.com>
12862 * server.c (handle_query): Add reply for qC packet.
12864 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12865 Leo Zayas <lerele@champenstudios@com>
12867 * server.h (check_remote_input_interrupt_request): New function.
12868 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12869 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12870 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12871 (check_remote_input_interrupt_request): New function.
12872 * server.h (check_remote_input_interrupt_request): Declare.
12873 * win32-low.c (winapi_DebugBreakProcess,
12874 winapi_GenerateConsoleCtrlEvent): New typedefs.
12875 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12877 (win32_wait): Check for remote interrupt request
12878 with check_remote_input_interrupt_request.
12879 (win32_request_interrupt): New function.
12880 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12882 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12884 * win32-low.c (debug_registers_changed,
12885 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12886 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12887 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12888 (thread_rec): Get context using the low target.
12889 (child_add_thread): Call thread_added on the low target,
12890 which does the same thing.
12892 (do_initial_child_stuff): Remove debug registers references.
12893 Set context using the low target. Resume threads after
12894 setting the contexts.
12895 (child_continue): Remove dead variable. Remove debug
12896 registers references.
12897 (child_fetch_inferior_registers): Go through the low target.
12898 (do_child_store_inferior_registers): Remove.
12899 (child_store_inferior_registers): Go through the low target.
12900 (win32_resume): Remove debug registers references.
12901 Set context using the low target.
12902 (handle_exception): Change return type to void. Don't record
12903 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12904 first chance exception.
12905 (get_child_debug_event): Change return type to void. Remove
12906 goto loop. Always return after waiting for debug event.
12907 (win32_wait): Convert to switch statement. Handle spurious
12910 * win32-i386-low.c (debug_registers_changed,
12911 debug_registers_used): New.
12912 (initial_stuff): Rename to ...
12913 (i386_initial_stuff): ... this. Clear debug registers
12915 (store_debug_registers): Delete.
12916 (i386_get_thread_context): New.
12917 (load_debug_registers): Delete.
12918 (i386_set_thread_context): New.
12919 (i386_thread_added): New.
12920 (single_step): Rename to ...
12921 (i386_single_step): ... this.
12922 (do_fetch_inferior_registers): Rename to ...
12923 (i386_fetch_inferior_register): ... this.
12924 (i386_store_inferior_register): New.
12925 (the_low_target): Adapt to new interface.
12927 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12928 (arm_get_thread_context): New.
12929 (arm_set_thread_context): New.
12931 (do_fetch_inferior_registers): Rename to ...
12932 (arm_fetch_inferior_register): ... this.
12933 (arm_store_inferior_register): New.
12934 (arm_wince_breakpoint): Reimplement as unsigned long.
12935 (arm_wince_breakpoint_len): Define.
12936 (the_low_target): Adapt to new interface.
12938 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12939 load_debug_registers. Add get_thread_context, set_thread_context,
12940 thread_added and store_inferior_register. Rename
12941 fetch_inferior_registers to fetch_inferior_register.
12942 (regptr): Remove declaration.
12944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12946 * linux-low.c (linux_detach): Change return type to int. Return 0.
12947 * spu-low.c (spu_detach): Likewise.
12949 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12951 * target.h (target_ops): Change return type of detach to int.
12953 (join_inferior): New.
12954 * server.c (main): Don't skip detach support on mingw32.
12955 If the inferior doesn't support detaching return error.
12956 Call join_inferior instead of using waitpid.
12957 * linux-low.c (linux_join): New.
12958 (linux_target_op): Add linux_join.
12959 * spu-low.c (spu_join): New.
12960 (spu_target_ops): Add spu_join.
12961 * win32-low.c (win32_detach): Adapt to new interface.
12962 Reopen current_process_handle before detaching. Issue a child
12963 resume before detaching.
12965 (win32_target_op): Add win32_join.
12967 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12969 * win32-low.c (win32-attach): Fix return value.
12970 * target.h (target_ops): Describe ATTACH return values.
12972 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12974 * win32-low.c (GETPROCADDRESS): Define.
12975 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12976 (winapi_DebugSetProcessKillOnExit): Likewise.
12977 (win32_create_inferior): Force usage of ansi CreateProcessA.
12978 (win32_attach): Use GETPROCADDRESS.
12979 (win32_detach): Likewise.
12981 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12983 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12985 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12987 * win32-low.c: Commit leftover changes from 2007-03-29.
12989 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12991 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12992 fields short instead of int. Add explicit padding.
12993 (i387_cache_to_fsave): Remove unnecessary casts.
12994 (i387_fsave_to_cache): Doc fix.
12995 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12997 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12999 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13000 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13002 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13004 * configure.srv (arm*-*-mingw32ce*): Move near the other
13007 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13009 * configure.ac: Add errno checking.
13010 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13011 sys/file.h and malloc.h.
13012 (AC_CHECK_DECLS): Add perror.
13013 (srv_mingwce): Handle.
13014 * configure.srv (i[34567]86-*-cygwin*): Add
13015 win32-i386-low.o to srv_tgtobj.
13016 (i[34567]86-*-mingw*): Likewise.
13017 (arm*-*-mingw32ce*): Add case.
13018 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13019 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13020 [__MINGW32CE__] (strerror): New function.
13021 [__MINGW32CE__] (errno): Define to GetLastError.
13022 [__MINGW32CE__] (COUNTOF): New macro.
13023 (remote_open): Remove extra close call.
13024 * mem-break.c (delete_breakpoint_at): New function.
13025 * mem-break.h (delete_breakpoint_at): Declare.
13026 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13027 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13028 [USE_WIN32API] (read, write): Add char* casts.
13029 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13030 * server.h: Include wincecompat.h on Windows CE.
13031 [HAVE_ERRNO_H]: Check.
13032 (perror): Declare if not declared.
13033 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13034 (perror_with_name): Remove errno declaration.
13035 * wincecompat.h: New.
13036 * wincecompat.c: New.
13037 * win32-low.h: New.
13038 * win32-arm-low.c: New.
13039 * win32-i386-low.c: New.
13040 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13041 (OUTMSG2): Make it safe.
13043 (COUNTOF): New macro.
13044 (NUM_REGS): Get it from the low target.
13045 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13046 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13047 (thread_rec): Let low target handle debug registers.
13048 (child_add_thread): Likewise.
13049 (child_init_thread_list): Likewise.
13050 (continue_one_thread): Likewise.
13052 (do_child_fetch_inferior_registers): Move to ...
13053 * win32-i386-low.c: ... here, and rename to ...
13054 (do_fetch_inferior_registers): ... this.
13055 * win32-low.c (child_fetch_inferior_registers):
13056 Go through the low target.
13057 (do_child_store_inferior_registers): Use regptr.
13058 (strwinerror): New function.
13059 (win32_create_inferior): Handle Windows CE.
13060 Use strwinerror instead of strerror on Windows error
13061 codes. Add program to the error output.
13062 Don't close the main thread handle on Windows CE.
13063 (win32_attach): Use coredll.dll on Windows CE.
13064 (win32_kill): Close current process and current
13066 (win32_detach): Use coredll.dll on Windows CE.
13067 (win32_resume): Let low target handle debug registers, and
13069 (handle_exception): Add/Remove initial breakpoint. Avoid
13070 non-existant WSTOPSIG on Windows CE.
13071 (win32_read_inferior_memory): Cast to remove warning.
13072 (win32_arch_string): Go through the low target.
13073 (initialize_low): Call set_breakpoint_data with the low
13074 target's breakpoint.
13075 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13076 FOP_REGNUM, mappings): Move to ...
13077 * win32-i386-low.c: ... here.
13078 * win32-low.c (win32_thread_info): Move to ...
13079 * win32-low.h: ... here.
13080 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13081 win32-arm-low.c and wincecompat.c.
13082 (all:): Add $EXEEXT.
13083 (install-only:): Likewise.
13084 (gdbserver:): Likewise.
13085 (gdbreplay:): Likewise.
13086 * config.in: Regenerate.
13087 * configure: Regenerate.
13089 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13091 * win32-low.c: Rename typedef thread_info to
13092 win32_thread_info throughout.
13094 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13096 * win32-i386-low.c: Rename to ...
13097 * win32-low.c: ... this.
13098 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13099 * Makefile.in: Likewise.
13101 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13103 * remote-utils.c (monitor_output): Constify msg parameter.
13104 * server.h (monitor_output): Likewise.
13105 * win32-i386-low.c (handle_output_debug_string): New.
13106 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13107 handle_output_debug_string.
13108 (get_child_debug_event): Likewise.
13110 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13112 * server.c (main): Correct strtoul check.
13114 2007-03-27 Jon Ringle <jon@ringle.org>
13116 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13118 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13120 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13122 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13124 * terminal.h: Check HAVE_SGTTY_H.
13126 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13128 * remote-utils.c (remote_open): Print out the assigned port number.
13130 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13132 * remote-utils.c (monitor_output): New function.
13133 * server.c (debug_threads): Define here.
13134 (monitor_show_help): New function.
13135 (handle_query): Handle qRcmd.
13136 (main): Do not handle 'd' packet.
13137 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13138 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13141 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13143 * Makefile.in (EXEEXT): New.
13144 (clean): Use $(EXEEXT).
13146 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13148 * target.h (target_ops): Rename send_signal to request_interrupt,
13149 and remove enum target_signal parameter.
13150 * linux-low.c (linux_request_interrupt): Rename from
13151 linux_send_signal, and always send SIGINT.
13152 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13153 and always send SIGINT.
13154 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13156 (input_interrupt): Likewise.
13158 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13160 * server.c (get_features_xml): Check if target implemented
13162 * win32-i386-low.c (win32_arch_string): New.
13163 (win32_target_ops): Add win32_arch_string as arch_string member.
13165 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13167 * spu-low.c (spu_arch_string): New.
13168 (spu_target_ops): Add spu_arch_string.
13170 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13172 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13173 * configure.ac: Do not check for terminal.h.
13174 * configure, config.in: Regenerated.
13176 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13178 * Makefile.in (OBS): Add $(XML_BUILTIN).
13179 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13181 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13182 (arm-with-iwmmxt.c): New.
13183 * config.in, configure: Regenerate.
13184 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13185 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13186 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13187 (arm*-*-linux*): Add iWMMXt and regset support.
13188 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13189 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13190 (arm_store_wmmxregset, target_regsets): New.
13191 * server.c (get_features_xml): Take annex argument. Check builtin
13193 (handle_query): Handle multiple annexes.
13195 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13197 * remote-utils.c [USE_WIN32API] (read, write): Define.
13198 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13201 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13203 * linux-i386-low.c (the_low_target): Set arch_string.
13204 * linux-x86-64-low.c (the_low_target): Likewise.
13205 * linux-low.c (linux_arch_string): New.
13206 (linux_target_ops): Add it.
13207 * linux-low.h (struct linux_target_ops): Add arch_string.
13208 * server.c (write_qxfer_response): Use const void * for DATA.
13209 (get_features_xml): New.
13210 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13211 * target.h (struct target_ops): Add arch_string method.
13213 2007-01-03 Denis Pilat <denis.pilat@st.com>
13214 Daniel Jacobowitz <dan@codesourcery.com>
13216 * linux-low.c (linux_kill): Handle being called with no threads.
13217 * win32-i386-low.c (win32_kill): Likewise.
13218 (get_child_debug_event): Clear current_process_handle.
13220 2006-12-30 Denis PILAT <denis.pilat@st.com>
13221 Daniel Jacobowitz <dan@codesourcery.com>
13223 * remote-utils.c (remote_open): Check the type of specified
13224 serial port devices before opening them.
13225 * server.c (main): Kill the inferior if an error occurs during
13226 the first remote_open.
13228 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13230 * README: Update supported targets.
13232 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13234 * Makefile.in (clean): Remove reg-mips64.c.
13235 (reg-mips64.c, reg-mips64.o): New rules.
13236 * configure.srv: Handle mips64. Include regset support for mips.
13237 * linux-mips-low.c (union mips_register): New.
13238 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13239 (mips_breakpoint, mips_breakpoint_at): Use int.
13240 (mips_collect_register, mips_supply_register)
13241 (mips_collect_register_32bit, mips_supply_register_32bit)
13242 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13243 (mips_store_fpregset, target_regsets): New.
13244 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13246 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13248 * configure.srv: Add target "spu*-*-*".
13249 * Makefile.in (clean): Remove reg-spu.c.
13250 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13251 * spu-low.c: New file.
13253 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13255 * configure.ac: Correct td_thr_tls_get_addr test.
13256 * configure: Regenerated.
13258 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13260 * linux-low.c (linux_wait_for_event): Reformat. Use the
13261 pass_signals array.
13262 * remote-utils.c (decode_address_to_semicolon): New.
13263 * server.c (pass_signals, handle_general_set): New.
13264 (handle_query): Mention QPassSignals for qSupported.
13265 (main): Call handle_general_set.
13266 * server.h (pass_signals, decode_address_to_semicolon): New.
13268 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13270 * server.c (handle_query): Correct error handling for read_auxv.
13272 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13274 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13275 and srv_linux_thread_db to yes.
13276 * linux-s390-low.c (s390_fill_gregset): New function.
13277 (target_regsets): Define data structure.
13279 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13281 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13282 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13283 * config.in, configure: Regenerated.
13284 * inferiors.c (gdb_id_to_thread): New function.
13285 (gdb_id_to_thread_id): Use it.
13286 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13287 * linux-low.h (struct process_info): Add th member.
13288 (thread_db_get_tls_address): New prototype.
13289 * remote-utils.c (decode_address): Make non-static.
13290 * server.c (handle_query): Handle qGetTLSAddr.
13291 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13292 * target.h (struct target_ops): Add get_tls_address.
13293 * thread-db.c (maybe_attach_thread): Save the thread handle.
13294 (thread_db_get_tls_address): New.
13296 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13298 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13299 (linux_resume_one_process): Take a siginfo_t *. Update all
13300 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13301 (struct pending_signals): Add a siginfo_t.
13302 (linux_wait_for_process): Always set last_status.
13303 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13304 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13305 * linux-low.h (struct process_info): Add last_status.
13307 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13309 * remote-utils.c (try_rle): New function.
13310 (putpkt_binary): Use it.
13312 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13314 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13315 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13316 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13317 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13318 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13321 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13323 * server.c (terminal_fd): New variable.
13324 (old_foreground_pgrp): Likewise.
13325 (restore_old_foreground_pgrp): New function.
13326 (start_inferior): Record the terminal file descriptor in terminal_fd
13327 and its original foreground group in old_foreground_pgrp. Register
13328 restore_old_foreground_pgrp with atexit().
13330 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13332 * server.c (handle_query): Correct qPart to qXfer.
13334 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13336 * configure.ac: Check for more headers which are missing on
13337 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13338 * configure.srv: Add Cygwin and mingw32.
13339 * remote-utils.c: Don't include headers unconditionally which
13340 are missing on mingw32. Include <winsock.h> for mingw32.
13341 (remote_open): Adjust for mingw32 support. Flush
13342 standard error after writing to it.
13343 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13344 (unblock_async_io, enable_async_io, disable_async_io)
13345 (readchar, getpkt): Update for Winsock support.
13346 (prepare_resume_reply): Expect a protocol signal number.
13347 * server.c: Disable <sys/wait.h> on mingw32.
13348 (start_inferior): Adjust for mingw32 support. Flush
13349 standard error after writing to it.
13350 (attach_inferior): Likewise. Use protocol signal
13352 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13354 * win32-i386-low.c: New file.
13355 * Makefile.in (XM_CLIBS): Set.
13356 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13357 (win32-i386-low.o): New dependency rule.
13358 * linux-low.c (linux_wait): Use target signal numbers.
13359 * target.h (struct target_ops): Doc fix.
13360 * server.h (target_signal_to_name): New prototype.
13361 * gdbreplay.c: Don't include headers unconditionally which
13362 are missing on mingw32. Include <winsock.h> for mingw32.
13363 (remote_close, remote_open): Adjust for Winsock support.
13364 * configure, config.in: Regenerated.
13366 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13368 * server.c (decode_xfer_read, write_qxfer_response): New.
13369 (handle_query): Take a packet length argument. Handle
13370 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13371 the qSupported response.
13372 (main): Update call to handle_query.
13374 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13376 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13377 (putpkt_binary): Renamed from putpkt and adjusted for binary
13379 (putpkt): New wrapper for putpkt_binary.
13380 (readchar): Don't mask off the high bit.
13381 (decode_X_packet): New function.
13382 * server.c (main): Call putpkt_binary if a handler sets the packet
13383 length. Save the length of the incoming packet. Handle 'X'.
13384 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13386 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13388 * server.c (handle_query): Handle qSupported.
13390 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13392 * remote-utils.c (all_symbols_looked_up): New variable.
13393 (look_up_one_symbol): Check it.
13394 * server.h (look_up_one_symbol): New declaration.
13395 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13397 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13399 * Makefile.in (linux-arm-low.o): Update dependencies.
13400 * linux-arm-low.c: Include "gdb_proc_service.h".
13401 (PTRACE_GET_THREAD_AREA): Define.
13402 (ps_get_thread_area): New function.
13404 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13406 * configure.srv (m68k*-*-uclinux*): New target.
13407 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13408 (linux_resume_one_process): Remove extraneous cast.
13409 (linux_read_offsets): New.
13410 (linux_target_op): Add linux_read_offsets on mmuless systems.
13411 * server.c (handle_query): Add qOffsets logic.
13412 * target.h (struct target_ops): Add read_offsets.
13414 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13416 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13417 (PTRACE_GET_THREAD_AREA): Define.
13418 (ps_get_thread_area): New function.
13419 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13420 (linux-x86-64-low.o): Update.
13422 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13424 * configure.ac: Remove checks for prfpregset_t.
13425 * gdb_proc_service.h: New file.
13426 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13427 new "gdb_proc_service.h".
13428 * proc-service.c: Likewise.
13429 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13430 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13431 * Makefile.in (gdb_proc_service_h): Updated.
13432 * configure, config.in: Regenerated.
13434 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13436 * remote-utils.c (prepare_resume_reply): Move declaration
13437 of gdb_id_from_wait to the top of the block.
13439 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13441 * linux-low.c (regsets_store_inferior_registers): Read the regset
13442 from the target before filling it.
13444 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13446 * server.c (attach_inferior): Return SIGTRAP for a successful
13449 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13451 * Makefile.in (OBS): Add version.o.
13452 (STAGESTUFF): Delete.
13453 (version.o): Add dependencies.
13454 (version.c): Replace rule.
13455 (clean): Remove version.c.
13456 * server.c (gdbserver_version): New.
13457 (gdbserver_usage): Use printf.
13458 (main): Handle --version and --help.
13459 * server.h (version, host_name): Add declarations.
13461 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13473 * linux-x86-64-low.c:
13475 * linux-s390-low.c:
13476 * linux-ppc64-low.c:
13478 * linux-mips-low.c:
13479 * linux-m68k-low.c:
13480 * linux-m32r-low.c:
13483 * linux-ia64-low.c:
13484 * linux-i386-low.c:
13485 * linux-crisv32-low.c:
13497 * gdbserver.1: Add (C) after Copyright. Update the FSF
13500 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13502 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13503 (arm_breakpoint_at): Recognize both breakpoints.
13504 (the_low_target): Use the correct breakpoint instruction.
13506 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13508 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13509 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13510 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13511 (the_low_target): Update.
13513 2005-10-25 Andreas Schwab <schwab@suse.de>
13515 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13517 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13518 (ia64_num_regs): Reduce to 462.
13520 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13522 * acinclude.m4: Correct quoting.
13523 * aclocal.m4: Regenerated.
13525 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13526 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13527 (thread_db_init): Call thread_db_err_str.
13528 * configure.ac: Check for TD_VERSION.
13529 * config.in, configure: Regenerated.
13531 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13533 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13535 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13537 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13538 is not available. Define HAVE_PTRACE_GETREGS if it is.
13539 * config.in, configure: Regenerated.
13540 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13541 * linux-i386-low.c, linux-m68k-low.c: Update to use
13542 HAVE_PTRACE_GETREGS.
13543 * linux-low.c (regsets_fetch_inferior_registers)
13544 (regsets_store_inferior_registers): Only return 0 if we processed
13546 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13547 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13549 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13551 * inferiors.c (struct thread_info): Add gdb_id.
13552 (add_thread): Add gdb_id argument.
13553 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13554 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13555 calls to add_thread.
13556 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13557 * server.c (handle_query): Use thread_to_gdb_id.
13558 (handle_v_cont, main): Use gdb_id_to_thread_id.
13559 * server.h (add_thread): Update prototype.
13560 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13563 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13565 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13566 left-padded registers.
13567 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13568 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13570 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13572 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13573 * configure: Regenerate.
13574 * config.in: Regenerate.
13575 * server.h (NEED_DECLARATION_STRERROR):
13576 Replace with !HAVE_DECL_STRERROR.
13578 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13580 * linux-low.c (linux_wait, linux_send_signal): Don't test
13581 an unsigned long variable for > 0 if it could be MAX_ULONG.
13582 * server.c (myresume): Likewise.
13583 * target.c (set_desired_inferior): Likewise.
13585 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13587 * configure.ac: Simplify and improve check for socklen_t.
13588 * configure, config.in: Regenerate.
13590 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13592 * acconfig.h: Remove.
13593 * configure.ac: Add a test for socklen_t. Use three-argument
13594 AC_DEFINE throughout.
13595 * config.in: Regenerated using autoheader 2.59.
13596 * configure: Regenerated.
13598 * gdbreplay.c (socklen_t): Provide a default.
13599 (remote_open): Use socklen_t.
13600 * remote-utils.c (socklen_t): Provide a default.
13601 (remote_open): Use socklen_t.
13602 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13605 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13607 * linux-low.c (linux_read_memory, linux_write_memory)
13608 (linux_read_auxv): Likewise.
13609 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13610 (check_mem_write): Likewise.
13611 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13613 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13614 (registers_from_string, register_data): Likewise.
13615 * server.c (handle_query, main): Likewise.
13616 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13617 (decode_M_packet): Likewise.
13618 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13619 * target.h (struct target_ops): Update read_memory, write_memory,
13621 (read_inferior_memory, write_inferior_memory): Update.
13622 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13623 to unsigned char *.
13624 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13625 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13626 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13627 linux-s390-low.c, linux-sh-low.c: Update for changes in
13628 read_inferior_memory and the_low_target->breakpoint.
13630 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13632 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13633 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13634 * configure.srv: Add powerpc64-*-linux*.
13635 * linux-ppc64-low.c: New file.
13637 2005-05-23 Orjan Friberg <orjanf@axis.com>
13639 * linux-cris-low.c: New file with support for CRIS.
13640 * linux-crisv32-low.c: Ditto for CRISv32.
13641 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13642 (clean): Add reg-cris.c and reg-crisv32.c.
13643 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13644 reg-crisv32.o, and reg-crisv32.c to make rules.
13645 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13646 recognized targets.
13648 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13650 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13651 of sizeof (PTRACE_XFER_TYPE).
13652 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13654 2005-05-12 Orjan Friberg <orjanf@axis.com>
13656 * target.h (struct target_ops): Add insert_watchpoint,
13657 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13658 pointers for hardware watchpoint support.
13659 * linux-low.h (struct linux_target_ops): Ditto.
13660 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13661 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13662 to linux_target_ops.
13663 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13665 * server.c (main): Recognize 'Z' and 'z' packets.
13667 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13669 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13670 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13671 (the_low_target): Add new members.
13673 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13675 * proc-service.c (ps_lgetregs): Search all_processes instead of
13678 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13680 * server.c (start_inferior): Change return type to int.
13681 (attach_inferior): Change sigptr to int *.
13682 (handle_v_cont, handle_v_requests): Change signal to int *.
13683 (main): Change signal to int.
13685 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13687 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13688 * configure.srv: Add m32r*-*-linux*.
13689 * linux-m32r-low.c: New file.
13691 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13693 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13695 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13697 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13698 Take unsigned long arguments for PIDs.
13699 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13700 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13701 (wait_for_sigstop, linux_resume_one_process)
13702 (regsets_fetch_inferior_registers, linux_send_signal)
13703 (linux_read_auxv): Likewise. Update the types of variables holding
13704 PIDs. Update format string specifiers.
13705 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13706 * remote-utils.c (prepare_resume_reply): Likewise.
13707 * server.c (cont_thread, general_thread, step_thread)
13708 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13710 (handle_query): Update format specifiers.
13711 (handle_v_cont, main): Use strtoul for thread IDs.
13712 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13713 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13714 (general_thread, step_thread, thread_from_wait)
13715 (old_thread_from_wait): Update.
13716 * target.h (struct thread_resume): Use unsigned long for THREAD.
13717 (struct target_ops): Use unsigned long for arguments to attach and
13720 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13722 * acinclude.m4: Include bfd/bfd.m4 directly.
13723 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13724 <agriffis@toolchain.org>.
13725 * aclocal.m4, configure: Regenerated.
13727 2005-01-07 Andrew Cagney <cagney@gnu.org>
13729 * configure.ac: Rename configure.in, require autoconf 2.59.
13730 * configure: Re-generate.
13732 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13734 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13735 LIBS when finished.
13736 * aclocal.m4: Regenerated.
13737 * configure: Regenerated.
13739 2004-11-21 Andreas Schwab <schwab@suse.de>
13741 * linux-m68k-low.c (m68k_num_gregs): Define.
13742 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13743 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13744 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13745 (m68k_breakpoint_at): New. Add to the_low_target.
13747 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13748 srv_linux_thread_db to yes.
13750 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13752 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13753 (ARCH_SET_FS): Likewise.
13754 (ARCH_GET_FS): Likewise.
13755 (ARCH_GET_GS): Likewise.
13757 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13759 * linux-i386-low.c (ps_get_thread_area): New.
13760 * linux-x86-64-low.c (ps_get_thread_area): New.
13761 * linux-low.c: Include <sys/syscall.h>.
13762 (linux_kill_one_process): Don't kill the first thread here.
13763 (linux_kill): Kill the first thread here.
13764 (kill_lwp): New function.
13765 (send_sigstop, linux_send_signal): Use it.
13766 * proc-service.c: Clean up #ifdefs.
13767 (fpregset_info): Delete.
13768 (ps_lgetregs): Update and enable implementation.
13769 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13771 * remote-utils.c (struct sym_cache, symbol_cache): New.
13772 (input_interrupt): Print a clearer message.
13773 (async_io_enabled): New variable.
13774 (enable_async_io, disable_async_io): Use it. Update comments.
13775 (look_up_one_symbol): Use the symbol cache.
13776 * thread-db.c (thread_db_look_up_symbols): New function.
13777 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13779 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13781 * configure.in: Test for -rdynamic.
13782 * configure: Regenerated.
13783 * Makefile (INTERNAL_LDFLAGS): New.
13784 (gdbserver, gdbreplay): Use it.
13786 2004-09-02 Andrew Cagney <cagney@gnu.org>
13788 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13790 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13792 * linux-low.c (linux_wait): Clear all_processes list also.
13794 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13796 * linux-low.c: Include <errno.h>. Remove extern declaration of
13799 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13801 * gdbreplay.c, server.h, utils.c: Update copyright years.
13803 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13805 * server.c (main): Print child status or termination signal from
13806 variable 'signal', not 'sig'.
13808 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13810 * linux-low.c (linux_read_memory): Change return type to
13811 int. Check for and return error from ptrace().
13812 * target.c (read_inferior_memory): Change return type to int. Pass
13813 back return status from the_target->read_memory().
13814 * target.h (struct target_ops): Adapt *read_memory() prototype.
13816 (read_inferior_memory): Adapt prototype.
13817 * server.c (main): Return an error packet if
13818 read_inferior_memory() returns an error.
13820 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
13822 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13823 Unify with other clean targets.
13825 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13827 * server.c (handle_v_cont): Call set_desired_inferior.
13829 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13831 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13833 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13835 * linux-low.c (linux_wait): Unblock async I/O.
13836 (linux_resume): Block and enable async I/O.
13837 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13838 * server.h (block_async_io, unblock_async_io): Add prototypes.
13840 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13842 * remote-utils.c (remote_open): Print a status notice after
13843 opening a TCP port.
13844 * server.c (attach_inferior): Print a status notice after
13847 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
13849 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13851 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
13853 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13855 * server.c, target.h: Update copyright years.
13857 2004-02-25 Roland McGrath <roland@redhat.com>
13859 * target.h (struct target_ops): New member `read_auxv'.
13860 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13861 * linux-low.c (linux_read_auxv): New function.
13862 (linux_target_ops): Initialize `read_auxv' member to that.
13864 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13866 Committed by Jim Blandy <jimb@redhat.com>.
13868 * linux-s390-low.c (s390_num_regs): Update.
13869 (s390_regmap): Remove control registers. Use __s390x__ predefine
13870 instead of GPR_SIZE to distiguish s390 and s390x targets.
13872 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
13874 * linux-low.c: Update copyright year.
13875 (check_removed_breakpoint): Clear pending_is_breakpoint.
13876 (linux_set_resume_request, linux_queue_one_thread)
13877 (resume_status_pending_p): New functions.
13878 (linux_continue_one_thread): Use process->resume.
13879 (linux_resume): Only resume threads if there are no pending events.
13880 * linux-low.h (struct process_info): Add resume request
13883 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
13885 * regcache.c (new_register_cache): Clear the allocated register
13886 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13888 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
13890 * linux-low.c (linux_resume): Take a struct thread_resume *
13892 (linux_wait): Update call.
13893 (resume_ptr): New static variable.
13894 (linux_continue_one_thread): Renamed from
13895 linux_continue_one_process. Use resume_ptr.
13896 (linux_resume): Use linux_continue_one_thread.
13897 * server.c (handle_v_cont, handle_v_requests): New functions.
13898 (myresume): New function.
13899 (main): Handle 'v' case.
13900 * target.h (struct thread_resume): New type.
13901 (struct target_ops): Change argument of "resume" to struct
13903 (myresume): Delete macro.
13905 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13907 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13908 (uninstall): Support DESTDIR.
13910 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13912 * configure.srv: Add xscale*linux copy of arm*linux entry.
13914 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
13916 * linux-arm-low.c (arm_reinsert_addr): New function.
13917 (the_low_target): Add arm_reinsert_addr.
13919 2003-07-08 Mark Kettenis <kettenis@gnu.org>
13921 * mem-break.c: Remove whitespace at end of file.
13923 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13925 * configure.in: Check whether we need to prototype strerror.
13926 * server.h: Optionally prototype strerror.
13927 * gdbreplay.c (perror_with_name): Use strerror.
13928 * linux-low.c (linux_attach_lwp): Use strerror.
13929 * utils.c (perror_with_name): Use strerror.
13930 * config.in, configure: Regenerated.
13932 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
13934 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13935 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13937 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
13939 * Makefile.in (SFILES): Update.
13940 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13941 low-sun3.c: Remove files.
13943 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
13945 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13946 (linux_detach_one_process, linux_detach): New functions.
13947 (linux_target_ops): Add linux_detach.
13948 * server.c (main): Handle 'D' packet.
13949 * target.h (struct target_ops): Add "detach" member.
13950 (detach_inferior): Define.
13952 2003-06-13 Mark Kettenis <kettenis@gnu.org>
13954 From Kelley Cook <kelleycook@wideopenwest.com>:
13955 * configure.srv: Accept i[34567]86 variants.
13957 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
13959 * linux-low.c (linux_wait_for_event): Correct comment typos.
13960 (linux_resume_one_process): Call check_removed_breakpoint.
13961 (linux_send_signal): New function.
13962 (linux_target_ops): Add linux_send_signal.
13963 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13965 * target.h (struct target_ops): Add send_signal.
13967 2003-05-29 Jim Blandy <jimb@redhat.com>
13969 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13970 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13971 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13972 away part of the register's value.
13974 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
13976 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13977 (linux_wait_for_event, linux_init_signals): Likewise.
13979 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
13981 * configure.in: Check for stdlib.h.
13982 * configure: Regenerated.
13983 * config.in: Regenerated.
13985 2003-01-04 Andreas Schwab <schwab@suse.de>
13987 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13989 2003-01-02 Andrew Cagney <ac131313@redhat.com>
13991 * Makefile.in: Remove obsolete code.
13993 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
13995 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13996 defined(PT_FPR0_HI).
13998 2002-11-17 Stuart Hughes <seh@zee2.com>
14000 * linux-arm-low.c (arm_num_regs): Increase.
14001 (arm_regmap): Include status register.
14003 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14005 * linux-low.c (register_addr): Remove incorrect -1 check.
14007 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14009 * linux-low.c (linux_create_inferior): Call setpgid. Return
14011 (unstopped_p, linux_signal_pid): Remove.
14012 (linux_target_ops): Remove linux_signal_pid.
14013 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14014 global instead of target method.
14015 * target.h (struct target_ops): Remove signal_pid. Update comment
14016 for create_inferior.
14017 * server.c (signal_pid): New variable.
14018 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14019 gdbserver. Set the child to be the foreground process group.
14020 (attach_inferior): Set signal_pid.
14022 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14024 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14026 2002-08-20 Jim Blandy <jimb@redhat.com>
14028 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14031 2002-08-01 Andrew Cagney <cagney@redhat.com>
14033 * Makefile.in: Make chill references obsolete.
14035 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14037 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14038 * configure: Regenerate.
14039 * config.in: Regenerate.
14041 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14043 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14044 (perror_with_name, remote_close, remote_open, expect, play): Static.
14046 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14048 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14049 byte offsets instead of an array of indexes.
14050 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14052 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14054 * regcache.c: Add comment.
14056 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14058 * thread-db.c: New file.
14059 * proc-service.c: New file.
14060 * acinclude.m4: New file.
14061 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14062 proc-service.o, and thread-db.o.
14063 (linux-low.o): Add USE_THREAD_DB.
14064 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14065 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14066 * aclocal.m4: Regenerated.
14067 * config.in: Regenerated.
14068 * configure: Regenerated.
14069 * configure.in: Check for proc_service.h, sys/procfs.h,
14070 thread_db.h, and linux/elf.h headrs.
14071 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14072 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14073 Check for -lthread_db and thread support.
14074 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14075 PowerPC, and SuperH.
14076 * i387-fp.c: Constify arguments.
14077 * i387-fp.h: Likewise.
14078 * inferiors.c: (struct thread_info): Renamed from
14079 `struct inferior_info'. Remove PID member. Use generic inferior
14080 list header. All uses updated.
14081 (inferiors, signal_pid): Removed.
14082 (all_threads): New variable.
14083 (get_thread): Define.
14084 (add_inferior_to_list): New function.
14085 (for_each_inferior): New function.
14086 (change_inferior_id): New function.
14087 (add_inferior): Removed.
14088 (remove_inferior): New function.
14089 (add_thread): New function.
14090 (free_one_thread): New function.
14091 (remove_thread): New function.
14092 (clear_inferiors): Use for_each_inferior and free_one_thread.
14093 (find_inferior): New function.
14094 (find_inferior_id): New function.
14095 (inferior_target_data): Update argument type.
14096 (set_inferior_target_data): Likewise.
14097 (inferior_regcache_data): Likewise.
14098 (set_inferior_regcache_data): Likewise.
14099 * linux-low.c (linux_bp_reinsert): Remove.
14100 (all_processes, stopping_threads, using_thrads)
14101 (struct pending_signals, debug_threads, pid_of): New.
14102 (inferior_pid): Replace with macro.
14103 (struct inferior_linux_data): Remove.
14104 (get_stop_pc, add_process): New functions.
14105 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14106 Use add_process and add_thread.
14107 (linux_attach_lwp): New function, based on old linux_attach. Use
14108 add_process and add_thread. Set stop_expected for new threads.
14109 (linux_attach): New function.
14110 (linux_kill_one_process): New function.
14111 (linux_kill): Kill all LWPs.
14112 (linux_thread_alive): Use find_inferior_id.
14113 (check_removed_breakpoints, status_pending_p): New functions.
14114 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14115 Update. Use WNOHANG. Wait for cloned processes also. Update process
14116 struct for the found process.
14117 (linux_wait_for_event): New function.
14118 (linux_wait): Use it. Support LWPs.
14119 (send_sigstop, wait_for_sigstop, stop_all_processes)
14120 (linux_resume_one_process, linux_continue_one_process): New functions.
14121 (linux_resume): Support LWPs.
14122 (REGISTER_RAW_SIZE): Remove.
14123 (fetch_register): Use register_size instead. Call supply_register.
14124 (usr_store_inferior_registers): Likewise. Call collect_register.
14125 Fix recursive case.
14126 (regsets_fetch_inferior_registers): Improve error message.
14127 (regsets_store_inferior_registers): Add debugging.
14128 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14129 (unstopped_p, linux_signal_pid): New functions.
14130 (linux_target_ops): Add linux_signal_pid.
14131 (linux_init_signals): New function.
14132 (initialize_low): Call it. Initialize using_threads.
14133 * regcache.c (inferior_regcache_data): Add valid
14135 (get_regcache): Fetch registers lazily. Add fetch argument
14136 and update all callers.
14137 (regcache_invalidate_one, regcache_invalidate): New
14139 (new_register_cache): Renamed from create_register_cache.
14140 Return the new regcache.
14141 (free_register_cache): Change argument to a void *.
14142 (registers_to_string, registers_from_string): Call get_regcache
14143 with fetch flag set.
14144 (register_data): Make static. Pass fetch flag to get_regcache.
14145 (supply_register): Call get_regcache with fetch flag clear.
14146 (collect_register): Call get_regcache with fetch flag set.
14147 (collect_register_as_string): New function.
14148 * regcache.h: Update.
14149 * remote-utils.c (putpkt): Flush after debug output and use
14151 Handle input interrupts while waiting for an ACK.
14152 (input_interrupt): Use signal_pid method.
14153 (getpkt): Flush after debug output and use stderr.
14154 (outreg): Use collect_register_as_string.
14155 (new_thread_notify, dead_thread_notify): New functions.
14156 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14157 and general_thread.
14158 (look_up_one_symbol): Flush after debug output.
14159 * server.c (step_thread, server_waiting): New variables.
14160 (start_inferior): Don't use signal_pid. Update call to mywait.
14161 (attach_inferior): Update call to mywait.
14162 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14163 (main): Don't fetch/store registers explicitly. Use
14164 set_desired_inferior. Support proposed ``Hs'' packet. Update
14166 * server.h: Update.
14167 (struct inferior_list, struct_inferior_list_entry): New.
14168 * target.c (set_desired_inferior): New.
14169 (write_inferior_memory): Constify.
14170 (mywait): New function.
14171 * target.h: Update.
14172 (struct target_ops): New signal_pid method.
14173 (mywait): Removed macro, added prototype.
14175 * linux-low.h (regset_func): Removed.
14176 (regset_fill_func, regset_store_func): New.
14177 (enum regset_type): New.
14178 (struct regset_info): Add type field. Use new operation types.
14179 (struct linux_target_ops): stop_pc renamed to get_pc.
14180 Add decr_pc_after_break and breakpoint_at.
14181 (get_process, get_thread_proess, get_process_thread)
14182 (strut process_info, all_processes, linux_attach_lwp)
14183 (thread_db_init): New.
14185 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14186 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14187 (the_low_target): Add new members.
14188 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14189 (i386_store_fpxregset): Constify.
14190 (target_regsets): Add new kind identifier.
14191 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14192 (i386_set_pc): Add debugging.
14193 (i386_breakpoint_at): New function.
14194 (the_low_target): Add new members.
14195 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14196 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14197 (mips_breakpoint_at): New.
14198 (the_low_target): Add new members.
14199 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14200 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14201 (the_low_target): Add new members.
14202 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14203 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14204 (the_low_target): Add new members.
14205 * linux-x86-64-low.c (target_regsets): Add new kind
14208 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14210 From Martin Pool <mbp@samba.org>:
14211 * server.c (gdbserver_usage): New function.
14214 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14216 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14217 stop_at -> stop_pc.
14219 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14221 * Makefile.in: Remove obsolete code.
14223 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14225 * linux-low.c (regsets_fetch_inferior_registers),
14226 (regsets_store_inferior_registers): Removed cast to int from
14228 * regcache.h: Added declaration of struct inferior_info.
14230 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14232 * inferiors.c (struct inferior_info): Add regcache_data.
14233 (add_inferior): Call create_register_cache.
14234 (clear_inferiors): Call free_register_cache.
14235 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14236 * regcache.c (struct inferior_regcache_data): New.
14237 (registers): Remove.
14238 (get_regcache): New function.
14239 (create_register_cache, free_register_cache): New functions.
14240 (set_register_cache): Don't initialize the register cache here.
14241 (registers_to_string, registers_from_string, register_data): Call
14243 * regcache.h: Add prototypes.
14244 * server.h: Likewise.
14246 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14248 * mem-break.c: New file.
14249 * mem-break.h: New file.
14250 * Makefile.in: Add mem-break.o rule; update server.h
14252 * inferiors.c (struct inferior_info): Add target_data
14254 (clear_inferiors): Free target_data member if set.
14255 (inferior_target_data, set_inferior_target_data): New functions.
14256 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14257 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14258 * linux-low.c (linux_bp_reinsert): New variable.
14259 (struct inferior_linux_data): New.
14260 (linux_create_inferior): Use set_inferior_target_data.
14261 (linux_attach): Likewise. Call add_inferior.
14262 (linux_wait_for_one_inferior): New function.
14263 (linux_wait): Call it.
14264 (linux_write_memory): Add const.
14265 (initialize_low): Call set_breakpoint_data.
14266 * linux-low.h (struct linux_target_ops): Add breakpoint
14268 * server.c (attach_inferior): Remove extra add_inferior
14270 * server.h: Include mem-break.h. Update inferior.c
14272 * target.c (read_inferior_memory)
14273 (write_inferior_memory): New functions.
14274 * target.h (read_inferior_memory)
14275 (write_inferior_memory): Change macros to prototypes.
14276 (struct target_ops): Update comments. Add const to write_memory
14279 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14281 * linux-low.c (usr_store_inferior_registers): Support
14282 registers which are allowed to fail to store.
14283 * linux-low.h (linux_target_ops): Likewise.
14284 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14285 (ppc_cannot_store_register): FPSCR may not be storable.
14287 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14289 * server.h: Include <string.h> if HAVE_STRING_H.
14290 * ChangeLog: Correct paths in last ChangeLog entry.
14292 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14294 * linux-low.h: Remove obsolete prototypes.
14295 (struct linux_target_ops): New.
14296 (extern the_low_target): New.
14297 * linux-low.c (num_regs, regmap): Remove declarations.
14298 (register_addr): Use the_low_target explicitly.
14299 (fetch_register): Likewise.
14300 (usr_fetch_inferior_registers): Likewise.
14301 (usr_store_inferior_registers): Likewise.
14302 * linux-arm-low.c (num_regs): Remove.
14303 (arm_num_regs): Define.
14304 (arm_regmap): Renamed from regmap, made static.
14305 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14307 (arm_cannot_store_register): Renamed from cannot_store_register,
14309 (the_low_target): New.
14310 * linux-i386-low.c (num_regs): Remove.
14311 (i386_num_regs): Define.
14312 (i386_regmap): Renamed from regmap, made static.
14313 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14315 (i386_cannot_store_register): Renamed from cannot_store_register,
14317 (the_low_target): New.
14318 * linux-ia64-low.c (num_regs): Remove.
14319 (ia64_num_regs): Define.
14320 (ia64_regmap): Renamed from regmap, made static.
14321 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14323 (ia64_cannot_store_register): Renamed from cannot_store_register,
14325 (the_low_target): New.
14326 * linux-m68k-low.c (num_regs): Remove.
14327 (m68k_num_regs): Define.
14328 (m68k_regmap): Renamed from regmap, made static.
14329 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14331 (m68k_cannot_store_register): Renamed from cannot_store_register,
14333 (the_low_target): New.
14334 * linux-mips-low.c (num_regs): Remove.
14335 (mips_num_regs): Define.
14336 (mips_regmap): Renamed from regmap, made static.
14337 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14339 (mips_cannot_store_register): Renamed from cannot_store_register,
14341 (the_low_target): New.
14342 * linux-ppc-low.c (num_regs): Remove.
14343 (ppc_num_regs): Define.
14344 (ppc_regmap): Renamed from regmap, made static.
14345 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14347 (ppc_cannot_store_register): Renamed from cannot_store_register,
14349 (the_low_target): New.
14350 * linux-s390-low.c (num_regs): Remove.
14351 (s390_num_regs): Define.
14352 (s390_regmap): Renamed from regmap, made static.
14353 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14355 (s390_cannot_store_register): Renamed from cannot_store_register,
14357 (the_low_target): New.
14358 * linux-sh-low.c (num_regs): Remove.
14359 (sh_num_regs): Define.
14360 (sh_regmap): Renamed from regmap, made static.
14361 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14363 (sh_cannot_store_register): Renamed from cannot_store_register,
14365 (the_low_target): New.
14366 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14367 (the_low_target): New.
14369 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14371 * Makefile.in: Add stamp-h target.
14372 * configure.in: Create stamp-h.
14373 * configure: Regenerated.
14375 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14377 * inferiors.c: New file.
14378 * target.c: New file.
14379 * target.h: New file.
14380 * Makefile.in: Add target.o and inferiors.o. Update
14382 * linux-low.c (inferior_pid): New static variable,
14383 moved from server.c.
14384 (linux_create_inferior): Renamed from create_inferior.
14385 Call add_inferior. Return 0 on success instead of a PID.
14386 (linux_attach): Renamed from myattach.
14387 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14388 (linux_thread_alive): Renamed from mythread_alive.
14389 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14391 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14392 (regsets_store_inferior_registers): Correct error message.
14393 Add missing ``return 0''.
14394 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14395 (linux_store_registers): Renamed from store_inferior_registers.
14396 (linux_read_memory): Renamed from read_inferior_memory.
14397 (linux_write_memory): Renamed from write_inferior_memory.
14398 (linux_target_ops): New structure.
14399 (initialize_low): Call set_target_ops ().
14400 * remote-utils.c (unhexify): New function.
14401 (hexify): New function.
14402 (input_interrupt): Send signals to ``signal_pid''.
14403 * server.c (inferior_pid): Remove.
14404 (start_inferior): Update create_inferior call.
14405 (attach_inferior): Call add_inferior.
14406 (handle_query): New function.
14407 (main): Call handle_query for `q' packets.
14408 * server.h: Include "target.h". Remove obsolete prototypes.
14409 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14411 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14413 * Makefile.in: Add WARN_CFLAGS. Update configury
14415 * configure.in: Check for <string.h>
14416 * configure: Regenerate.
14417 * config.in: Regenerate.
14418 * gdbreplay.c: Include needed system headers.
14419 (remote_open): Remove strchr prototype.
14420 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14421 * regcache.c (supply_register): Change buf argument to const void *.
14422 (supply_register_by_name): Likewise.
14423 (collect_register): Change buf argument to void *.
14424 (collect_register_by_name): Likewise.
14425 * regcache.h: Add missing prototypes.
14426 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14427 * server.c (handle_query): New function.
14428 (attached): New static variable, moved out of main.
14429 (main): Quiet longjmp clobber warnings.
14430 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14431 * utils.c (error): Remove NORETURN.