1 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4 * nto-x86-low.c: Likewise.
6 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
8 * Makefile.in: Include disable-implicit-rules.mk.
10 2016-11-23 Pedro Alves <palves@redhat.com>
12 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
13 (debug_vprintf): Use std::chrono::steady_clock instead of
14 gettimeofday. Use '.' instead of ':'.
15 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
16 (get_timestamp): Use std::chrono::steady_clock instead of
19 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
21 * Makefile.in: Fix whitespace formatting.
23 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
25 * Makefile.in (SFILES, OBS): Flatten list and order
28 2016-11-23 Pedro Alves <palves@redhat.com>
30 * event-loop.c (handle_file_event): Use warning.
31 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
32 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
35 2016-11-23 Pedro Alves <palves@redhat.com>
37 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
39 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
40 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
41 debug_printf and debug_flush for debug output.
42 * server.c (handle_general_set): Likewise.
43 * thread-db.c (try_thread_db_load): Use debug_printf for debug
46 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
48 * Makefile.in (.c.o): Replace rule with ...
49 (%.o: %.c): ... this one.
51 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
53 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
54 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
56 * configure.ac: Remove checks for the make program.
57 * configure: Re-generate.
59 2016-10-28 Pedro Alves <palves@redhat.com>
61 * Makefile.in (CXX_DIALECT): Get from configure.
62 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
63 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
64 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
65 * config.in: Regenerate.
66 * configure: Regenerate.
68 2016-10-27 Yao Qi <yao.qi@linaro.org>
70 * linux-low.c (linux_supports_range_stepping): Return true if
71 can_software_single_step return true.
73 2016-10-27 Yao Qi <yao.qi@linaro.org>
75 * inferiors.c (find_inferior_in_random): New function.
76 * inferiors.h (find_inferior_in_random): Declare.
77 * linux-low.c (linux_wait_for_event_filtered): Call
78 find_inferior_in_random instead of find_inferior.
80 2016-10-27 Yao Qi <yao.qi@linaro.org>
82 * linux-low.c (linux_wait_1): If single-step breakpoints are
83 inserted, remove them.
85 2016-10-26 Pedro Alves <palves@redhat.com>
87 * linux-low.c (handle_extended_wait): Link parent/child fork
89 (linux_wait_1): Unlink them.
90 (linux_set_resume_request): Ignore resume requests for
91 already-resumed and unhandled fork child threads.
92 * linux-low.h (struct lwp_info) <fork_relative>: New field.
93 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
95 (handle_v_requests) <vCont>: Don't call require_running.
96 * server.h (in_queued_stop_replies): New declaration.
98 2016-10-24 Yao Qi <yao.qi@linaro.org>
101 * linux-aarch64-low.c (append_insns): Cast the return value to
104 2016-10-10 Yao Qi <yao.qi@linaro.org>
106 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
108 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
110 * target.c (target_supports_multi_process): New function, moved
112 * target.h (target_supports_multi_process): ... here. Remove
115 2016-10-05 Tom Tromey <tom@tromey.com>
118 * tracepoint.c (handle_tracepoint_bkpts): Check
119 ipa_error_tracepoint, not ipa_stopping_tracepoint.
121 2016-10-05 Yao Qi <yao.qi@linaro.org>
123 * configure.srv: Update the path of arm-*.xml files.
125 2016-10-05 Terry Guo <terry.guo@arm.com>
126 Yao Qi <yao.qi@linaro.org>
128 * Makefile.in: Adjust the path of rules.
129 * configure.srv: Update the path of xml files.
130 * regformats/arm-with-iwmmxt.dat: Regenerated.
131 * regformats/arm-with-neon.dat: Likewise.
132 * regformats/arm-with-vfpv2.dat: Likewise.
133 * regformats/arm-with-vfpv3.dat Likewise.
135 2016-09-30 Yao Qi <yao.qi@linaro.org>
138 * target.c (target_stop_and_wait): Don't call
139 target_continue_no_signal, use resume_stop instead.
141 2016-09-26 Yao Qi <yao.qi@linaro.org>
143 * linux-low.c (linux_wait_1): Call debug_exit.
145 2016-09-23 Pedro Alves <palves@redhat.com>
147 * Makefile.in (SFILES): Add common/new-op.c.
148 (OBS): Add common/new-op.o.
149 (new-op.o): New rule.
151 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
153 * .gitinore: Ignore more files.
155 2016-09-21 Yao Qi <yao.qi@linaro.org>
157 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
160 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
162 * server.c (start_inferior): Call target_mourn_inferior instead of
163 mourn_inferior; pass ptid_t argument to it.
165 (handle_target_event): Likewise.
166 * target.c (target_mourn_inferior): New function.
167 * target.h (mourn_inferior): Delete macro.
169 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
171 * linux-low.c (lwp_is_stepping): New function.
173 2016-09-06 Carl Love <cel@us.ibm.com>
175 * server.c (start_inferior): Fixed comment, requested comment change
176 didn't get updated correctly. Removed reference to ptrace () call as
177 it is only true on Linux systems.
179 2016-09-06 Carl Love <cel@us.ibm.com>
181 * server.c (start_inferior): Do not call
182 function target_post_create_inferior () if the
183 inferior process has already exited.
185 2016-09-05 Pedro Alves <palves@redhat.com>
187 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
188 (COMPILE.pre, CC_LD): Use CXX directly.
189 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
190 * acinclude.m4: Don't include build-with-cxx.m4.
191 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
192 * configure: Regenerate.
194 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
197 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
198 call writing data to own_buf.
200 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
202 * target.c (mywait): Call target_wait instead of
204 (target_wait): New function.
206 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
208 * server.c (start_inferior): New variable 'ptid'. Replace calls
209 to the_target->resume by target_continue{,_no_signal}, depending
211 * target.c (target_stop_and_wait): Call target_continue_no_signal
212 instead of the_target->resume.
213 (target_continue): New function.
215 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
217 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
219 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
222 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
224 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
225 * linux-arm-low.c (ps_get_thread_area): Likewise.
226 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
227 * linux-m68k-low.c (ps_get_thread_area): Likewise.
228 * linux-mips-low.c (ps_get_thread_area): Likewise.
229 * linux-nios2-low.c (ps_get_thread_area): Likewise.
230 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
231 * linux-x86-low.c (ps_get_thread_area): Likewise.
232 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
234 2016-08-19 Pedro Alves <palves@redhat.com>
236 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
238 2016-08-19 Pedro Alves <palves@redhat.com>
240 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
241 comment. Use memcpy instead of casting through unsigned long.
243 2016-08-19 Pedro Alves <palves@redhat.com>
245 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
246 allocating around 0x80000000.
248 2016-08-19 Pedro Alves <palves@redhat.com>
251 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
252 (x32-avx512-linux-ipa.o): New rules.
253 * configure.ac (x86_64-*-linux*): New x32 check.
254 * configure.srv (ipa_x32_linux_regobj): New.
255 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
256 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
258 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
260 * configure: Regenerate.
262 2016-08-09 Pedro Alves <palves@redhat.com>
265 * Makefile.in (OBS): Add signals-state-save-restore.o.
266 (signals-state-save-restore.o): New rule.
267 * config.in: Regenerate.
268 * configure: Regenerate.
269 * linux-low.c: Include "signals-state-save-restore.h".
270 (linux_create_inferior): Call
271 restore_original_signals_state.
272 * server.c: Include "dispositions-save-restore.h".
273 (captured_main): Call save_original_signals_state.
275 2016-08-05 Pedro Alves <palves@redhat.com>
277 * configure: Regenerate.
279 2016-08-04 Yao Qi <yao.qi@linaro.org>
281 * linux-low.c (regsets_fetch_inferior_registers): Check
282 errno is ESRCH or not.
284 2016-08-02 Yao Qi <yao.qi@linaro.org>
286 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
287 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
288 (thread_db_load_search): Update.
289 (try_thread_db_load_1): Don't look for td_ta_event_addr,
290 td_ta_set_event and td_ta_event_getmsg.
292 2016-07-26 Pedro Alves <palves@redhat.com>
295 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
296 of unsigned long for 64-bit registers and use uint32_t instead of
297 unsigned int for 32-bit registers.
299 2016-07-26 Pedro Alves <palves@redhat.com>
301 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
304 2016-07-21 Tom Tromey <tom@tromey.com>
306 * configure: Rebuild.
308 2016-07-21 Yao Qi <yao.qi@linaro.org>
310 * mem-break.c (find_gdb_breakpoint): Cast bp to
311 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
313 2016-07-21 Yao Qi <yao.qi@linaro.org>
315 * server.c (handle_v_requests): Support s and S actions
316 if target_supports_software_single_step return true.
318 2016-07-21 Yao Qi <yao.qi@linaro.org>
320 * linux-low.c (resume_stopped_resumed_lwps): If resume request
321 is resume_step, call maybe_hw_step.
322 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
324 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
326 (proceed_one_lwp): If resume request is resume_step, install
327 reinsert breakpoints and call maybe_hw_step.
329 2016-07-21 Yao Qi <yao.qi@linaro.org>
331 * linux-low.c (proceed_one_lwp): Declare.
332 (linux_resume_one_thread): Remove local variable 'step'.
333 Lift code enqueue signal. Call proceed_one_lwp instead of
334 linux_resume_one_lwp.
336 2016-07-21 Yao Qi <yao.qi@linaro.org>
338 * linux-low.c (linux_resume_one_thread): Call
339 enqueue_pending_signal.
341 2016-07-21 Yao Qi <yao.qi@linaro.org>
343 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
344 * inferiors.c (do_restore_current_thread_cleanup): New function.
345 (make_cleanup_restore_current_thread): Likewise.
346 * linux-low.c (install_software_single_step_breakpoints): Call
347 make_cleanup_restore_current_thread. Switch current_thread to
350 2016-07-21 Yao Qi <yao.qi@linaro.org>
352 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
353 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
354 (clone_one_breakpoint): Likewise.
355 (delete_reinsert_breakpoints): Change parameter to thread.
357 (has_reinsert_breakpoints): Likewise.
358 (uninsert_reinsert_breakpoints): Likewise.
359 (reinsert_reinsert_breakpoints): Likewise.
360 * mem-break.h (set_reinsert_breakpoint): Update declaration.
361 (delete_reinsert_breakpoints): Likewise.
362 (reinsert_reinsert_breakpoints): Likewise.
363 (uninsert_reinsert_breakpoints): Likewise.
364 (has_reinsert_breakpoints): Likewise.
366 2016-07-21 Yao Qi <yao.qi@linaro.org>
368 * inferiors.c (get_thread_process): Make parameter const.
369 * inferiors.h (get_thread_process): Update declaration.
370 * mem-break.c (clone_all_breakpoints): Remove all parameters.
371 Add new parameters child_thread and parent_thread. Callers
373 * mem-break.h (clone_all_breakpoints): Update declaration.
375 2016-07-21 Yao Qi <yao.qi@linaro.org>
377 * mem-break.c (struct breakpoint) <cond_list>: Remove.
378 <command_list, handler>: Remove.
379 (struct gdb_breakpoint): New.
380 (struct other_breakpoint): New.
381 (struct reinsert_breakpoint): New.
382 (is_gdb_breakpoint): New function.
383 (any_persistent_commands): Update command_list if
384 is_gdb_breakpoint returns true.
385 (set_breakpoint): Create breakpoints according to their types.
386 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
387 (set_gdb_breakpoint_1): Likewise.
388 (set_gdb_breakpoint): Likewise.
389 (clear_breakpoint_conditions): Change parameter type to
390 'struct gdb_breakpoint *'.
391 (clear_breakpoint_commands): Likewise.
392 (clear_breakpoint_conditions_and_commands): Likewise.
393 (add_condition_to_breakpoint): Likewise.
394 (add_breakpoint_condition): Likewise.
395 (add_commands_to_breakpoint): Likewise.
396 (check_breakpoints): Check other_breakpoint.
397 (clone_one_breakpoint): Clone breakpopint according to its type.
398 * mem-break.h (struct gdb_breakpoint): Declare.
399 (set_gdb_breakpoint): Update declaration.
400 (clear_breakpoint_conditions_and_commands): Likewise.
401 (add_breakpoint_condition): Likewise.
402 (add_breakpoint_commands): Likewise.
403 * server.c (process_point_options): Change parameter type to
404 'struct gdb_breakpoint *'.
406 2016-07-21 Yao Qi <yao.qi@linaro.org>
408 * mem-break.c (set_breakpoint_at): Rename it to ...
409 (set_breakpoint_type_at): ... it.
410 (set_breakpoint_at): Call set_breakpoint_type_at.
411 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
412 * mem-break.h (set_breakpoint_at): Update comments.
414 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
416 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
418 (nios2_store_gregset): Likewise.
420 2016-07-01 Pedro Alves <palves@redhat.com>
421 Antoine Tremblay <antoine.tremblay@ericsson.com>
423 * linux-low.c: Change interface to take the target lwp_info
424 pointer directly and return void. Handle detaching from a zombie
426 (linux_detach_lwp_callback): New function.
427 (linux_detach): Detach from the leader thread after detaching from
430 2016-06-28 Yao Qi <yao.qi@linaro.org>
432 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
433 for variable new_offset.
434 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
435 (aarch64_ftrace_insn_reloc_cb): Likewise.
436 (aarch64_ftrace_insn_reloc_tb): Likewise.
437 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
438 PRIx64 instead of PRIx32.
440 2016-06-28 Yao Qi <yao.qi@linaro.org>
442 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
443 (the_low_target): Install arm_get_syscall_trapinfo.
445 2016-06-28 Yao Qi <yao.qi@linaro.org>
447 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
449 (the_low_target): Install aarch64_get_syscall_trapinfo.
451 2016-06-28 Yao Qi <yao.qi@linaro.org>
453 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
455 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
456 Remove parameter sysno.
457 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
460 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
462 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
463 (s390_emit_ne_goto): Likewise.
464 (s390_emit_lt_goto): Likewise.
465 (s390_emit_le_goto): Likewise.
466 (s390_emit_gt_goto): Likewise.
467 (s390_emit_ge_goto): Likewise.
468 (s390x_emit_eq_goto): Likewise.
469 (s390x_emit_ne_goto): Likewise.
470 (s390x_emit_lt_goto): Likewise.
471 (s390x_emit_le_goto): Likewise.
472 (s390x_emit_gt_goto): Likewise.
473 (s390x_emit_ge_goto): Likewise.
474 (s390_emit_ops_impl): Mark variable static.
475 (s390x_emit_ops): Likewise.
477 2016-06-17 Yao Qi <yao.qi@linaro.org>
479 * linux-low.c (handle_extended_wait): Call
480 uninsert_reinsert_breakpoints for the parent process. Remove
481 reinsert breakpoints from the child process. Reinsert them to
482 the parent process when vfork is done.
483 * mem-break.c (uninsert_reinsert_breakpoints): New function.
484 (reinsert_reinsert_breakpoints): New function.
485 * mem-break.h (uninsert_reinsert_breakpoints): Declare
486 (reinsert_reinsert_breakpoints): Declare.
488 2016-06-17 Yao Qi <yao.qi@linaro.org>
490 * linux-low.c (handle_extended_wait): If the parent is doing
491 step-over, remove the reinsert breakpoints from the forked child.
493 2016-06-17 Yao Qi <yao.qi@linaro.org>
495 * linux-low.c (unsuspend_all_lwps): Declare.
496 (linux_low_filter_event): If thread exited, call finish_step_over.
497 If step-over is finished, unsuspend other threads.
499 2016-06-17 Yao Qi <yao.qi@linaro.org>
501 * linux-low.c (linux_resume_one_lwp_throw): Assert
502 has_reinsert_breakpoints returns false.
503 * mem-break.c (delete_disabled_breakpoints): Assert
504 bp type isn't reinsert_breakpoint.
506 2016-06-17 Yao Qi <yao.qi@linaro.org>
508 * linux-low.c (maybe_hw_step): New function.
509 (linux_resume_one_lwp_throw): Call maybe_hw_step.
510 (finish_step_over): Switch current_thread to lwp temporarily,
511 and assert has_reinsert_breakpoints returns true.
512 (proceed_one_lwp): Call maybe_hw_step.
513 * mem-break.c (has_reinsert_breakpoints): New function.
514 * mem-break.h (has_reinsert_breakpoints): Declare.
516 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
518 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
520 2016-05-17 Yao Qi <yao.qi@linaro.org>
522 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
523 instead of find_inferior.
525 2016-05-05 Yao Qi <yao.qi@linaro.org>
527 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
528 Initialize res to zero.
530 2016-05-05 Yao Qi <yao.qi@linaro.org>
532 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
535 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
537 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
538 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
539 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
541 2016-04-28 Par Olsson <par.olsson@windriver.com>
542 Simon Marchi <simon.marchi@ericsson.com>
544 * tracepoint.c (write_inferior_int8): New function.
545 (cmd_qtenable_disable): Write enable flag using
548 2016-04-25 Yao Qi <yao.qi@linaro.org>
550 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
551 (need_step_over_p): Return zero if the LWP has pending signals
552 can be delivered on software single step target.
554 2016-04-25 Yao Qi <yao.qi@linaro.org>
556 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
557 return instead of error.
559 2016-04-22 Yao Qi <yao.qi@linaro.org>
561 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
564 2016-04-22 Yao Qi <yao.qi@linaro.org>
566 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
567 signal when stepping over breakpoint with software single
570 2016-04-21 Pedro Alves <palves@redhat.com>
572 * linux-s390-low.c (s390_collect_ptrace_register)
573 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
575 (s390_check_regset): Use void * instead of gdb_byte *.
577 2016-04-20 Pedro Alves <palves@redhat.com>
579 * configure: Renegerate.
581 2016-04-20 Yao Qi <yao.qi@linaro.org>
583 * linux-aarch32-low.c: Include "arch/arm-linux.h".
584 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
586 (arm_store_gregset): Likewise.
588 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
590 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
591 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
592 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
593 (amd64-avx-mpx-linux.c): New rules.
594 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
595 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
596 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
597 (srv_amd64_regobj): Add amd64-avx-mpx.o.
598 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
599 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
600 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
601 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
602 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
603 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
604 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
605 * linux-x86-low.c (x86_linux_read_description): Add case for
606 X86_XSTATE_AVX_MPX_MASK.
607 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
608 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
609 init_registers_i386_avx_mpx_linux.
610 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
611 (initialize_low_tracepoint): Call
612 init_registers_i386_avx_mpx_linux.
613 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
614 (initialize_low_tracepoint): Call
615 init_registers_amd64_avx_mpx_linux.
616 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
617 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
618 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
621 2016-04-18 Pedro Alves <palves@redhat.com>
623 * configure: Regenerate.
625 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
627 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
628 (aarch64_emit_sub): Likewise.
630 2016-04-12 Pedro Alves <palves@redhat.com>
632 * utils.c (prepare_to_throw_exception): Delete.
634 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
636 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
638 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
640 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
642 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
644 * linux-aarch64-ipa.c: Add <elf.h> include.
645 * linux-ppc-ipa.c: Add <elf.h> include.
646 * linux-s390-ipa.c: Add <elf.h> include.
648 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
650 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
651 (get_raw_reg_ptr): Likewise.
652 (get_trace_state_variable_value_ptr): Likewise.
653 (set_trace_state_variable_value_ptr): Likewise.
654 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
657 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
658 Marcin Kościelnicki <koriakin@0x04.net>
661 * linux-ppc-low.c (emit_insns): New function.
662 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
663 (ppc_emit_prologue): New function.
664 (ppc_emit_epilogue): New function.
665 (ppc_emit_add): New function.
666 (ppc_emit_sub): New function.
667 (ppc_emit_mul): New function.
668 (ppc_emit_lsh): New function.
669 (ppc_emit_rsh_signed): New function.
670 (ppc_emit_rsh_unsigned): New function.
671 (ppc_emit_ext): New function.
672 (ppc_emit_zero_ext): New function.
673 (ppc_emit_log_not): New function.
674 (ppc_emit_bit_and): New function.
675 (ppc_emit_bit_or): New function.
676 (ppc_emit_bit_xor): New function.
677 (ppc_emit_bit_not): New function.
678 (ppc_emit_equal): New function.
679 (ppc_emit_less_signed): New function.
680 (ppc_emit_less_unsigned): New function.
681 (ppc_emit_ref): New function.
682 (ppc_emit_const): New function.
683 (ppc_emit_reg): New function.
684 (ppc_emit_pop): New function.
685 (ppc_emit_stack_flush): New function.
686 (ppc_emit_swap): New function.
687 (ppc_emit_stack_adjust): New function.
688 (ppc_emit_call): New function.
689 (ppc_emit_int_call_1): New function.
690 (ppc_emit_void_call_2): New function.
691 (ppc_emit_if_goto): New function.
692 (ppc_emit_goto): New function.
693 (ppc_emit_eq_goto): New function.
694 (ppc_emit_ne_goto): New function.
695 (ppc_emit_lt_goto): New function.
696 (ppc_emit_le_goto): New function.
697 (ppc_emit_gt_goto): New function.
698 (ppc_emit_ge_goto): New function.
699 (ppc_write_goto_address): New function.
700 (ppc_emit_ops_impl): New static variable.
701 (ppc64v1_emit_prologue): New function.
702 (ppc64v2_emit_prologue): New function.
703 (ppc64_emit_epilogue): New function.
704 (ppc64_emit_add): New function.
705 (ppc64_emit_sub): New function.
706 (ppc64_emit_mul): New function.
707 (ppc64_emit_lsh): New function.
708 (ppc64_emit_rsh_signed): New function.
709 (ppc64_emit_rsh_unsigned): New function.
710 (ppc64_emit_ext): New function.
711 (ppc64_emit_zero_ext): New function.
712 (ppc64_emit_log_not): New function.
713 (ppc64_emit_bit_and): New function.
714 (ppc64_emit_bit_or): New function.
715 (ppc64_emit_bit_xor): New function.
716 (ppc64_emit_bit_not): New function.
717 (ppc64_emit_equal): New function.
718 (ppc64_emit_less_signed): New function.
719 (ppc64_emit_less_unsigned): New function.
720 (ppc64_emit_ref): New function.
721 (ppc64_emit_const): New function.
722 (ppc64v1_emit_reg): New function.
723 (ppc64v2_emit_reg): New function.
724 (ppc64_emit_pop): New function.
725 (ppc64_emit_stack_flush): New function.
726 (ppc64_emit_swap): New function.
727 (ppc64v1_emit_call): New function.
728 (ppc64v2_emit_call): New function.
729 (ppc64v1_emit_int_call_1): New function.
730 (ppc64v2_emit_int_call_1): New function.
731 (ppc64v1_emit_void_call_2): New function.
732 (ppc64v2_emit_void_call_2): New function.
733 (ppc64_emit_if_goto): New function.
734 (ppc64_emit_eq_goto): New function.
735 (ppc64_emit_ne_goto): New function.
736 (ppc64_emit_lt_goto): New function.
737 (ppc64_emit_le_goto): New function.
738 (ppc64_emit_gt_goto): New function.
739 (ppc64_emit_ge_goto): New function.
740 (ppc64v1_emit_ops_impl): New static variable.
741 (ppc64v2_emit_ops_impl): New static variable.
742 (ppc_emit_ops): New function.
743 (linux_low_target): Wire in ppc_emit_ops.
745 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
746 Marcin Kościelnicki <koriakin@0x04.net>
749 * Makefile.in: Add powerpc-*-ipa.o
750 * configure.srv: Add ipa_obj for powerpc*-linux.
751 * linux-ppc-ipa.c: New file.
752 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
754 (PPC_FIELD): New macro.
755 (PPC_SEXT): New macro.
756 (PPC_OP6): New macro.
760 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
761 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
762 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
763 (ppc_get_thread_area): New function.
764 (is_elfv2_inferior): New function.
765 (gen_ds_form): New function.
766 (GEN_STD): New macro.
767 (GEN_STDU): New macro.
769 (GEN_LDU): New macro.
770 (gen_d_form): New function.
771 (GEN_ADDI): New macro.
772 (GEN_ADDIS): New macro.
774 (GEN_LIS): New macro.
775 (GEN_ORI): New macro.
776 (GEN_ORIS): New macro.
777 (GEN_LWZ): New macro.
778 (GEN_STW): New macro.
779 (GEN_STWU): New macro.
780 (gen_xfx_form): New function.
781 (GEN_MFSPR): New macro.
782 (GEN_MTSPR): New macro.
783 (GEN_MFCR): New macro.
784 (GEN_MTCR): New macro.
785 (GEN_SYNC): New macro.
786 (GEN_LWSYNC): New macro.
787 (gen_x_form): New function.
790 (GEN_LWARX): New macro.
791 (GEN_STWCX): New macro.
792 (GEN_CMPW): New macro.
793 (gen_md_form): New function.
794 (GEN_RLDICL): New macro.
795 (GEN_RLDICR): New macro.
796 (gen_i_form): New function.
799 (gen_b_form): New function.
800 (GEN_BNE): New macro.
801 (GEN_LOAD): New macro.
802 (GEN_STORE): New macro.
803 (gen_limm): New function.
804 (gen_atomic_xchg): New function.
805 (gen_call): New function.
806 (ppc_relocate_instruction): New function.
807 (ppc_install_fast_tracepoint_jump_pad): New function.
808 (ppc_get_min_fast_tracepoint_insn_len): New function.
809 (ppc_get_ipa_tdesc_idx): New function.
810 (the_low_target): Wire in the new functions.
811 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
813 * linux-ppc-tdesc.h: New file.
815 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
817 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
818 (alloc_jump_pad_buffer): New function.
819 * linux-amd64-ipa.c: Add <sys/mman.h> include.
820 (alloc_jump_pad_buffer): New function.
821 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
822 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
823 (alloc_jump_pad_buffer): New function.
824 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
825 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
826 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
827 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
829 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
831 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
832 * linux-amd64-ipa.c: Likewise.
833 * linux-i386-ipa.c: Likewise.
834 * linux-s390-ipa.c: Likewise.
835 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
836 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
837 set_trace_state_variable_value_ptr.
838 (struct ipa_sym_addresses): Likewise.
839 (symbol_list): Likewise.
840 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
841 accessing gdb_collect directly.
842 (gdb_collect_ptr_type): New typedef.
843 (get_raw_reg_ptr_type): New typedef.
844 (get_trace_state_variable_value_ptr_type): New typedef.
845 (set_trace_state_variable_value_ptr_type): New typedef.
846 (gdb_collect_ptr): New global.
847 (get_raw_reg_ptr): New global.
848 (get_trace_state_variable_value_ptr): New global.
849 (set_trace_state_variable_value_ptr): New global.
850 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
851 accessing get_raw_reg directly.
852 (get_get_tsv_func_addr): Likewise for
853 get_trace_state_variable_value_ptr.
854 (get_set_tsv_func_addr): Likewise for
855 set_trace_state_variable_value_ptr.
856 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
858 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
860 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
862 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
864 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
866 (relocate_instruction): Remove own_buf.
867 * server.c (own_buf): Make global.
868 (handle_v_requests): Make global.
869 * server.h (own_buf): New declaration.
870 (handle_v_requests): New prototype.
872 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
875 * linux-s390-low.c (add_insns): New function.
876 (s390_emit_prologue): New function.
877 (s390_emit_epilogue): New function.
878 (s390_emit_add): New function.
879 (s390_emit_sub): New function.
880 (s390_emit_mul): New function.
881 (s390_emit_lsh): New function.
882 (s390_emit_rsh_signed): New function.
883 (s390_emit_rsh_unsigned): New function.
884 (s390_emit_ext): New function.
885 (s390_emit_log_not): New function.
886 (s390_emit_bit_and): New function.
887 (s390_emit_bit_or): New function.
888 (s390_emit_bit_xor): New function.
889 (s390_emit_bit_not): New function.
890 (s390_emit_equal): New function.
891 (s390_emit_less_signed): New function.
892 (s390_emit_less_unsigned): New function.
893 (s390_emit_ref): New function.
894 (s390_emit_if_goto): New function.
895 (s390_emit_goto): New function.
896 (s390_write_goto_address): New function.
897 (s390_emit_litpool): New function.
898 (s390_emit_const): New function.
899 (s390_emit_call): New function.
900 (s390_emit_reg): New function.
901 (s390_emit_pop): New function.
902 (s390_emit_stack_flush): New function.
903 (s390_emit_zero_ext): New function.
904 (s390_emit_swap): New function.
905 (s390_emit_stack_adjust): New function.
906 (s390_emit_set_r2): New function.
907 (s390_emit_int_call_1): New function.
908 (s390_emit_void_call_2): New function.
909 (s390_emit_eq_goto): New function.
910 (s390_emit_ne_goto): New function.
911 (s390_emit_lt_goto): New function.
912 (s390_emit_le_goto): New function.
913 (s390_emit_gt_goto): New function.
914 (s390_emit_ge_goto): New function.
915 (s390x_emit_prologue): New function.
916 (s390x_emit_epilogue): New function.
917 (s390x_emit_add): New function.
918 (s390x_emit_sub): New function.
919 (s390x_emit_mul): New function.
920 (s390x_emit_lsh): New function.
921 (s390x_emit_rsh_signed): New function.
922 (s390x_emit_rsh_unsigned): New function.
923 (s390x_emit_ext): New function.
924 (s390x_emit_log_not): New function.
925 (s390x_emit_bit_and): New function.
926 (s390x_emit_bit_or): New function.
927 (s390x_emit_bit_xor): New function.
928 (s390x_emit_bit_not): New function.
929 (s390x_emit_equal): New function.
930 (s390x_emit_less_signed): New function.
931 (s390x_emit_less_unsigned): New function.
932 (s390x_emit_ref): New function.
933 (s390x_emit_if_goto): New function.
934 (s390x_emit_const): New function.
935 (s390x_emit_call): New function.
936 (s390x_emit_reg): New function.
937 (s390x_emit_pop): New function.
938 (s390x_emit_stack_flush): New function.
939 (s390x_emit_zero_ext): New function.
940 (s390x_emit_swap): New function.
941 (s390x_emit_stack_adjust): New function.
942 (s390x_emit_int_call_1): New function.
943 (s390x_emit_void_call_2): New function.
944 (s390x_emit_eq_goto): New function.
945 (s390x_emit_ne_goto): New function.
946 (s390x_emit_lt_goto): New function.
947 (s390x_emit_le_goto): New function.
948 (s390x_emit_gt_goto): New function.
949 (s390x_emit_ge_goto): New function.
950 (s390_emit_ops): New function.
951 (struct linux_target_ops): Fill in emit_ops hook.
953 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
956 * Makefile.in: Add s390 IPA files.
957 * configure.srv: Build IPA for s390.
958 * linux-s390-ipa.c: New file.
959 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
960 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
961 (tdesc_s390_linux32): Likewise.
962 (init_registers_s390_linux32v1): Likewise.
963 (tdesc_s390_linux32v1): Likewise.
964 (init_registers_s390_linux32v2): Likewise.
965 (tdesc_s390_linux32v2): Likewise.
966 (init_registers_s390_linux64): Likewise.
967 (tdesc_s390_linux64): Likewise.
968 (init_registers_s390_linux64v1): Likewise.
969 (tdesc_s390_linux64v1): Likewise.
970 (init_registers_s390_linux64v2): Likewise.
971 (tdesc_s390_linux64v2): Likewise.
972 (init_registers_s390_te_linux64): Likewise.
973 (tdesc_s390_te_linux64): Likewise.
974 (init_registers_s390_vx_linux64): Likewise.
975 (tdesc_s390_vx_linux64): Likewise.
976 (init_registers_s390_tevx_linux64): Likewise.
977 (tdesc_s390_tevx_linux64): Likewise.
978 (init_registers_s390x_linux64): Likewise.
979 (tdesc_s390x_linux64): Likewise.
980 (init_registers_s390x_linux64v1): Likewise.
981 (tdesc_s390x_linux64v1): Likewise.
982 (init_registers_s390x_linux64v2): Likewise.
983 (tdesc_s390x_linux64v2): Likewise.
984 (init_registers_s390x_te_linux64): Likewise.
985 (tdesc_s390x_te_linux64): Likewise.
986 (init_registers_s390x_vx_linux64): Likewise.
987 (tdesc_s390x_vx_linux64): Likewise.
988 (init_registers_s390x_tevx_linux64): Likewise.
989 (tdesc_s390x_tevx_linux64): Likewise.
990 (have_hwcap_s390_vx): New static variable.
991 (s390_arch_setup): Fill have_hwcap_s390_vx.
992 (s390_get_thread_area): New function.
993 (s390_ft_entry_gpr_esa): New const.
994 (s390_ft_entry_gpr_zarch): New const.
995 (s390_ft_entry_misc): New const.
996 (s390_ft_entry_fr): New const.
997 (s390_ft_entry_vr): New const.
998 (s390_ft_main_31): New const.
999 (s390_ft_main_64): New const.
1000 (s390_ft_exit_fr): New const.
1001 (s390_ft_exit_vr): New const.
1002 (s390_ft_exit_misc): New const.
1003 (s390_ft_exit_gpr_esa): New const.
1004 (s390_ft_exit_gpr_zarch): New const.
1005 (append_insns): New function.
1006 (s390_relocate_instruction): New function.
1007 (s390_install_fast_tracepoint_jump_pad): New function.
1008 (s390_get_min_fast_tracepoint_insn_len): New function.
1009 (s390_get_ipa_tdesc_idx): New function.
1010 (struct linux_target_ops): Wire in the above functions.
1011 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1012 * linux-s390-tdesc.h: New file.
1014 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1016 * linux-s390-low.c (s390_supports_tracepoints): New function.
1017 (struct linux_target_ops): Fill supports_tracepoints hook.
1019 2016-03-18 Yao Qi <yao.qi@linaro.org>
1021 * linux-low.c (lwp_signal_can_be_delivered): New function.
1022 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1024 2016-03-18 Yao Qi <yao.qi@linaro.org>
1026 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1027 0 if signal is enqueued. Remove 'signal' from one debugging
1028 message. Move one debugging message to some lines below.
1029 Remove code setting 'signal' to 0.
1031 2016-03-18 Yao Qi <yao.qi@linaro.org>
1033 * linux-low.c (linux_low_filter_event): Remove redundant
1034 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1036 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1038 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1039 (struct linux_target_ops): Wire in the above.
1041 2016-03-03 Yao Qi <yao.qi@linaro.org>
1043 * linux-low.c: Update comments to start_step_over.
1045 2016-03-03 Yao Qi <yao.qi@linaro.org>
1048 * linux-low.c (handle_extended_wait): Set child suspended
1049 if event_lwp->bp_reinsert isn't zero.
1051 2016-03-02 Yao Qi <yao.qi@linaro.org>
1053 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1054 enqueue_pending_signal.
1056 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1058 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1061 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1063 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1064 (s390_regmap_3264) [!__s390x__]: New global.
1065 (s390_collect_ptrace_register): Skip map entries containing -1.
1066 (s390_supply_ptrace_register): Ditto.
1067 (s390_fill_gprs_high): New function.
1068 (s390_store_gprs_high): New function.
1069 (s390_regsets): Add NT_S390_HIGH_GPRS.
1070 (s390_get_hwcap): Enable on 31-bit.
1071 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1072 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1073 Detect NT_S390_HIGH_GPRS.
1074 (s390_usrregs_info_3264): Enable on 31-bit.
1075 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1076 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1078 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1081 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1082 * configure.srv: Ditto.
1083 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1084 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1085 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1086 (init_registers_amd64_linux): Remove prototype.
1087 (tdesc_amd64_linux): Remove declaration.
1088 (get_ipa_tdesc): New function.
1089 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1090 initialize remaining tdescs.
1091 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1092 (init_registers_i386_linux): Remove prototype.
1093 (tdesc_i386_linux): Remove declaration.
1094 (get_ipa_tdesc): New function.
1095 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1096 initialize remaining tdescs.
1097 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1098 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1099 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1100 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1101 (x86_get_ipa_tdesc_idx): New function.
1102 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1103 * linux-x86-tdesc.h: New file.
1104 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1105 (target_get_ipa_tdesc_idx): New macro.
1106 * tracepoint.c (ipa_tdesc_idx): New macro.
1107 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1108 (symbol_list): Add ipa_tdesc_idx.
1109 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1110 (ipa_tdesc): Remove.
1111 (ipa_tdesc_idx): New variable.
1112 (get_context_regcache): Use get_ipa_tdesc.
1113 (gdb_collect): Ditto.
1115 * tracepoint.h (get_ipa_tdesc): New prototype.
1116 (ipa_tdesc): Remove.
1118 2016-02-24 Pedro Alves <palves@redhat.com>
1120 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1121 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1122 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1123 Factor out common code between the USE_SIGTRAP_SIGINFO and
1124 !USE_SIGTRAP_SIGINFO blocks.
1125 (linux_low_filter_event): Call save_stop_reason instead of
1126 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1128 (linux_wait_1): Update comments.
1130 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1132 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1133 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1134 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1135 ppc_insert_point, ppc_remove_point.
1137 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1139 * linux-s390-low.c (s390_supports_z_point_type): New function.
1140 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1142 2016-02-16 Yao Qi <yao.qi@linaro.org>
1144 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1145 PC. Get pc from regcache_read_pc.
1147 2016-02-12 Yao Qi <yao.qi@linaro.org>
1149 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1150 or linux_get_pc_32bit.
1151 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1153 2016-02-12 Yao Qi <yao.qi@linaro.org>
1155 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1156 arm_linux_get_next_pcs_fixup.
1158 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1160 * tracepoint.c (x_tracepoint_action_download): Change
1161 write_inferior_data_ptr to write_inferior_data_pointer.
1162 (cmd_qtstart): Likewise.
1163 (write_inferior_data_ptr): Remove.
1164 (download_agent_expr): Change write_inferior_data_ptr to
1165 write_inferior_data_pointer.
1166 (download_tracepoint_1): Likewise.
1167 (download_tracepoint): Likewise.
1168 (download_trace_state_variables): Likewise.
1170 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1171 Marcin Kościelnicki <koriakin@0x04.net>
1173 * tracepoint.c (struct tracepoint_action_ops): Remove.
1174 (struct tracepoint_action): Remove ops.
1175 (m_tracepoint_action_download, r_tracepoint_action_download)
1176 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1177 size and offset accordingly.
1178 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1179 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1180 (tracepoint_action_send, tracepoint_action_download): New functions.
1181 Helpers for trace action handlers.
1182 (add_tracepoint_action): Remove setup actions ops.
1183 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1185 2016-02-10 Yao Qi <yao.qi@linaro.org>
1187 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1189 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1191 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1193 * configure: Regenerate.
1195 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1197 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1198 void * to gdb_byte *.
1199 * linux-low.c (siginfo_fixup): Likewise.
1200 (linux_xfer_siginfo): Likewise.
1201 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1203 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1205 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1207 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1209 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1211 * linux-x86-low.c [__x86_64__]: Include
1212 "nat/amd64-linux-siginfo.h".
1213 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1214 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1215 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1216 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1217 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1218 (cpt_si_fd, si_timerid, si_overrun): Move from
1219 nat/amd64-linux-siginfo.c.
1220 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1222 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1224 * server.c (skip_to_semicolon): Remove.
1225 (process_point_options): Use strchrnul instead of
1228 2016-01-26 Yao Qi <yao.qi@linaro.org>
1230 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1231 * linux-low.c (install_software_single_step_breakpoints): Don't
1232 call regcache_read_pc.
1233 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1236 2016-01-26 Yao Qi <yao.qi@linaro.org>
1238 * linux-low.c (install_software_single_step_breakpoints): Call
1239 regcache_read_pc instead of get_pc.
1241 2016-01-26 Yao Qi <yao.qi@linaro.org>
1243 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1244 (unblock_async_io): Rename to ...
1245 (block_unblock_async_io): ... it. New function.
1246 (enable_async_io): Don't install SIGIO handler. Unblock it
1248 (disable_async_io): Don't ignore SIGIO. Block it instead.
1249 (initialize_async_io): Install SIGIO handler. Don't call
1252 2016-01-26 Yao Qi <yao.qi@linaro.org>
1254 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1255 first character is '\003', call *the_target->request_interrupt.
1257 2016-01-25 Yao Qi <yao.qi@linaro.org>
1259 * remote-utils.c (new_thread_notify): Remove.
1260 (dead_thread_notify): Likewise.
1261 * remote-utils.h (new_thread_notify): Remove declaration.
1262 (dead_thread_notify): Likewise.
1264 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1266 * gdb.trace/pending.exp: Fix expected message on continue.
1268 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1270 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1271 it works properly on big-endian machines where sizeof (CORE_ADDR)
1274 2016-01-21 Pedro Alves <palves@redhat.com>
1276 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1277 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1278 * configure: Regenerate.
1280 2016-01-21 Yao Qi <yao.qi@linaro.org>
1282 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1283 is_thumb and set it according to CPSR saved on the stack.
1284 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1285 arm_sigreturn_next_pc.
1287 2016-01-18 Yao Qi <yao.qi@linaro.org>
1289 * linux-low.c (linux_set_pc_64bit): New function.
1290 (linux_get_pc_64bit): New function.
1291 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1293 * linux-sparc-low.c (debug_threads): Remove declaration.
1294 (sparc_get_pc): Remove.
1295 (the_low_target): Use linux_get_pc_64bit instead of
1297 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1298 (the_low_target): Use linux_get_pc_64bit and
1301 2016-01-18 Yao Qi <yao.qi@linaro.org>
1303 * linux-arm-low.c (debug_threads): Remove declaration.
1304 (arm_get_pc, arm_set_pc): Remove.
1305 (the_low_target): Use linux_get_pc_32bit and
1307 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1308 (the_low_target): Use linux_get_pc_32bit and
1310 * linux-cris-low.c (debug_threads): Remove declaration.
1311 (cris_get_pc, cris_set_pc,): Remove.
1312 (the_low_target): Use linux_get_pc_32bit and
1314 * linux-crisv32-low.c (debug_threads): Remove declaration.
1315 (cris_get_pc, cris_set_pc): Remove.
1316 (the_low_target): Use linux_get_pc_32bit and
1318 * linux-low.c: Include inttypes.h.
1319 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1320 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1321 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1322 (the_low_target): Use linux_get_pc_32bit and
1324 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1325 (the_low_target): Use linux_get_pc_32bit and
1327 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1328 (the_low_target): Use linux_get_pc_32bit and
1330 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1331 (the_low_target): Use linux_get_pc_32bit and
1333 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1334 (the_low_target): Use linux_get_pc_32bit and
1337 2016-01-18 Gary Benson <gbenson@redhat.com>
1339 * configure.ac (AC_FUNC_FORK): New check.
1340 * config.in: Regenerate.
1341 * configure: Likewise.
1343 2016-01-14 Yao Qi <yao.qi@linaro.org>
1345 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1346 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1347 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1348 arm_get_next_pcs_ctor.
1350 2016-01-12 Josh Stone <jistone@redhat.com>
1351 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1353 * inferiors.h: Include "gdb_vecs.h".
1354 (struct process_info): Add syscalls_to_catch.
1355 * inferiors.c (remove_process): Free syscalls_to_catch.
1356 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1357 syscall_return stops.
1358 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1359 * server.c (handle_general_set): Handle QCatchSyscalls.
1360 (handle_query): Report support for QCatchSyscalls.
1361 * target.h (struct target_ops): Add supports_catch_syscall.
1362 (target_supports_catch_syscall): New macro.
1363 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1364 (struct lwp_info): Add syscall_state.
1365 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1366 Maintain syscall_state and syscalls_to_catch across exec.
1367 (get_syscall_trapinfo): New function, proxy to the_low_target.
1368 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1369 (linux_low_filter_event): Toggle syscall_state entry/return for
1370 syscall traps, and set it ignored for all others.
1371 (gdb_catching_syscalls_p): New function.
1372 (gdb_catch_this_syscall_p): New function.
1373 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1374 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1375 (linux_supports_catch_syscall): New function.
1376 (linux_target_ops): Install it.
1377 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1378 (the_low_target): Install it.
1380 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1382 * acinclude.m4: Include new ../warning.m4 file.
1383 * configure: Regenerated.
1384 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1386 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1388 * ax.c (is_goto_target): Mark static.
1389 * linux-low.c (register_addr): Likewise.
1390 (linux_fetch_registers, linux_store_registers): Likewise.
1391 * mem-break.c (any_persistent_commands): Fix old prototype.
1392 (add_commands_to_breakpoint): Mark static.
1393 * regcache.c (find_register_by_name): Delete unused func.
1394 * remote-utils.c (hex_or_minus_one): Mark static.
1395 * server.c (monitor_show_help): Mark static.
1396 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1397 handle_v_requests): Likewise.
1399 2016-01-12 Pedro Alves <palves@redhat.com>
1401 Remove use of the registered trademark symbol throughout.
1403 2016-01-08 Yao Qi <yao.qi@linaro.org>
1405 * remote-utils.c (getpkt): If c is '\003', call target hook
1408 2016-01-06 Yao Qi <yao.qi@linaro.org>
1410 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1411 linux-aarch32-low.c.
1412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1413 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1414 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1415 (thumb2_breakpoint): Declare.
1416 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1417 linux-aarch32-low.h.
1418 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1419 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1420 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1422 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1424 * gdbreplay.c (gdbreplay_version): Change copyright year in
1426 * server.c (gdbserver_version): Likewise.
1428 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1430 * server.c (crc32_table): Delete.
1431 (crc32): Use libiberty's xcrc32 function.
1433 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1435 * lynx-low.c (lynx_delete_thread_callback): New function.
1436 (lynx_mourn): Properly delete our process and all of its
1437 threads. Remove call to clear_inferiors.
1439 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1441 * target.c (thread_search_callback): Add check that
1442 the thread_stopped target callback is not NULL before
1445 2015-12-21 Yao Qi <yao.qi@linaro.org>
1447 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1450 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1452 * server.c (handle_query): Call target_supports_software_single_step.
1454 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1456 * linux-low.c (single_step): New function.
1457 (linux_resume_one_lwp_throw): Call single_step.
1458 (start_step_over): Likewise.
1460 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1462 * Makefile.in (SFILES): Append arch/arm-linux.c,
1463 arch/arm-get-next-pcs.c.
1464 (arm-linux.o): New rule.
1465 (arm-get-next-pcs.o): New rule.
1466 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1468 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1469 to linux-aarch32-low.c.
1470 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1471 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1472 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1473 (thumb2_breakpoint_len): Likewise.
1474 (arm_is_thumb_mode): Make non-static.
1475 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1476 from linux-aarch32-low.c.
1477 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1478 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1479 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1480 (thumb2_breakpoint_len): Likewise.
1481 (arm_is_thumb_mode): New declaration.
1482 * linux-arm-low.c: Include arch/arm-linux.h
1483 aarch/arm-get-next-pcs.h, sys/syscall.h.
1484 (get_next_pcs_ops): New struct.
1485 (get_next_pcs_addr_bits_remove): New function.
1486 (get_next_pcs_is_thumb): New function.
1487 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1488 (arm_sigreturn_next_pc): Likewise.
1489 (get_next_pcs_syscall_next_pc): Likewise.
1490 (arm_gdbserver_get_next_pcs): Likewise.
1491 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1493 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1494 * server.h: Include gdb_vecs.h.
1496 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1498 * Makefile.in (SFILES): Append common/common-regcache.c.
1499 (OBS): Append common-regcache.o.
1500 (common-regcache.o): New rule.
1501 * regcache.c (init_register_cache): Initialize cache to
1503 (regcache_raw_read_unsigned): New function.
1504 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1505 register_status enum.
1507 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1509 * linux-aarch64-low.c (the_low_targets): Rename
1510 breakpoint_reinsert_addr to get_next_pcs.
1511 * linux-arm-low.c (the_low_targets): Likewise.
1512 * linux-bfin-low.c (the_low_targets): Likewise.
1513 * linux-cris-low.c (the_low_targets): Likewise.
1514 * linux-crisv32-low.c (the_low_targets): Likewise.
1515 * linux-low.c (can_software_single_step): Likewise.
1516 (install_software_single_step_breakpoints): New function.
1517 (start_step_over): Use install_software_single_step_breakpoints.
1518 * linux-low.h: New CORE_ADDR vector.
1519 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1521 * linux-mips-low.c (the_low_targets): Likewise.
1522 * linux-nios2-low.c (the_low_targets): Likewise.
1523 * linux-sparc-low.c (the_low_targets): Likewise.
1525 2015-12-17 Pedro Alves <palves@redhat.com>
1527 * linux-low.c (linux_kill_one_lwp): Remove references to
1529 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1531 (linux_init_signals): Delete.
1532 (initialize_low): Adjust.
1533 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1535 2015-12-16 Pedro Alves <palves@redhat.com>
1537 * configure.ac (compiler warning flags): When testing a
1538 -Wno-foo option, check whether -Wfoo works instead.
1539 * configure: Regenerate.
1541 2015-12-11 Don Breazeal <donb@codesourcery.com>
1543 * server.c (process_serial_event): Don't exit from gdbserver
1544 in remote mode if there are still active inferiors.
1546 2015-12-11 Yao Qi <yao.qi@linaro.org>
1548 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1549 arm_breakpoint_at if the process is 32-bit.
1551 2015-12-11 Yao Qi <yao.qi@linaro.org>
1553 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1556 2015-12-07 Yao Qi <yao.qi@linaro.org>
1558 * configure.srv: Append arm.o to srv_tgtobj for
1559 aarch64*-*-linux* target.
1560 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1561 from linux-arm-low.c.
1562 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1563 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1564 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1565 (thumb2_breakpoint_len): Likewise.
1566 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1567 (arm_breakpoint_kinds): Likewise.
1568 (arm_breakpoint_kind_from_pc): Likewise.
1569 (arm_sw_breakpoint_from_kind): Likewise.
1570 (arm_breakpoint_kind_from_current_state): Likewise.
1571 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1572 (arm_sw_breakpoint_from_kind): Declare.
1573 (arm_breakpoint_kind_from_current_state): Declare.
1574 (arm_breakpoint_at): Declare.
1575 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1576 arm_sw_breakpoint_from_kind if process is 32-bit.
1577 (aarch64_breakpoint_kind_from_pc): New function.
1578 (aarch64_breakpoint_kind_from_current_state): New function.
1579 (the_low_target): Initialize fields breakpoint_kind_from_pc
1580 and breakpoint_kind_from_current_state.
1581 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1582 linux-aarch32-low.c.
1583 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1584 (arm_breakpoint, arm_breakpoint_len): Likewise.
1585 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1586 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1587 (arm_is_thumb_mode): Likewise.
1588 (arm_breakpoint_at): Likewise.
1589 (arm_breakpoint_kind_from_pc): Likewise.
1590 (arm_sw_breakpoint_from_kind): Likewise.
1591 (arm_breakpoint_kind_from_current_state): Likewise.
1594 2015-08-04 Yao Qi <yao.qi@linaro.org>
1596 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1597 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1598 * server.c (extended_protocol): Remove "static".
1599 * server.h (extended_protocol): Declare it.
1601 2015-12-04 Josh Stone <jistone@redhat.com>
1603 * target.h (struct target_ops) <arch_setup>: Rename to ...
1604 (struct target_ops) <post_create_inferior>: ... this.
1605 (target_arch_setup): Rename to ...
1606 (target_post_create_inferior): ... this, calling post_create_inferior.
1607 * server.c (start_inferior): Update target_arch_setup calls to
1608 target_post_create_inferior.
1609 * linux-low.c (linux_low_ptrace_options): Forward declare.
1610 (linux_arch_setup): Update its comment for general use.
1611 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1612 (struct linux_target_ops): Use linux_post_create_inferior.
1613 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1614 to post_create_inferior.
1615 * nto-low.c (struct nto_target_ops): Likewise.
1616 * spu-low.c (struct spu_target_ops): Likewise.
1617 * win32-low.c (struct win32_target_ops): Likewise.
1619 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1621 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1623 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1625 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1626 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1627 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1628 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1629 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1630 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1631 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1632 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1633 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1634 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1635 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1636 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1638 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1640 * linux-low.c (linux_look_up_symbols): Don't call
1641 linux_supports_traceclone.
1642 * linux-low.h (thread_db_init): Remove use_events argument.
1643 * thread-db.c (thread_db_use_event): Remove global variable.
1644 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1645 (struct thread_db) <td_create_bp>: Remove field.
1646 (thread_db_create_event): Remove function.
1647 (thread_db_enable_reporting): Likewise.
1648 (find_one_thread): Don't check for thread_db_use_events.
1649 (attach_thread): Likewise.
1650 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1651 (try_thread_db_load_1): Don't check for thread_db_use_events.
1652 (thread_db_init): Remove use_events argument and thread events
1654 (remove_thread_event_breakpoints): Remove function.
1655 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1657 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1659 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1661 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1662 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1663 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1664 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1665 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1667 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1669 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1670 * linux-low.c (can_hardware_single_step): Use
1671 supports_hardware_single_step.
1672 (can_software_single_step): New function.
1673 (start_step_over): Call can_software_single_step.
1674 (linux_supports_hardware_single_step): New function.
1675 (struct target_ops) <supports_software_single_step>: Initialize.
1676 * linux-low.h (struct linux_target_ops)
1677 <supports_hardware_single_step>: Initialize.
1678 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1679 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1680 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1681 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1682 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1683 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1684 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1685 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1686 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1687 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1689 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1690 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1692 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1693 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1694 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1696 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1697 * target.h (struct target_ops): <supports_software_single_step>:
1699 (target_supports_software_single_step): New macro.
1701 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1703 * linux-low.c (linux_wait_1): Fix pc advance condition.
1704 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1705 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1707 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1709 * linux-arm-low.c (arm_is_thumb_mode): New function.
1710 (arm_breakpoint_at): Use arm_is_thumb_mode.
1711 (arm_breakpoint_kind_from_current_state): New function.
1712 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1714 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1715 (linux_breakpoint_kind_from_current_state): New function.
1716 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1717 * linux-low.h (struct linux_target_ops)
1718 <breakpoint_kind_from_current_state>: New field.
1719 * target.h (struct target_ops): Likewise.
1720 (target_breakpoint_kind_from_current_state): New macro.
1722 2015-11-30 Pedro Alves <palves@redhat.com>
1724 * linux-low.c (linux_resume): Wake up the event loop before
1727 2015-11-30 Pedro Alves <palves@redhat.com>
1729 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1731 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1733 * target.c (struct thread_search): New structure.
1734 (thread_search_callback): New function.
1735 (prev_general_thread): New global.
1736 (prepare_to_access_memory, done_accessing_memory): New functions.
1737 * target.h (prepare_to_access_memory, done_accessing_memory):
1738 Replace macros with function declarations.
1740 2015-11-30 Pedro Alves <palves@redhat.com>
1743 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1744 report TARGET_WAITKIND_NO_RESUMED.
1745 * remote-utils.c (prepare_resume_reply): Handle
1746 TARGET_WAITKIND_NO_RESUMED.
1747 * server.c (report_no_resumed): New global.
1748 (handle_query) <qSupported>: Handle "no-resumed+". Report
1749 "no-resumed+" support.
1750 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1751 return error if the client doesn't support no-resumed events.
1752 (push_stop_notification): New function.
1753 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1754 events if the client supports them.
1756 2015-11-30 Pedro Alves <palves@redhat.com>
1758 * linux-low.c (thread_still_has_status_pending_p): Don't check
1760 (lwp_resumed): New function.
1761 (status_pending_p_callback): Return early if the LWP is not
1762 supposed to be resumed.
1764 2015-11-30 Pedro Alves <palves@redhat.com>
1766 * linux-low.c (handle_extended_wait): Assert that the LWP's
1767 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1768 thread create events, leave the new child's status pending.
1769 (linux_low_filter_event): If GDB wants to hear about thread exit
1770 events, leave the LWP marked dead and don't delete it.
1771 (linux_wait_for_event_filtered): Don't check for thread exit.
1772 (filter_exit_event): New function.
1773 (linux_wait_1): Use it, when returning an exit event.
1774 (linux_resume_one_lwp_throw): Assert that the LWP's
1775 waitstatus is TARGET_WAITKIND_IGNORE.
1776 * remote-utils.c (prepare_resume_reply): Handle
1777 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1778 * server.c (report_thread_events): New global.
1779 (handle_general_set): Handle QThreadEvents.
1780 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1781 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1782 TARGET_WAITKIND_THREAD_EXITED.
1783 * server.h (report_thread_events): Declare.
1785 2015-11-30 Pedro Alves <palves@redhat.com>
1787 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1788 the thread's last_resume_kind was resume_stop.
1790 2015-11-30 Pedro Alves <palves@redhat.com>
1792 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1795 2015-11-30 Pedro Alves <palves@redhat.com>
1797 * server.c (handle_v_requests): Handle vCtrlC.
1799 2015-11-30 Pedro Alves <palves@redhat.com>
1801 * gdbthread.h (find_any_thread_of_pid): Declare.
1802 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1804 * server.c (handle_query): If current_thread is NULL, look for
1805 another thread of the selected process.
1807 2015-11-26 Daniel Colascione <dancol@dancol.org>
1808 Simon Marchi <simon.marchi@ericsson.com>
1810 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1811 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1813 * target.h (struct target_ops) <thread_name>: New field.
1814 (target_thread_name): New macro.
1816 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1818 * regcache.h (regcache_invalidate_pid): Add declaration.
1819 * regcache.c (regcache_invalidate_pid): New function, extracted
1820 from regcache_invalidate.
1821 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1822 Add trivial documentation comment.
1823 * lynx-low.c: Use regcache_invalidate_pid instead of
1824 regcache_invalidate.
1826 2015-11-23 Joel Brobecker <brobecker@adacore.com>
1828 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1829 and Elf64_auxv_t if the target is Android.
1831 2015-11-22 Doug Evans <xdje42@gmail.com>
1833 * target.h: #include <sys/types.h>.
1835 2015-11-19 Pedro Alves <palves@redhat.com>
1837 * linux-low.c (linux_process_qsupported): Change prototype.
1839 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1841 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1842 and adjust to loop over all features.
1843 * server.c (handle_query) <qSupported>: Adjust to call
1844 target_process_qsupported once, passing it a vector of unprocessed
1846 * target.h (struct target_ops) <process_qsupported>: Change
1848 (target_process_qsupported): Adjust.
1850 2015-11-19 Pedro Alves <palves@redhat.com>
1852 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1854 * configure: Regenerate.
1856 2015-11-19 Pedro Alves <palves@redhat.com>
1858 * configure: Regenerate.
1860 2015-11-19 Yao Qi <yao.qi@linaro.org>
1862 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1865 2015-11-19 Yao Qi <yao.qi@linaro.org>
1867 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1868 (struct aarch64_operand): Move enum out.
1870 2015-11-19 Yao Qi <yao.qi@linaro.org>
1872 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1873 struct user_fpsimd_state *.
1874 (aarch64_store_fpregset): Likewise.
1876 2015-11-19 Yao Qi <yao.qi@linaro.org>
1878 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1879 struct user_pt_regs *.
1880 (aarch64_store_gregset): Likewise.
1882 2015-11-18 Pedro Alves <palves@redhat.com>
1884 * Makefile.in (all_object_files): Add $IPA_OBJS.
1886 2015-11-17 Pedro Alves <palves@redhat.com>
1888 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1889 GDB_SIGNAL_0 and gdb_signal_to_string.
1891 2015-11-17 Pedro Alves <palves@redhat.com>
1893 * win32-low.c (handle_output_debug_string): Remove parameter.
1894 (win32_kill): Remove our_status local and adjust call to
1895 handle_output_debug_string.
1896 (get_child_debug_event): Adjust call to
1897 handle_output_debug_string.
1899 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1901 * linux-mips-low.c (mips_fill_gregset): Add cast.
1902 (mips_store_gregset): Likewise.
1903 (mips_fill_fpregset): Likewise.
1904 (mips_store_fpregset): Likewise.
1906 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1908 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1911 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1913 * linux-mips-low.c (mips_linux_new_thread): Change type of
1914 watch_type to enum target_hw_bp_type.
1916 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1918 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1919 Change return type to arm_hwbp_type.
1921 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1923 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1924 (arm_store_gregset): Likewise.
1925 * linux-arm-low.c (arm_get_hwcap): Likewise.
1926 (arm_read_description): Likewise.
1928 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1930 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1932 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1934 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1935 (ppc_fill_vsxregset): Likewise.
1936 (ppc_store_vsxregset): Likewise.
1937 (ppc_fill_vrregset): Likewise.
1938 (ppc_store_vrregset): Likewise.
1939 (ppc_fill_evrregset): Likewise.
1940 (ppc_store_evrregset): Likewise.
1942 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1944 * linux-ppc-low.c (ppc_usrregs_info): Remove
1945 forward-declaration.
1946 (ppc_arch_setup): Move lower in file.
1948 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1950 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1951 (ps_pdwrite): Likewise.
1953 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1955 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1956 to after assert checks.
1958 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1960 * proc-service.c (ps_pdread): Add/adjust casts.
1961 (ps_pdwrite): Add/adjust casts.
1963 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1965 * server.c (handle_search_memory_1): Cast return value of
1968 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1970 * server.c (write_qxfer_response): Change type of data to
1973 2015-10-29 Pedro Alves <palves@redhat.com>
1975 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1977 2015-10-29 Pedro Alves <palves@redhat.com>
1979 * tracepoint.c (clear_installed_tracepoints): Add casts.
1981 2015-10-29 Pedro Alves <palves@redhat.com>
1983 * server.c (handle_v_cont, process_serial_event): Add enum
1984 gdb_signal casts to signal parsing code.
1986 2015-10-29 Pedro Alves <palves@redhat.com>
1988 * linux-low.h (NULL_REGSET): Define.
1989 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1990 * linux-arm-low.c (arm_regsets): Likewise.
1991 * linux-crisv32-low.c (cris_regsets): Likewise.
1992 * linux-m68k-low.c (m68k_regsets): Likewise.
1993 * linux-mips-low.c (mips_regsets): Likewise.
1994 * linux-nios2-low.c (nios2_regsets): Likewise.
1995 * linux-ppc-low.c (ppc_regsets): Likewise.
1996 * linux-s390-low.c (s390_regsets): Likewise.
1997 * linux-sh-low.c (sh_regsets): Likewise.
1998 * linux-sparc-low.c (sparc_regsets): Likewise.
1999 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2000 * linux-tile-low.c (tile_regsets): Likewise.
2001 * linux-x86-low.c (x86_regsets): Likewise.
2002 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2004 2015-10-29 Pedro Alves <palves@redhat.com>
2006 * linux-low.h (NULL_REGSET): Define.
2007 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2008 * linux-arm-low.c (arm_regsets): Likewise.
2009 * linux-crisv32-low.c (cris_regsets): Likewise.
2010 * linux-m68k-low.c (m68k_regsets): Likewise.
2011 * linux-mips-low.c (mips_regsets): Likewise.
2012 * linux-nios2-low.c (nios2_regsets): Likewise.
2013 * linux-ppc-low.c (ppc_regsets): Likewise.
2014 * linux-s390-low.c (s390_regsets): Likewise.
2015 * linux-sh-low.c (sh_regsets): Likewise.
2016 * linux-sparc-low.c (sparc_regsets): Likewise.
2017 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2018 * linux-tile-low.c (tile_regsets): Likewise.
2019 * linux-x86-low.c (x86_regsets): Likewise.
2020 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2022 2015-10-26 Doug Evans <dje@google.com>
2024 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2026 2015-10-26 Doug Evans <dje@google.com>
2028 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2030 2015-10-26 Doug Evans <dje@google.com>
2032 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2034 (attach_thread, find_new_threads_callback): Ditto.
2036 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2038 * mem-break.h (set_breakpoint_data): Remove.
2040 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2042 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2043 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2044 (initialize_low): Remove set_breakpoint_data call.
2045 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2046 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2047 (initialize_low): Remove set_breakpoint_data call.
2048 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2049 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2050 (initialize_low): Remove set_breakpoint_data call.
2052 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2054 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2055 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2056 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2057 * target.h (target_breakpoint_kind_from_pc): New macro.
2059 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2061 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2062 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2063 the default breakpoint kind.
2065 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2067 * linux-arm-low.c (arm_supports_z_point_type): Add software
2070 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2072 * linux-arm-low.c: Refactor breakpoint definitions.
2073 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2074 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2076 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2078 * Makefile.in: Add arm.c/o.
2079 * configure.srv: Likewise.
2080 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2081 (arm_breakpoint_kind_from_pc): New function.
2082 (arm_sw_breakpoint_from_kind): Return proper kind.
2083 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2085 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2087 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2089 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2090 (struct raw_breakpoint) <size>: Remove.
2091 (struct raw_breakpoint) <kind>: Add.
2092 (bp_size): New function.
2093 (bp_opcode): Likewise.
2094 (find_raw_breakpoint_at): Adjust for kind.
2095 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2096 (remove_memory_breakpoint): Adjust for kind call bp_size.
2097 (set_raw_breakpoint_at): Adjust for kind.
2098 (set_breakpoint): Likewise.
2099 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2100 (delete_raw_breakpoint): Adjust for kind.
2101 (delete_breakpoint): Likewise.
2102 (find_gdb_breakpoint): Likewise.
2103 (set_gdb_breakpoint_1): Likewise.
2104 (set_gdb_breakpoint): Likewise.
2105 (delete_gdb_breakpoint_1): Likewise.
2106 (delete_gdb_breakpoint): Likewise.
2107 (uninsert_raw_breakpoint): Likewise.
2108 (reinsert_raw_breakpoint): Likewise.
2109 (set_breakpoint_data): Remove.
2110 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2111 (check_mem_read): Adjust for kind call bp_size.
2112 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2113 (clone_one_breakpoint): Adjust for kind.
2114 * mem-break.h (set_gdb_breakpoint): Likewise.
2115 (delete_gdb_breakpoint): Likewise.
2116 * server.c (process_serial_event): Likewise.
2118 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2120 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2121 (struct linux_target_ops) <breakpoint>: Remove.
2122 (struct linux_target_ops) <breakpoint_len>: Remove.
2123 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2124 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2125 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2126 (arm_sw_breakpoint_from_kind): New function.
2127 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2128 (struct linux_target_ops) <breakpoint>: Remove.
2129 (struct linux_target_ops) <breakpoint_len>: Remove.
2130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2132 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2133 (struct linux_target_ops) <breakpoint>: Remove.
2134 (struct linux_target_ops) <breakpoint_len>: Remove.
2135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2137 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2138 (struct linux_target_ops) <breakpoint>: Remove.
2139 (struct linux_target_ops) <breakpoint_len>: Remove.
2140 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2141 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2142 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2143 and sw_breakpoint_from_kind to increment the pc.
2144 (linux_breakpoint_kind_from_pc): New function.
2145 (linux_sw_breakpoint_from_kind): New function.
2146 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2147 (initialize_low): Call breakpoint_kind_from_pc and
2148 sw_breakpoint_from_kind to replace breakpoint_data/len.
2149 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2152 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2153 (struct linux_target_ops) <breakpoint>: Remove.
2154 (struct linux_target_ops) <breakpoint_len>: Remove.
2155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2157 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2158 (struct linux_target_ops) <breakpoint>: Remove.
2159 (struct linux_target_ops) <breakpoint_len>: Remove.
2160 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2162 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2163 (struct linux_target_ops) <breakpoint>: Remove.
2164 (struct linux_target_ops) <breakpoint_len>: Remove.
2165 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2166 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2167 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2168 (struct linux_target_ops) <breakpoint>: Remove.
2169 (struct linux_target_ops) <breakpoint_len>: Remove.
2170 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2171 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2172 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2173 (struct linux_target_ops) <breakpoint>: Remove.
2174 (struct linux_target_ops) <breakpoint_len>: Remove.
2175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2177 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2178 (struct linux_target_ops) <breakpoint>: Remove.
2179 (struct linux_target_ops) <breakpoint_len>: Remove.
2180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2182 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2183 (struct linux_target_ops) <breakpoint>: Remove.
2184 (struct linux_target_ops) <breakpoint_len>: Remove.
2185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2187 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2188 (struct linux_target_ops) <breakpoint>: Remove.
2189 (struct linux_target_ops) <breakpoint_len>: Remove.
2190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2192 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2193 (struct linux_target_ops) <breakpoint>: Remove.
2194 (struct linux_target_ops) <breakpoint_len>: Remove.
2195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2197 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2198 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2199 (struct linux_target_ops) <breakpoint>: Remove.
2200 (struct linux_target_ops) <breakpoint_len>: Remove.
2201 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2202 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2203 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2204 (struct linux_target_ops) <breakpoint>: Remove.
2205 (struct linux_target_ops) <breakpoint_len>: Remove.
2206 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2207 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2209 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2211 * linux-cris-low.c (cris_get_pc): Remove void arg.
2213 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2215 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2218 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2220 * inferiors.c (thread_pid_matches_callback): New function.
2221 (find_thread_process): New function.
2222 (remove_thread): Reset current_thread.
2223 (remove_process): Assert threads have been removed first.
2225 2015-10-15 Yao Qi <yao.qi@linaro.org>
2227 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2229 (aarch64_remove_point): Likewise.
2230 * regcache.c (regcache_register_size): New function.
2232 2015-10-12 Yao Qi <yao.qi@linaro.org>
2234 * linux-aarch64-low.c: Update all callers as emit_load_store
2235 is renamed to aarch64_emit_load_store.
2237 2015-10-12 Yao Qi <yao.qi@linaro.org>
2239 * linux-aarch64-low.c: Update all callers of function renaming
2240 from emit_insn to aarch64_emit_insn.
2242 2015-10-12 Yao Qi <yao.qi@linaro.org>
2244 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2245 arch/aarch64-insn.h.
2246 (struct aarch64_memory_operand): Likewise.
2248 (emit_insn): Move to arch/aarch64-insn.c.
2249 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2250 (emit_load_store): Move to arch/aarch64-insn.c.
2251 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2252 (can_encode_int32): Remove.
2254 2015-10-12 Yao Qi <yao.qi@linaro.org>
2256 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2257 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2258 (aarch64_relocate_instruction): Likewise.
2259 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2260 (struct aarch64_insn_visitor): Likewise.
2262 2015-10-12 Yao Qi <yao.qi@linaro.org>
2264 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2265 (struct aarch64_insn_visitor): New.
2266 (struct aarch64_insn_relocation_data): New.
2267 (aarch64_ftrace_insn_reloc_b): New function.
2268 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2269 (aarch64_ftrace_insn_reloc_cb): Likewise.
2270 (aarch64_ftrace_insn_reloc_tb): Likewise.
2271 (aarch64_ftrace_insn_reloc_adr): Likewise.
2272 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2273 (aarch64_ftrace_insn_reloc_others): Likewise.
2275 (aarch64_relocate_instruction): Use visitor.
2277 2015-10-12 Yao Qi <yao.qi@linaro.org>
2279 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2280 int. Add argument buf.
2281 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2282 aarch64_relocate_instruction.
2284 2015-10-12 Yao Qi <yao.qi@linaro.org>
2286 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2287 argument insn. Remove local variable insn. Don't call
2289 (aarch64_install_fast_tracepoint_jump_pad): Call
2292 2015-09-30 Yao Qi <yao.qi@linaro.org>
2294 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2295 (emit_load_store_pair): Likewise.
2297 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2299 * dll.c (match_dll): Add cast(s).
2300 (unloaded_dll): Likewise.
2301 * linux-low.c (second_thread_of_pid_p): Likewise.
2302 (delete_lwp_callback): Likewise.
2303 (count_events_callback): Likewise.
2304 (select_event_lwp_callback): Likewise.
2305 (linux_set_resume_request): Likewise.
2306 * server.c (accumulate_file_name_length): Likewise.
2307 (emit_dll_description): Likewise.
2308 (handle_qxfer_threads_worker): Likewise.
2309 (visit_actioned_threads): Likewise.
2310 * thread-db.c (any_thread_of): Likewise.
2311 * tracepoint.c (same_process_p): Likewise.
2312 (match_blocktype): Likewise.
2313 (build_traceframe_info_xml): Likewise.
2315 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2317 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2319 (gdb_unparse_agent_expr): Likewise.
2320 * hostio.c (require_data): Likewise.
2321 (handle_pread): Likewise.
2322 * linux-low.c (disable_regset): Likewise.
2323 (fetch_register): Likewise.
2324 (store_register): Likewise.
2325 (get_dynamic): Likewise.
2326 (linux_qxfer_libraries_svr4): Likewise.
2327 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2328 (set_fast_tracepoint_jump): Likewise.
2329 (uninsert_fast_tracepoint_jumps_at): Likewise.
2330 (reinsert_fast_tracepoint_jumps_at): Likewise.
2331 (validate_inserted_breakpoint): Likewise.
2332 (clone_agent_expr): Likewise.
2333 * regcache.c (init_register_cache): Likewise.
2334 * remote-utils.c (putpkt_binary_1): Likewise.
2335 (decode_M_packet): Likewise.
2336 (decode_X_packet): Likewise.
2337 (look_up_one_symbol): Likewise.
2338 (relocate_instruction): Likewise.
2339 (monitor_output): Likewise.
2340 * server.c (handle_search_memory): Likewise.
2341 (handle_qxfer_exec_file): Likewise.
2342 (handle_qxfer_libraries): Likewise.
2343 (handle_qxfer): Likewise.
2344 (handle_query): Likewise.
2345 (handle_v_cont): Likewise.
2346 (handle_v_run): Likewise.
2347 (captured_main): Likewise.
2348 * target.c (write_inferior_memory): Likewise.
2349 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2350 * tracepoint.c (init_trace_buffer): Likewise.
2351 (add_tracepoint_action): Likewise.
2352 (add_traceframe): Likewise.
2353 (add_traceframe_block): Likewise.
2354 (cmd_qtdpsrc): Likewise.
2355 (cmd_qtdv): Likewise.
2356 (cmd_qtstatus): Likewise.
2357 (response_source): Likewise.
2358 (response_tsv): Likewise.
2359 (cmd_qtnotes): Likewise.
2360 (gdb_collect): Likewise.
2361 (initialize_tracepoint): Likewise.
2363 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2365 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2366 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2367 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2369 (enum aarch64_condition_codes): New enum.
2370 (w0): New static global.
2373 (struct aarch64_memory_operand) <type>: New
2374 MEMORY_OPERAND_POSTINDEX type.
2375 (postindex_memory_operand): New helper function.
2376 (emit_ret): New function.
2377 (emit_load_store_pair): New function, factored out of emit_stp
2378 with support for MEMORY_OPERAND_POSTINDEX.
2379 (emit_stp): Rewrite using emit_load_store_pair.
2380 (emit_ldp): New function.
2381 (emit_load_store): Likewise.
2382 (emit_ldr): Mention post-index instruction in comment.
2383 (emit_ldrh): New function.
2384 (emit_ldrb): New function.
2385 (emit_ldrsw): Mention post-index instruction in comment.
2386 (emit_str): Likewise.
2387 (emit_subs): New function.
2388 (emit_cmp): Likewise.
2389 (emit_and): Likewise.
2390 (emit_orr): Likewise.
2391 (emit_orn): Likewise.
2392 (emit_eor): Likewise.
2393 (emit_mvn): Likewise.
2394 (emit_lslv): Likewise.
2395 (emit_lsrv): Likewise.
2396 (emit_asrv): Likewise.
2397 (emit_mul): Likewise.
2398 (emit_sbfm): Likewise.
2399 (emit_sbfx): Likewise.
2400 (emit_ubfm): Likewise.
2401 (emit_ubfx): Likewise.
2402 (emit_csinc): Likewise.
2403 (emit_cset): Likewise.
2404 (emit_nop): Likewise.
2405 (emit_ops_insns): New helper function.
2406 (emit_pop): Likewise.
2407 (emit_push): Likewise.
2408 (aarch64_emit_prologue): New function.
2409 (aarch64_emit_epilogue): Likewise.
2410 (aarch64_emit_add): Likewise.
2411 (aarch64_emit_sub): Likewise.
2412 (aarch64_emit_mul): Likewise.
2413 (aarch64_emit_lsh): Likewise.
2414 (aarch64_emit_rsh_signed): Likewise.
2415 (aarch64_emit_rsh_unsigned): Likewise.
2416 (aarch64_emit_ext): Likewise.
2417 (aarch64_emit_log_not): Likewise.
2418 (aarch64_emit_bit_and): Likewise.
2419 (aarch64_emit_bit_or): Likewise.
2420 (aarch64_emit_bit_xor): Likewise.
2421 (aarch64_emit_bit_not): Likewise.
2422 (aarch64_emit_equal): Likewise.
2423 (aarch64_emit_less_signed): Likewise.
2424 (aarch64_emit_less_unsigned): Likewise.
2425 (aarch64_emit_ref): Likewise.
2426 (aarch64_emit_if_goto): Likewise.
2427 (aarch64_emit_goto): Likewise.
2428 (aarch64_write_goto_address): Likewise.
2429 (aarch64_emit_const): Likewise.
2430 (aarch64_emit_call): Likewise.
2431 (aarch64_emit_reg): Likewise.
2432 (aarch64_emit_pop): Likewise.
2433 (aarch64_emit_stack_flush): Likewise.
2434 (aarch64_emit_zero_ext): Likewise.
2435 (aarch64_emit_swap): Likewise.
2436 (aarch64_emit_stack_adjust): Likewise.
2437 (aarch64_emit_int_call_1): Likewise.
2438 (aarch64_emit_void_call_2): Likewise.
2439 (aarch64_emit_eq_goto): Likewise.
2440 (aarch64_emit_ne_goto): Likewise.
2441 (aarch64_emit_lt_goto): Likewise.
2442 (aarch64_emit_le_goto): Likewise.
2443 (aarch64_emit_gt_goto): Likewise.
2444 (aarch64_emit_ge_got): Likewise.
2445 (aarch64_emit_ops_impl): New static global variable.
2446 (aarch64_emit_ops): New target function, return
2447 &aarch64_emit_ops_impl.
2448 (struct linux_target_ops): Install it.
2450 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2452 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2453 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2455 * linux-aarch64-ipa.c: New file.
2456 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2458 (aarch64_get_thread_area): New target method.
2459 (extract_signed_bitfield): New helper function.
2460 (aarch64_decode_ldr_literal): New function.
2461 (enum aarch64_opcodes): New enum.
2462 (struct aarch64_register): New struct.
2463 (struct aarch64_operand): New struct.
2464 (x0): New static global.
2473 (aarch64_register): New helper function.
2474 (register_operand): Likewise.
2475 (immediate_operand): Likewise.
2476 (struct aarch64_memory_operand): New struct.
2477 (offset_memory_operand): New helper function.
2478 (preindex_memory_operand): Likewise.
2479 (enum aarch64_system_control_registers): New enum.
2480 (ENCODE): New macro.
2481 (emit_insn): New helper function.
2482 (emit_b): New function.
2483 (emit_bcond): Likewise.
2484 (emit_cb): Likewise.
2485 (emit_tb): Likewise.
2486 (emit_blr): Likewise.
2487 (emit_stp): Likewise.
2488 (emit_ldp_q_offset): Likewise.
2489 (emit_stp_q_offset): Likewise.
2490 (emit_load_store): Likewise.
2491 (emit_ldr): Likewise.
2492 (emit_ldrsw): Likewise.
2493 (emit_str): Likewise.
2494 (emit_ldaxr): Likewise.
2495 (emit_stxr): Likewise.
2496 (emit_stlr): Likewise.
2497 (emit_data_processing_reg): Likewise.
2498 (emit_data_processing): Likewise.
2499 (emit_add): Likewise.
2500 (emit_sub): Likewise.
2501 (emit_mov): Likewise.
2502 (emit_movk): Likewise.
2503 (emit_mov_addr): Likewise.
2504 (emit_mrs): Likewise.
2505 (emit_msr): Likewise.
2506 (emit_sevl): Likewise.
2507 (emit_wfe): Likewise.
2508 (append_insns): Likewise.
2509 (can_encode_int32_in): New helper function.
2510 (aarch64_relocate_instruction): New function.
2511 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2512 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2513 (struct linux_target_ops): Install aarch64_get_thread_area,
2514 aarch64_install_fast_tracepoint_jump_pad and
2515 aarch64_get_min_fast_tracepoint_insn_len.
2517 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2519 * Makefile.in (aarch64-insn.o): New rule.
2520 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2522 2015-09-21 Yao Qi <yao.qi@linaro.org>
2524 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2526 2015-09-21 Yao Qi <yao.qi@linaro.org>
2528 * tracepoint.c (max_jump_pad_size): Remove.
2530 2015-09-18 Yao Qi <yao.qi@linaro.org>
2532 * linux-aarch64-low.c: Don't include sys/uio.h.
2533 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2535 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2537 * tracepoint.c (eval_result_type): Change prototype.
2538 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2540 2015-09-15 Pedro Alves <palves@redhat.com>
2542 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2543 Check whether to report exec events instead of checking whether
2544 multiprocess is enabled.
2546 2015-09-15 Pedro Alves <palves@redhat.com>
2549 * remote-utils.c (prepare_resume_reply): Merge
2550 TARGET_WAITKIND_VFORK_DONE switch case with the
2551 TARGET_WAITKIND_FORKED case.
2553 2015-09-15 Yao Qi <yao.qi@linaro.org>
2555 * server.c (handle_query): Check string comparison using
2556 "else if" instead of "if".
2558 2015-09-15 Yao Qi <yao.qi@linaro.org>
2560 * server.c (vCont_supported): New global variable.
2561 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2562 matches. Append ";vContSupported+" to own_buf.
2563 (handle_v_requests): Append ";s;S" to own_buf if target supports
2564 hardware single step or vCont_supported is false.
2565 (capture_main): Set vCont_supported to zero.
2567 2015-09-15 Yao Qi <yao.qi@linaro.org>
2569 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2571 (linux_supports_hardware_single_step): ... New function.
2572 (linux_target_ops): Update.
2573 * lynx-low.c (lynx_target_ops): Set field
2574 supports_hardware_single_step to target_can_do_hardware_single_step.
2575 * nto-low.c (nto_target_ops): Likewise.
2576 * spu-low.c (spu_target_ops): Likewise.
2577 * win32-low.c (win32_target_ops): Likewise.
2578 * target.c (target_can_do_hardware_single_step): New function.
2579 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2580 Remove. <supports_hardware_single_step>: New field.
2581 (target_supports_conditional_breakpoints): Remove.
2582 (target_supports_hardware_single_step): New macro.
2583 (target_can_do_hardware_single_step): Declare.
2584 * server.c (handle_query): Use target_supports_hardware_single_step
2585 instead of target_supports_conditional_breakpoints.
2587 2015-09-15 Yao Qi <yao.qi@linaro.org>
2589 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2591 (struct linux_target_ops the_low_target): Install
2592 aarch64_linux_siginfo_fixup.
2594 2015-09-11 Don Breazeal <donb@codesourcery.com>
2595 Luis Machado <lgustavo@codesourcery.com>
2597 * linux-low.c (linux_mourn): Static declaration.
2598 (linux_arch_setup): Move in front of
2599 handle_extended_wait.
2600 (linux_arch_setup_thread): New function.
2601 (handle_extended_wait): Handle exec events. Call
2602 linux_arch_setup_thread. Make event_lwp argument a
2603 pointer-to-a-pointer.
2604 (check_zombie_leaders): Do not check stopped threads.
2605 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2606 (linux_low_filter_event): Add lwp and thread for exec'ing
2607 non-leader thread if leader thread has been deleted.
2608 Refactor code into linux_arch_setup_thread and call it.
2609 Pass child lwp pointer by reference to handle_extended_wait.
2610 (linux_wait_for_event_filtered): Update comment.
2611 (linux_wait_1): Prevent clobbering exec event status.
2612 (linux_supports_exec_events): New function.
2613 (linux_target_ops) <supports_exec_events>: Initialize new member.
2614 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2616 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2617 * server.c (report_exec_events): New global variable.
2618 (handle_query): Handle qSupported query for exec-events feature.
2619 (captured_main): Initialize report_exec_events.
2620 * server.h (report_exec_events): Declare new global variable.
2621 * target.h (struct target_ops) <supports_exec_events>: New
2623 (target_supports_exec_events): New macro.
2624 * win32-low.c (win32_target_ops) <supports_exec_events>:
2625 Initialize new member.
2627 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2629 * linux-low.c (linux_low_enable_btrace): Remove.
2630 (linux_target_ops): Replace linux_low_enable_btrace with
2631 linux_enable_btrace.
2633 2015-09-03 Yao Qi <yao.qi@linaro.org>
2635 * linux-aarch64-low.c (aarch64_insert_point): Call
2636 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2639 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2641 * linux-low.c (check_stopped_by_breakpoint): Use
2642 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2644 2015-08-27 Pedro Alves <palves@redhat.com>
2646 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2648 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2650 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2651 the XNEW-family equivalent.
2652 (compile_bytecodes): Likewise.
2653 * dll.c (loaded_dll): Likewise.
2654 * event-loop.c (append_callback_event): Likewise.
2655 (create_file_handler): Likewise.
2656 (create_file_event): Likewise.
2657 * hostio.c (handle_open): Likewise.
2658 * inferiors.c (add_thread): Likewise.
2659 (add_process): Likewise.
2660 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2661 * linux-arm-low.c (arm_new_process): Likewise.
2662 (arm_new_thread): Likewise.
2663 * linux-low.c (add_to_pid_list): Likewise.
2664 (linux_add_process): Likewise.
2665 (handle_extended_wait): Likewise.
2666 (add_lwp): Likewise.
2667 (enqueue_one_deferred_signal): Likewise.
2668 (enqueue_pending_signal): Likewise.
2669 (linux_resume_one_lwp_throw): Likewise.
2670 (linux_resume_one_thread): Likewise.
2671 (linux_read_memory): Likewise.
2672 (linux_write_memory): Likewise.
2673 * linux-mips-low.c (mips_linux_new_process): Likewise.
2674 (mips_linux_new_thread): Likewise.
2675 (mips_add_watchpoint): Likewise.
2676 * linux-x86-low.c (initialize_low_arch): Likewise.
2677 * lynx-low.c (lynx_add_process): Likewise.
2678 * mem-break.c (set_raw_breakpoint_at): Likewise.
2679 (set_breakpoint): Likewise.
2680 (add_condition_to_breakpoint): Likewise.
2681 (add_commands_to_breakpoint): Likewise.
2682 (clone_agent_expr): Likewise.
2683 (clone_one_breakpoint): Likewise.
2684 * regcache.c (new_register_cache): Likewise.
2685 * remote-utils.c (look_up_one_symbol): Likewise.
2686 * server.c (queue_stop_reply): Likewise.
2687 (start_inferior): Likewise.
2688 (queue_stop_reply_callback): Likewise.
2689 (handle_target_event): Likewise.
2690 * spu-low.c (fetch_ppc_memory): Likewise.
2691 (store_ppc_memory): Likewise.
2692 * target.c (set_target_ops): Likewise.
2693 * thread-db.c (thread_db_load_search): Likewise.
2694 (try_thread_db_load_1): Likewise.
2695 * tracepoint.c (add_tracepoint): Likewise.
2696 (add_tracepoint_action): Likewise.
2697 (create_trace_state_variable): Likewise.
2698 (cmd_qtdpsrc): Likewise.
2699 (cmd_qtro): Likewise.
2700 (add_while_stepping_state): Likewise.
2701 * win32-low.c (child_add_thread): Likewise.
2702 (get_image_name): Likewise.
2704 2015-08-25 Yao Qi <yao.qi@linaro.org>
2706 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2708 2015-08-25 Yao Qi <yao.qi@linaro.org>
2710 * Makefile.in (aarch64-linux.o): New rule.
2711 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2713 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2714 (aarch64_init_debug_reg_state): Make it extern.
2715 (aarch64_linux_prepare_to_resume): Remove.
2717 2015-08-25 Yao Qi <yao.qi@linaro.org>
2719 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2720 lwp_arch_private_info and ptid_of_lwp.
2722 2015-08-25 Yao Qi <yao.qi@linaro.org>
2724 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2725 Find proc_info by find_process_pid. All callers updated.
2727 2015-08-25 Yao Qi <yao.qi@linaro.org>
2729 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2731 (debug_reg_change_callback): Remove.
2732 (aarch64_notify_debug_reg_change): Remove.
2734 2015-08-25 Yao Qi <yao.qi@linaro.org>
2736 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2737 Call current_lwp_ptid.
2739 2015-08-25 Yao Qi <yao.qi@linaro.org>
2741 * linux-aarch64-low.c (debug_reg_change_callback): Use
2744 2015-08-25 Yao Qi <yao.qi@linaro.org>
2746 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2748 2015-08-25 Yao Qi <yao.qi@linaro.org>
2750 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2752 2015-08-25 Yao Qi <yao.qi@linaro.org>
2754 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2757 2015-08-25 Yao Qi <yao.qi@linaro.org>
2759 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2761 (debug_reg_change_callback): Remove argument entry and add argument
2762 lwp. Remove local variable thread. Don't print thread id in the
2763 debugging output. Don't check whether pid of thread equals to pid.
2764 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2765 iterate_over_lwps instead find_inferior.
2767 2015-08-24 Pedro Alves <palves@redhat.com>
2769 * inferiors.c (get_first_process): New function.
2770 * inferiors.h (get_first_process): New declaration.
2771 * remote-utils.c (read_ptid): Default to the first process in the
2772 list, instead of to the current thread's process.
2774 2015-08-24 Pedro Alves <palves@redhat.com>
2776 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2777 * event-loop.c: Likewise.
2778 * remote-utils.c: Likewise.
2779 * tracepoint.c: Likewise.
2781 2015-08-24 Pedro Alves <palves@redhat.com>
2783 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2786 2015-08-21 Pedro Alves <palves@redhat.com>
2788 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2789 instead of literal 1.
2791 2015-08-21 Pedro Alves <palves@redhat.com>
2793 * tdesc.c (default_description): Explicitly zero-initialize.
2795 2015-08-21 Pedro Alves <palves@redhat.com>
2798 * inferiors.c (remove_thread): Discard any pending stop reply for
2800 * server.c (remove_all_on_match_pid): Rename to ...
2801 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2803 (discard_queued_stop_replies): Change parameter to a ptid. Now
2805 (handle_v_kill, kill_inferior_callback, captured_main)
2806 (process_serial_event): Adjust.
2807 * server.h (discard_queued_stop_replies): Declare.
2809 2015-08-21 Pedro Alves <palves@redhat.com>
2811 * linux-low.c (wait_for_sigstop): Always switch to no thread
2812 selected if the previously current thread dies.
2813 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2814 process instead of the current thread's.
2815 * remote-utils.c (input_interrupt): Don't check if there's no
2817 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2818 current thread to the general thread fails, error out.
2819 (handle_qxfer_auxv, handle_qxfer_libraries)
2820 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2821 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2822 (handle_query): Check if there's a thread selected instead of
2823 checking whether there's any thread in the thread list.
2824 (handle_qxfer_threads, handle_qxfer_btrace)
2825 (handle_qxfer_btrace_conf): Don't error out early if there's no
2826 thread in the thread list.
2827 (handle_v_cont, myresume): Don't set the current thread to the
2829 (process_serial_event) <Hg handling>: Also set thread_id if the
2830 previous general thread is still alive.
2831 (process_serial_event) <g/G handling>: If setting the current
2832 thread to the general thread fails, error out.
2833 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2834 thread's lwp instead of the current thread's.
2835 * target.c (set_desired_thread): If the desired thread was not
2836 found, leave the current thread pointing to NULL. Return an int
2837 (boolean) indicating success.
2838 * target.h (set_desired_thread): Change return type to int.
2840 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2842 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2843 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2845 (ps_get_thread_area): New function.
2847 2015-08-19 Gary Benson <gbenson@redhat.com>
2849 * hostio.c (handle_pread): Do not attempt to read more data
2850 than hostio_reply_with_data can fit in a packet.
2852 2015-08-18 Joel Brobecker <brobecker@adacore.com>
2854 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2856 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2858 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2860 2015-08-06 Pedro Alves <palves@redhat.com>
2862 * tracepoint.c (expr_eval_result): Now an int.
2864 2015-08-06 Pedro Alves <palves@redhat.com>
2866 * gdbthread.h (struct regcache): Forward declare.
2867 (struct thread_info) <regcache_data>: Now a struct regcache
2869 * inferiors.c (inferior_regcache_data)
2870 (set_inferior_regcache_data): Now work with struct regcache
2872 * inferiors.h (struct regcache): Forward declare.
2873 (inferior_regcache_data, set_inferior_regcache_data): Now work
2874 with struct regcache pointers.
2875 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2876 (free_register_cache_thread): Remove struct regcache pointer
2879 2015-08-06 Pedro Alves <palves@redhat.com>
2881 * server.c (captured_main): On error, print the exception message
2882 to stderr, and if run_once is set, throw a quit.
2884 2015-08-06 Pedro Alves <palves@redhat.com>
2886 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2889 2015-08-06 Pedro Alves <palves@redhat.com>
2891 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2892 reading beyond the passed in buffer length.
2894 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2896 * tracepoint.c (symbol_list) <required>: Remove.
2898 2015-08-06 Pedro Alves <palves@redhat.com>
2900 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2901 count if stopping and suspending threads.
2902 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2903 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2904 (linux_detach): Complete an ongoing step-over.
2905 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2907 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2908 (linux_wait_1): If passing a signal to the inferior after
2909 finishing a step-over, unsuspend and re-resume all lwps. If we
2910 see a single-step event but the thread should be continuing, don't
2911 pass the trap to gdb.
2912 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2913 internal_error instead of gdb_assert.
2914 (enqueue_pending_signal): New function.
2915 (check_ptrace_stopped_lwp_gone): Add debug output.
2916 (start_step_over): Use internal_error instead of gdb_assert.
2917 (complete_ongoing_step_over): New function.
2918 (linux_resume_one_thread): Don't resume a suspended thread.
2919 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2922 2015-08-06 Pedro Alves <palves@redhat.com>
2924 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2925 (linux_thread_alive): Use lwp_is_marked_dead.
2926 (extended_event_reported): Delete.
2927 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2928 instead of extended_event_reported.
2929 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2931 (lwp_is_marked_dead): New function.
2932 (lwp_running): Use lwp_is_marked_dead.
2933 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2936 2015-08-06 Pedro Alves <palves@redhat.com>
2938 * linux-low.c (linux_wait_1): Move fork event output out of the
2939 !report_to_gdb check. Pass event_child->waitstatus to
2940 target_waitstatus_to_string instead of ourstatus.
2942 2015-08-04 Yao Qi <yao.qi@linaro.org>
2944 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2945 if current_thread is 32 bit.
2947 2015-08-04 Yao Qi <yao.qi@linaro.org>
2949 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2950 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2951 * server.c (extended_protocol): Remove "static".
2952 * server.h (extended_protocol): Declare it.
2954 2015-08-04 Yao Qi <yao.qi@linaro.org>
2956 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2957 both aarch64 and aarch32.
2958 (aarch64_set_pc): Likewise.
2960 2015-08-04 Yao Qi <yao.qi@linaro.org>
2962 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2963 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2964 arm-with-neon.xml to srv_xmlfiles.
2965 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2966 (is_64bit_tdesc): New function.
2967 (aarch64_linux_read_description): New function.
2968 (aarch64_arch_setup): Call aarch64_linux_read_description.
2969 (regs_info): Rename to regs_info_aarch64.
2970 (aarch64_regs_info): Return right regs_info.
2971 (initialize_low_arch): Call initialize_low_arch_aarch32.
2973 2015-08-04 Yao Qi <yao.qi@linaro.org>
2975 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2976 * linux-aarch32-low.c: New file.
2977 * linux-aarch32-low.h: New file.
2978 * linux-arm-low.c (arm_fill_gregset): Move it to
2979 linux-aarch32-low.c.
2980 (arm_store_gregset): Likewise.
2981 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2982 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2983 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2984 (regs_info): Rename to regs_info_arm.
2985 (arm_regs_info): Return regs_info_aarch32 if
2986 have_ptrace_getregset is 1 and target description is
2987 arm_with_neon or arm_with_vfpv3.
2988 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2989 Call initialize_low_arch_aarch32 instead.
2991 2015-08-04 Yao Qi <yao.qi@linaro.org>
2993 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2994 * linux-low.c: ... here.
2995 * linux-low.h (have_ptrace_getregset): Declare it.
2997 2015-08-04 Pedro Alves <palves@redhat.com>
2999 * thread-db.c (struct thread_db): Use new typedefs.
3000 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3002 (disable_thread_event_reporting): Cast result of dlsym to
3003 destination function pointer type.
3004 (thread_db_mourn): Use td_ta_delete_ftype.
3006 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3008 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3010 (CDX_BREAKPOINT): Define for R2.
3011 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3012 (the_low_target): Add comments.
3014 2015-07-30 Yao Qi <yao.qi@linaro.org>
3016 * linux-arm-low.c (arm_hwcap): Remove it.
3017 (arm_read_description): New local variable arm_hwcap. Don't
3018 set arm_hwcap to zero.
3020 2015-07-30 Yao Qi <yao.qi@linaro.org>
3022 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3023 Use regcache->tdesc instead.
3024 (arm_store_wmmxregset): Likewise.
3025 (arm_fill_vfpregset): Likewise.
3026 (arm_store_vfpregset): Likewise.
3028 2015-07-30 Yao Qi <yao.qi@linaro.org>
3030 * linux-arm-low.c: Include arch/arm.h.
3031 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3032 (arm_store_gregset): Likewise.
3034 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3036 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3037 ptrace's 4th parameter.
3039 2015-07-27 Yao Qi <yao.qi@linaro.org>
3041 * configure.srv (case aarch64*-*-linux*): Don't set
3044 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3046 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3048 * linux-arm-low.c: Likewise.
3049 * linux-cris-low.c: Likewise.
3050 * linux-crisv32-low.c: Likewise.
3051 * linux-low.c: Likewise.
3052 * linux-m68k-low.c: Likewise.
3053 * linux-mips-low.c: Likewise.
3054 * linux-nios2-low.c: Likewise.
3055 * linux-s390-low.c: Likewise.
3056 * linux-sparc-low.c: Likewise.
3057 * linux-tic6x-low.c: Likewise.
3058 * linux-tile-low.c: Likewise.
3059 * linux-x86-low.c: Likewise.
3061 2015-07-24 Pedro Alves <palves@redhat.com>
3063 * config.in: Regenerate.
3064 * configure: Regenerate.
3066 2015-07-24 Pedro Alves <palves@redhat.com>
3068 * acinclude.m4: Include ../ptrace.m4.
3069 * configure.ac: Call GDB_AC_PTRACE.
3070 * config.in, configure: Regenerate.
3072 2015-07-24 Yao Qi <yao.qi@linaro.org>
3074 * linux-low.c (linux_create_inferior): Remove setting to
3075 proc->priv->new_inferior.
3076 (linux_attach): Likewise.
3077 (linux_low_filter_event): Likewise.
3078 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3080 2015-07-24 Yao Qi <yao.qi@linaro.org>
3082 * linux-low.c (linux_arch_setup): New function.
3083 (linux_low_filter_event): If proc->tdesc is NULL and
3084 proc->attached is true, call the_low_target.arch_setup.
3085 Otherwise, keep status pending, and return.
3086 (linux_resume_one_lwp_throw): Don't call get_pc if
3087 thread->while_stepping isn't NULL. Don't call
3088 get_thread_regcache if proc->tdesc is NULL.
3089 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3090 (linux_target_ops): Install arch_setup.
3091 * server.c (start_inferior): Call the_target->arch_setup.
3092 * target.h (struct target_ops) <arch_setup>: New field.
3093 (target_arch_setup): New marco.
3094 * lynx-low.c (lynx_target_ops): Update.
3095 * nto-low.c (nto_target_ops): Update.
3096 * spu-low.c (spu_target_ops): Update.
3097 * win32-low.c (win32_target_ops): Update.
3099 2015-07-24 Yao Qi <yao.qi@linaro.org>
3101 * linux-low.c (linux_add_process): Don't set
3102 proc->priv->new_inferior.
3103 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3104 (linux_attach): Likewise.
3106 2015-07-24 Yao Qi <yao.qi@linaro.org>
3108 * server.c (start_inferior): Code refactor.
3110 2015-07-24 Yao Qi <yao.qi@linaro.org>
3112 * server.c (process_serial_event): Set general_thread.
3114 2015-07-21 Yao Qi <yao.qi@linaro.org>
3116 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3117 aarch64_linux_get_debug_reg_capacity.
3119 2015-07-17 Yao Qi <yao.qi@linaro.org>
3121 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3122 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3123 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3124 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3125 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3126 (AARCH64_HWP_ALIGNMENT): Likewise.
3127 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3128 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3129 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3130 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3131 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3132 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3133 (struct aarch64_debug_reg_state): Likewise.
3134 (struct arch_lwp_info): Likewise.
3135 (aarch64_align_watchpoint): Likewise.
3136 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3137 (aarch64_watchpoint_length): Likewise.
3138 (aarch64_point_encode_ctrl_reg): Likewise
3139 (aarch64_point_is_aligned): Likewise.
3140 (aarch64_align_watchpoint): Likewise.
3141 (aarch64_linux_set_debug_regs):
3142 (aarch64_dr_state_insert_one_point): Likewise.
3143 (aarch64_dr_state_remove_one_point): Likewise.
3144 (aarch64_handle_breakpoint): Likewise.
3145 (aarch64_handle_aligned_watchpoint): Likewise.
3146 (aarch64_handle_unaligned_watchpoint): Likewise.
3147 (aarch64_handle_watchpoint): Likewise.
3149 2015-07-17 Yao Qi <yao.qi@linaro.org>
3151 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3152 and don't aarch64_get_debug_reg_state. All callers update.
3153 (aarch64_handle_aligned_watchpoint): Likewise.
3154 (aarch64_handle_unaligned_watchpoint): Likewise.
3155 (aarch64_handle_watchpoint): Likewise.
3156 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3157 (aarch64_remove_point): Likewise.
3159 2015-07-17 Yao Qi <yao.qi@linaro.org>
3161 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3163 (aarch64_handle_unaligned_watchpoint): Likewise.
3165 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3167 Revert the previous 3 commits:
3168 Move gdb_regex* to common/
3169 Move linux_find_memory_regions_full & co.
3170 gdbserver build-id attribute generator
3172 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3173 Jan Kratochvil <jan.kratochvil@redhat.com>
3175 gdbserver build-id attribute generator.
3176 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3177 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3178 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3180 (get_dynamic): Use find_pdhr to traverse program headers.
3181 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3182 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3183 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3184 (get_hex_build_id): New.
3185 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3186 to reply XML document.
3188 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3189 Jan Kratochvil <jan.kratochvil@redhat.com>
3191 * target.c: Include target/target-utils.h and fcntl.h.
3192 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3193 (target_fileio_read_stralloc): New functions.
3195 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3197 * Makefile.in (OBS): Add gdb_regex.o.
3199 * config.in: Rebuilt.
3200 * configure: Rebuilt.
3202 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3203 Jan Kratochvil <jan.kratochvil@redhat.com>
3205 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3206 * Makefile.in (OBS): Add target-utils.o.
3207 (linux-maps.o, target-utils.o): New.
3208 * configure.srv (srv_linux_obj): Add linux-maps.o.
3210 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3212 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3214 (the_low_target): Install it.
3216 2015-07-14 Pedro Alves <palves@redhat.com>
3218 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3219 Instead, ignore ECHILD, and throw an error for other errnos.
3221 2015-07-10 Pedro Alves <palves@redhat.com>
3223 * event-loop.c (struct callback_event) <data>: Change type to
3224 gdb_client_data instance instead of gdb_client_data pointer.
3225 (append_callback_event): Adjust.
3227 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3229 * linux-aarch64-low.c: Add comments for each linux_target_ops
3230 method. Remove comments already covered in target_ops and
3231 linux_target_ops definitions.
3232 (the_low_target): Add comments for each unimplemented method.
3234 2015-07-09 Yao Qi <yao.qi@linaro.org>
3236 * linux-aarch64-low.c (aarch64_regmap): Remove.
3237 (aarch64_usrregs_info): Remove.
3238 (regs_info): Set field usrregs to NULL.
3240 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3242 * linux-low.c: Include "rsp-low.h"
3243 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3244 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3245 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3246 (handle_btrace_enable_pt): New.
3247 (handle_btrace_general_set): Support "pt".
3248 (handle_btrace_conf_general_set): Support "pt:size".
3250 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3252 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3255 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3257 * linux-aarch64-low.c: Remove comment about endianness.
3258 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3259 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3262 2015-06-24 Gary Benson <gbenson@redhat.com>
3264 * linux-i386-ipa.c (stdint.h): Do not include.
3265 * lynx-i386-low.c (stdint.h): Likewise.
3266 * lynx-ppc-low.c (stdint.h): Likewise.
3267 * mem-break.c (stdint.h): Likewise.
3268 * thread-db.c (stdint.h): Likewise.
3269 * tracepoint.c (stdint.h): Likewise.
3270 * win32-low.c (stdint.h): Likewise.
3272 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3274 * server.c (write_qxfer_response): Update call to
3275 remote_escape_output.
3277 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3278 Jan Kratochvil <jan.kratochvil@redhat.com>
3280 Merge multiple hex conversions.
3281 * gdbreplay.c (tohex): Rename to 'fromhex'.
3282 (logchar): Use fromhex.
3284 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3286 * server.c (handle_qxfer_libraries): Set `version' attribute for
3289 2015-06-10 Gary Benson <gbenson@redhat.com>
3291 * target.h (struct target_ops) <multifs_open>: New field.
3292 <multifs_unlink>: Likewise.
3293 <multifs_readlink>: Likewise.
3294 * linux-low.c (nat/linux-namespaces.h): New include.
3295 (linux_target_ops): Initialize the_target->multifs_open,
3296 the_target->multifs_unlink and the_target->multifs_readlink.
3297 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3298 * hostio.c (hostio_fs_pid): New static variable.
3299 (hostio_handle_new_gdb_connection): New function.
3300 (handle_setfs): Likewise.
3301 (handle_open): Use the_target->multifs_open as appropriate.
3302 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3303 (handle_readlink): Use the_target->multifs_readlink as
3305 (handle_vFile): Handle vFile:setfs packets.
3306 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3307 after target_handle_new_gdb_connection.
3309 2015-06-10 Gary Benson <gbenson@redhat.com>
3311 * configure.ac (AC_CHECK_FUNCS): Add setns.
3312 * config.in: Regenerate.
3313 * configure: Likewise.
3314 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3315 (linux-namespaces.o): New rule.
3316 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3318 2015-06-09 Gary Benson <gbenson@redhat.com>
3320 * hostio.c (handle_open): Process mode argument with
3321 fileio_to_host_mode.
3323 2015-06-01 Yao Qi <yao.qi@linaro.org>
3325 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3326 * linux-x86-low.c: Likewise.
3328 2015-05-28 Don Breazeal <donb@codesourcery.com>
3330 * linux-low.c (handle_extended_wait): Initialize
3331 thread_info.last_resume_kind for new fork children.
3333 2015-05-15 Pedro Alves <palves@redhat.com>
3335 * target.h (target_handle_new_gdb_connection): Rewrite using if
3336 wrapped in do/while.
3338 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3340 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3341 * configure, config.in: Regenerate.
3342 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3345 2015-05-12 Don Breazeal <donb@codesourcery.com>
3347 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3348 PTRACE_EVENT_VFORK_DONE.
3349 (linux_low_ptrace_options, extended_event_reported): Add vfork
3351 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3352 and "vforkdone" for RSP 'T' Stop Reply Packet.
3353 * server.h (report_vfork_events): Declare
3356 2015-05-12 Don Breazeal <donb@codesourcery.com>
3358 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3359 (the_low_target) <new_fork>: Initialize new member.
3360 * linux-arm-low.c (arm_new_fork): New function.
3361 (the_low_target) <new_fork>: Initialize new member.
3362 * linux-low.c (handle_extended_wait): Call new target function
3364 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3365 * linux-mips-low.c (mips_add_watchpoint): New function
3366 extracted from mips_insert_point.
3367 (the_low_target) <new_fork>: Initialize new member.
3368 (mips_linux_new_fork): New function.
3369 (mips_insert_point): Call mips_add_watchpoint.
3370 * linux-x86-low.c (x86_linux_new_fork): New function.
3371 (the_low_target) <new_fork>: Initialize new member.
3373 2015-05-12 Don Breazeal <donb@codesourcery.com>
3375 * linux-low.c (handle_extended_wait): Implement return value,
3376 rename argument 'event_child' to 'event_lwp', handle
3377 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3378 (linux_low_ptrace_options): New function.
3379 (linux_low_filter_event): Call linux_low_ptrace_options,
3380 use different argument fo linux_enable_event_reporting,
3381 use return value from handle_extended_wait.
3382 (extended_event_reported): New function.
3383 (linux_wait_1): Call extended_event_reported and set
3384 status to report fork events.
3385 (linux_write_memory): Add pid to debug message.
3386 (reset_lwp_ptrace_options_callback): New function.
3387 (linux_handle_new_gdb_connection): New function.
3388 (linux_target_ops): Initialize new structure member.
3389 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3390 * lynx-low.c: Initialize new structure member.
3391 * remote-utils.c (prepare_resume_reply): Implement stop reason
3392 "fork" for "T" stop message.
3393 * server.c (handle_query): Call handle_new_gdb_connection.
3394 * server.h (report_fork_events): Declare global flag.
3395 * target.h (struct target_ops) <handle_new_gdb_connection>:
3397 (target_handle_new_gdb_connection): New macro.
3398 * win32-low.c: Initialize new structure member.
3400 2015-05-12 Don Breazeal <donb@codesourcery.com>
3402 * mem-break.c (APPEND_TO_LIST): Define macro.
3403 (clone_agent_expr): New function.
3404 (clone_one_breakpoint): New function.
3405 (clone_all_breakpoints): New function.
3406 * mem-break.h: Declare new functions.
3408 2015-05-12 Don Breazeal <donb@codesourcery.com>
3410 * linux-low.c (linux_supports_fork_events): New function.
3411 (linux_supports_vfork_events): New function.
3412 (linux_target_ops): Initialize new structure members.
3413 (initialize_low): Call linux_check_ptrace_features.
3414 * lynx-low.c (lynx_target_ops): Initialize new structure
3416 * server.c (report_fork_events, report_vfork_events):
3418 (handle_query): Add new features to qSupported packet and
3420 (captured_main): Initialize new global variables.
3421 * target.h (struct target_ops) <supports_fork_events>:
3423 <supports_vfork_events>: New member.
3424 (target_supports_fork_events): New macro.
3425 (target_supports_vfork_events): New macro.
3426 * win32-low.c (win32_target_ops): Initialize new structure
3429 2015-05-12 Gary Benson <gbenson@redhat.com>
3431 * server.c (handle_qxfer_exec_file): Use current process
3434 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3436 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3437 Remove HAVE_PTRACE_GETREGS conditionals.
3438 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3439 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3441 2015-05-08 Yao Qi <yao.qi@linaro.org>
3443 * linux-low.c (linux_supports_conditional_breakpoints): New
3445 (linux_target_ops): Install new target method.
3446 * lynx-low.c (lynx_target_ops): Install NULL hook for
3447 supports_conditional_breakpoints.
3448 * nto-low.c (nto_target_ops): Likewise.
3449 * spu-low.c (spu_target_ops): Likewise.
3450 * win32-low.c (win32_target_ops): Likewise.
3451 * server.c (handle_query): Check
3452 target_supports_conditional_breakpoints.
3453 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3455 (target_supports_conditional_breakpoints): New macro.
3457 2015-05-06 Pedro Alves <palves@redhat.com>
3460 * server.c (start_inferior): If the process exits, mourn it.
3462 2015-04-21 Gary Benson <gbenson@redhat.com>
3464 * hostio.c (fileio_open_flags_to_host): Factored out to
3465 fileio_to_host_openflags in common/fileio.c. Single use
3468 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3470 * linux-xtensa-low.c (xtensa_fill_gregset)
3471 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3474 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3476 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3477 (regs_info): Replace usrregs pointer with NULL.
3479 2015-04-17 Gary Benson <gbenson@redhat.com>
3481 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3482 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3483 * server.c (handle_qxfer_exec_file): New function.
3484 (qxfer_packets): Add exec-file entry.
3485 (handle_query): Report qXfer:exec-file:read as supported packet.
3487 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3489 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3491 2015-04-09 Gary Benson <gbenson@redhat.com>
3493 * hostio-errno.c (errno_to_fileio_error): Remove function.
3494 Update caller to use remote_fileio_to_fio_error.
3496 2015-04-09 Yao Qi <yao.qi@linaro.org>
3498 * linux-low.c (linux_insert_point): Call
3499 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3500 (linux_remove_point): Call remove_memory_breakpoint if type is
3502 * linux-x86-low.c (x86_insert_point): Don't call
3503 insert_memory_breakpoint.
3504 (x86_remove_point): Don't call remove_memory_breakpoint.
3506 2015-04-01 Pedro Alves <palves@redhat.com>
3507 Cleber Rosa <crosa@redhat.com>
3509 * server.c (gdbserver_usage): Reorganize and extend the usage
3512 2015-03-24 Pedro Alves <palves@redhat.com>
3514 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3515 output. Also dump TRAP_TRACE.
3516 (linux_low_filter_event): In debug output, distinguish a
3517 resume_stop SIGSTOP from a delayed SIGSTOP.
3519 2015-03-24 Gary Benson <gbenson@redhat.com>
3521 * linux-x86-low.c (x86_linux_new_thread): Moved to
3523 (x86_linux_prepare_to_resume): Likewise.
3525 2015-03-24 Gary Benson <gbenson@redhat.com>
3527 * Makefile.in (x86-linux-dregs.o): New rule.
3528 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3529 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3530 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3531 (x86_linux_dr_get): Likewise.
3532 (x86_linux_dr_set): Likewise.
3533 (update_debug_registers_callback): Likewise.
3534 (x86_linux_dr_set_addr): Likewise.
3535 (x86_linux_dr_get_addr): Likewise.
3536 (x86_linux_dr_set_control): Likewise.
3537 (x86_linux_dr_get_control): Likewise.
3538 (x86_linux_dr_get_status): Likewise.
3539 (x86_linux_update_debug_registers): Likewise.
3541 2015-03-24 Gary Benson <gbenson@redhat.com>
3543 * linux-x86-low.c (x86_linux_update_debug_registers):
3544 New function, factored out from...
3545 (x86_linux_prepare_to_resume): ...this.
3547 2015-03-24 Gary Benson <gbenson@redhat.com>
3549 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3550 (x86_linux_dr_set): Likewise.
3551 (update_debug_registers_callback): Likewise.
3552 (x86_linux_dr_set_addr): Likewise.
3553 (x86_linux_dr_get_addr): Likewise.
3554 (x86_linux_dr_set_control): Likewise.
3555 (x86_linux_dr_get_control): Likewise.
3556 (x86_linux_dr_get_status): Likewise.
3557 (x86_linux_prepare_to_resume): Likewise.
3559 2015-03-24 Gary Benson <gbenson@redhat.com>
3561 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3562 Use perror_with_name. Pass string through gettext.
3563 (x86_linux_dr_set): Likewise.
3565 2015-03-24 Gary Benson <gbenson@redhat.com>
3567 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3568 (x86_linux_dr_set_addr): ...this.
3569 (x86_dr_low_get_addr): Rename to...
3570 (x86_linux_dr_get_addr): ...this.
3571 (x86_dr_low_set_control): Rename to...
3572 (x86_linux_dr_set_control): ...this.
3573 (x86_dr_low_get_control): Rename to...
3574 (x86_linux_dr_get_control): ...this.
3575 (x86_dr_low_get_status): Rename to...
3576 (x86_linux_dr_get_status): ...this.
3577 (x86_dr_low): Update with new function names.
3579 2015-03-24 Gary Benson <gbenson@redhat.com>
3581 * Makefile.in (x86-linux.o): New rule.
3582 * configure.srv: Add x86-linux.o to relevant targets.
3583 * linux-low.c (lwp_set_arch_private_info): New function.
3584 (lwp_arch_private_info): Likewise.
3585 * linux-x86-low.c: Include nat/x86-linux.h.
3586 (arch_lwp_info): Removed structure.
3587 (update_debug_registers_callback):
3588 Use lwp_set_debug_registers_changed.
3589 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3590 and lwp_set_debug_registers_changed.
3591 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3593 2015-03-24 Gary Benson <gbenson@redhat.com>
3595 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3596 * linux-arm-low.c (arm_new_thread): Likewise.
3597 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3598 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3599 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3600 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3602 2015-03-24 Gary Benson <gbenson@redhat.com>
3604 * linux-low.c (ptid_of_lwp): New function.
3605 (lwp_is_stopped): Likewise.
3606 (lwp_stop_reason): Likewise.
3607 * linux-x86-low.c (update_debug_registers_callback):
3609 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3612 2015-03-24 Gary Benson <gbenson@redhat.com>
3614 * linux-low.h (linux_stop_lwp): Remove declaration.
3616 2015-03-24 Gary Benson <gbenson@redhat.com>
3618 * linux-low.h: Include nat/linux-nat.h.
3619 * linux-low.c (iterate_over_lwps_args): New structure.
3620 (iterate_over_lwps_filter): New function.
3621 (iterate_over_lwps): Likewise.
3622 * linux-x86-low.c (update_debug_registers_callback):
3623 Update signature to what iterate_over_lwps expects.
3624 Remove PID check that iterate_over_lwps now performs.
3625 (x86_dr_low_set_addr): Use iterate_over_lwps.
3626 (x86_dr_low_set_control): Likewise.
3628 2015-03-24 Gary Benson <gbenson@redhat.com>
3630 * linux-x86-low.c (x86_debug_reg_state): New function.
3631 (x86_linux_prepare_to_resume): Use the above.
3633 2015-03-24 Gary Benson <gbenson@redhat.com>
3635 * linux-low.c (current_lwp_ptid): New function.
3636 * linux-x86-low.c: Include nat/linux-nat.h.
3637 (x86_dr_low_get_addr): Use current_lwp_ptid.
3638 (x86_dr_low_get_control): Likewise.
3639 (x86_dr_low_get_status): Likewise.
3641 2015-03-20 Pedro Alves <palves@redhat.com>
3643 * tracepoint.c (cmd_qtstatus): Make "str" const.
3645 2015-03-20 Pedro Alves <palves@redhat.com>
3647 * server.c (handle_general_set): Make "req_str" const.
3649 2015-03-19 Pedro Alves <palves@redhat.com>
3651 * linux-low.c (linux_resume_one_lwp): Rename to ...
3652 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3653 instead call perror_with_name.
3654 (check_ptrace_stopped_lwp_gone): New function.
3655 (linux_resume_one_lwp): Reimplement as wrapper around
3656 linux_resume_one_lwp_throw that swallows errors if the LWP is
3659 2015-03-19 Pedro Alves <palves@redhat.com>
3661 * linux-low.c (count_events_callback, select_event_lwp_callback):
3662 No longer check whether the thread has resume_stop as last resume
3665 2015-03-19 Pedro Alves <palves@redhat.com>
3667 * linux-low.c (count_events_callback, select_event_lwp_callback):
3668 Use the lwp's status_pending_p field, not the thread's.
3670 2015-03-19 Pedro Alves <palves@redhat.com>
3672 * linux-low.c (select_event_lwp_callback): Update comments to
3673 no longer mention SIGTRAP.
3675 2015-03-18 Gary Benson <gbenson@redhat.com>
3677 * server.c (handle_query): Do not report vFile:fstat as supported.
3679 2015-03-11 Gary Benson <gbenson@redhat.com>
3681 * hostio.c (sys/types.h): New include.
3682 (sys/stat.h): Likewise.
3683 (common-remote-fileio.h): Likewise.
3684 (handle_fstat): New function.
3685 (handle_vFile): Handle vFile:fstat packets.
3687 2015-03-11 Gary Benson <gbenson@redhat.com>
3689 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3690 struct stat.st_blocks and struct stat.st_blksize.
3691 * configure: Regenerate.
3692 * config.in: Likewise.
3693 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3694 (OBS): Add common-remote-fileio.o.
3695 (common-remote-fileio.o): New rule.
3697 2015-03-09 Pedro Alves <palves@redhat.com>
3699 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3700 'struct sockaddr' pointer in 'accept' call.
3702 2015-03-09 Pedro Alves <palves@redhat.com>
3705 2015-03-07 Pedro Alves <palves@redhat.com>
3706 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3707 or <winsock2.h> here. Instead include "gdb_socket.h".
3708 (remote_open): Use union gdb_sockaddr_u.
3709 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3710 or <winsock2.h> here. Instead include "gdb_socket.h".
3711 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3712 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3714 (init_named_socket, gdb_agent_helper_thread): Use union
3717 2015-03-07 Pedro Alves <palves@redhat.com>
3719 * configure.ac (build_warnings): Move
3720 -Wdeclaration-after-statement to the C-specific set.
3721 * configure: Regenerate.
3723 2015-03-07 Pedro Alves <palves@redhat.com>
3725 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3726 or <winsock2.h> here. Instead include "gdb_socket.h".
3727 (remote_open): Use union gdb_sockaddr_u.
3728 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3729 or <winsock2.h> here. Instead include "gdb_socket.h".
3730 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3731 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3733 (init_named_socket, gdb_agent_helper_thread): Use union
3736 2015-03-07 Pedro Alves <palves@redhat.com>
3738 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3741 2015-03-06 Yao Qi <yao.qi@linaro.org>
3743 * linux-aarch64-low.c (aarch64_insert_point): Use
3744 show_debug_regs as a boolean.
3745 (aarch64_remove_point): Likewise.
3747 2015-03-05 Pedro Alves <palves@redhat.com>
3749 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3750 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3751 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3752 * nto-low.c (nto_target_ops): Likewise.
3753 * spu-low.c (spu_target_ops): Likewise.
3754 * win32-low.c (win32_target_ops): Likewise.
3756 2015-03-04 Pedro Alves <palves@redhat.com>
3758 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3759 Decide whether a breakpoint triggered based on the SIGTRAP's
3761 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3762 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3763 (linux_low_filter_event): Check for breakpoints before checking
3765 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3767 (linux_stopped_by_sw_breakpoint)
3768 (linux_supports_stopped_by_sw_breakpoint)
3769 (linux_stopped_by_hw_breakpoint)
3770 (linux_supports_stopped_by_hw_breakpoint): New functions.
3771 (linux_target_ops): Install new target methods.
3773 2015-03-04 Pedro Alves <palves@redhat.com>
3775 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3776 * server.c (swbreak_feature, hwbreak_feature): New globals.
3777 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3778 (captured_main): Clear swbreak_feature and hwbreak_feature.
3779 * server.h (swbreak_feature, hwbreak_feature): Declare.
3780 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3781 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3782 supports_stopped_by_hw_breakpoint>: New fields.
3783 (target_supports_stopped_by_sw_breakpoint)
3784 (target_stopped_by_sw_breakpoint)
3785 (target_supports_stopped_by_hw_breakpoint)
3786 (target_stopped_by_hw_breakpoint): Declare.
3788 2015-03-04 Pedro Alves <palves@redhat.com>
3790 enum lwp_stop_reason -> enum target_stop_reason
3791 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3792 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3793 (linux_wait_1, stuck_in_jump_pad_callback)
3794 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3795 (linux_stopped_by_watchpoint):
3796 * linux-low.h (enum lwp_stop_reason): Delete.
3797 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3798 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3800 2015-03-04 Yao Qi <yao.qi@linaro.org>
3802 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3804 2015-03-03 Gary Benson <gbenson@redhat.com>
3806 * hostio.c (handle_vFile): Fix prefix lengths.
3808 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3810 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3813 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3815 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3816 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3817 (clean): Add "rm -f" for above C files.
3818 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3819 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3820 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3821 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3822 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3823 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3824 (init_registers_s390x_vx_linux64)
3825 (init_registers_s390x_tevx_linux64)
3826 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3827 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3829 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3830 (s390_store_vxrs_high): New functions.
3831 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3833 (s390_arch_setup): Add logic for selecting one of the new target
3834 descriptions. Activate the new vector regsets if applicable.
3835 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3836 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3837 and init_registers_s390x_tevx_linux64.
3839 2015-03-01 Pedro Alves <palves@redhat.com>
3841 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3844 2015-02-27 Pedro Alves <palves@redhat.com>
3846 * linux-x86-low.c (u_debugreg_offset): New function.
3847 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3849 2015-02-27 Pedro Alves <palves@redhat.com>
3851 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3852 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3853 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3854 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3855 (ps_lsetfpregs, ps_getpid)
3856 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3857 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3858 (ps_lsetxregs, ps_plog): Declare.
3860 2015-02-27 Pedro Alves <palves@redhat.com>
3862 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3863 IP_AGENT_EXPORT_FUNC.
3864 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3865 IP_AGENT_EXPORT_FUNC.
3866 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3867 (IP_AGENT_EXPORT): Delete.
3868 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3869 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3870 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3871 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3872 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3873 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3874 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3875 (traceframe_read_count, traceframe_write_count)
3876 (traceframes_created, trace_state_variables, get_raw_reg)
3877 (get_trace_state_variable_value, set_trace_state_variable_value)
3878 (ust_loaded, helper_thread_id, cmd_buf): Use
3879 IPA_SYM_EXPORTED_NAME.
3880 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3881 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3882 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3883 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3884 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3885 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3886 EXTERN_C_PUSH/EXTERN_C_POP.
3887 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3888 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3889 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3890 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3891 (traceframe_write_count, traceframe_read_count)
3892 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3893 (about_to_request_buffer_space, get_trace_state_variable_value)
3894 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3895 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3896 EXTERN_C_PUSH/EXTERN_C_POP.
3897 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3898 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3899 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3900 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3901 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3902 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3903 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3904 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3906 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3907 (IP_AGENT_EXPORT_VAR_DECL): Define.
3909 (gdb_agent_get_raw_reg): Declare.
3911 2015-02-27 Tom Tromey <tromey@redhat.com>
3912 Pedro Alves <palves@redhat.com>
3914 Rename symbols whose names are reserved C++ keywords throughout.
3916 2015-02-27 Pedro Alves <palves@redhat.com>
3918 * Makefile.in (COMPILER): New, get it from autoconf.
3919 (CXX): Get from autoconf instead.
3920 (COMPILE.pre): Use COMPILER.
3921 (CC-LD): Rename to ...
3922 (CC_LD): ... this. Use COMPILER.
3923 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3924 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3925 * acinclude.m4: Include build-with-cxx.m4.
3926 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3927 Disable -Werror by default if building in C++ mode.
3928 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3929 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3930 the C++ compiler. Save/restore CXXFLAGS too.
3931 * configure: Regenerate.
3933 2015-02-27 Pedro Alves <palves@redhat.com>
3935 * acinclude.m4: Include libiberty.m4.
3936 * configure.ac: Call libiberty_INIT.
3937 * config.in, configure: Regenerate.
3939 2015-02-26 Pedro Alves <palves@redhat.com>
3941 * linux-low.c (linux_wait_1): When incrementing the PC past a
3942 program breakpoint always use the_low_target.breakpoint_len as
3943 increment, rather than the maximum between that and
3944 the_low_target.decr_pc_after_break.
3946 2015-02-23 Pedro Alves <palves@redhat.com>
3948 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3949 thread was doing a step-over; always adjust the PC if
3950 we stepped over a permanent breakpoint.
3951 (linux_wait_1): If we stepped over breakpoint that was on top of a
3952 permanent breakpoint, manually advance the PC past it.
3954 2015-02-23 Pedro Alves <palves@redhat.com>
3956 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3958 (x86_fill_gregset, x86_store_gregset): Use it when handling
3961 2015-02-20 Pedro Alves <palves@redhat.com>
3963 * thread-db.c: Include "nat/linux-procfs.h".
3964 (thread_db_init): Skip listing new threads if the kernel supports
3965 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3967 2015-02-20 Pedro Alves <palves@redhat.com>
3969 * linux-low.c (status_pending_p_callback): Use ptid_match.
3971 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3973 PR breakpoints/16812
3974 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3975 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3976 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3978 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3980 PR breakpoints/15956
3981 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3983 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3985 * linux-low.c (linux_low_btrace_conf): Print size.
3986 * server.c (handle_btrace_conf_general_set): New.
3987 (hanle_general_set): Call handle_btrace_conf_general_set.
3988 (handle_query): Report Qbtrace-conf:bts:size as supported.
3990 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3992 * linux-low.c (linux_low_enable_btrace): Update parameters.
3993 (linux_low_btrace_conf): New.
3994 (linux_target_ops)<to_btrace_conf>: Initialize.
3995 * server.c (current_btrace_conf): New.
3996 (handle_btrace_enable): Rename to ...
3997 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
3998 to target_enable_btrace. Update comment. Update users.
3999 (handle_qxfer_btrace_conf): New.
4000 (qxfer_packets): Add btrace-conf entry.
4001 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4002 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4003 (target_ops)<read_btrace_conf>: New.
4004 (target_enable_btrace): Update parameters.
4005 (target_read_btrace_conf): New.
4007 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4009 * server.c (handle_btrace_general_set): Remove call to
4010 target_supports_btrace.
4011 (supported_btrace_packets): New.
4012 (handle_query): Call supported_btrace_packets.
4013 * target.h: include btrace-common.h.
4014 (btrace_target_info): Removed.
4015 (supports_btrace, target_supports_btrace): Update parameters.
4017 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4019 * Makefile.in (SFILES): Add common/btrace-common.c.
4020 (OBS): Add common/btrace-common.o.
4021 (btrace-common.o): Add build rules.
4022 * linux-low: Include btrace-common.h.
4023 (linux_low_read_btrace): Use struct btrace_data. Call
4024 btrace_data_init and btrace_data_fini.
4026 2015-02-06 Pedro Alves <palves@redhat.com>
4028 * thread-db.c (find_new_threads_callback): Add debug output.
4030 2015-02-04 Pedro Alves <palves@redhat.com>
4032 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4033 (resume_stopped_resumed_lwps): New function.
4034 (linux_wait_for_event_filtered): Use it.
4036 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4038 * Makefile.in (SFILES): Add linux-personality.c.
4039 (linux-personality.o): New rule.
4040 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4041 list of objects to be built.
4042 * linux-low.c: Include nat/linux-personality.h.
4043 (linux_create_inferior): Remove code to disable address space
4044 randomization (moved to ../nat/linux-personality.c). Create
4045 cleanup to disable address space randomization.
4047 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4049 * Makefile.in (posix-strerror.o): New rule.
4050 (mingw-strerror.o): Likewise.
4051 * configure: Regenerated.
4052 * configure.ac: Source file ../common/common.host. Initialize new
4053 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4055 2015-01-14 Yao Qi <yao@codesourcery.com>
4057 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4058 (ppc-linux.o): New rule.
4059 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4060 * configure.ac: AC_CHECK_FUNCS(getauxval).
4061 * config.in: Re-generated.
4062 * configure: Re-generated.
4063 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4064 ppc64_64bit_inferior_p
4066 2015-01-14 Yao Qi <yao@codesourcery.com>
4068 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4069 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4070 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4071 (PT_ORIG_R3, PT_TRAP): Likewise.
4072 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4073 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4074 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4076 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4078 * i387-fp.c (i387_cache_to_xsave): In look over
4079 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4080 zmmh_low_space field by use of zmmh_high_space.
4082 2015-01-09 Pedro Alves <palves@redhat.com>
4084 * linux-low.c (step_over_bkpt): Move higher up in the file.
4085 (handle_extended_wait): Don't store the stop_pc here.
4086 (get_stop_pc): Adjust comments and rename to ...
4087 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4088 stopped for a software breakpoint or hardware breakpoint.
4089 (thread_still_has_status_pending_p): New function.
4090 (status_pending_p_callback): Use
4091 thread_still_has_status_pending_p. If the event is no longer
4092 interesting, resume the LWP.
4093 (handle_tracepoints): Add assert.
4094 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4095 (wstatus_maybe_breakpoint): New function.
4096 (cancel_breakpoint): Delete function.
4097 (check_stopped_by_watchpoint): New function, factored out from
4098 linux_low_filter_event.
4099 (lp_status_maybe_breakpoint): Delete function.
4100 (linux_low_filter_event): Remove filter_ptid argument.
4101 Leave thread group exits pending here. Store the LWP's stop PC.
4102 Always leave events pending.
4103 (linux_wait_for_event_filtered): Pull all events out of the
4104 kernel, and leave them all pending.
4105 (count_events_callback, select_event_lwp_callback): Consider all
4107 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4108 (select_event_lwp): Only give preference to the stepping LWP in
4109 all-stop mode. Adjust comments.
4110 (ignore_event): New function.
4111 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4112 references to cancel_breakpoints. Adjust to renames. Also give
4113 equal priority to all LWPs that have had events in non-stop mode.
4114 If reporting a software breakpoint event, unadjust the LWP's PC.
4115 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4116 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4118 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4119 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4120 (linux_stopped_by_watchpoint): Adjust.
4121 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4122 * linux-low.h (enum lwp_stop_reason): New.
4123 (struct lwp_info) <stop_pc>: Adjust comment.
4124 <stopped_by_watchpoint>: Delete field.
4125 <stop_reason>: New field.
4126 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4127 * mem-break.c (software_breakpoint_inserted_here)
4128 (hardware_breakpoint_inserted_here): New function.
4129 * mem-break.h (software_breakpoint_inserted_here)
4130 (hardware_breakpoint_inserted_here): Declare.
4131 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4132 (cancel_breakpoints): Delete.
4133 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4134 (upload_fast_traceframes): Remove references to
4137 2015-01-09 Pedro Alves <palves@redhat.com>
4139 * thread-db.c (find_new_threads_callback): Ignore thread if the
4140 kernel thread ID is -1.
4142 2015-01-09 Pedro Alves <palves@redhat.com>
4144 * linux-low.c (linux_attach_fail_reason_string): Move to
4145 nat/linux-ptrace.c, and rename.
4146 (linux_attach_lwp): Update comment.
4147 (attach_proc_task_lwp_callback): New function.
4148 (linux_attach): Adjust to rename and use
4149 linux_proc_attach_tgid_threads.
4150 (linux_attach_fail_reason_string): Delete declaration.
4152 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4154 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4155 * server.c (gdbserver_version): Likewise.
4157 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4159 * remote-utils.c: Include ctype.h.
4160 (input_interrupt): Explicitly handle the case when the char
4161 received is the NUL byte. Improve the printing of non-ASCII
4164 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4166 * linux-low.c (linux_low_filter_event): Update call to
4167 linux_enable_event_reporting following the addition of
4168 a new parameter to that function.
4170 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4173 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4174 (AARCH64_FPCR_REGNO): Likewise.
4175 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4176 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4177 (aarch64_store_fpregset): Likewise.
4179 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4181 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4182 Remove FIXME comment about assumption about N.
4184 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4186 * configure.ac: If large-file support is disabled in GDBserver,
4187 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4188 * configure: Regenerate.
4190 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4192 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4193 warning upon ENODATA from ptrace.
4194 * linux-s390-low.c (s390_store_tdb): New.
4195 (s390_regsets): Add regset for NT_S390_TDB.
4197 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4199 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4200 without a fill_function.
4201 * linux-s390-low.c (s390_fill_last_break): Remove.
4202 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4203 (s390_arch_setup): Use regset's size instead of fill_function for
4206 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4208 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4209 the regset's store function when ptrace returned an error.
4210 * regcache.c (get_thread_regcache): Invalidate register cache
4211 before fetching inferior's registers.
4213 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4215 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4216 while-loop as for-loop.
4217 (regsets_store_inferior_registers): Likewise.
4219 2014-11-28 Yao Qi <yao@codesourcery.com>
4221 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4222 * config.in, configure: Re-generate.
4223 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4226 2014-11-21 Yao Qi <yao@codesourcery.com>
4228 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4229 (AC_CHECK_HEADERS): Remove malloc.h.
4230 * configure: Re-generated.
4231 * config.in: Re-generated.
4232 * server.h: Don't include alloca.h and malloc.h.
4233 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4234 Don't include malloc.h.
4236 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4238 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4239 corresponding ERRNO check in same block.
4241 2014-11-12 Pedro Alves <palves@redhat.com>
4243 * server.c (cont_thread): Update comment.
4244 (start_inferior, attach_inferior): No longer clear cont_thread.
4245 (handle_v_cont): No longer set cont_thread.
4246 (captured_main): Clear cont_thread each time a GDB connects.
4248 2014-11-12 Pedro Alves <palves@redhat.com>
4250 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4251 thread, and don't resume all threads if the Hc thread has exited.
4253 2014-11-12 Pedro Alves <palves@redhat.com>
4255 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4256 the process group instead of to a specific LWP.
4258 2014-10-15 Pedro Alves <palves@redhat.com>
4261 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4263 (arm_set_thread_context): Delete.
4264 (the_low_target): Adjust.
4265 * win32-i386-low.c (debug_registers_changed)
4266 (debug_registers_used): Delete.
4267 (update_debug_registers_callback): New function.
4268 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4269 needing to update their debug registers.
4270 (win32_get_current_dr): New function.
4271 (x86_dr_low_get_addr, x86_dr_low_get_control)
4272 (x86_dr_low_get_status): Fetch the debug register from the thread
4274 (i386_initial_stuff): Adjust.
4275 (i386_get_thread_context): Remove current_event parameter. Don't
4276 clear debug_registers_changed nor copy DR values to
4278 (i386_set_thread_context): Delete.
4279 (i386_prepare_to_resume): New function.
4280 (i386_thread_added): Mark the thread as needing to update irs
4282 (the_low_target): Remove i386_set_thread_context and install
4283 i386_prepare_to_resume.
4284 * win32-low.c (win32_get_thread_context): Adjust.
4285 (win32_set_thread_context): Use SetThreadContext
4287 (win32_prepare_to_resume): New function.
4288 (win32_require_context): New function, factored out from ...
4289 (thread_rec): ... this.
4290 (continue_one_thread): Call win32_prepare_to_resume on each thread
4291 we're about to continue.
4292 (win32_resume): Call win32_prepare_to_resume on the event thread.
4293 * win32-low.h (struct win32_thread_info)
4294 <debug_registers_changed>: New field.
4295 (struct win32_target_ops): Change prototype of set_thread_context,
4296 delete set_thread_context and add prepare_to_resume.
4297 (win32_require_context): New declaration.
4299 2014-10-08 Gary Benson <gbenson@redhat.com>
4301 * server.h: Do not include common-exceptions.h.
4303 2014-10-08 Gary Benson <gbenson@redhat.com>
4305 * server.h: Do not include cleanups.h.
4307 2014-09-30 James Hogan <james.hogan@imgtec.com>
4309 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4312 2014-09-23 Yao Qi <yao@codesourcery.com>
4314 * linux-low.c (lp_status_maybe_breakpoint): New function.
4315 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4316 (count_events_callback): Likewise.
4317 (select_event_lwp_callback): Likewise.
4318 (cancel_breakpoints_callback): Likewise.
4320 2014-09-19 Don Breazeal <donb@codesourcery.com>
4322 * linux-low.c (handle_extended_wait): Call
4323 linux_ptrace_get_extended_event.
4324 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4325 linux_is_extended_waitstatus.
4327 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4329 * Makefile.in (CPPFLAGS): Define.
4330 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4331 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4333 2014-09-16 Gary Benson <gbenson@redhat.com>
4335 * inferiors.h (current_inferior): Renamed as...
4336 (current_thread): New variable. All uses updated.
4337 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4338 (maybe_move_out_of_jump_pad): Likewise.
4339 (cancel_breakpoint): Likewise.
4340 (linux_low_filter_event): Likewise.
4341 (wait_for_sigstop): Likewise.
4342 (linux_resume_one_lwp): Likewise.
4343 (need_step_over_p): Likewise.
4344 (start_step_over): Likewise.
4345 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4346 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4347 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4348 and save_inferior as saved_thread.
4349 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4351 (regcache_invalidate_thread): Likewise.
4352 * remote-utils.c (prepare_resume_reply): Likewise.
4353 * thread-db.c (thread_db_get_tls_address): Likewise.
4354 (disable_thread_event_reporting): Likewise.
4355 (remove_thread_event_breakpoints): Likewise.
4356 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4358 * target.h (set_desired_inferior): Renamed as...
4359 (set_desired_thread): New declaration. All uses updated.
4360 * server.c (myresume): Updated comment to reference thread instead
4362 (handle_serial_event): Likewise.
4363 (handle_target_event): Likewise.
4365 2014-09-12 Tom Tromey <tromey@redhat.com>
4366 Gary Benson <gbenson@redhat.com>
4368 * regcache.h: Include common-regcache.h.
4369 (regcache_read_pc): Don't declare.
4370 * regcache.c (get_thread_regcache_for_ptid): New function.
4372 2014-09-11 Tom Tromey <tromey@redhat.com>
4373 Gary Benson <gbenson@redhat.com>
4375 * symbol.c: New file.
4376 * Makefile.in (SFILES): Add symbol.c.
4377 (OBS): Add symbol.o.
4379 2014-09-11 Gary Benson <gbenson@redhat.com>
4381 * target.c (target_stop_ptid, target_continue_ptid): New
4384 2014-09-11 Tom Tromey <tromey@redhat.com>
4385 Gary Benson <gbenson@redhat.com>
4387 * target.h: Include target/target.h.
4388 * target.c (target_read_memory, target_read_uint32)
4389 (target_write_memory): New functions.
4391 2014-09-11 Gary Benson <gbenson@redhat.com>
4393 * server.h (debug_hw_points): Don't declare.
4394 * server.c (debug_hw_points): Don't define. Replace all uses
4395 with show_debug_regs.
4396 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4397 all uses with show_debug_regs.
4399 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4401 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4402 endianness into account.
4403 (ppc_supply_ptrace_register): Likewise.
4405 2014-09-03 James Hogan <james.hogan@imgtec.com>
4407 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4408 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4410 2014-09-03 Gary Benson <gbenson@redhat.com>
4412 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4413 ALL_DEBUG_ADDRESS_REGISTERS.
4415 2014-09-02 Gary Benson <gbenson@redhat.com>
4417 * i386-low.h: Renamed as...
4418 * x86-low.h: New file. All type, function and variable name
4419 prefixes changed from "i386_" to "x86_". All references updated.
4420 * i386-low.c: Renamed as...
4421 * x86-low.c: New file. All type, function and variable name
4422 prefixes changed from "i386_" to "x86_". All references updated.
4424 2014-09-02 Gary Benson <gbenson@redhat.com>
4426 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4427 (x86_linux_new_thread): Likewise.
4429 2014-08-29 Gary Benson <gbenson@redhat.com>
4431 * server.h (setjmp.h): Do not include.
4432 (toplevel): Do not declare.
4433 (common-exceptions.h): Include.
4434 (cleanups.h): Likewise.
4435 * server.c (toplevel): Do not define.
4436 (exit_code): New static global.
4437 (detach_or_kill_for_exit_cleanup): New function.
4438 (main): New function. Original main renamed to...
4439 (captured_main): New function.
4440 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4442 2014-08-29 Gary Benson <gbenson@redhat.com>
4444 * Makefile.in (SFILES): Add common/common-exceptions.c.
4445 (OBS): Add common-exceptions.o.
4446 (common-exceptions.o): New rule.
4447 * utils.c (prepare_to_throw_exception): New function.
4449 2014-08-29 Gary Benson <gbenson@redhat.com>
4451 * config.in: Regenerate.
4452 * configure: Likewise.
4454 2014-08-29 Gary Benson <gbenson@redhat.com>
4456 * Makefile.in (SFILES): Add common/cleanups.c.
4458 (cleanups.o): New rule.
4460 2014-08-29 Gary Benson <gbenson@redhat.com>
4462 * utils.c (internal_vwarning): New function.
4464 2014-08-28 Gary Benson <gbenson@redhat.com>
4466 * utils.h (fatal): Remove declaration.
4467 * utils.c (fatal): Remove function.
4469 2014-08-28 Gary Benson <gbenson@redhat.com>
4471 * tracepoint.c (gdb_agent_init): Replace fatal with
4473 (initialize_tracepoint): Likewise.
4475 2014-08-28 Gary Benson <gbenson@redhat.com>
4477 * remote-utils.c (remote_prepare): Replace fatal with error.
4479 2014-08-28 Gary Benson <gbenson@redhat.com>
4481 * linux-low.c (linux_async): Replace fatal with warning.
4483 (linux_start_non_stop): Return -1 if linux_async failed.
4485 2014-08-28 Gary Benson <gbenson@redhat.com>
4487 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4489 (i386_dr_low_get_addr): Remove vague comment.
4490 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4493 2014-08-28 Gary Benson <gbenson@redhat.com>
4495 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4496 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4498 (linux_resume_one_lwp): Likewise.
4499 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4501 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4502 with internal_error.
4503 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4504 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4505 (find_register_by_name): Replace fatal with internal_error.
4506 (find_regno): Likewise.
4507 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4508 * thread-db.c (thread_db_create_event): Likewise.
4509 (thread_db_load_search): Likewise.
4510 (try_thread_db_load_1): Likewise.
4511 * tracepoint.c (get_jump_space_head): Replace fatal with
4513 (claim_trampoline_space): Likewise.
4514 (have_fast_tracepoint_trampoline_buffer): Likewise.
4515 (cmd_qtstart): Likewise.
4516 (stop_tracing): Likewise.
4517 (fast_tracepoint_collecting): Likewise.
4518 (target_malloc): Likewise.
4519 (download_tracepoint): Likewise.
4520 (download_trace_state_variables): Replace check with gdb_assert.
4521 (upload_fast_traceframes): Replace fatal with internal_error.
4523 2014-08-19 Tom Tromey <tromey@redhat.com>
4524 Gary Benson <gbenson@redhat.com>
4526 * Makefile.in (SFILES): Add common/common-debug.c.
4527 (OBS): Add common-debug.o.
4528 (common-debug.o): New rule.
4529 * debug.h (debug_printf): Don't declare.
4530 * debug.c (debug_printf): Renamed and rewritten as...
4531 (debug_vprintf): New function.
4533 2014-08-19 Gary Benson <gbenson@redhat.com>
4535 * utils.h: Do not include print-utils.h.
4537 2014-08-19 Tom Tromey <tromey@redhat.com>
4538 Gary Benson <gbenson@redhat.com>
4540 * server.h: Add static assertion.
4541 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4543 2014-08-19 Tom Tromey <tromey@redhat.com>
4544 Gary Benson <gbenson@redhat.com>
4546 * Makefile.in (SFILES): Add common/errors.c.
4547 (OBS): Add errors.o.
4548 (IPA_OBS): Add errors-ipa.o.
4549 (errors.o): New rule.
4550 (errors-ipa.o): Likewise.
4551 * utils.h (perror_with_name, error, warning): Don't declare.
4552 * utils.c (warning): Renamed and rewritten as...
4553 (vwarning): New function.
4554 (error): Renamed and rewritten as...
4555 (verror): New function.
4556 (internal_error): Renamed and rewritten as...
4557 (internal_verror): New function.
4559 2014-08-07 Gary Benson <gbenson@redhat.com>
4561 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4562 * configure: Regenerate.
4563 * config.in: Likewise.
4564 * server.h: Do not include errno.h.
4565 * event-loop.c: Likewise.
4566 * hostio-errno.c: Likewise.
4567 * linux-low.c: Likewise.
4568 * remote-utils.c: Likewise.
4569 * spu-low.c: Likewise.
4570 * utils.c: Likewise.
4571 * gdbreplay.c: Unconditionally include errno.h.
4573 2014-08-07 Gary Benson <gbenson@redhat.com>
4575 * server.h: Do not include string.h.
4576 * event-loop.c: Likewise.
4577 * linux-low.c: Likewise.
4578 * regcache.c: Likewise.
4579 * remote-utils.c: Likewise.
4580 * spu-low.c: Likewise.
4581 * utils.c: Likewise.
4583 2014-08-07 Gary Benson <gbenson@redhat.com>
4585 * server.h: Do not include gdb_assert.h.
4587 2014-08-07 Gary Benson <gbenson@redhat.com>
4589 * server.h: Do not include common-utils.h.
4591 2014-08-07 Gary Benson <gbenson@redhat.com>
4593 * server.h: Do not include ptid.h.
4594 * notif.h: Likewise.
4596 2014-08-07 Gary Benson <gbenson@redhat.com>
4598 * server.h: Do not include gdb_locale.h.
4600 2014-08-07 Gary Benson <gbenson@redhat.com>
4602 * server.h: Do not include gdb/signals.h.
4603 * win32-low.c: Likewise.
4605 2014-08-07 Gary Benson <gbenson@redhat.com>
4607 * server.h: Do not include pathmax.h.
4609 2014-08-07 Gary Benson <gbenson@redhat.com>
4611 * server.h: Do not include libiberty.h.
4612 * linux-bfin-low.c: Likewise.
4614 2014-08-07 Gary Benson <gbenson@redhat.com>
4616 * server.h: Do not include ansidecl.h.
4618 2014-08-07 Gary Benson <gbenson@redhat.com>
4620 * linux-x86-low.c: Do not include stddef.h.
4621 * lynx-ppc-low.c: Likewise.
4622 * tracepoint.c: Likewise.
4624 2014-08-07 Gary Benson <gbenson@redhat.com>
4626 * server.h: Do not include stdarg.h.
4627 * nto-low.c: Likewise.
4629 2014-08-07 Gary Benson <gbenson@redhat.com>
4631 * server.h: Do not include stdlib.h.
4632 * inferiors.c: Likewise.
4633 * linux-low.c: Likewise.
4634 * regcache.c: Likewise.
4635 * spu-low.c: Likewise.
4636 * tracepoint.c: Likewise.
4637 * utils.c: Likewise.
4639 2014-08-07 Gary Benson <gbenson@redhat.com>
4641 * server.h: Do not include stdio.h.
4642 * linux-low.c: Likewise.
4643 * remote-utils.c: Likewise.
4644 * spu-low.c: Likewise.
4645 * utils.c: Likewise.
4646 * wincecompat.c: Likewise.
4648 2014-08-06 Gary Benson <gbenson@redhat.com>
4650 * regcache.c (init_register_cache): Move conditionals inside if.
4652 2014-08-06 Gary Benson <gbenson@redhat.com>
4654 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4656 2014-07-31 Gary Benson <gbenson@redhat.com>
4658 * ax.h: Do not include server.h.
4659 * gdbthread.h: Likewise.
4660 * lynx-low.h: Likewise.
4661 * notif.h: Likewise.
4663 2014-07-30 Gary Benson <gbenson@redhat.com>
4665 * server.h: Include common-defs.h.
4666 Do not include config.h or build-gnulib-gdbserver/config.h.
4668 2014-07-30 Gary Benson <gbenson@redhat.com>
4670 * hostio-errno.c: Move server.h to top of includes list.
4671 * inferiors.c: Likewise.
4672 * linux-x86-low.c: Likewise.
4673 * notif.c: Include server.h.
4675 2014-07-24 Tom Tromey <tromey@redhat.com>
4676 Gary Benson <gbenson@redhat.com>
4678 * server.h (CORE_ADDR): Now unsigned.
4680 2014-07-16 Pedro Alves <palves@redhat.com>
4682 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4684 2014-07-15 Pedro Alves <palves@redhat.com>
4686 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4689 2014-07-11 Pedro Alves <palves@redhat.com>
4691 * linux-low.c (kill_wait_lwp): New function, based on
4692 kill_one_lwp_callback, but use my_waitpid directly.
4693 (kill_one_lwp_callback, linux_kill): Use it.
4695 2014-06-23 Pedro Alves <palves@redhat.com>
4697 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4698 before setting DR0..DR3.
4700 2014-06-20 Gary Benson <gbenson@redhat.com>
4702 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4703 * configure: Regenerated.
4704 * config.in: Likewise.
4706 2014-06-20 Gary Benson <gbenson@redhat.com>
4708 * Makefile.in (SFILES): Update locations for files moved
4710 (object file files): Reordered.
4712 2014-06-20 Gary Benson <gbenson@redhat.com>
4714 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4715 (i386_dr_low_set_addr): Likewise.
4716 (i386_dr_low_get_addr): Likewise.
4717 (i386_dr_low_can_set_control): Likewise.
4718 (i386_dr_low_set_control): Likewise.
4719 (i386_dr_low_get_control): Likewise.
4720 (i386_dr_low_get_status): Likewise.
4721 (i386_get_debug_register_length): Likewise.
4722 * linux-x86-low.c (i386_dr_low_set_addr):
4723 Changed signature. Made static.
4724 (i386_dr_low_get_addr): Likewise.
4725 (i386_dr_low_set_control): Likewise.
4726 (i386_dr_low_get_control): Likewise.
4727 (i386_dr_low_get_status): Likewise.
4728 (i386_dr_low): New global variable.
4729 * win32-i386-low.c (i386_dr_low_set_addr):
4730 Changed signature. Made static.
4731 (i386_dr_low_get_addr): Likewise.
4732 (i386_dr_low_set_control): Likewise.
4733 (i386_dr_low_get_control): Likewise.
4734 (i386_dr_low_get_status): Likewise.
4735 (i386_dr_low): New global variable.
4737 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4739 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4740 * Makefile.in (AR, AR_FLAGS): Define.
4741 * configure: Regenerate.
4743 2014-06-19 Gary Benson <gbenson@redhat.com>
4745 * Makefile.in (i386-dregs.o): New rule.
4746 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4747 * i386-low.c (target.h): Remove include.
4748 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4749 (DR_CONTROL_SHIFT): Likewise.
4750 (DR_CONTROL_SIZE): Likewise.
4751 (DR_RW_EXECUTE): Likewise.
4752 (DR_RW_WRITE): Likewise.
4753 (DR_RW_READ): Likewise.
4754 (DR_RW_IORW): Likewise.
4755 (DR_LEN_1): Likewise.
4756 (DR_LEN_2): Likewise.
4757 (DR_LEN_4): Likewise.
4758 (DR_LEN_8): Likewise.
4759 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4760 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4761 (DR_ENABLE_SIZE): Likewise.
4762 (DR_LOCAL_SLOWDOWN): Likewise.
4763 (DR_GLOBAL_SLOWDOWN): Likewise.
4764 (DR_CONTROL_RESERVED): Likewise.
4765 (I386_DR_CONTROL_MASK): Likewise.
4766 (I386_DR_VACANT): Likewise.
4767 (I386_DR_LOCAL_ENABLE): Likewise.
4768 (I386_DR_GLOBAL_ENABLE): Likewise.
4769 (I386_DR_DISABLE): Likewise.
4770 (I386_DR_SET_RW_LEN): Likewise.
4771 (I386_DR_GET_RW_LEN): Likewise.
4772 (I386_DR_WATCH_HIT): Likewise.
4773 (i386_wp_op_t): Likewise.
4774 (i386_show_dr): Likewise.
4775 (i386_length_and_rw_bits): Likewise.
4776 (i386_insert_aligned_watchpoint): Likewise.
4777 (i386_remove_aligned_watchpoint): Likewise.
4778 (i386_handle_nonaligned_watchpoint): Likewise.
4779 i386_update_inferior_debug_regs(): Likewise.
4780 (i386_dr_insert_watchpoint): Likewise.
4781 (i386_dr_remove_watchpoint): Likewise.
4782 (i386_dr_region_ok_for_watchpoint): Likewise.
4783 (i386_dr_stopped_data_address): Likewise.
4784 (i386_dr_stopped_by_watchpoint): Likewise.
4786 2014-06-19 Gary Benson <gbenson@redhat.com>
4788 * i386-low.c (i386_dr_show): Renamed to
4789 i386_show_dr and made static. All uses updated.
4790 (i386_dr_length_and_rw_bits): Renamed to
4791 i386_length_and_rw_bits and made static.
4793 (i386_dr_insert_aligned_watchpoint): Renamed to
4794 i386_insert_aligned_watchpoint and made static.
4796 (i386_dr_remove_aligned_watchpoint): Renamed to
4797 i386_remove_aligned_watchpoint and made static.
4799 (i386_dr_update_inferior_debug_regs): Renamed to
4800 i386_update_inferior_debug_regs and made static.
4803 2014-06-18 Gary Benson <gbenson@redhat.com>
4805 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4806 (i386_dr_low_can_set_control): Likewise.
4807 (i386_get_debug_register_length): Likewise.
4808 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4809 (i386_dr_low_can_set_control): Likewise.
4810 (i386_get_debug_register_length): Likewise.
4812 2014-06-17 Gary Benson <gbenson@redhat.com>
4814 * i386-low.h (i386-dregs.h): New include.
4815 (DR_FIRSTADDR): Now in i386-dregs.h.
4816 (DR_LASTADDR): Likewise.
4817 (DR_NADDR): Likewise.
4818 (DR_STATUS): Likewise.
4819 (DR_CONTROL): Likewise.
4820 (i386_debug_reg_state): Likewise.
4821 (i386_dr_insert_watchpoint): Likewise.
4822 (i386_dr_remove_watchpoint): Likewise.
4823 (i386_dr_region_ok_for_watchpoint): Likewise.
4824 (i386_dr_stopped_data_address): Likewise.
4825 (i386_dr_stopped_by_watchpoint): Likewise.
4826 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4828 2014-06-18 Gary Benson <gbenson@redhat.com>
4830 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4831 i386_dr_insert_watchpoint.
4832 (i386_low_remove_watchpoint): Renamed to
4833 i386_dr_remove_watchpoint.
4834 (i386_low_region_ok_for_watchpoint): Renamed to
4835 i386_dr_region_ok_for_watchpoint.
4836 (i386_low_stopped_data_address): Renamed to
4837 i386_dr_stopped_data_address.
4838 (i386_low_stopped_by_watchpoint): Renamed to
4839 i386_dr_stopped_by_watchpoint.
4840 * i386-low.c (i386_show_dr): Renamed to
4841 i386_dr_show and made nonstatic. All uses updated.
4842 (i386_length_and_rw_bits): Renamed to
4843 i386_dr_length_and_rw_bits and made nonstatic.
4845 (i386_insert_aligned_watchpoint): Renamed to
4846 i386_dr_insert_aligned_watchpoint and made nonstatic.
4848 (i386_remove_aligned_watchpoint): Renamed to
4849 i386_dr_remove_aligned_watchpoint and made nonstatic.
4851 (i386_update_inferior_debug_regs): Renamed to
4852 i386_dr_update_inferior_debug_regs and made nonstatic.
4854 (i386_low_insert_watchpoint): Renamed to
4855 i386_dr_insert_watchpoint. All uses updated.
4856 (i386_low_remove_watchpoint): Renamed to
4857 i386_dr_remove_watchpoint. All uses updated.
4858 (i386_low_region_ok_for_watchpoint): Renamed to
4859 i386_dr_region_ok_for_watchpoint. All uses updated.
4860 (i386_low_stopped_data_address): Renamed to
4861 i386_dr_stopped_data_address. All uses updated.
4862 (i386_low_stopped_by_watchpoint): Renamed to
4863 i386_dr_stopped_by_watchpoint. All uses updated.
4865 2014-06-18 Gary Benson <gbenson@redhat.com>
4867 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4868 (i386_dr_low_can_set_control): Likewise.
4869 (i386_insert_aligned_watchpoint): New check.
4871 2014-06-18 Gary Benson <gbenson@redhat.com>
4873 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4876 2014-06-18 Gary Benson <gbenson@redhat.com>
4878 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4879 instead of fatal and error.
4880 (i386_handle_nonaligned_watchpoint): Likewise.
4882 2014-06-18 Gary Benson <gbenson@redhat.com>
4884 * i386-low.c (i386_get_debug_register_length): New macro.
4885 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4886 (i386_show_dr): Use debug_printf instead of fprintf. Use
4887 phex to format values.
4889 2014-06-18 Gary Benson <gbenson@redhat.com>
4891 * i386-low.h: Comment changes.
4892 * i386-low.c: Likewise.
4894 2014-06-18 Gary Benson <gbenson@redhat.com>
4896 * i386-low.c: Whitespace changes.
4898 2014-06-12 Tom Tromey <tromey@redhat.com>
4900 * utils.c (freeargv): Remove.
4902 2014-06-12 Tom Tromey <tromey@redhat.com>
4904 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4905 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4906 (parse_debug_format_options): Likewise.
4907 (gdbserver_usage): Likewise.
4908 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4909 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4910 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4912 ($(LIBGNU)): Depend on libiberty.
4913 (all-lib): Recurse into all subdirs.
4914 (install-only): Invoke "install" target in subdirs.
4915 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4917 * configure: Rebuild.
4918 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4919 for vasprintf, vsnprintf, or gettimeofday.
4920 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4923 2014-06-05 Joel Brobecker <brobecker@adacore.com>
4925 * development.sh: Delete.
4926 * Makefile.in (config.status): Adjust dependency on development.sh.
4927 * configure.ac: Adjust development.sh source call.
4928 * configure: Regenerate.
4930 2014-06-02 Pedro Alves <palves@redhat.com>
4932 * ax.c (gdb_free_agent_expr): New function.
4933 * ax.h (gdb_free_agent_expr): New declaration.
4934 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4936 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4938 (clear_breakpoint_conditions_and_commands): New function.
4939 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4940 (clear_breakpoint_conditions_and_commands): New declaration.
4942 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4944 * linux-aarch64-low.c (asm/ptrace.h): Include.
4946 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4948 Fix TLS access for -static -pthread.
4949 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4950 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4951 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4953 2014-05-20 Pedro Alves <palves@redhat.com>
4955 * linux-aarch64-low.c (aarch64_insert_point)
4956 (aarch64_remove_point): No longer check whether the type is
4957 supported here. Adjust to new interface.
4958 (the_low_target): Install aarch64_supports_z_point_type as
4959 supports_z_point_type method.
4960 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4961 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4962 instead of a Z packet char. Adjust.
4963 (arm_supports_z_point_type): New function.
4964 (arm_insert_point, arm_remove_point): Adjust to new interface.
4965 (the_low_target): Install arm_supports_z_point_type.
4966 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4967 (cris_insert_point, cris_remove_point): Adjust to new interface.
4968 Don't check whether the type is supported here.
4969 (the_low_target): Install cris_supports_z_point_type.
4970 * linux-low.c (linux_supports_z_point_type): New function.
4971 (linux_insert_point, linux_remove_point): Adjust to new interface.
4972 * linux-low.h (struct linux_target_ops) <insert_point,
4973 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4974 raw_breakpoint pointer parameter.
4975 <supports_z_point_type>: New method.
4976 * linux-mips-low.c (mips_supports_z_point_type): New function.
4977 (mips_insert_point, mips_remove_point): Adjust to new interface.
4978 Use mips_supports_z_point_type.
4979 (the_low_target): Install mips_supports_z_point_type.
4980 * linux-ppc-low.c (the_low_target): Install NULL as
4981 supports_z_point_type method.
4982 * linux-s390-low.c (the_low_target): Install NULL as
4983 supports_z_point_type method.
4984 * linux-sparc-low.c (the_low_target): Install NULL as
4985 supports_z_point_type method.
4986 * linux-x86-low.c (x86_supports_z_point_type): New function.
4987 (x86_insert_point): Adjust to new insert_point interface. Use
4988 insert_memory_breakpoint. Adjust to new
4989 i386_low_insert_watchpoint interface.
4990 (x86_remove_point): Adjust to remove_point interface. Use
4991 remove_memory_breakpoint. Adjust to new
4992 i386_low_remove_watchpoint interface.
4993 (the_low_target): Install x86_supports_z_point_type.
4994 * lynx-low.c (lynx_target_ops): Install NULL as
4995 supports_z_point_type callback.
4996 * nto-low.c (nto_supports_z_point_type): New.
4997 (nto_insert_point, nto_remove_point): Adjust to new interface.
4998 (nto_target_ops): Install nto_supports_z_point_type.
4999 * mem-break.c: Adjust intro comment.
5000 (struct raw_breakpoint) <raw_type, size>: New fields.
5001 <inserted>: Update comment.
5002 <shlib_disabled>: Delete field.
5003 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5004 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5005 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5006 (raw_bkpt_type_to_target_hw_bp_type): New function.
5007 (find_enabled_raw_code_breakpoint_at): New function.
5008 (find_raw_breakpoint_at): New type and size parameters. Use them.
5009 (insert_memory_breakpoint): New function, based off
5010 set_raw_breakpoint_at.
5011 (remove_memory_breakpoint): New function.
5012 (set_raw_breakpoint_at): Reimplement.
5013 (set_breakpoint): New, based on set_breakpoint_at.
5014 (set_breakpoint_at): Reimplement.
5015 (delete_raw_breakpoint): Go through the_target->remove_point
5016 instead of assuming memory breakpoints.
5017 (find_gdb_breakpoint_at): Delete.
5018 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5019 (find_gdb_breakpoint): New function.
5020 (set_gdb_breakpoint_at): Delete.
5021 (z_type_supported): New function.
5022 (set_gdb_breakpoint_1): New function, loosely based off
5023 set_gdb_breakpoint_at.
5024 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5025 (delete_gdb_breakpoint_at): Delete.
5026 (delete_gdb_breakpoint_1): New function, loosely based off
5027 delete_gdb_breakpoint_at.
5028 (delete_gdb_breakpoint): New function.
5029 (clear_gdb_breakpoint_conditions): Rename to ...
5030 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5032 (add_condition_to_breakpoint): Make static.
5033 (add_breakpoint_condition): Take a struct breakpoint pointer
5034 instead of an address. Adjust.
5035 (gdb_condition_true_at_breakpoint): Rename to ...
5036 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5038 (gdb_condition_true_at_breakpoint): Reimplement.
5039 (add_breakpoint_commands): Take a struct breakpoint pointer
5040 instead of an address. Adjust.
5041 (gdb_no_commands_at_breakpoint): Rename to ...
5042 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5043 parameter. Return true if no breakpoint was found. Change debug
5045 (gdb_no_commands_at_breakpoint): Reimplement.
5046 (run_breakpoint_commands): Rename to ...
5047 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5048 and change return type to boolean.
5049 (run_breakpoint_commands): New function.
5050 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5051 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5052 breakpoint. Go through the_target->remove_point instead of
5053 assuming memory breakpoint.
5054 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5055 software and hardware breakpoints.
5056 (reinsert_raw_breakpoint): Go through the_target->insert_point
5057 instead of assuming memory breakpoint.
5058 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5059 software and hardware breakpoints.
5060 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5061 Check both software and hardware breakpoints.
5062 (validate_inserted_breakpoint): Assert the breakpoint is a
5063 software breakpoint. Set the inserted flag to -1 instead of
5064 setting shlib_disabled.
5065 (delete_disabled_breakpoints): Adjust.
5066 (validate_breakpoints): Only validate software breakpoints.
5067 Adjust to inserted flag change.
5068 (check_mem_read, check_mem_write): Skip breakpoint types other
5069 than software breakpoints. Adjust to inserted flag change.
5070 * mem-break.h (enum raw_bkpt_type): New enum.
5071 (raw_breakpoint, struct process_info): Forward declare.
5072 (Z_packet_to_target_hw_bp_type): Delete declaration.
5073 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5074 (set_gdb_breakpoint, delete_gdb_breakpoint)
5075 (clear_breakpoint_conditions): New declarations.
5076 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5077 (breakpoint_inserted_here): Update comment.
5078 (add_breakpoint_condition, add_breakpoint_commands): Replace
5079 address parameter with a breakpoint pointer parameter.
5080 (gdb_breakpoint_here): Update comment.
5081 (delete_gdb_breakpoint_at): Delete.
5082 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5083 * server.c (process_point_options): Take a struct breakpoint
5084 pointer instead of an address. Adjust.
5085 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5086 delete_gdb_breakpoint.
5087 * spu-low.c (spu_target_ops): Install NULL as
5088 supports_z_point_type method.
5089 * target.h: Include mem-break.h.
5090 (struct target_ops) <prepare_to_access_memory>: Update comment.
5091 <supports_z_point_type>: New field.
5092 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5093 instead of a char. Also take a raw breakpoint pointer.
5094 * win32-arm-low.c (the_low_target): Install NULL as
5095 supports_z_point_type.
5096 * win32-i386-low.c (i386_supports_z_point_type): New function.
5097 (i386_insert_point, i386_remove_point): Adjust to new interface.
5098 (the_low_target): Install i386_supports_z_point_type.
5099 * win32-low.c (win32_supports_z_point_type): New function.
5100 (win32_insert_point, win32_remove_point): Adjust to new interface.
5101 (win32_target_ops): Install win32_supports_z_point_type.
5102 * win32-low.h (struct win32_target_ops):
5103 <supports_z_point_type>: New method.
5104 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5105 instead of a char. Also take a raw breakpoint pointer.
5107 2014-05-20 Pedro Alves <palves@redhat.com>
5109 * mem-break.h: Include break-common.h.
5110 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5111 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5112 (Z_packet_to_target_hw_bp_type): New declaration.
5113 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5114 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5115 (Z_PACKET_ACCESS_WP): Delete macros.
5116 (Z_packet_to_hw_type): Delete function.
5117 * i386-low.h: Don't include break-common.h here.
5118 (Z_packet_to_hw_type): Delete declaration.
5119 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5120 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5121 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5122 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5123 * linux-aarch64-low.c: Don't include break-common.h here.
5124 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5125 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5126 (Z_packet_to_target_hw_bp_type): Delete function.
5127 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5129 (mips_insert_point, mips_remove_point): Use
5130 Z_packet_to_target_hw_bp_type.
5132 2014-05-20 Pedro Alves <palves@redhat.com>
5134 * linux-aarch64-low.c: Include break-common.h.
5135 (enum target_point_type): Delete.
5136 (Z_packet_to_point_type): Rename to ...
5137 (Z_packet_to_target_hw_bp_type): ... this, and return a
5138 target_hw_bp_type instead.
5139 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5140 instead of an enum target_point_type.
5141 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5143 (aarch64_dr_state_insert_one_point)
5144 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5145 (aarch64_handle_aligned_watchpoint)
5146 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5147 Take an enum target_hw_bp_type instead of an enum
5149 (aarch64_supports_z_point_type): New function.
5150 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5151 use Z_packet_to_target_hw_bp_type.
5153 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5155 * configure.ac: Only use -Werror by default when DEVELOPMENT
5157 * configure: Regenerate.
5159 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5161 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5162 * linux-x86-low.c (X86_64_USER_REGS): New.
5163 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5165 2014-04-28 Yao Qi <yao@codesourcery.com>
5167 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5170 2014-04-25 Pedro Alves <palves@redhat.com>
5173 * linux-low.c (linux_attach_fail_reason_string): New function.
5174 (linux_attach_lwp): Delete.
5175 (linux_attach_lwp_1): Rename to ...
5176 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5177 argument. Remove "initial" parameter. Return int instead of
5178 void. Don't error or warn here.
5179 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5180 failure to attach to the tgid. Call warning when failing to
5182 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5183 argument. Remove "initial" parameter. Return int instead of
5184 void. Don't error or warn here.
5185 (linux_attach_fail_reason_string): New declaration.
5186 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5187 interface change. Use linux_attach_fail_reason_string.
5189 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5190 Walfred Tedeschi <walfred.tedeschi@intel.com>
5192 * Makefile.in: Added rules to handle new files
5193 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5194 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5195 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5196 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5197 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5198 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5200 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5201 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5202 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5203 i386/x32-avx512.xml.
5204 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5205 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5206 i386/x32-avx512-linux.xml.
5207 * i387-fp.c (num_avx512_k_registers): New constant for number
5209 (num_avx512_zmmh_low_registers): New constant for number of
5210 lower ZMM registers (0-15).
5211 (num_avx512_zmmh_high_registers): New constant for number of
5212 higher ZMM registers (16-31).
5213 (num_avx512_ymmh_registers): New contant for number of higher
5214 YMM registers (ymm16-31 added by avx521 on x86_64).
5215 (num_avx512_xmm_registers): New constant for number of higher
5216 XMM registers (xmm16-31 added by AVX512 on x86_64).
5217 (struct i387_xsave): Add space for AVX512 registers.
5218 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5219 Add code to handle AVX512 registers.
5220 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5221 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5222 prototypei from generated file.
5223 (tdesc_amd64_avx512_linux): Likewise.
5224 (init_registers_x32_avx512_linux): Likewise.
5225 (tdesc_x32_avx512_linux): Likewise.
5226 (init_registers_i386_avx512_linux): Likewise.
5227 (tdesc_i386_avx512_linux): Likewise.
5228 (x86_64_regmap): Add AVX512 registers.
5229 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5231 (initialize_low_arch): Add code to initialize AVX512 registers.
5233 2014-04-23 Pedro Alves <palves@redhat.com>
5235 * mem-break.c (find_gdb_breakpoint_at): Make static.
5236 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5238 2014-04-23 Pedro Alves <palves@redhat.com>
5240 * i386-low.c: Don't include break-common.h here.
5241 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5242 prototype to take target_hw_bp_type as argument instead of a Z
5244 * i386-low.h: Include break-common.h here.
5245 (Z_packet_to_hw_type): Declare.
5246 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5248 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5249 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5250 (x86_remove_point): Convert the packet number to a
5251 target_hw_bp_type before calling i386_low_remove_watchpoint.
5252 * win32-i386-low.c (i386_insert_point): Convert the packet number
5253 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5254 (i386_remove_point): Convert the packet number to a
5255 target_hw_bp_type before calling i386_low_remove_watchpoint.
5257 2014-04-23 Pedro Alves <palves@redhat.com>
5259 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5261 2014-04-10 Pedro Alves <palves@redhat.com>
5263 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5264 Check if the condition or command is NULL before checking if the
5265 breakpoint is known. On success, return true.
5266 * mem-break.h (add_breakpoint_condition): Document return.
5267 (add_breakpoint_commands): Add describing comment.
5268 * server.c (skip_to_semicolon): New function.
5269 (process_point_options): Use it.
5271 2014-04-09 Pedro Alves <palves@redhat.com>
5273 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5276 2014-02-27 Pedro Alves <palves@redhat.com>
5279 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5281 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5283 (last_thread_of_process_p): Take a PID argument instead of a
5285 (linux_wait_for_lwp): Delete.
5286 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5288 (linux_low_filter_event): New function, party factored out from
5289 linux_wait_for_event.
5290 (linux_wait_for_event): Rename to ...
5291 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5292 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5293 sigsuspend. Check for zombie leaders.
5294 (linux_wait_for_event): Reimplement as wrapper around
5295 linux_wait_for_event_filtered.
5296 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5297 a normal or signal exit is seen, it's the whole process exiting.
5298 (wait_for_sigstop): No longer a for_each_inferior callback.
5299 Rewrite on top of linux_wait_for_event_filtered.
5300 (stop_all_lwps): Call wait_for_sigstop directly.
5301 * server.c (resume, handle_target_event): Handle
5302 TARGET_WAITKIND_NO_RESUMED.
5304 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5306 * win32-low.c (psapi_get_dll_name,
5307 * win32_CreateToolhelp32Snapshot): Delete.
5308 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5309 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5311 (handle_load_dll): Add function description.
5312 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5314 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5316 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5318 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5319 base address when calling win32_add_one_solib.
5320 (handle_load_dll): Delete local variable load_addr.
5321 Remove 0x1000 offset applied to DLL base address when calling
5322 win32_add_one_solib.
5323 (handle_unload_dll): Add comment.
5325 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5327 * win32-low.c (win32_add_all_dlls): Renames
5328 win32_ensure_ntdll_loaded. Rewrite function documentation.
5329 Adjust implementation to always load all DLLs.
5330 Add 0x1000 offset to DLL base address when calling
5331 win32_add_one_solib.
5332 (child_initialization_done): New static global.
5333 (do_initial_child_stuff): Set child_initialization_done to
5334 zero during child initialization, and 1 after. Replace call
5335 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5337 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5338 (handle_unload_dll): Add function documentation.
5339 (get_child_debug_event): Ignore load and unload DLL events
5340 during child initialization.
5342 2014-02-20 Doug Evans <dje@google.com>
5344 Remove global all_lwps.
5345 * inferiors.h (ptid_of): Move here from linux-low.h.
5346 (pid_of, lwpid_of): Ditto.
5347 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5348 parameter is a struct thread_info * now.
5349 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5350 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5351 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5353 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5354 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5355 * linux-arm-low.c (update_registers_callback): Update, "entry"
5356 parameter is a struct thread_info * now.
5357 Fetch lwpid from current_inferior directly.
5358 (arm_insert_point): Pass &all_threads to find_inferior instead of
5360 (arm_remove_point): Ditto.
5361 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5362 (arm_prepare_to_resume): Fetch pid from thread.
5363 (arm_read_description): Fetch lwpid from current_inferior directly.
5364 * linux-low.c (all_lwps): Delete.
5365 (delete_lwp): Delete call to remove_inferior.
5366 (handle_extended_wait): Fetch lwpid from thread.
5367 (add_lwp): Don't set lwp->entry.id. Remove call to
5368 add_inferior_to_list.
5369 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5370 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5371 (kill_one_lwp_callback): Ditto.
5372 (linux_kill): Don't dereference NULL pointer.
5373 Fetch ptid,lwpid from thread.
5374 (get_detach_signal): Fetch ptid from thread.
5375 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5376 Simplify call to regcache_invalidate_thread.
5377 (delete_lwp_callback): Update, "entry" parameter is a
5378 struct thread_info * now. Fetch pid from thread.
5379 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5380 (status_pending_p_callback): Update, "entry" parameter is a
5381 struct thread_info * now. Fetch ptid from thread.
5382 (find_lwp_pid): Update, "entry" parameter is a
5383 struct thread_info * now.
5384 (linux_wait_for_lwp): Fetch pid from thread.
5385 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5386 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5387 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5388 (dequeue_one_deferred_signal): Ditto.
5389 (cancel_breakpoint): Fetch ptid from current_inferior.
5390 (linux_wait_for_event): Pass &all_threads to find_inferior,
5391 not &all_lwps. Fetch ptid, lwpid from thread.
5392 (count_events_callback): Update, "entry" parameter is a
5393 struct thread_info * now.
5394 (select_singlestep_lwp_callback): Ditto.
5395 (select_event_lwp_callback): Ditto.
5396 (cancel_breakpoints_callback): Ditto.
5397 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5399 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5400 (unsuspend_one_lwp): Update, "entry" parameter is a
5401 struct thread_info * now.
5402 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5404 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5405 Fetch lwpid from thread, not lwp.
5406 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5407 Pass &all_threads to find_inferior, not &all_lwps.
5408 (send_sigstop): Fetch lwpid from thread, not lwp.
5409 (send_sigstop_callback): Update, "entry" parameter is a
5410 struct thread_info * now.
5411 (suspend_and_send_sigstop_callback): Ditto.
5412 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5413 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5414 struct thread_info * now.
5415 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5417 (lwp_running): Update, "entry" parameter is a
5418 struct thread_info * now.
5419 (stop_all_lwps): Fetch ptid from thread.
5420 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5421 (linux_resume_one_lwp): Fetch lwpid from thread.
5422 (linux_set_resume_request): Update, "entry" parameter is a
5423 struct thread_info * now. Fetch pid, lwpid from thread.
5424 (resume_status_pending_p): Update, "entry" parameter is a
5425 struct thread_info * now.
5426 (need_step_over_p): Ditto. Fetch lwpid from thread.
5427 (start_step_over): Fetch lwpid from thread.
5428 (linux_resume_one_thread): Update, "entry" parameter is a
5429 struct thread_info * now. Fetch lwpid from thread.
5430 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5431 (proceed_one_lwp): Update, "entry" parameter is a
5432 struct thread_info * now. Fetch lwpid from thread.
5433 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5434 struct thread_info * now.
5435 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5436 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5437 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5439 (regsets_store_inferior_registers): Ditto.
5440 (fetch_register, store_register): Ditto.
5441 (linux_read_memory, linux_write_memory): Ditto.
5442 (linux_request_interrupt): Ditto.
5443 (linux_read_auxv): Ditto.
5444 (linux_xfer_siginfo): Ditto.
5445 (linux_qxfer_spu): Ditto.
5446 (linux_qxfer_libraries_svr4): Ditto.
5447 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5448 moved to inferiors.h.
5450 (get_thread_lwp): Update.
5451 (struct lwp_info): Delete member "entry". Simplify comment for
5454 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5455 current_inferior directly.
5456 (update_watch_registers_callback): Update, "entry" parameter is a
5457 struct thread_info * now. Fetch pid from thread.
5458 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5459 (mips_insert_point): Fetch lwpid from current_inferior.
5460 Pass &all_threads to find_inferior, not &all_lwps.
5461 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5462 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5464 (mips_stopped_data_address): Ditto.
5465 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5467 * linux-tile-low.c (tile_arch_setup): Ditto.
5468 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5469 (update_debug_registers_callback): Update, "entry" parameter is a
5470 struct thread_info * now. Fetch pid from thread.
5471 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5472 Pass &all_threads to find_inferior, not &all_lwps.
5473 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5474 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5475 Pass &all_threads to find_inferior, not &all_lwps.
5476 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5477 (i386_dr_low_get_status): Ditto.
5478 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5479 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5480 (x86_linux_read_description): Ditto.
5481 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5483 2014-02-20 Doug Evans <dje@google.com>
5485 * inferiors.c (get_first_inferior): Fix buglet.
5487 2014-02-19 Doug Evans <dje@google.com>
5489 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5490 * inferiors.c (add_thread): Change result type to struct thread_info *.
5491 All callers updated.
5492 (add_lwp): Call add_thread here instead of in callers.
5493 All callers updated.
5494 * linux-low.h (get_lwp_thread): Rewrite.
5495 (struct lwp_info): New member "thread".
5497 2014-02-19 Doug Evans <dje@google.com>
5499 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5500 All callers updated.
5502 2014-02-19 Doug Evans <dje@google.com>
5504 * inferiors.c (add_thread): Fix whitespace.
5506 2014-02-19 Doug Evans <dje@google.com>
5508 * dll.c (clear_dlls): Replace accessing list implemention details
5510 * gdbthread.h (get_first_thread): Declare.
5511 * inferiors.c (for_each_inferior_with_data): New function.
5512 (get_first_thread): New function.
5513 (find_thread_ptid): Simplify.
5514 (get_first_inferior): New function.
5515 (clear_list): Delete.
5516 (one_inferior_p): New function.
5517 (clear_inferior_list): New function.
5518 (clear_inferiors): Update.
5519 * inferiors.h (for_each_inferior_with_data): Declare.
5520 (clear_inferior_list): Declare.
5521 (one_inferior_p): Declare.
5522 (get_first_inferior): Declare.
5523 * linux-low.c (linux_wait_for_event): Replace accessing list
5524 implemention details with API function.
5525 * server.c (target_running): Ditto.
5526 (accumulate_file_name_length): New function.
5527 (emit_dll_description): New function.
5528 (handle_qxfer_libraries): Replace accessing list implemention
5529 details with API function.
5530 (handle_qxfer_threads_worker): New function.
5531 (handle_qxfer_threads_proper): Replace accessing list implemention
5532 details with API function.
5533 (handle_query): Ditto.
5534 (visit_actioned_threads_callback_ftype): New typedef.
5535 (visit_actioned_threads_data): New struct.
5536 (visit_actioned_threads): Rewrite to be find_inferior callback.
5537 (resume): Call find_inferior.
5538 (handle_status): Replace accessing list implemention
5539 details with API function.
5540 (process_serial_event): Replace accessing list implemention details
5542 * target.c (set_desired_inferior): Replace accessing list implemention
5543 details with API function.
5544 * tracepoint.c (same_process_p): New function.
5545 (gdb_agent_about_to_close): Replace accessing list implemention
5546 details with API function.
5547 * win32-low.c (child_delete_thread): Replace accessing list
5548 implemention details with API function.
5549 (match_dll_by_basename): New function.
5550 (dll_is_loaded_by_basename): New function.
5551 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5552 details call to dll_is_loaded_by_basename.
5554 2014-02-19 Doug Evans <dje@google.com>
5556 * dll.h (struct dll_info): Add comment.
5557 * gdbthread.h (struct thread_info): Add comment.
5558 (current_ptid): Simplify.
5559 * inferiors.c (add_process): Update.
5560 (remove_process): Update.
5561 * inferiors.h (struct process_info): Rename member "head" to "entry".
5562 * linux-low.c (delete_lwp): Update.
5564 (last_thread_of_process_p): Update.
5565 (kill_one_lwp_callback, linux_kill): Update.
5566 (status_pending_p_callback): Update.
5567 (wait_for_sigstop): Update. Simplify read of ptid.
5568 (start_step_over): Update.
5569 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5570 (get_lwp_thread): Update.
5571 (struct lwp_info): Rename member "head" to "entry".
5572 * regcache.h (inferior_list_entry): Delete.
5573 * server.c (kill_inferior_callback): Update.
5574 (detach_or_kill_inferior_callback): Update.
5575 (print_started_pid): Update.
5576 (print_attached_pid): Update.
5577 (process_serial_event): Simplify read of ptid.
5578 * thread-db.c (thread_db_create_event): Update.
5579 (thread_db_get_tls_address): Update.
5580 * win32-low.c (current_inferior_ptid): Simplify.
5582 2014-02-19 Tom Tromey <tromey@redhat.com>
5584 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5586 (target_supports_btrace): Update.
5588 2014-02-14 Yao Qi <yao@codesourcery.com>
5590 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5591 (rsp-low-ipa.o): New target.
5593 2014-02-12 Tom Tromey <tromey@redhat.com>
5595 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5596 convert_ascii_to_int.
5597 * regcache.c (registers_to_string): Likewise.
5598 * remote-utils.c (decode_M_packet): Likewise.
5599 * server.c (process_serial_event): Likewise.
5601 2014-02-12 Tom Tromey <tromey@redhat.com>
5603 * server.c (handle_query, handle_v_run): Use hex2bin, not
5605 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5607 2014-02-12 Tom Tromey <tromey@redhat.com>
5609 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5610 convert_int_to_ascii.
5611 * regcache.c (registers_to_string, collect_register_as_string):
5613 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5615 * server.c (process_serial_event): Likewise.
5616 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5617 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5619 2014-02-12 Tom Tromey <tromey@redhat.com>
5621 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5622 bin2hex, not hexify.
5623 * tracepoint.c (cmd_qtstatus): Likewise.
5625 2014-02-12 Tom Tromey <tromey@redhat.com>
5627 * remote-utils.c (monitor_output): Pass explicit length to
5630 2014-02-12 Tom Tromey <tromey@redhat.com>
5632 * tracepoint.c: Include rsp-low.h.
5633 * server.c: Include rsp-low.h.
5634 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5635 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5637 * remote-utils.c: Include rsp-low.h.
5638 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5639 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5640 (convert_int_to_ascii, convert_ascii_to_int): Move to
5642 * regcache.c: Include rsp-low.h.
5643 * ax.c: Include rsp-low.h.
5644 * Makefile.in (SFILES): Add common/rsp-low.c.
5645 (OBS): Add rsp-low.o.
5646 (rsp-low.o): New target.
5648 2014-02-12 Tom Tromey <tromey@redhat.com>
5650 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5651 Include print-utils.h.
5652 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5653 (plongest, thirty_two, phex_nz): Remove.
5654 * Makefile.in (SFILES): Add common/print-utils.c.
5655 (OBS): Add print-utils.o.
5656 (print-utils-ipa.o): New target.
5657 (print-utils.o): New target.
5658 (IPA_OBJS): Add print-utils-ipa.o.
5660 2014-02-06 Tom Tromey <tromey@redhat.com>
5662 * Makefile.in (SFILES): Fix indentation.
5664 2014-02-05 Doug Evans <dje@google.com>
5666 * linux-low.c (linux_wait_for_event): Improve comment.
5667 (linux_wait_1): Keep current_inferior in sync with event_child.
5669 2014-01-22 Doug Evans <dje@google.com>
5671 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5673 2014-01-22 Doug Evans <dje@google.com>
5675 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5676 * configure: Regenerate.
5677 * config.in: Regenerate.
5678 * Makefile.in (SFILES): Add debug.c.
5680 * debug.c: New file.
5681 * debug.h: New file.
5682 * linux-aarch64-low.c (*): Update all debugging printfs to use
5683 debug_printf instead of fprintf.
5684 * linux-arm-low.c (*): Ditto.
5685 * linux-cris-low.c (*): Ditto.
5686 * linux-crisv32-low.c (*): Ditto.
5687 * linux-m32r-low.c (*): Ditto.
5688 * linux-sparc-low.c (*): Ditto.
5689 * linux-x86.c (*): Ditto.
5690 * linux-low.c (*): Ditto.
5691 (linux_wait_1): Add calls to debug_enter, debug_exit.
5692 (linux_wait): Remove redundant debugging printf.
5693 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5694 (linux_resume, unstop_all_lwps): Ditto.
5695 * mem-break.c (*): Update all debugging printfs to use
5696 debug_printf instead of fprintf.
5697 * remote-utils.c (*): Ditto.
5698 * thread-db.c (*): Ditto.
5699 * server.c #include <ctype.h>, "gdb_vecs.h".
5700 (debug_threads): Moved to debug.c.
5701 (*): Update all debugging printfs to use debug_printf instead of
5703 (start_inferior): Replace call to fflush with call to debug_flush.
5704 (monitor_show_help): Mention set debug-format.
5705 (parse_debug_format_options): New function.
5706 (handle_monitor_command): Handle "monitor set debug-format".
5707 (gdbserver_usage): Mention --debug-format.
5708 (main): Parse --debug-format.
5709 * server.h (debug_threads): Declaration moved to debug.h.
5711 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5712 trace_debug_1 that uses debug_printf.
5713 (tracepoint_look_up_symbols): Update all debugging printfs to use
5714 debug_printf instead of fprintf.
5716 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5718 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5721 2014-01-17 Pedro Alves <palves@redhat.com>
5724 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5725 defined after including gdb_proc_service.h.
5727 2014-01-16 Doug Evans <dje@google.com>
5729 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5730 (match_dll): Use it.
5732 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5734 * target.h (target_ops) <read_btrace>: Change parameters and
5735 return type to allow error reporting.
5736 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5737 trace reading errors on.
5738 * linux-low.c (linux_low_read_btrace): Pass trace reading
5740 (linux_low_disable_btrace): New.
5742 2014-01-15 Doug Evans <dje@google.com>
5744 * inferiors.c (thread_id_to_gdb_id): Delete.
5745 * inferiors.h (thread_id_to_gdb_id): Delete.
5747 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5749 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5750 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5753 2014-01-08 Pedro Alves <palves@redhat.com>
5755 * server.c (handle_status): Don't discard previous queued stop
5756 replies or thread's pending status here.
5757 (main) <disconnection>: Do it here instead.
5759 2014-01-08 Pedro Alves <palves@redhat.com>
5761 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5762 * server.c (visit_actioned_threads, handle_pending_status): New
5764 (handle_v_cont): Factor out parts to ...
5765 (resume): ... this new function. If in all-stop, and a thread
5766 being resumed has a pending status, report it without actually
5768 (myresume): Adjust to use the new 'resume' function.
5769 (clear_pending_status_callback, set_pending_status_callback)
5770 (find_status_pending_thread_callback): New functions.
5771 (handle_status): Handle the case of multiple threads having
5772 interesting statuses to report. Report threads' real last signal
5773 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5774 with an interesting thread to report the status for, instead of
5775 always reporting the status of the first thread.
5777 2014-01-01 Joel Brobecker <brobecker@adacore.com>
5779 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5780 * gdbreplay.c (gdbreplay_version): Likewise.
5782 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5784 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5785 iov.iov_len with the real length in use.
5787 2013-12-13 Joel Brobecker <brobecker@adacore.com>
5789 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5790 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5791 for all targets that use win32-low.c.
5792 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5793 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5795 2013-12-13 Pedro Alves <palves@redhat.com>
5797 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5798 if equal to TARGET_WAITKIND_LOADED.
5799 * win32-low.c (cached_status): New static global.
5800 (win32_wait): Add declaration.
5801 (do_initial_child_stuff): Flush all initial pending debug events
5802 up to the initial breakpoint.
5803 (win32_wait): If CACHED_STATUS was set, return that instead
5804 of doing a real wait. Remove the code resuming the execution
5805 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5806 during the initial phase. Also remove the code changing
5807 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5808 TARGET_WAITKIND_STOPPED.
5810 2013-12-11 Yao Qi <yao@codesourcery.com>
5812 * notif.c (handle_notif_ack): Return 0 if no notification
5815 2013-11-20 Doug Evans <dje@google.com>
5817 * linux-low.c (linux_set_resume_request): Fix comment.
5819 2013-11-20 Doug Evans <dje@google.com>
5821 * linux-low.c (resume_status_pending_p): Tweak comment.
5823 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5825 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5826 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5827 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5828 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5829 (srv_amd64_regobj): Add amd64-mpx.o.
5830 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5831 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5832 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5833 * i387-fp.c (num_pl_bnd_register) Added constant.
5834 (num_pl_bnd_cfg_registers) Added constant.
5835 (struct i387_xsave) Added reserved area and MPX fields.
5836 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5837 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5839 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5840 (init_registers_amd64_mpx_linux): Declare new function.
5841 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5842 (x86_64_regmap): Add MPX registers.
5843 (x86_linux_read_description): Add MPX case.
5844 (initialize_low_arch): Initialize MPX targets.
5846 2013-11-18 Tom Tromey <tromey@redhat.com>
5848 * configure: Rebuild.
5849 * configure.ac: Don't check for stdlib.h.
5850 * gdbreplay.c: Unconditionally include stdlib.h.
5852 2013-11-18 Tom Tromey <tromey@redhat.com>
5854 * config.in: Rebuild.
5855 * configure: Rebuild.
5856 * configure.ac: Don't use AC_HEADER_DIRENT.
5858 2013-11-18 Tom Tromey <tromey@redhat.com>
5860 * server.h: Don't check HAVE_STRING_H.
5861 * gdbreplay.c: Don't check HAVE_STRING_H.
5862 * configure: Rebuild.
5864 2013-11-18 Tom Tromey <tromey@redhat.com>
5866 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5869 2013-11-08 Tom Tromey <tromey@redhat.com>
5871 * configure, config.in: Rebuild.
5872 * configure.ac: Remove unused configury.
5874 2013-11-08 Tom Tromey <tromey@redhat.com>
5876 * acinclude.m4: Include common.m4, codeset.m4.
5877 * configure, config.in: Rebuild.
5878 * configure.ac: Use GDB_AC_COMMON.
5880 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5882 * linux-s390-low.c (HWCAP_S390_TE): New define.
5883 (s390_arch_setup): Consider the TE field in the HWCAP for
5884 determining 'have_regset_tdb'.
5886 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5889 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5892 2013-10-02 Pedro Alves <palves@redhat.com>
5894 * server.c (process_serial_event): Don't output "GDBserver
5895 exiting" if GDB is connected through stdio.
5896 * target.c (mywait): Likewise, be silent if GDB is connected
5899 2013-10-01 Joel Brobecker <brobecker@adacore.com>
5901 * lynx-low.c (lynx_add_threads_after_attach): New function.
5902 (lynx_attach): Remove call to add_thread. Add call to
5903 lynx_add_threads_after_attach instead.
5905 2013-09-28 Mike Frysinger <vapier@gentoo.org>
5907 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5908 * config.in, configure: Regenerated.
5910 2013-09-18 Yao Qi <yao@codesourcery.com>
5913 * server.c (start_inferior): Clear 'resume_info'.
5915 2013-09-16 Jiong Wang <jiwang@tilera.com>
5917 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5920 2013-09-16 Jiong Wang <jiwang@tilera.com>
5922 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5923 linux-tile-low.o to srv_tgtobj.
5925 2013-09-16 Will Newton <will.newton@linaro.org>
5927 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5930 2013-09-06 Pedro Alves <palves@redhat.com>
5932 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5933 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5934 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5935 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5936 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5937 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5939 2013-09-06 Pedro Alves <palves@redhat.com>
5941 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5942 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5944 2013-09-06 Pedro Alves <palves@redhat.com>
5946 * linux-amd64-ipa.c: Include tracepoint.h.
5947 * linux-i386-ipa.c: Include tracepoint.h.
5949 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5951 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5952 (ps_get_thread_area): New function.
5954 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
5956 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5957 (initialize_low_arch): Call init_registers_crisv32 rather than
5958 init_register_crisv32.
5960 2013-09-05 Pedro Alves <palves@redhat.com>
5962 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5964 * hostio.h: ... this new file.
5965 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5966 win32-low.c: Include hostio.h.
5968 2013-09-05 Pedro Alves <palves@redhat.com>
5970 * server.h (gdb_client_data, handler_func, callback_handler_func)
5971 (delete_file_handler, add_file_handler, append_callback_event)
5972 (delete_callback_event, start_event_loop, initialize_event_loop):
5973 Move to event-loop.h and include it.
5974 * event-loop.h: New file.
5976 2013-09-05 Pedro Alves <palves@redhat.com>
5978 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5979 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5980 (loaded_dll, unloaded_dll): Move to ...
5981 * dll.h: ... this new file.
5982 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5984 2013-09-05 Pedro Alves <palves@redhat.com>
5986 * server.h (current_process, get_thread_process, all_processes)
5987 (add_inferior_to_list, for_each_inferior, current_inferior)
5988 (remove_inferior, add_process, remove_process, find_process_pid)
5989 (have_started_inferiors_p, have_attached_inferiors_p)
5990 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5991 (clear_inferiors, find_inferior, find_inferior_id)
5992 (inferior_target_data, set_inferior_target_data)
5993 (inferior_regcache_data, set_inferior_regcache_data): Move to
5994 inferiors.h, and include it.
5995 * inferiors.h: New file.
5997 2013-09-05 Pedro Alves <palves@redhat.com>
5999 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6003 2013-09-05 Pedro Alves <palves@redhat.com>
6005 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6007 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6008 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6009 (handle_tracepoint_general_set, handle_tracepoint_query)
6010 (tracepoint_finished_step, tracepoint_was_hit)
6011 (release_while_stepping_state_list, current_traceframe)
6012 (in_readonly_region, traceframe_read_mem)
6013 (fetch_traceframe_registers, traceframe_read_sdata)
6014 (traceframe_read_info, struct fast_tpoint_collect_status)
6015 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6016 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6017 (supply_fast_tracepoint_registers)
6018 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6019 (ipa_tdesc, claim_trampoline_space)
6020 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6021 (agent_mem_read, agent_get_trace_state_variable_value)
6022 (agent_set_trace_state_variable_value, agent_tsv_read)
6023 (agent_mem_read_string, get_raw_reg_func_addr)
6024 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6025 * tracepoint.h: ... this new file.
6027 2013-09-05 Pedro Alves <palves@redhat.com>
6029 * server.h (perror_with_name, error, fatal, warning, paddress)
6030 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6032 * utils.h: New file.
6034 2013-09-05 Pedro Alves <palves@redhat.com>
6036 * server.h (remote_debug, noack_mode, transport_is_reliable)
6037 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6038 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6039 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6040 (write_enn, initialize_async_io, enable_async_io)
6041 (disable_async_io, check_remote_input_interrupt_request)
6042 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6043 (dead_thread_notify, prepare_resume_reply)
6044 (decode_address_to_semicolon, decode_address, decode_m_packet)
6045 (decode_M_packet, decode_X_packet, decode_xfer_write)
6046 (decode_search_memory_packet, unhexify, hexify)
6047 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6048 (look_up_one_symbol, relocate_instruction)
6049 (monitor_output): Move to remote-utils.h, and include it.
6050 * remote-utils.h: New file.
6052 2013-09-05 Pedro Alves <palves@redhat.com>
6054 * server.h (_): Delete.
6056 2013-09-02 Pedro Alves <palves@redhat.com>
6058 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6059 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6061 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6063 2013-09-02 Pierre Muller <muller@sourceware.org>
6065 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6066 or WriteProcessMemory complete successfully and handle
6067 ERROR_PARTIAL_COPY error.
6069 2013-09-02 Pedro Alves <palves@redhat.com>
6071 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6072 error instead of EIO.
6074 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6077 * linux-low.c: Include filestuff.h.
6078 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6079 * lynx-low.c: Include filestuff.h.
6080 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6081 * server.c: Include filestuff.h.
6082 (main): Call notice_open_fds.
6083 * spu-low.c: Include filestuff.h.
6084 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6086 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6088 * Makefile.in: Explain why ../target and ../nat are not
6089 listed as include file search paths.
6090 (linux-waitpid.o): New object file rule.
6091 * configure.srv (srv_native_linux_obj): New variable.
6092 Replace all occurrences of linux native object files with
6093 $srv_native_linux_obj.
6094 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6095 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6096 (linux_enable_event_reporting): Remove declaration.
6097 (my_waitpid): Moved to common/linux-waitpid.c.
6098 (linux_wait_for_event): Pass ptid when calling
6099 linux_enable_event_reporting.
6100 (linux_supports_tracefork_flag): Remove.
6101 (linux_enable_event_reporting): Likewise.
6102 (linux_tracefork_grandchild): Remove.
6103 (STACK_SIZE): Moved to common/linux-ptrace.c.
6104 (linux_tracefork_child): Remove.
6105 (linux_test_for_tracefork): Remove.
6106 (linux_look_up_symbols): Call linux_supports_traceclone.
6107 (initialize_low): Remove call to linux_test_for_tracefork.
6108 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6109 common/linux-ptrace.h.
6110 (PTRACE_TYPE_ARG4): Likewise.
6111 Include linux-ptrace.h.
6113 2013-08-21 Pedro Alves <palves@redhat.com>
6115 * config.in: Renegerate.
6117 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6119 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6120 (SFILES): Remove $(srcdir)/common/target-common.c and
6121 add $(srcdir)/target/waitstatus.c.
6122 (OBS): Remove target-common.o and add waitstatus.o.
6123 (server_h): Remove $(srcdir)/../common/target-common.h and
6124 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6125 and $(srcdir)/../target/waitstatus.h.
6126 (target-common.o): Remove.
6127 (waitstatus.o): New target object file.
6128 * target.h: Do not include target-common.h and
6129 include target/resume.h, target/wait.h and
6130 target/waitstatus.h.
6132 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6134 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6135 to PTRACE_TYPE_ARG3.
6136 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6137 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6139 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6140 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6142 2013-07-27 Jie Zhang <jie@codesourcery.com>
6143 Daniel Jacobowitz <dan@codesourcery.com>
6144 Yao Qi <yao@codesourcery.com>
6146 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6147 (mips-linux-watch.o): New rule.
6148 (mips_linux_watch_h): New variable.
6149 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6151 * linux-mips-low.c: Include mips-linux-watch.h.
6152 (struct arch_process_info, struct arch_lwp_info): New.
6153 (update_watch_registers_callback): New function.
6154 (mips_linux_new_process, mips_linux_new_thread) New functions.
6155 (mips_linux_prepare_to_resume, mips_insert_point): New
6157 (mips_remove_point, mips_stopped_by_watchpoint): New
6159 (rsp_bp_type_to_target_hw_bp_type): New function.
6160 (mips_stopped_data_address): New function.
6161 (the_low_target): Add watchpoint support functions.
6163 2013-07-27 Yao Qi <yao@codesourcery.com>
6165 * i386-low.c: Include break-common.h.
6166 (enum target_hw_bp_type): Remove.
6168 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6170 * Makefile.in (SFILES): /common/target-common.c.
6171 (OBS): Add target-common.o.
6172 (server_h): Add $(srcdir)/../common/target-common.h.
6173 (target-common.o): New target.
6174 * server.c (queue_stop_reply_callback): Free
6175 status string after use.
6176 * target.c (target_waitstatus_to_string): Remove.
6177 * target.h: Include target-common.h.
6178 (resume_kind): Likewise.
6179 (target_waitkind): Likewise.
6180 (target_waitstatus): Likewise.
6181 (TARGET_WNOHANG): Likewise.
6183 2013-07-04 Yao Qi <yao@codesourcery.com>
6185 * Makefile.in (host_alias): Use @host_noncanonical@.
6186 (target_alias): Use @target_noncanonical@.
6187 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6188 ACX_NONCANONICAL_HOST.
6189 * configure: Regenerated.
6192 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6194 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6195 * configure: Rebuild.
6196 * Makefile.in (version_host, version_target): Get from configure.
6197 (version.c): Use $(version_host) and $(version_target).
6199 2013-07-03 Pedro Alves <palves@redhat.com>
6201 * Makefile.in (config.status): Depend on development.sh.
6202 * acinclude.m4: Include libmcheck.m4.
6203 * configure: Regenerate.
6205 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6207 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6208 attribute inside the parentheses.
6209 (winapi_DebugSetProcessKillOnExit): Ditto.
6210 (winapi_DebugBreakProcess): Ditto.
6211 (winapi_GenerateConsoleCtrlEvent): Ditto.
6213 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6215 * notif.h (notif_event): Add a dummy member to avoid compiler
6218 2013-07-01 Pedro Alves <palves@redhat.com>
6220 * hostio.c (HOSTIO_PATH_MAX): Define.
6221 (require_filename, handle_open, handle_unlink, handle_readlink):
6224 2013-07-01 Pedro Alves <palves@redhat.com>
6226 * server.h: Include "pathmax.h".
6227 * linux-low.c: Don't include sys/param.h.
6228 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6230 * win32-low.c: Don't include sys/param.h.
6231 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6233 2013-07-01 Pedro Alves <palves@redhat.com>
6235 * event-loop.c: Don't check HAVE_UNISTD_H before including
6237 * gdbreplay.c: Likewise.
6238 * remote-utils.c: Likewise.
6239 * server.c: Likewise.
6240 * configure.ac: Don't check for unistd.h.
6241 * configure: Regenerate.
6243 2013-06-28 Tom Tromey <tromey@redhat.com>
6245 * Makefile.in (version.c): Use version.in, not
6248 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6250 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6251 * configure: Rebuild.
6252 * Makefile.in (version_host, version_target): Get from configure.
6253 (version.c): Use $(version_host) and $(version_target).
6255 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6257 Fix trace-status to output user name without trailing colon.
6258 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6260 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6262 Fix trace-status to output proper start-time and stop-time.
6263 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6264 output start time and stop time in hex as gdb expects.
6266 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6268 * tracepoint.c (build_traceframe_info_xml): Output trace state
6269 variables present in the trace buffer.
6271 2013-06-24 Tom Tromey <tromey@redhat.com>
6273 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6275 (version.o): Remove.
6276 * gdbreplay.c: Include version.h.
6277 (version, host_name): Don't declare.
6278 * server.h: Include version.h.
6279 (version, host_name): Don't declare.
6281 2013-06-12 Pedro Alves <palves@redhat.com>
6283 * linux-x86-low.c (linux_is_elf64): Delete global.
6284 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6285 with local linux_pid_exe_is_elf_64_file use.
6287 2013-06-11 Pedro Alves <palves@redhat.com>
6289 * linux-low.c (regset_disabled, disable_regset): New functions.
6290 (regsets_fetch_inferior_registers)
6291 (regsets_store_inferior_registers): Use them.
6292 (initialize_regsets_info); Don't allocate the disabled_regsets
6294 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6297 2013-06-11 Pedro Alves <palves@redhat.com>
6299 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6302 2013-06-11 Pedro Alves <palves@redhat.com>
6304 * linux-x86-low.c (initialize_low_arch): Call
6305 init_registers_x32_avx_linux.
6307 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6309 Fix compatibility with Android Bionic.
6310 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6313 2013-06-07 Pedro Alves <palves@redhat.com>
6316 * Makefile.in (OBS): Add tdesc.o.
6317 (IPA_OBJS): Add tdesc-ipa.o.
6318 (tdesc-ipa.o): New rule.
6319 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6321 * linux-low.c (new_inferior): Delete.
6322 (disabled_regsets, num_regsets): Delete.
6323 (linux_add_process): Adjust to set the new per-process
6325 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6326 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6327 was a stop. When calling arch_setup, switch the current inferior
6328 to the thread that got an event.
6329 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6330 (regsets_fetch_inferior_registers)
6331 (regsets_store_inferior_registers): New regsets_info parameter.
6333 (linux_register_in_regsets): New regs_info parameter. Adjust to
6335 (register_addr, fetch_register, store_register): New usrregs_info
6336 parameter. Adjust to use it.
6337 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6338 parameter regs_info. Adjust to use it.
6339 (linux_fetch_registers): Get the current inferior's regs_info, and
6341 (linux_store_registers): Ditto.
6342 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6343 (initialize_low): Don't initialize the target_regsets here. Call
6344 initialize_low_arch.
6345 * linux-low.h (target_regsets): Delete declaration.
6346 (struct regsets_info): New.
6347 (struct usrregs_info): New.
6348 (struct regs_info): New.
6349 (struct process_info_private) <new_inferior>: New field.
6350 (struct linux_target_ops): Delete the num_regs, regmap, and
6351 regset_bitmap fields. New field regs_info.
6352 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6353 * i387-fp.c (num_xmm_registers): Delete.
6354 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6355 calls to new interface.
6356 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6357 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6358 Infer the number of xmm registers from the regcache's target
6360 * i387-fp.h (num_xmm_registers): Delete.
6361 * inferiors.c (add_thread): Don't install the thread's regcache
6363 * proc-service.c (gregset_info): Fetch the current inferior's
6364 regs_info. Adjust to use it.
6365 * regcache.c: Include tdesc.h.
6366 (register_bytes, reg_defs, num_registers)
6367 (gdbserver_expedite_regs): Delete.
6368 (get_thread_regcache): If the thread doesn't have a regcache yet,
6369 create one, instead of aborting gdbserver.
6370 (regcache_invalidate_one): Rename to ...
6371 (regcache_invalidate_thread): ... this.
6372 (regcache_invalidate_one): New.
6373 (regcache_invalidate): Only invalidate registers of the current
6375 (init_register_cache): Add target_desc parameter, and use it.
6376 (new_register_cache): Ditto. Assert the target description has a
6377 non zero registers_size.
6378 (regcache_cpy): Add assertions. Adjust.
6379 (realloc_register_cache, set_register_cache): Delete.
6380 (registers_to_string, registers_from_string): Adjust.
6381 (find_register_by_name, find_regno, find_register_by_number)
6382 (register_cache_size): Add target_desc parameter, and use it.
6383 (free_register_cache_thread, free_register_cache_thread_one)
6384 (regcache_release, register_cache_size): New.
6385 (register_size): Add target_desc parameter, and use it.
6386 (register_data, supply_register, supply_register_zeroed)
6387 (supply_regblock, supply_register_by_name, collect_register)
6388 (collect_register_as_string, collect_register_by_name): Adjust.
6389 * regcache.h (struct target_desc): Forward declare.
6390 (struct regcache) <tdesc>: New field.
6391 (init_register_cache, new_register_cache): Add target_desc
6393 (regcache_invalidate_thread): Declare.
6394 (regcache_invalidate_one): Delete declaration.
6395 (regcache_release): Declare.
6396 (find_register_by_number, register_cache_size, register_size)
6397 (find_regno): Add target_desc parameter.
6398 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6400 * remote-utils.c: Include tdesc.h.
6401 (outreg, prepare_resume_reply): Adjust.
6402 * server.c: Include tdesc.h.
6403 (gdbserver_xmltarget): Delete declaration.
6404 (get_features_xml, process_serial_event): Adjust.
6405 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6407 (struct process_info) <tdesc>: New field.
6408 (ipa_tdesc): Declare.
6409 * tdesc.c: New file.
6410 * tdesc.h: New file.
6411 * tracepoint.c: Include tdesc.h.
6412 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6413 (get_context_regcache): Adjust to pass ipa_tdesc down.
6414 (do_action_at_tracepoint): Adjust to get the register cache size
6415 from the context regcache's description.
6416 (traceframe_walk_blocks): Adjust to get the register cache size
6417 from the current trace frame's description.
6418 (traceframe_get_pc): Adjust to get current trace frame's
6419 description and pass it down.
6420 (gdb_collect): Adjust to get the register cache size from the
6422 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6423 (gdbserver_xmltarget): Delete.
6424 (initialize_low_tracepoint): Set the ipa's target description.
6425 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6426 (initialize_low_tracepoint): Set the ipa's target description.
6427 * linux-x86-low.c: Include tdesc.h.
6428 [__x86_64__] (is_64bit_tdesc): New.
6429 (ps_get_thread_area, x86_get_thread_area): Use it.
6430 (i386_cannot_store_register): Rename to ...
6431 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6432 (i386_cannot_fetch_register): Rename to ...
6433 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6434 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6436 (target_regsets): Rename to ...
6437 (x86_regsets): ... this.
6438 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6440 (x86_siginfo_fixup): Use is_64bit_tdesc.
6441 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6442 (tdesc_x32_avx_linux, tdesc_x32_linux)
6443 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6445 (x86_linux_update_xmltarget): Delete.
6446 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6447 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6448 (AMD64_LINUX_USER64_CS): New.
6449 (x86_linux_read_description): New, based on
6450 x86_linux_update_xmltarget.
6451 (same_process_callback): New.
6452 (x86_arch_setup_process_callback): New.
6453 (x86_linux_update_xmltarget): New.
6454 (x86_regsets_info): New.
6455 (amd64_linux_regs_info): New.
6456 (i386_linux_usrregs_info): New.
6457 (i386_linux_regs_info): New.
6458 (x86_linux_regs_info): New.
6459 (x86_arch_setup): Reimplement.
6460 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6461 (x86_emit_ops): Ditto.
6462 (the_low_target): Adjust. Install x86_linux_regs_info,
6463 x86_cannot_fetch_register, and x86_cannot_store_register.
6464 (initialize_low_arch): New.
6465 * linux-ia64-low.c (tdesc_ia64): Declare.
6466 (ia64_fetch_register): Adjust.
6467 (ia64_usrregs_info, regs_info): New globals.
6468 (ia64_regs_info): New function.
6469 (the_low_target): Adjust.
6470 (initialize_low_arch): New function.
6471 * linux-sparc-low.c (tdesc_sparc64): Declare.
6472 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6474 (sparc_arch_setup): New function.
6475 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6476 (the_low_target): Adjust.
6477 (initialize_low_arch): New function.
6478 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6479 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6480 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6481 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6482 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6483 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6484 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6485 (tdesc_powerpc_isa205_vsx64l): Declare.
6486 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6487 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6488 (ppc_set_pc, ppc_get_hwcap): Adjust.
6489 (ppc_usrregs_info): Forward declare.
6490 (!__powerpc64__) ppc_regmap_adjusted: New global.
6491 (ppc_arch_setup): Adjust to the current process'es target
6493 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6494 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6495 (ppc_store_evrregset): Adjust.
6496 (target_regsets): Rename to ...
6497 (ppc_regsets): ... this, and make static.
6498 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6499 (ppc_regs_info): New function.
6500 (the_low_target): Adjust.
6501 (initialize_low_arch): New function.
6502 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6503 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6504 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6505 (tdesc_s390x_linux64v2): Declare.
6506 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6507 (s390_fill_gregset, s390_store_last_break): Adjust.
6508 (target_regsets): Rename to ...
6509 (s390_regsets): ... this, and make static.
6510 (s390_get_pc, s390_set_pc): Adjust.
6511 (s390_get_hwcap): New target_desc parameter, and use it.
6512 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6513 (s390_arch_setup): Adjust to set the current process'es target
6514 description. Don't adjust the regmap.
6515 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6516 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6517 (regs_info_3264): New globals.
6518 (s390_regs_info): New function.
6519 (the_low_target): Adjust.
6520 (initialize_low_arch): New function.
6521 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6522 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6523 [__mips64] (init_registers_mips_linux)
6524 (init_registers_mips_dsp_linux): Delete defines.
6525 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6526 (have_dsp): New global.
6527 (mips_read_description): New, based on mips_arch_setup.
6528 (mips_arch_setup): Reimplement.
6529 (get_usrregs_info): New function.
6530 (mips_cannot_fetch_register, mips_cannot_store_register)
6531 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6532 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6533 (target_regsets): Rename to ...
6534 (mips_regsets): ... this, and make static.
6535 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6536 (dsp_regs_info, regs_info): New globals.
6537 (mips_regs_info): New function.
6538 (the_low_target): Adjust.
6539 (initialize_low_arch): New function.
6540 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6541 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6543 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6544 (arm_read_description): New, with bits factored from
6546 (arm_arch_setup): Reimplement.
6547 (target_regsets): Rename to ...
6548 (arm_regsets): ... this, and make static.
6549 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6550 (arm_regs_info): New function.
6551 (the_low_target): Adjust.
6552 (initialize_low_arch): New function.
6553 * linux-m68k-low.c (tdesc_m68k): Declare.
6554 (target_regsets): Rename to ...
6555 (m68k_regsets): ... this, and make static.
6556 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6557 (m68k_regs_info): New function.
6558 (m68k_arch_setup): New function.
6559 (the_low_target): Adjust.
6560 (initialize_low_arch): New function.
6561 * linux-sh-low.c (tdesc_sharch): Declare.
6562 (target_regsets): Rename to ...
6563 (sh_regsets): ... this, and make static.
6564 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6565 (sh_regs_info, sh_arch_setup): New functions.
6566 (the_low_target): Adjust.
6567 (initialize_low_arch): New function.
6568 * linux-bfin-low.c (tdesc_bfin): Declare.
6569 (bfin_arch_setup): New function.
6570 (bfin_usrregs_info, regs_info): New globals.
6571 (bfin_regs_info): New function.
6572 (the_low_target): Adjust.
6573 (initialize_low_arch): New function.
6574 * linux-cris-low.c (tdesc_cris): Declare.
6575 (cris_arch_setup): New function.
6576 (cris_usrregs_info, regs_info): New globals.
6577 (cris_regs_info): New function.
6578 (the_low_target): Adjust.
6579 (initialize_low_arch): New function.
6580 * linux-cris-low.c (tdesc_crisv32): Declare.
6581 (cris_arch_setup): New function.
6582 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6583 (cris_regs_info): New function.
6584 (the_low_target): Adjust.
6585 (initialize_low_arch): New function.
6586 * linux-m32r-low.c (tdesc_m32r): Declare.
6587 (m32r_arch_setup): New function.
6588 (m32r_usrregs_info, regs_info): New globals.
6589 (m32r_regs_info): Adjust.
6590 (initialize_low_arch): New function.
6591 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6592 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6593 (tic6x_usrregs_info): Forward declare.
6594 (tic6x_read_description): New function, based on ...
6595 (tic6x_arch_setup): ... this. Reimplement.
6596 (target_regsets): Rename to ...
6597 (tic6x_regsets): ... this, and make static.
6598 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6599 (tic6x_regs_info): New function.
6600 (the_low_target): Adjust.
6601 (initialize_low_arch): New function.
6602 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6603 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6604 (target_regsets): Rename to ...
6605 (xtensa_regsets): ... this, and make static.
6606 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6608 (xtensa_arch_setup, xtensa_regs_info): New functions.
6609 (the_low_target): Adjust.
6610 (initialize_low_arch): New function.
6611 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6612 (nios2_arch_setup): Set the current process'es tdesc.
6613 (target_regsets): Rename to ...
6614 (nios2_regsets): ... this.
6615 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6616 (nios2_regs_info): New function.
6617 (the_low_target): Adjust.
6618 (initialize_low_arch): New function.
6619 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6620 (aarch64_arch_setup): Set the current process'es tdesc.
6621 (target_regsets): Rename to ...
6622 (aarch64_regsets): ... this.
6623 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6624 (aarch64_regs_info): New function.
6625 (the_low_target): Adjust.
6626 (initialize_low_arch): New function.
6627 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6629 (target_regsets): Rename to ...
6630 (tile_regsets): ... this.
6631 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6632 (tile_regs_info): New function.
6633 (tile_arch_setup): Set the current process'es tdesc.
6634 (the_low_target): Adjust.
6635 (initialize_low_arch): New function.
6636 * spu-low.c (tdesc_spu): Declare.
6637 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6638 * win32-arm-low.c (tdesc_arm): Declare.
6639 (arm_arch_setup): New function.
6640 (the_low_target): Install arm_arch_setup instead of
6642 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6643 (init_windows_x86): Rename to ...
6644 (i386_arch_setup): ... this. Set `win32_tdesc'.
6645 (the_low_target): Adjust.
6646 * win32-low.c (win32_tdesc): New global.
6647 (child_add_thread): Don't create the thread cache here.
6648 (do_initial_child_stuff): Set the new process'es tdesc.
6649 * win32-low.h (struct target_desc): Forward declare.
6650 (win32_tdesc): Declare.
6651 * lynx-i386-low.c (tdesc_i386): Declare global.
6652 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6653 * lynx-low.c (lynx_tdesc): New global.
6654 (lynx_add_process): Set the new process'es tdesc.
6655 * lynx-low.h (struct target_desc): Forward declare.
6656 (lynx_tdesc): Declare global.
6657 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6658 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6659 * nto-low.c (nto_tdesc): New global.
6660 (do_attach): Set the new process'es tdesc.
6661 * nto-low.h (struct target_desc): Forward declare.
6662 (nto_tdesc): Declare.
6663 * nto-x86-low.c (tdesc_i386): Declare.
6664 (nto_x86_arch_setup): Set `nto_tdesc'.
6666 2013-06-04 Gary Benson <gbenson@redhat.com>
6668 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6669 to qSupported response when appropriate.
6670 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6671 with nonzero-length annex.
6672 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6673 arguments supplied in annex.
6675 2013-05-31 Doug Evans <dje@google.com>
6678 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6679 64 bits in 64-cross-32 environment.
6681 2013-05-28 Pedro Alves <palves@redhat.com>
6683 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6684 (aarch64-without-fpu.c): Delete rule.
6685 * configure.srv (aarch64*-*-linux*): Remove references to
6686 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6687 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6690 2013-05-24 Pedro Alves <palves@redhat.com>
6692 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6693 instead of strchr/decode_address. Error if the range isn't split
6694 with a ','. Don't assume there's be a ':' in the action.
6696 2013-05-23 Yao Qi <yao@codesourcery.com>
6697 Pedro Alves <palves@redhat.com>
6699 * linux-low.c (lwp_in_step_range): New function.
6700 (linux_wait_1): If the thread was range stepping and stopped
6701 outside the stepping range, report the stop to GDB. Otherwise,
6702 continue stepping. Add range stepping debug output.
6703 (linux_set_resume_request): Copy the step range from the resume
6705 (linux_supports_range_stepping): New.
6706 (linux_target_ops) <supports_range_stepping>: Set to
6707 linux_supports_range_stepping.
6708 * linux-low.h (struct linux_target_ops)
6709 <supports_range_stepping>: New field.
6710 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6711 * linux-x86-low.c (x86_supports_range_stepping): New.
6712 (the_low_target) <supports_range_stepping>: Set to
6713 x86_supports_range_stepping.
6714 * server.c (handle_v_cont): Handle 'r' action.
6715 (handle_v_requests): Append ";r" if the target supports range
6717 * target.h (struct thread_resume) <step_range_start,
6718 step_range_end>: New fields.
6719 (struct target_ops) <supports_range_stepping>:
6721 (target_supports_range_stepping): New macro.
6723 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6725 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6726 confusion in comment.
6728 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6730 * lynx-low.c (struct process_info_private): New type.
6731 (lynx_add_process): New function.
6732 (lynx_create_inferior, lynx_attach): Replace calls to
6733 add_process by calls to lynx_add_process.
6734 (lynx_resume): If PTID is null, then try using
6735 current_process()->private->last_wait_event_ptid.
6737 (lynx_clear_inferiors): Delete. The contents of that function
6738 has been inlined in lynx_mourn;
6739 (lynx_wait_1): Save the ptid in the process's private data.
6740 (lynx_mourn): Free the process' private data. Replace call
6741 to lynx_clear_inferiors by call to clear_inferiors.
6743 2013-05-17 Yao Qi <yao@codesourcery.com>
6745 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6748 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6750 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6751 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6752 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6753 PT_TEXT_END_ADDR guards. Update comments.
6754 (linux_target_op) <read_offsets>: Conditionally define to
6755 linux_read_offsets if the target is UCLIBC and if it defines
6756 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6758 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6759 Andrew Jenner <andrew@codesourcery.com>
6761 * Makefile.in (SFILES): Add linux-nios2-low.c.
6762 (clean): Add action to delete nios2-linux.c.
6763 (nios2-linux.c): New rule.
6764 * configure.srv: Add nios2*-*-linux*.
6765 * linux-nios2-low.c: New.
6767 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6769 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6771 2013-04-25 Hui Zhu <hui@codesourcery.com>
6774 * ax.c (ax_printf): Add fflush.
6776 2013-04-22 Tom Tromey <tromey@redhat.com>
6778 * Makefile.in (SFILES): Add filestuff.c.
6779 (OBS): Add filestuff.o.
6780 (filestuff.o): New target.
6781 * config.in, configure: Rebuild.
6782 * configure.ac: Check for fdwalk, pipe2.
6784 2013-04-17 Pedro Alves <palves@redhat.com>
6786 * configure.ac (USE_THREAD_DB): Delete variable.
6787 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6788 Don't AC_SUBST USE_THREAD_DB.
6789 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6790 * config.in, configure: Regenerate.
6792 2013-04-16 Pedro Alves <palves@redhat.com>
6794 * linux-low.h (struct lwp_info) <thread_known>: Move under
6795 the USE_THREAD_DB #ifdef.
6797 2013-04-16 Pedro Alves <palves@redhat.com>
6799 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6800 (linux-low.o): Delete rule.
6801 * linux-low.h: Always include "gdb_thread_db.h" instead of
6802 conditionally including thread_db.h.
6803 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6806 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6808 * Makefile.in (install-only): Fix make install regression.
6810 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6812 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6813 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6815 * gdbserver.1: Remove.
6817 2013-03-22 Pedro Alves <palves@redhat.com>
6819 * linux-low.c (handle_extended_wait): Don't call
6820 linux_enable_event_reporting.
6822 2013-03-15 Tony Theodore <tonyt@logyst.com>
6825 * Makefile.in (SHELL): Use @SHELL@.
6827 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6829 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6832 2013-03-13 Joel Brobecker <brobecker@adacore.com>
6834 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6835 Remove extraneous NULL element.
6837 2013-03-13 Yao Qi <yao@codesourcery.com>
6839 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6840 'V' block in trace frame.
6842 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6844 * target.h (struct target_ops): Add btrace ops.
6845 (target_supports_btrace): New macro.
6846 (target_enable_btrace): New macro.
6847 (target_disable_btrace): New macro.
6848 (target_read_btrace): New macro.
6849 * gdbthread.h (struct thread_info): Add btrace field.
6850 * server.c: Include btrace-common.h.
6851 (handle_btrace_general_set): New function.
6852 (handle_btrace_enable): New function.
6853 (handle_btrace_disable): New function.
6854 (handle_general_set): Call handle_btrace_general_set.
6855 (handle_qxfer_btrace): New function.
6856 (struct qxfer qxfer_packets[]): Add btrace entry.
6857 * inferiors.c (remove_thread): Disable btrace.
6858 * linux-low: Include linux-btrace.h.
6859 (linux_low_enable_btrace): New function.
6860 (linux_low_read_btrace): New function.
6861 (linux_target_ops): Add btrace ops.
6862 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6863 Add srv_linux_btrace=yes.
6864 (x86_64-*-linux*): Add linux-btrace.o.
6865 Add srv_linux_btrace=yes.
6866 * configure.ac: Define HAVE_LINUX_BTRACE.
6867 * config.in: Regenerated.
6868 * configure: Regenerated.
6870 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6872 * server.c (handle_qxfer): Preserve error message if -3 is
6874 (qxfer): Document the -3 return value.
6876 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6878 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6879 (linux_btrace_h): New variable.
6880 (linux-btrace.o): New rule.
6882 2013-03-08 Stan Shebs <stan@codesourcery.com>
6883 Hafiz Abid Qadeer <abidh@codesourcery.com>
6885 * tracepoint.c (trace_buffer_size): New global.
6886 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6887 (init_trace_buffer): Change to one-argument function. Allocate
6888 trace buffer memory.
6889 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6890 handle QTBuffer:size packet.
6891 (cmd_bigqtbuffer_size): New function.
6892 (initialize_tracepoint): Call init_trace_buffer with
6893 DEFAULT_TRACE_BUFFER_SIZE.
6894 * server.c (handle_query): Add QTBuffer:size in the
6897 2013-03-07 Yao Qi <yao@codesourcery.com>
6899 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6900 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6902 (cmd_qtsp): Adjust condition. Do post increment.
6903 Set cur_action and cur_step_action back to 0.
6905 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6908 * linux-low.c (linux_write_memory): Return early success if LEN is
6911 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
6913 * configure.srv: Add x86_64-*-cygwin* as target.
6915 2013-02-28 Tom Tromey <tromey@redhat.com>
6917 * configure.ac: Invoke AC_SYS_LARGEFILE.
6918 * configure, config.in: Rebuild.
6920 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
6922 * win32-low.c: Throughout, fix format strings and casts of
6923 printf-like functions to avoid type related warnings on all
6925 (get_child_debug_event): Print dwDebugEventCode as hex since
6926 that's how it's usually documented.
6928 2013-02-28 Yao Qi <yao@codesourcery.com>
6930 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6933 2013-02-27 Jiong Wang <jiwang@tilera.com>
6935 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6936 (reg-tilegx32.c): New rule.
6937 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6938 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6939 different register info initializer according to elf class.
6940 (init_registers_tilgx32): New function. The tilegx32 register info
6942 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6943 (tile_store_gregset): Likewise.
6945 2013-02-27 Yao Qi <yao@codesourcery.com>
6947 * server.c (process_point_options): Print debug message when
6948 debug_threads is true.
6950 2013-02-26 Yao Qi <yao@codesourcery.com>
6952 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6954 2013-02-19 Pedro Alves <palves@redhat.com>
6955 Kai Tietz <ktietz@redhat.com>
6959 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6960 instead of strtoul to extract address from packet.
6961 (process_serial_event) <'z'>: Likewise.
6963 2013-02-18 Yao Qi <yao@codesourcery.com>
6965 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6967 2013-02-14 Pedro Alves <palves@redhat.com>
6971 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6972 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6974 2013-02-14 Pedro Alves <palves@redhat.com>
6976 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6978 2013-02-14 Pedro Alves <palves@redhat.com>
6980 * tracepoint.c (save_string): Delete.
6981 (add_tracepoint_action): Use savestring instead of save_string.
6983 2013-02-12 Pedro Alves <palves@redhat.com>
6985 * linux-xtensa-low.c: Ditto.
6986 * xtensa-xtregs.c: Ditto.
6988 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6990 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6993 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6995 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6996 aarch64_num_wp_regs and aarch64_num_bp_regs to
6997 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6999 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7001 * linux-aarch64-low.c (ps_get_thread_area): Replace
7002 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7004 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7005 Marcus Shawcroft <marcus.shawcroft@arm.com>
7006 Nigel Stephens <nigel.stephens@arm.com>
7007 Yufeng Zhang <yufeng.zhang@arm.com>
7009 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7010 (aarch64.c, aarch64-without-fpu.c): New targets.
7011 * configure.srv (aarch64*-*-linux*): New.
7012 * linux-aarch64-low.c: New file.
7014 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7016 * linux-low.c (handle_extended_wait, linux_create_inferior)
7017 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7018 (dequeue_one_deferred_signal, linux_resume_one_thread)
7019 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7020 (linux_tracefork_grandchild, linux_test_for_tracefork)
7021 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7022 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7023 where the argument is 0.
7025 2013-01-25 Yao Qi <yao@codesourcery.com>
7027 * event-loop.c: Include "queue.h".
7028 (gdb_event_p): New typedef.
7029 (struct gdb_event) <next_event>: Remove.
7030 (event_queue): Change to QUEUE(gdb_event_p).
7031 (async_queue_event): Remove.
7032 (gdb_event_xfree): New.
7033 (initialize_event_loop): New.
7034 (process_event): Use API from QUEUE.
7035 (wait_for_event): Likewise.
7036 * server.c (main): Call initialize_event_loop.
7037 * server.h (initialize_event_loop): Declare.
7039 2013-01-18 Yao Qi <yao@codesourcery.com>
7041 * ax.h (struct eval_agent_expr_context): New.
7042 (gdb_eval_agent_expr): Update declaration.
7043 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7044 TFRAME. Add new argument CTX.
7045 * server.h (struct eval_agent_expr_context): Declare.
7046 (agent_mem_read, agent_tsv_read): Update declaration.
7047 (agent_mem_read_string): Likewise.
7048 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7049 (add_traceframe_block): Add new argument TPOINT.
7050 Increase TPOINT->traceframe_usage.
7051 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7052 eval_tracepoint_agent_expr.
7053 (condition_true_at_tracepoint): Likewise.
7054 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7055 (agent_mem_read_string, agent_tsv_read): Likewise.
7057 2013-01-16 Yao Qi <yao@codesourcery.com>
7059 * linux-low.c (linux_resume_one_lwp): Don't check
7060 'lwp->bp_reinsert != 0'.
7062 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7063 Pedro Alves <palves@redhat.com>
7065 * lynx-low.c (ptrace_request_to_str): Define a temporary
7066 macro and use it to simplify this function's implementation.
7068 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7070 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7073 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7075 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7077 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7079 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7081 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7083 * lynx-low.c (lynx_resume): Use the resume_info parameter
7084 to determine the ptid for the lynx_ptrace call, unless
7085 it is equal to minus_one_ptid, in which case we use the
7086 ptid of the current_inferior.
7087 (lynx_wait_1): After having received a thread create/exit
7088 event, resume the inferior's execution using the signaling
7089 thread's ptid, rather than the old ptid.
7091 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7093 * lynx-low.c (lynx_resume): Delete variable ret.
7095 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7097 * gdbreplay.c (gdbreplay_version): Update copyright year.
7098 * server.c (gdbserver_version): Likewise.
7100 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7102 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7105 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7107 * lynx-low.c (ptrace_request_to_str): Add handling for
7110 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7112 * lynx-low.c (lynx_attach): Delete variable new_process.
7114 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7116 * lynx-low.c (lynx_create_inferior): Delete variable
7119 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7121 * lynx-low.c (ptrace_request_to_str): Do not handle
7122 PTRACE_GETTHREADLIST if this macro does not exist.
7124 2012-12-15 Yao Qi <yao@codesourcery.com>
7126 * Makefile.in (OBS): Add notif.o.
7127 * notif.c, notif.h: New.
7128 * server.c: Include "notif.h".
7129 (struct vstop_notif) <next>: Remove.
7131 (queue_stop_reply): Update.
7132 (push_event, send_next_stop_reply): Remove.
7133 (discard_queued_stop_replies): Update.
7134 (notif_stop): New variable.
7135 (handle_v_stopped): Remove.
7136 (handle_v_requests): Don't call handle_v_stopped. Call
7137 handle_ack_notif instead.
7138 (queue_stop_reply_callback): Call notif_event_enque instead
7139 of queue_stop_reply.
7140 (handle_status): Don't call send_next_stop_reply, call
7141 notif_write_event instead.
7142 (kill_inferior_callback): Likewise.
7143 (detach_or_kill_inferior_callback): Likewise.
7144 (main): Call initialize_notif.
7145 (process_serial_event): Call QUEUE_is_empty.
7146 (handle_target_event): Call notif_push instead of push event.
7147 * server.h (push_event): Remove declaration.
7149 2012-12-10 Tom Tromey <tromey@redhat.com>
7151 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7152 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7155 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7156 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7157 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7158 (amd64-linux-ipa.o, ax.o): Rewrite.
7159 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7160 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7161 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7162 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7163 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7164 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7165 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7166 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7167 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7168 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7169 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7170 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7171 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7172 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7173 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7174 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7175 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7176 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7177 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7178 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7179 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7180 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7181 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7182 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7183 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7184 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7185 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7186 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7187 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7188 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7189 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7190 (reg-tilegx.o): Remove.
7191 (all_object_files): New macro.
7192 Include .deps files.
7193 * aclocal.m4, configure: Rebuild.
7194 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7195 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7196 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7198 2012-12-05 Tom Tromey <tromey@redhat.com>
7201 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7203 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7205 * configure.ac: Check for linux/perf_event.h.
7206 * config.in: Regenerated.
7207 * configure: Regenerated.
7209 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7211 * hostio.c (handle_readlink): Decrease buffer size
7212 parameter passed to readlink by one byte.
7214 2012-11-26 Yao Qi <yao@codesourcery.com>
7216 * configure.ac (build_warnings): Append '-Wempty-body'.
7217 * configure: Regenerated.
7218 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7221 2012-11-15 Pierre Muller <muller@sourceware.org>
7223 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7224 * config.in: Regenerate.
7225 * configure: Regenerate.
7226 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7227 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7228 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7229 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7231 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7232 instead of <sys/wait.h> header.
7233 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7235 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7237 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7238 (various make rules): Remove -DGDBSERVER
7240 2012-11-09 Yao Qi <yao@codesourcery.com>
7242 * spu-low.c (current_ptid): Move it to ..
7243 * gdbthread.h: ... here. New.
7244 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7245 * server.c (myresume, process_serial_event): Likewise.
7246 * thread-db.c (thread_db_find_new_threads): Likewise.
7247 * tracepoint.c (run_inferior_command): Likewise.
7249 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7251 * server.c (handle_search_memory_1): Include access length in
7254 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7256 * linux-crisv32-low.c: Fix compile errors.
7258 2012-09-04 Yao Qi <yao@codesourcery.com>
7260 * tracepoint.c (cmd_qtsv): Adjust debug message.
7261 Don't check CUR_TPOINT.
7263 2012-08-28 Yao Qi <yao@codesourcery.com>
7265 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7266 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7267 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7268 Remove declarations of xmalloc, xreallloc, xstrdup and
7270 * Makefile.in (libiberty_h): New.
7271 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7272 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7274 2012-08-23 Yao Qi <yao@codesourcery.com>
7276 * server.h: Remove declaration of 'xsnprintf'.
7278 2012-08-22 Keith Seitz <keiths@redhat.com>
7280 * server.h: Include build-gnulib-gbserver/config.h.
7281 * gdbreplay.c: Likewise.
7283 2012-08-08 Doug Evans <dje@google.com>
7285 * Makefile.in (SFILES): Add gdb_vecs.c.
7286 (OBS): Add gdb_vecs.o.
7287 (gdb_vecs_h, host_defs_h): New variables.
7288 (thread-db.o): Add $(gdb_vecs_h) dependency.
7289 (gdb_vecs.o): New rule.
7290 * thread-db.c: #include "gdb_vecs.h".
7291 (thread_db_load_search): Use a vector to iterate over path elements.
7292 Handle text appearing after "$pdir".
7294 * configure.ac: Add check for strstr.
7295 * config.in: Regenerate.
7296 * configure: Regenerate.
7298 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7300 * hostio.c (handle_pread): If pread fails, fall back to attempting
7302 (handle_pwrite): Likewise for pwrite.
7304 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7306 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7307 between unsupported TYPE and unimplementable ADDR/LEN combination.
7308 (arm_insert_point): Act on new return value.
7310 2012-07-31 Pedro Alves <palves@redhat.com>
7312 * server.c (process_point_options): Only skip tokens if we find
7313 one that is unrecognized. Don't treat 'X' specially while
7314 skipping unrecognized tokens.
7316 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7318 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7319 to 4-byte-align HW breakpoint addresses for Thumb.
7321 2012-07-27 Yao Qi <yao@codesourcery.com>
7325 * server.h: Declare gdb_agent_about_to_close.
7326 * target.c (kill_inferior): Include "agent.h".
7327 New. Send command 'kill'.
7328 * target.h (kill_inferior): Removed macro.
7329 * tracepoint.c (gdb_agent_about_to_close): New.
7330 (gdb_agent_helper_thread): Handle command 'close'.
7331 Wait endlessly until the inferior stops.
7332 Install gdb_agent_remove_socket to atexit hook.
7333 (agent_socket_name): New static variable.
7334 (gdb_agent_socket_init): Replace local variable 'name' with
7335 'agent_socket_name'.
7336 (gdb_agent_remove_socket): New.
7338 2012-07-27 Yao Qi <yao@codesourcery.com>
7340 * server.c (process_point_options): Stop at 'X' when parsing.
7342 2012-07-19 Michael Eager <eager@eagercon.com>
7344 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7346 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7347 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7348 hardware breakpoint.
7350 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7352 * gdbserver/linux-low.c (initialize_low): Call
7353 linux_ptrace_init_warnings.
7355 2012-07-02 Doug Evans <dje@google.com>
7357 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7360 2012-07-02 Stan Shebs <stan@codesourcery.com>
7362 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7363 (ax.o): Add it to build rule.
7365 (OBS): Add format.o.
7366 (IPA_OBS): Add format.o.
7367 * server.c (handle_query): Claim support for breakpoint commands.
7368 (process_point_options): Add command case.
7369 (process_serial_event): Leave running if there are printfs in
7371 * mem-break.h (any_persistent_commands): Declare.
7372 (add_breakpoint_commands): Declare.
7373 (gdb_no_commands_at_breakpoint): Declare.
7374 (run_breakpoint_commands): Declare.
7375 * mem-break.c (struct point_command_list): New struct.
7376 (struct breakpoint): New field command_list.
7377 (any_persistent_commands): New function.
7378 (add_commands_to_breakpoint): New function.
7379 (add_breakpoint_commands): New function.
7380 (gdb_no_commands_at_breakpoint): New function.
7381 (run_breakpoint_commands): New function.
7382 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7384 * ax.c: Include format.h.
7385 (ax_printf): New function.
7386 (gdb_eval_agent_expr): Add printf opcode.
7388 2012-06-13 Yao Qi <yao@codesourcery.com>
7390 * server.c (start_inferior): Remove duplicated writes to fields
7391 'last_resume_kind' and 'last_status' of 'current_inferior'.
7393 2012-06-12 Yao Qi <yao@codesourcery.com>
7394 Pedro Alves <palves@redhat.com>
7396 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7398 * server.c (handle_v_cont): Extend comment.
7400 2012-06-11 Yao Qi <yao@codesourcery.com>
7402 * linux-low.c (linux_attach): Add 'static'.
7404 2012-06-06 Yao Qi <yao@codesourcery.com>
7406 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7408 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7410 Fix gcc -flto compilation warning.
7411 * server.c (main): Make variable multi_mode and attach volatile.
7413 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7415 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7416 if the platform doesn't know about it.
7418 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7420 * Makefile.in (SFILES): Add linux-tile-low.c.
7421 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7422 * configure.srv: Handle tilegx-*-linux*.
7423 * linux-tile-low.c: New file.
7425 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7427 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7429 2012-05-24 Pedro Alves <palves@redhat.com>
7433 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7435 2012-05-24 Pedro Alves <palves@redhat.com>
7439 Replace target_signal with gdb_signal throughout.
7441 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7443 * linux-low.c (linux_store_registers): Avoid the copying sequence
7444 when no data has been retrieved by ptrace.
7446 2012-05-22 Will Deacon <will.deacon@arm.com>
7448 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7449 Include asm/ptrace.h.
7450 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7453 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7455 * linux-low.c (linux_store_registers): Don't re-retrieve data
7456 with ptrace that has already been obtained from /proc. Always
7457 copy any data retrieved with ptrace to the buffer supplied.
7459 2012-05-11 Yao Qi <yao@codesourcery.com>
7460 Pedro Alves <palves@redhat.com>
7462 * linux-low.c (enum stopping_threads_kind): New.
7463 (stopping_threads): Change type to `enum stopping_threads_kind'.
7464 (handle_extended_wait): If stopping and suspending threads, leave
7465 the new_lwp suspended too.
7466 (linux_wait_for_event): Adjust.
7467 (stop_all_lwps): Set `stopping_threads' to
7468 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7469 whether we're suspending threads or just stopping them. Assert no
7472 2012-04-29 Yao Qi <yao@codesourcery.com>
7474 * server.h: Move some code to ...
7475 * gdbthread.h: ... here. New.
7476 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7477 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7478 (nto-low.o, win32-low.o): Likewise.
7479 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7480 * regcache.c, remote-utils.c, server.c: Likewise.
7481 * target.c, tracepoint.c, win32-low.c: Likewise.
7483 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7485 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7486 (PTRACE_ARG4_TYPE): Likewise.
7487 (PTRACE_XFER_TYPE): Likewise.
7488 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7489 ptrace to PTRACE_ARG3_TYPE.
7490 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7491 (PTRACE_ARG4_TYPE): Likewise.
7492 (PTRACE_XFER_TYPE): Likewise.
7493 (linux_detach_one_lwp): Cast fourth argument of
7494 ptrace to long then PTRACE_ARG4_TYPE.
7495 (regsets_fetch_inferior_registers): Cast third argument of
7496 ptrace to long then PTRACE_ARG3_TYPE.
7497 (regsets_store_inferior_registers): Likewise.
7499 2012-04-20 Pedro Alves <palves@redhat.com>
7501 * configure: Regenerate.
7503 2012-04-19 Pedro Alves <palves@redhat.com>
7505 * Makefile.in (GNULIB_BUILDDIR): New.
7506 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7507 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7508 (all, install-only, uninstall, clean-info, all-lib, clean): No
7509 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7510 (maintainer-clean realclean distclean): Use subdir_do.
7512 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7513 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7514 * acinclude.m4: Include acx_configure_dir.m4.
7515 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7516 calls. Call AC_PROG_RANLIB. Configure gnulib using
7519 (GNULIB_STDINT_H): Adjust.
7520 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7521 * gdbreplay.c: Include build-gnulib/config.h.
7522 * server.h: Likewise.
7523 * aclocal.m4: Regenerate.
7524 * config.in: Regenerate.
7525 * configure: Regenerate.
7527 2012-04-19 Pedro Alves <palves@redhat.com>
7529 * Makefile.in (LIBGNU, INCGNU): Adjust.
7530 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7531 (all, install-only, uninstall, clean-info, all-lib, clean)
7532 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7533 * configure.ac: Adjust AC_OUTPUT output.
7534 * aclocal.m4: Regenerate.
7535 * configure: Regenerate.
7537 2012-04-19 Pedro Alves <palves@redhat.com>
7539 * Makefile.in (generated_files): New.
7540 (server_h): Remove the explicit dependency on config.h, and depend
7541 on $generated_files.
7543 2012-04-19 Pedro Alves <palves@redhat.com>
7545 * Makefile.in (INCGNU): Add -Ignulib.
7547 2012-04-19 Pedro Alves <palves@redhat.com>
7549 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7550 (INCGNU): ... this, and spell out -I here.
7551 (GNULIB_LIB): Rename to ...
7553 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7555 2012-04-19 Pedro Alves <palves@redhat.com>
7557 * config.in: Regenerate.
7559 2012-04-19 Pedro Alves <palves@redhat.com>
7561 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7562 * server.h (memmem): Remove declaration.
7563 * config.in: Regenerate.
7564 * configure: Regenerate.
7566 2012-04-19 Yao Qi <yao@codesourcery.com>
7568 * Makefile.in (SFILES): Add common/vec.c.
7572 2012-04-19 Yao Qi <yao@codesourcery.com>
7574 * remote-utils.c (prepare_resume_reply): Replace with macro
7575 target_core_of_thread.
7576 * server.c (handle_qxfer_threads_proper): Likewise.
7577 * target.h (traget_core_of_thread): New macro.
7579 2012-04-18 Pedro Alves <palves@redhat.com>
7581 * aclocal.m4: Regenerate.
7582 * configure: Regenerate.
7584 2012-04-16 Yao Qi <yao@codesourcery.com>
7586 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7587 duplicated on address.
7589 2012-04-16 Yao Qi <yao@codesourcery.com>
7591 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7592 (struct tracepoint_action_ops) <send>: New field.
7593 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7594 (agent_expr_send, x_tracepoint_action_send): New.
7595 (l_tracepoint_action_send): New.
7596 (cmd_qtdp): Download and install tracepoint
7597 according to `use_agent'.
7598 (run_inferior_command): Add one more parameter `len'.
7600 (tracepoint_send_agent): New.
7601 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7603 2012-04-16 Yao Qi <yao@codesourcery.com>
7605 * tracepoint.c (download_tracepoints): Moved to ...
7606 (cmd_qtstart): ... here.
7608 2012-04-14 Yao Qi <yao@codesourcery.com>
7610 * tracepoint.c: Include inttypes.h.
7611 (struct collect_memory_action): Use sized types.
7612 (struct tracepoint): Likewise.
7613 (cmd_qtdp, stop_tracing): Update print specifiers.
7614 (cmd_qtp, response_tracepoint): Likewise.
7615 (collect_data_at_tracepoint): Likewise.
7616 (collect_data_at_step): Likewise.
7618 2012-04-14 Yao Qi <yao@codesourcery.com>
7620 Import gnulib module inttypes.
7621 * aclocal.m4, config.in, configure: Regenerated.
7623 2012-04-14 Yao Qi <yao@codesourcery.com>
7625 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7626 Makefile and config.status at last.
7628 2012-04-13 Yao Qi <yao@codesourcery.com>
7630 * tracepoint.c: Include stdint.h unconditionally.
7632 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7634 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7635 on BFD_HAVE_SYS_PROCFS_TYPE.
7636 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7637 * configure: Regenerate.
7638 * config.in: Likewise.
7640 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7642 * Makefile.in (clean): Also remove x32.c x32-linux.c
7643 x32-avx.c x32-avx-linux.c.
7644 (x32.o): New target.
7646 (x32-linux.o): Likewise.
7647 (x32-linux.c): Likewise.
7648 (x32-avx.o): Likewise.
7649 (x32-avx.c): Likewise.
7650 (x32-avx-linux.o): Likewise.
7651 (x32-avx-linux.c): Likewise.
7653 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7654 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7655 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7656 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7657 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7658 i386/x32-avx-linux.xml.
7660 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7661 (init_registers_x32_avx_linux): Likwise.
7662 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7663 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7665 2012-04-13 Pedro Alves <palves@redhat.com>
7667 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7668 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7669 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7670 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7673 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7675 * linux-x86-low.c (compat_x32_clock_t): New.
7676 (compat_x32_siginfo_t): Likewise.
7677 (compat_x32_siginfo_from_siginfo): Likewise.
7678 (siginfo_from_compat_x32_siginfo): Likewise.
7679 (linux_is_elf64): Likewise.
7680 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7681 and siginfo_from_compat_x32_siginfo for x32.
7682 (x86_arch_setup): Set linux_is_elf64.
7684 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7687 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7689 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7690 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7691 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7692 compatible with process.
7694 2012-04-12 Yao Qi <yao@codesourcery.com>
7696 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7697 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7698 (install-only, install-info, clean): Handle sub dir gnulib.
7699 (all-lib, am--refresh): New targets.
7700 (memmem.o): Remove target.
7701 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7702 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7703 (AC_REPLACE_FUNCS): Remove memmem.
7704 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7705 (AC_OUTPUT): Generate Makefile in gnulib/.
7706 * aclocal.m4, config.in, configure: Regenerated.
7708 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7710 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7712 2012-04-05 Pedro Alves <palves@redhat.com>
7714 -Werror=strict-aliasing
7716 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7719 2012-04-04 Pedro Alves <palves@redhat.com>
7721 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7722 (sparc_store_gregset_from_stack, sparc_store_gregset)
7723 (sparc_breakpoint_at): Fix formatting.
7725 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7727 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7729 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7730 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7731 * config.in: Regenerate.
7732 * configure: Likewise.
7734 2012-03-29 Pedro Alves <palves@redhat.com>
7736 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7737 Correct ptrace arguments.
7739 2012-03-28 Pedro Alves <palves@redhat.com>
7741 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7742 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7743 (IA64_FR1_REGNUM): New defines.
7744 (ia64_fetch_register): New.
7745 (the_low_target): Install it.
7746 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7748 * linux-low.c (linux_fetch_registers): Try the
7749 the_low_target.fetch_register hook first.
7751 * linux-arm-low.c (the_low_target): Adjust.
7752 * linux-bfin-low.c (the_low_target): Adjust.
7753 * linux-cris-low.c (the_low_target): Adjust.
7754 * linux-crisv32-low.c (the_low_target): Adjust.
7755 * linux-m32r-low.c (the_low_target): Adjust.
7756 * linux-m68k-low.c (the_low_target): Adjust.
7757 * linux-mips-low.c (the_low_target): Adjust.
7758 * linux-ppc-low.c (the_low_target): Adjust.
7759 * linux-s390-low.c (the_low_target): Adjust.
7760 * linux-sh-low.c (the_low_target): Adjust.
7761 * linux-sparc-low.c (the_low_target): Adjust.
7762 * linux-tic6x-low.c (the_low_target): Adjust.
7763 * linux-x86-low.c (the_low_target): Adjust.
7764 * linux-xtensa-low.c (the_low_target): Adjust.
7766 2012-03-26 Pedro Alves <palves@redhat.com>
7768 * server.c (handle_qxfer_libraries): Don't bail early if
7769 the_target->qxfer_libraries_svr4 is not NULL.
7771 2012-03-26 Pedro Alves <palves@redhat.com>
7773 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7775 2012-03-23 Pedro Alves <palves@redhat.com>
7777 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7778 "library-list-svr4" element's start tag when the the DSO list is
7781 2012-03-23 Pedro Alves <palves@redhat.com>
7783 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7784 a variable whose type size is the same as the inferior's pointer
7787 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7789 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7791 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7792 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7793 * linux-low.h: Include <signal.h>.
7794 (struct siginfo): Remove forward declaration.
7795 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7798 2012-03-21 Mike Frysinger <vapier@gentoo.org>
7800 * .gitignore: Ignore more files.
7802 2012-03-19 Pedro Alves <palves@redhat.com>
7803 Jan Kratochvil <jan.kratochvil@redhat.com>
7805 * server.c (cont_thread, general_thread): Add describing comments.
7806 (start_inferior): Clear `cont_thread'.
7807 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7810 2012-03-15 Yao Qi <yao@codesourcery.com>
7812 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7814 (cmd_qtdp): ... here.
7816 2012-03-15 Yao Qi <yao@codesourcery.com>
7818 * tracepoint.c (struct tracepoint_action_ops): New.
7819 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7820 (m_tracepoint_action_download): New.
7821 (r_tracepoint_action_download): New.
7822 (x_tracepoint_action_download): New.
7823 (l_tracepoint_action_download): New.
7824 (add_tracepoint_action): Install `action->ops' according type.
7825 (download_tracepoint_1): Move code `download' function pointer
7826 of various tracepoint_action_ops.
7828 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7830 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7831 linux_ptrace_attach_warnings.
7833 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7835 * Makefile.in (linux-ptrace.o): New.
7836 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7837 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7838 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7839 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7840 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7842 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7844 2012-03-08 Yao Qi <yao@codesourcery.com>
7845 Pedro Alves <palves@redhat.com>
7847 Fix PR server/13392.
7848 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7850 * tracepoint.c (remove_tracepoint): New.
7851 (cmd_qtdp): Call remove_tracepoint when failed to install.
7853 2012-03-07 Pedro Alves <palves@redhat.com>
7855 * linux-low.c (get_detach_signal): New.
7856 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7857 Pass on pending signals to PTRACE_DETACH. Check the result of the
7859 * server.c (program_signals, program_signals_p): New.
7860 (handle_general_set): Handle QProgramSignals.
7861 * server.h (program_signals, program_signals_p): Declare.
7863 2012-03-05 Pedro Alves <palves@redhat.com>
7864 Jan Kratochvil <jan.kratochvil@redhat.com>
7866 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7869 2012-03-03 Yao Qi <yao@codesourcery.com>
7871 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7872 agent_look_up_symbols.
7874 2012-03-03 Yao Qi <yao@codesourcery.com>
7876 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7877 (linux-x86-low.o): Likewise.
7878 * server.h: Remove in_process_agent_loaded.
7879 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7883 2012-03-03 Yao Qi <yao@codesourcery.com>
7885 * tracepoint.c (gdb_agent_capability): New global.
7886 (in_process_agent_loaded_ust): Renamed to
7887 `in_process_agent_supports_ust'.
7889 (in_process_agent_supports_ust): Call agent_capability_check.
7890 (clear_installed_tracepoints): Assert that agent supports
7893 2012-03-03 Yao Qi <yao@codesourcery.com>
7895 * linux-low.c (linux_supports_agent): New.
7896 (linux_target_ops): Initialize field `supports_agent' with
7897 linux_supports_agent.
7898 * target.h (struct target_ops) <supports_agent>: New.
7899 (target_supports_agent): New macro.
7900 * server.c (handle_general_set): Handle packet 'QAgent'.
7901 (handle_query): Send `QAgent+'.
7902 * Makefile.in (server.o): Depends on agent.h.
7904 2012-03-03 Yao Qi <yao@codesourcery.com>
7906 * Makefile.in (OBS): Add agent.o.
7907 Add new rule for agent.o.
7908 Track dependence of tracepoint.c on agent.h.
7909 * tracepoint.c (run_inferior_command_1):
7910 (run_inferior_command): Call agent_run_command.
7911 (gdb_ust_connect_sync_socket): Deleted. Move it to
7913 (resume_thread, stop_thread): Likewise.
7914 (gdb_ust_socket_init): Renamed to ...
7915 (gdb_agent_socket_init): ... New.
7916 (gdb_ust_thread): Renamed to ...
7917 (gdb_agent_helper_thread): ... New.
7918 (gdb_ust_init): Move some code to ...
7919 (gdb_agent_init): ... here. New.
7920 [HAVE_UST]: Call gdb_ust_init.
7921 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7922 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7923 * config.in, configure: Regenerated.
7925 2012-03-02 Pedro Alves <palves@redhat.com>
7927 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7928 * linux-low.c (struct simple_pid_list): New.
7929 (stopped_pids): New a struct simple_pid_list pointer.
7930 (add_to_pid_list, pull_pid_from_list): New.
7931 (handle_extended_wait): Don't assume the first signal new children
7932 report is SIGSTOP. Adjust call to pull_pid_from_list.
7933 (linux_wait_for_lwp): Adjust.
7935 2012-03-02 Yao Qi <yao@codesourcery.com>
7937 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7940 2012-03-02 Yao Qi <yao@codesourcery.com>
7942 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7943 `stop_pc' and `tpoint'. Update caller.
7945 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7947 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7948 * linux-low.c (use_linux_regsets): New macro.
7949 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7950 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7951 (linux_register_in_regsets): New function.
7952 (usr_fetch_inferior_registers): Skip registers covered by
7954 (usr_store_inferior_registers): Likewise.
7955 (usr_fetch_inferior_registers): New macro.
7956 (usr_store_inferior_registers): Likewise.
7957 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7958 (linux_store_registers): Likewise.
7959 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7961 (init_registers_mips64_dsp_linux): Likewise.
7962 (init_registers_mips_linux): New macro.
7963 (init_registers_mips_dsp_linux): Likewise.
7964 (mips_dsp_num_regs): Likewise.
7965 (DSP_BASE, DSP_CONTROL): New fallback macros.
7966 (mips_base_regs): New macro.
7967 (mips_regmap): Use it. Fix the size.
7968 (mips_dsp_regmap): New variable.
7969 (mips_dsp_regset_bitmap): Likewise.
7970 (mips_arch_setup): New function.
7971 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7973 (mips_cannot_store_register): Likewise.
7974 (the_low_target): Update .arch_setup, .num_regs and .regmap
7975 initializers. Add .regset_bitmap initializer.
7976 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7978 * linux-bfin-low.c (the_low_target): Likewise.
7979 * linux-cris-low.c (the_low_target): Likewise.
7980 * linux-crisv32-low.c (the_low_target): Likewise.
7981 * linux-ia64-low.c (the_low_target): Likewise.
7982 * linux-m32r-low.c (the_low_target): Likewise.
7983 * linux-m68k-low.c (the_low_target): Likewise.
7984 * linux-ppc-low.c (the_low_target): Likewise.
7985 * linux-s390-low.c (the_low_target): Likewise.
7986 * linux-sh-low.c (the_low_target): Likewise.
7987 * linux-sparc-low.c (the_low_target): Likewise.
7988 * linux-tic6x-low.c (the_low_target): Likewise.
7989 * linux-x86-low.c (the_low_target): Likewise.
7990 * linux-xtensa-low.c (the_low_target): Likewise.
7991 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7992 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7993 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7995 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7996 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7998 2012-02-29 Yao Qi <yao@codesourcery.com>
7999 Pedro Alves <palves@redhat.com>
8001 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8002 `step_over_finished' is true.
8004 2012-02-27 Pedro Alves <palves@redhat.com>
8006 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8007 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8009 2012-02-27 Pedro Alves <palves@redhat.com>
8012 * linux-low.c (pid_is_stopped): New.
8013 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8015 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8017 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8020 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8022 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8024 2012-02-24 Luis Machado <lgustavo@codesourcery>
8026 * server.c (handle_query): Advertise support for target-side
8027 breakpoint condition evaluation.
8028 (process_point_options): New function.
8029 (process_serial_event): When inserting a breakpoint, check for
8030 a target-side condition that should be evaluated.
8032 * mem-break.c: Include regcache.h and ax.h.
8033 (point_cond_list_t): New data structure.
8034 (breakpoint) <cond_list>: New field.
8035 (find_gdb_breakpoint_at): Make non-static.
8036 (delete_gdb_breakpoint_at): Clear any target-side
8038 (clear_gdb_breakpoint_conditions): New function.
8039 (add_condition_to_breakpoint): Likewise.
8040 (add_breakpoint_condition): Likewise.
8041 (gdb_condition_true_at_breakpoint): Likewise.
8042 (gdb_breakpoint_here): Return result directly instead
8043 of going through a local variable.
8045 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8046 (clear_gdb_breakpoint_conditions): Likewise.
8047 (add_breakpoint_condition): Likewise.
8048 (gdb_condition_true_at_breakpoint): Likewise.
8050 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8051 (need_step_over_p): Take target-side breakpoint condition into
8054 2012-02-24 Luis Machado <lgustavo@codesourcery>
8056 * server.h: Include tracepoint.h.
8057 (agent_mem_read, agent_get_trace_state_variable_value,
8058 agent_set_trace_state_variable_value,
8059 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8060 get_set_tsv_func_addr): New prototypes.
8062 * ax.h: New include file.
8063 * ax.c: New source file.
8065 * tracepoint.c: Include ax.h.
8066 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8067 agent_expr, eval_result_type): Move to ax.h.
8068 (parse_agent_expr): Rename to ...
8069 (gdb_parse_agent_expr): ... this, make it non-static and move
8071 (unparse_agent_expr) Rename to ...
8072 (gdb_unparse_agent_expr): ... this, make it non-static and move
8074 (eval_agent_expr): Rename to ...
8075 (eval_tracepoint_agent_expr): ... this.
8076 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8077 forward declarations.
8078 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8079 (agent_get_trace_state_variable_value): New function.
8080 (agent_set_trace_state_variable_value): New function.
8081 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8082 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8083 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8084 (condition_true_at_tracepoint): Likewise.
8085 (parse_agent_expr): Rename to ...
8086 (gdb_parse_agent_expr): ... this and move to ax.c.
8087 (unparse_agent_expr): Rename to ...
8088 (gdb_unparse_agent_expr): ... this and move to ax.c.
8089 (gdb_agent_op_name): Move to ax.c.
8090 (eval_agent_expr): Rename to ...
8091 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8093 (eval_tracepoint_agent_expr): New function.
8094 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8096 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8098 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8099 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8100 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8101 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8102 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8103 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8104 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8105 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8106 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8107 (compile_bytecodes): Remove forward declaration.
8108 (is_goto_target): Move to ax.c.
8109 (compile_bytecodes): Move to ax.c and call
8110 agent_get_trace_state_variable_value (...) and
8111 agent_set_trace_state_variable_value (...).
8113 * Makefile.in: Update ax.c and IPA dependencies.
8115 2012-02-24 Pedro Alves <palves@redhat.com>
8117 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8118 (cmd_bigqtbuffer_circular): ... this. Only handle
8119 'QTBuffer:circular:'.
8120 (handle_tracepoint_general_set): Adjust.
8122 2012-02-16 Yao Qi <yao@codesourcery.com>
8124 * inferiors.c: Move code to ...
8125 * dll.c: .... here. New.
8126 * server.h: Declare clear_dlls.
8127 * Makefile.in (SFILES): Add dll.c.
8131 2012-02-11 Yao Qi <yao@codesourcery.com>
8133 * server.c: (handle_monitor_command): Add a new parameter
8135 (handle_query): Update caller.
8137 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8139 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8140 * configure, config.in: Regenerate.
8141 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8144 2012-02-02 Pedro Alves <palves@redhat.com>
8146 Try SIGKILL first, then PTRACE_KILL.
8147 * linux-low.c (linux_kill_one_lwp): New.
8148 (linux_kill_one_lwp): Rename to ...
8149 (kill_one_lwp_callback): ... this. Use the new
8152 2012-02-02 Pedro Alves <palves@redhat.com>
8154 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8157 2012-01-27 Pedro Alves <palves@redhat.com>
8159 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8160 (elf_64_file_p): Make static.
8161 (linux_pid_exe_is_elf_64_file): New.
8162 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8163 Delete declarations.
8164 (linux_pid_exe_is_elf_64_file): Declare.
8165 * linux-x86-low.c (x86_arch_setup): Use
8166 linux_pid_exe_is_elf_64_file.
8168 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8170 * linux-low.c (linux_wait_for_event_1): Rename to ...
8171 (linux_wait_for_event): ... here and merge it with former
8172 linux_wait_for_event - new variable wait_ptid, use it.
8173 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8175 2012-01-23 Pedro Alves <palves@redhat.com>
8177 * server.c (main): Avoid yet another case of infinite loop while
8178 detaching/killing after a longjmp.
8180 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8183 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8185 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8187 * hostio.c (handle_readlink): New function.
8188 (handle_vFile): Call it to handle "vFile:readlink" packets.
8190 2012-01-20 Pedro Alves <palves@redhat.com>
8191 Ulrich Weigand <ulrich.weigand@linaro.org>
8193 * server.c (handle_v_requests): Only support vAttach and vRun to
8194 start multiple processes when in extended protocol mode.
8196 2012-01-17 Pedro Alves <palves@redhat.com>
8198 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8199 memalign plus mprotect to allocate the scratch buffer.
8201 2012-01-13 Pedro Alves <palves@redhat.com>
8203 * server.c (attach_inferior): Clear `cont_thread'.
8205 2012-01-13 Pedro Alves <palves@redhat.com>
8207 * server.c (main): Avoid infinite loop while detaching/killing
8210 2012-01-09 Doug Evans <dje@google.com>
8212 * server.c (start_inferior): Set last_ptid in --wrapper case.
8214 2012-01-06 Yao Qi <yao@codesourcery.com>
8216 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8218 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8220 2012-01-04 Yao Qi <yao@codesourcery.com>
8222 * tracepoint.c (cmd_qtdp): Print debug message
8223 for static tracepoint.
8225 2012-01-04 Yao Qi <yao@codesourcery.com>
8227 * tracepoint.c (trace_vdebug): Differentiate debug message
8228 between gdbserver and IPA.
8230 2012-01-03 Yao Qi <yao@codesourcery.com>
8232 * tracepoint.c (tracepoint_was_hit): Don't collect for
8235 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8237 * terminal.h: Reformat copyright header.
8239 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8241 * server.c (gdbserver_version): Update copyright year.
8242 * gdbreplay.c (gdbreplay_version): Likewise.
8244 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8246 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8249 2011-12-18 Hui Zhu <teawater@gmail.com>
8250 * linux-low.c (linux_create_inferior): Save return value to ret.
8252 2011-12-18 Hui Zhu <teawater@gmail.com>
8254 * linux-low.c (linux_create_inferior): Save return value to ret.
8256 2011-12-16 Doug Evans <dje@google.com>
8258 * linux-low.c (linux_create_inferior): If stdio connection,
8259 redirect stdin from /dev/null, stdout to stderr.
8260 * remote-utils.c (remote_is_stdio): New static global.
8261 (remote_connection_is_stdio): New function.
8262 (remote_prepare): Handle stdio connection.
8263 (remote_open): Ditto.
8264 (remote_close): Don't close stdin for stdio connections.
8265 (read_prim,write_prim): New functions. Replace all calls to
8266 read/write to these.
8267 * server.c (main): Watch for "-" argument. Move call to
8268 remote_prepare before start_inferior.
8269 * server.h (STDIO_CONNECTION_NAME): New macro.
8270 (remote_connection_is_stdio): Declare.
8272 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8273 in debugging output.
8275 2011-12-15 Yao Qi <yao@codesourcery.com>
8277 * tracepoint.c: Include sys/syscall.h.
8278 (gdb_ust_thread): Remove preprocessor conditional.
8280 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8282 * linux-low.c (linux_detach_one_lwp): Call
8283 the_low_target.prepare_to_resume before detaching.
8285 2011-12-14 Yao Qi <yao@codesourcery.com>
8287 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8290 2011-12-14 Yao Qi <yao@codesourcery.com>
8292 * i386-low.c (i386_low_stopped_data_address): Initialize local
8295 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8299 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8300 DR_CONTROL unless necessary. Extend comments.
8301 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8302 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8304 2011-12-13 Yao Qi <yao@codesourcery.com>
8306 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8308 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8310 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8312 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8313 Print new debug message for such case.
8315 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8317 Fix overlapping memcpy.
8318 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8319 the read_inferior_memory transfer.
8320 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8321 write_inferior_memory transfer.
8322 (set_fast_tracepoint_jump): New variable buf. Use it for the
8323 read_inferior_memory and write_inferior_memory transfers.
8324 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8325 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8326 Use it for the write_inferior_memory transfer.
8327 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8330 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8332 * linux-low.c (fetch_register, store_register): Make code
8333 consistent, fix formatting.
8335 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8337 * linux-low.c (usr_store_inferior_registers): Factor out code
8338 to handle individual registers into...
8339 (store_register): ... this new function.
8341 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8343 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8344 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8345 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8346 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8347 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8348 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8349 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8350 (srv_xmlfiles): Add new XML files.
8352 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8354 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8355 (init_registers_s390_linux32v1): Add prototype.
8356 (init_registers_s390_linux32v2): Likewise.
8357 (init_registers_s390_linux64v1): Likewise.
8358 (init_registers_s390_linux64v2): Likewise.
8359 (init_registers_s390x_linux64v1): Likewise.
8360 (init_registers_s390x_linux64v2): Likewise.
8361 (s390_num_regs): Increment to 52.
8362 (s390_regmap): Add orig_r2 register.
8363 (s390_num_regs_3264): Increment to 68.
8364 (s390_regmap_3264): Add orig_r2 register.
8365 (s390_collect_ptrace_register): Handle orig_r2 register.
8366 (s390_supply_ptrace_register): Likewise.
8367 (s390_fill_last_break): New function.
8368 (s390_store_last_break): Likewise.
8369 (s390_fill_system_call): New function.
8370 (s390_store_system_call): Likewise.
8371 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8373 (s390_check_regset): New function.
8374 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8375 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8376 Update target_regsets for available register sets.
8378 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8379 Jan Kratochvil <jan.kratochvil@redhat.com>
8381 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8382 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8384 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8385 * linux-low.h (struct process_info_private): New member r_debug.
8386 * server.c (handle_qxfer_libraries): Call
8387 the_target->qxfer_libraries_svr4.
8388 (handle_qxfer_libraries_svr4): New function.
8389 (qxfer_packets): New entry "libraries-svr4".
8390 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8391 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8392 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8393 PACKET_qXfer_libraries_svr4.
8395 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8397 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8398 PSW address/mask between 8-byte and 16-byte formats.
8399 (s390_supply_ptrace_register): Likewise.
8400 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8401 basic addressing mode bit.
8403 2011-11-24 Stan Shebs <stan@codesourcery.com>
8405 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8407 2011-11-17 Stan Shebs <stan@codesourcery.com>
8409 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8410 (tracing_start_time): New global.
8411 (tracing_stop_time): New global.
8412 (tracing_user_name): New global.
8413 (tracing_notes): New global.
8414 (tracing_stop_note): New global.
8415 (cmd_qtstart): Set traceframe_usage, start_time.
8416 (stop_tracing): Set stop_time.
8417 (cmd_qtstatus): Report additional status.
8418 (cmd_qtp): New function.
8419 (handle_tracepoint_query): Call it.
8420 (cmd_qtnotes): New function.
8421 (handle_tracepoint_general_set): Call it.
8422 (get_timestamp): Rename from tsv_get_timestamp.
8424 2011-11-14 Stan Shebs <stan@codesourcery.com>
8425 Kwok Cheung Yeung <kcy@codesourcery.com>
8427 * linux-x86-low.c (small_jump_insn): New.
8428 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8429 trampoline and error message, build a trampoline and issue a small
8430 jump instruction to it.
8431 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8432 trampoline and error message.
8433 (x86_get_min_fast_tracepoint_insn_len): New.
8434 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8435 * linux-low.h (struct linux_target_ops): Add arguments to
8436 install_fast_tracepoint_jump_pad operation, add new operation.
8437 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8439 (linux_get_min_fast_tracepoint_insn_len): New function.
8440 (linux_target_op): Add new operation.
8441 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8442 (gdb_trampoline_buffer_end): Ditto.
8443 (gdb_trampoline_buffer_error): Ditto.
8444 (struct ipa_sym_addresses): Add fields for new IPA variables.
8445 (symbol_list): Add entries for new IPA variables.
8446 (struct tracepoint): Add fields to hold the address range of the
8447 trampoline used by the tracepoint.
8448 (trampoline_buffer_head): New static variable.
8449 (trampoline_buffer_tail): Ditto.
8450 (claim_trampoline_space): New function.
8451 (have_fast_tracepoint_trampoline_buffer): New function.
8452 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8454 (install_fast_tracepoint): Ditto, also add error buffer argument.
8455 (cmd_qtminftpilen): New function.
8456 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8457 (fast_tracepoint_from_trampoline_address): New function.
8458 (fast_tracepoint_collecting): Handle trampoline as part of jump
8460 (set_trampoline_buffer_space): New function.
8461 (initialize_tracepoint): Initialize new IPA variables.
8462 * target.h (struct target_ops): Add arguments to
8463 install_fast_tracepoint_jump_pad operation, add new
8464 get_min_fast_tracepoint_insn_len operation.
8465 (target_get_min_fast_tracepoint_insn_len): New.
8466 (install_fast_tracepoint_jump_pad): Add arguments.
8467 * server.h (IPA_BUFSIZ): Define.
8468 * linux-i386-ipa.c: Include extra header files.
8469 (initialize_fast_tracepoint_trampoline_buffer): New function.
8470 (initialize_low_tracepoint): Call it.
8471 * server.h (set_trampoline_buffer_space): Declare.
8472 (claim_trampoline_space): Ditto.
8473 (have_fast_tracepoint_trampoline_buffer): Ditto.
8475 2011-11-14 Yao Qi <yao@codesourcery.com>
8477 * server.c (handle_query): Handle InstallInTrace for qSupported.
8478 * tracepoint.c (add_tracepoint): Sort list.
8479 (install_tracepoint, download_tracepoint): New.
8480 (cmd_qtdp): Call them to install and download tracepoints.
8481 (sort_tracepoints): Removed.
8482 (cmd_qtstart): Update.
8484 2011-11-14 Yao Qi <yao@codesourcery.com>
8486 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8487 * mem-break.h: Declare.
8488 * tracepoint.c (cmd_qtstart): Move some code to ...
8489 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8491 (download_tracepoints): Move some code to ...
8492 (download_tracepoint_1): ... here. New.
8494 2011-11-08 Yao Qi <yao@codesourcery.com>
8496 * remote-utils.c (relocate_instruction): A comment fix.
8498 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8500 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8501 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8502 dr_status_mirror and dr_control_mirror from debug_reg_state.
8503 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8504 (i386_initial_stuff): Remove use of deleted globals.
8505 (i386_get_thread_context, i386_set_thread_context,
8506 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8507 from debug_reg_state.
8509 2011-11-05 Yao Qi <yao@codesourcery.com>
8511 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8512 address as TPOINT's.
8514 2011-11-02 Stan Shebs <stan@codesourcery.com>
8516 * tracepoint.c (agent_mem_read_string): New function.
8517 (eval_agent_expr): Call it for tracenz.
8518 * server.c (handle_query): Report support for tracenz.
8520 2011-11-02 Yao Qi <yao@codesourcery.com>
8522 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8524 2011-11-02 Yao Qi <yao@codesourcery.com>
8526 * target.h: Fix a typo in comment.
8528 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8530 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8531 clobber the breakpoints' shadows with fast tracepoint jumps.
8532 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8533 * target.c (write_inferior_memory): Also pass MYADDR down to
8536 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8538 * configure.ac: Check support for personality routine.
8539 * configure: Regenerate.
8540 * config.in: Likewise.
8541 * linux-low.c: Include <sys/personality.h>.
8542 Define ADDR_NO_RANDOMIZE if necessary.
8543 (linux_create_inferior): Disable address space randomization when
8544 forking inferior, if requested.
8545 (linux_supports_disable_randomization): New function.
8546 (linux_target_ops): Install it.
8547 * server.h (disable_randomization): Declare.
8548 * server.c (disable_randomization): New global variable.
8549 (handle_general_set): Handle QDisableRandomization.
8550 (handle_query): Likewise for qSupported.
8551 (main): Support --disable-randomization and --no-disable-randomization
8552 command line arguments.
8553 * target.h (struct target_ops): Add supports_disable_randomization.
8554 (target_supports_disable_randomization): New macro.
8556 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8558 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8560 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8561 [!PT_GETDSBT] (target_loadmap): New definition.
8562 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8563 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8564 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8565 and PT_GETDSBT to LINUX_LOADMAP.
8566 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8567 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8569 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8571 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8572 (arm_linux_hwbp_cap): New static variable.
8573 (arm_linux_get_hwbp_cap): Replace by ...
8574 (arm_linux_init_hwbp_cap): ... this new function.
8575 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8576 (arm_linux_get_hw_watchpoint_count): Likewise.
8577 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8578 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8579 (arm_prepare_to_resume): Use perror_with_name instead of error.
8581 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8583 * linux-arm-low.c: Include <signal.h>.
8584 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8585 (struct arm_linux_hwbp_cap): New data type.
8586 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8587 (struct arm_linux_hw_breakpoint): New data type.
8588 (MAX_BPTS, MAX_WPTS): Define.
8589 (struct arch_process_info, struct arch_lwp_info): New data types.
8590 (arm_linux_get_hwbp_cap): New function.
8591 (arm_linux_get_hw_breakpoint_count): Likewise.
8592 (arm_linux_get_hw_watchpoint_count): Likewise.
8593 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8594 (arm_hwbp_control_initialize): Likewise.
8595 (arm_hwbp_control_is_enabled): Likewise.
8596 (arm_hwbp_control_is_initialized): Likewise.
8597 (arm_hwbp_control_disable): Likewise.
8598 (arm_linux_hw_breakpoint_equal): Likewise.
8599 (arm_linux_hw_point_initialize): Likewise.
8600 (struct update_registers_data): New data structure.
8601 (update_registers_callback: New function.
8602 (arm_insert_point): Likewise.
8603 (arm_remove_point): Likewise.
8604 (arm_stopped_by_watchpoint): Likewise.
8605 (arm_stopped_data_address): Likewise.
8606 (arm_new_process): Likewise.
8607 (arm_new_thread): Likewise.
8608 (arm_prepare_to_resume): Likewise.
8609 (the_low_target): Register arm_insert_point, arm_remove_point,
8610 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8611 arm_new_thread, and arm_prepare_to_resume.
8613 2011-09-15 Stan Shebs <stan@codesourcery.com>
8615 * server.h (struct emit_ops): Add compare-goto fields.
8616 * tracepoint.c (gdb_agent_op_sizes): New table.
8617 (emit_eq_goto): New function.
8618 (emit_ne_goto): New function.
8619 (emit_lt_goto): New function.
8620 (emit_le_goto): New function.
8621 (emit_gt_goto): New function.
8622 (emit_ge_goto): New function.
8623 (is_goto_target): New function.
8624 (compile_bytecodes): Recognize special cases of compare-goto
8625 combinations and call specialized emitters for them.
8626 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8627 (amd64_emit_ne_goto): New function.
8628 (amd64_emit_lt_goto): New function.
8629 (amd64_emit_le_goto): New function.
8630 (amd64_emit_gt_goto): New function.
8631 (amd64_emit_ge_goto): New function.
8632 (amd64_emit_ops): Add the new functions.
8633 (i386_emit_eq_goto): New function.
8634 (i386_emit_ne_goto): New function.
8635 (i386_emit_lt_goto): New function.
8636 (i386_emit_le_goto): New function.
8637 (i386_emit_gt_goto): New function.
8638 (i386_emit_ge_goto): New function.
8639 (i386_emit_ops): Add the new functions.
8641 2011-09-08 Stan Shebs <stan@codesourcery.com>
8643 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8644 (i386_emit_epilogue): Restore %ebx.
8646 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8648 * server.c (step_thread): Remove definition.
8649 (process_serial_event): Don't handle Hs.
8650 * server.h (step_thread): Remove declaration.
8651 * target.c (set_desired_inferior): Remove use of step_thread.
8653 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8655 * linux-low.c: Include linux-procfs.h.
8656 (linux_attach_lwp_1): Update comments.
8657 (linux_attach): Scan for existing threads when attaching to a
8658 process that is the tgid.
8659 * Makefile.in: Update dependencies.
8661 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8663 * configure.srv: Add linux-procfs.o dependencies.
8665 2011-08-14 Yao Qi <yao@codesourcery.com>
8667 * target.h (struct target_ops): Fix indent.
8668 * win32-low.c (win32_target_ops): Fix comment.
8670 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8671 Yao Qi <yao@codesourcery.com>
8673 * Makefile.in (clean): Remove tic6x-*.c files.
8674 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8675 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8676 (tic6x-c64xp-linux.c): Likewise.
8677 * configure.srv: Add support for tic6x-*-uclinux.
8678 * linux-tic6x-low.c: New.
8679 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8681 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8682 Yao Qi <yao@codesourcery.com>
8684 * target.h (struct target_ops): Add read_loadmap.
8685 * linux-low.c (struct target_loadseg): New type.
8686 (struct target_loadmap): New type.
8687 (linux_read_loadmap): New function.
8688 (linux_target_ops): Add linux_read_loadmap.
8689 * server.c (handle_query): Support qXfer:fdpic:read packet.
8690 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8693 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8695 * win32-low.c: Include <stdint.h>.
8697 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8699 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8700 to the inferior here.
8701 (i386_remove_aligned_watchpoint): Ditto.
8702 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8703 fit part of the watchpoint in the debug registers.
8704 (i386_update_inferior_debug_regs): New.
8705 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8706 registers, and only update the inferior on success.
8707 (i386_low_remove_watchpoint): Ditto.
8709 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8711 * linux-low.c (compare_ints, unique, list_threads, show_process,
8712 linux_core_of_thread): Delete.
8713 (linux_target_ops): Change linux_core_of_thread to
8714 linux_common_core_of_thread.
8715 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8716 * utils.c (malloc_failure): Change type of argument.
8717 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8718 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8719 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8720 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8721 (IPA_OBJS): Add common-utils-ipa.o.
8722 (ptid_h, linux_osdata_h): New macros.
8723 (server_h): Add common/common-utils.h, common/xml-utils.h,
8724 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8726 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8727 ptid.o, buffer.o): New rules.
8728 (linux-low.o): Add common/linux-osdata.h as a dependency.
8729 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8730 * configure.ac: Add AC_HEADER_DIRENT check.
8731 * config.in: Regenerate.
8732 * configure: Regenerate.
8733 * remote-utils.c (xml_escape_text): Delete.
8734 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8735 buffer_xml_printf): Move to common/buffer.c.
8736 * server.c (main): Remove call to initialize_inferiors.
8737 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8738 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8739 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8740 internal_error, gdb_assert, gdb_assert_fail): Delete.
8741 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8742 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8744 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8745 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8746 initialize_inferiors): Delete.
8748 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8750 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8753 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8755 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8757 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8759 2011-05-26 Yao Qi <yao@codesourcery.com>
8761 * Makefile.in (thread-db.o): Track dependence to
8762 common/gdb_thread_db.h.
8763 * thread-db.c: include gdb_thread_db.h from right place.
8765 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8767 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8768 __FILE__ and __LINE__ to internal_error.
8770 2011-05-13 Doug Evans <dje@google.com>
8772 * thread-db.c (try_thread_db_load_from_sdir): New function.
8773 (try_thread_db_load_from_dir): New function.
8774 (thread_db_load_search): Handle $sdir, ignore $pdir.
8775 Remove trying of system directories if search of
8776 libthread-db-search-path fails, that is now done via $sdir.
8778 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8780 * server.c (handle_query): Add EnableDisableTracepoints to the list
8781 of supported features.
8782 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8784 (cmd_qtenable_disable): New.
8785 (cmd_qtstart): Install tracepoints even if disabled.
8786 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8787 receiving a QTEnable or QTDisable packet.
8788 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8789 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8791 (gdb_probe): Skip data collection if static tracepoint is disabled.
8793 2011-05-10 Doug Evans <dje@google.com>
8795 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8797 2011-05-04 Doug Evans <dje@google.com>
8799 * linux-low.c (linux_join): Skip process lookup.
8800 * spu-low.c (spu_join): Ditto.
8801 * server.c (join_inferiors_callback): Delete.
8802 (process_serial_event): For 'D' packet (detach) call join_inferior
8805 2011-05-04 Joseph Myers <joseph@codesourcery.com>
8807 * README: Don't mention xscale*-*-linux*.
8808 * configure.srv (xscale*-*-linux*): Don't handle target.
8810 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8812 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8814 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8815 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8816 (i386_emit_void_call_2): Likewise.
8818 2011-04-26 Yao Qi <yao@codesourcery.com>
8820 * linux-low.c: Move common macros to linux-ptrace.h.
8821 Include linux-ptrace.h.
8822 * Makefile.in (linux_ptrace_h): New.
8823 (linux-low.o): Depends on linux-ptrace.h.
8825 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8827 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8828 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8829 (remote_prepare): New function with most of the TCP code from ...
8830 (remote_open): ... here. Detect PORT here unconditionally. Move also
8831 setting transport_is_reliable.
8832 * server.c (run_once): New variable.
8833 (gdbserver_usage): Document it.
8834 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8835 the first run if RUN_ONCE.
8836 * server.h (run_once, remote_prepare): New declarations.
8838 2011-04-19 Tom Tromey <tromey@redhat.com>
8840 * win32-low.c (handle_load_dll): Remove duplicate "the".
8842 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8844 Remove support for old Cygwin 1.5 versions.
8845 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8846 function to avoid warning.
8847 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8850 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8852 * gdbserver/server.h (Macro _): Define it if not available.
8854 2011-03-14 Michael Snyder <msnyder@vmware.com>
8856 * hostio.c (handle_close): Remove unnecessary null test.
8858 2011-03-10 Joel Brobecker <brobecker@adacore.com>
8860 * Makefile.in (maintainer-clean realclean distclean): Remove
8861 "make ... subdir_do" command.
8863 2011-03-10 Michael Snyder <msnyder@vmware.com>
8865 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8867 * server.c (handle_v_run): Free alloced buffer on early return.
8869 2011-03-09 Yao Qi <yao@codesourcery.com>
8872 2011-03-04 Yao Qi <yao@codesourcery.com>
8874 * Makefile.in: Remove GNU make feature --directory.
8876 2011-03-05 Yao Qi <yao@codesourcery.com>
8878 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8879 (subdir_do): New make target. Copied from gdb/Makefile.
8880 (maintainer-clean, realclean, distclean, clean): Call corresponding
8881 make targets in common/Makefile.
8883 2011-02-11 Yao Qi <yao@codesourcery.com>
8885 * configure.ac: Call AC_PROG_RANLIB.
8886 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8887 * configure: Regenerate.
8889 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8891 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8893 2011-03-06 Yao Qi <yao@codesourcery.com>
8895 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8897 2011-03-05 Yao Qi <yao@codesourcery.com>
8899 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8900 (subdir_do): New make target. Copied from gdb/Makefile.
8901 (maintainer-clean, realclean, distclean, clean): Call corresponding
8902 make targets in common/Makefile.
8904 2011-03-04 Yao Qi <yao@codesourcery.com>
8906 * Makefile.in: Remove GNU make feature --directory.
8908 2011-03-04 Michael Snyder <msnyder@vmware.com>
8910 * server.c (queue_stop_reply): Call xmalloc not malloc.
8912 2011-03-02 Michael Snyder <msnyder@vmware.com>
8914 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8916 2011-02-28 Michael Snyder <msnyder@vmware.com>
8918 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8919 (cmd_qtframe): Ditto.
8920 (cmd_qtbuffer): Ditto.
8921 (cmd_bigqtbuffer): Ditto.
8923 * utils.c (decimal2str): Initialize 'width' to nine, then
8926 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8928 * hostio.c (require_data): Free *data, not data.
8930 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8932 * hostio.c (require_data): Use free, not xfree.
8934 2011-02-27 Michael Snyder <msnyder@vmware.com>
8936 * server.c (handle_query): Discard unused value.
8938 * hostio.c (require_data): Free malloc memory before returning
8941 2011-02-26 Michael Snyder <msnyder@vmware.com>
8943 * linux-low.c (list_threads): Call closedir for dirent.
8945 2011-02-27 Michael Snyder <msnyder@vmware.com>
8947 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8948 a case statement falls through.
8950 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8952 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8955 2011-02-26 Michael Snyder <msnyder@vmware.com>
8957 * utils.c (decimal2str): Eliminate dead code and dead param.
8958 (pulongest): Drop dead param from call to decimal2str.
8961 2011-02-24 Joel Brobecker <brobecker@adacore.com>
8963 Revert the following patch (not approved yet):
8964 2011-02-21 Hui Zhu <teawater@gmail.com>
8965 * tracepoint.c (tp_printf): New function.
8966 (eval_agent_expr): Handle gdb_agent_op_printf.
8968 2011-02-21 Hui Zhu <teawater@gmail.com>
8970 * tracepoint.c (tp_printf): New function.
8971 (eval_agent_expr): Handle gdb_agent_op_printf.
8973 2011-02-18 Tom Tromey <tromey@redhat.com>
8975 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8976 (tracepoint.o): Likewise.
8977 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8978 (gdb_agent_op_names): Likewise.
8980 2011-02-18 Tom Tromey <tromey@redhat.com>
8982 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8983 gdb_agent_op_rot>: New constants.
8984 (gdb_agent_op_names): Add pick and roll.
8985 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8988 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8990 * aclocal.m4: Regenerated with aclocal-1.11.1.
8992 2011-02-14 Pedro Alves <pedro@codesourcery.com>
8994 * server.c (handle_qxfer_traceframe_info): New.
8995 (qxfer_packets): Register "traceframe-info".
8996 (handle_query): Report support for qXfer:traceframe-info:read+.
8997 * tracepoint.c (match_blocktype): New.
8998 (traceframe_find_block_type): Rename to ...
8999 (traceframe_walk_blocks): ... this. Add callback filter argument,
9001 (traceframe_find_block_type): New, reimplemented on top of
9002 traceframe_walk_blocks.
9003 (build_traceframe_info_xml): New.
9004 (traceframe_read_info): New.
9005 * server.h (traceframe_read_info): Declare.
9007 2011-02-11 Yao Qi <yao@codesourcery.com>
9009 * configure.ac: Call AC_PROG_RANLIB.
9010 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9011 * configure: Regenerate.
9013 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9015 * server.c (gdb_read_memory): Change return semantics to allow
9017 (handle_search_memory_1): Adjust.
9018 (process_serial_event) <'m' packet>: Handle partial transfers.
9019 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9021 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9023 * regcache.c (init_register_cache): Initialize
9024 regcache->register_status.
9025 (free_register_cache): Release regcache->register_status.
9026 (regcache_cpy): Copy register_status.
9027 (registers_to_string): Print 'x's for unavailable registers.
9028 (supply_register): Mark the register's status valid or
9029 unavailable, depending on whether a buffer was passed in or not.
9030 (supply_register_zeroed): New.
9031 (supply_regblock): Mark the registers' status valid or
9032 unavailable, depending on whether a buffer was passed in or not.
9033 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9034 (struct regcache): New `register_status' field.
9035 (supply_register_zeroed): Declare.
9036 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9037 supply_register_zeroed, rather than passing a NULL buffer to
9039 * tracepoint.c (fetch_traceframe_registers): Update comment.
9041 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9043 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9046 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9048 * server.h (decode_xfer_write): Change prototype.
9049 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9050 and don't extract the annex here.
9051 * server.c (decode_xfer_read): Remove `annex' parameter,
9052 and don't extract the annex here.
9054 (struct qxfer): New.
9055 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9056 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9057 (handle_qxfer_statictrace): New functions, abstracted out from
9058 handle_query, and made to use the struct qxfer interface.
9059 (handle_threads_qxfer_proper): Rename to ...
9060 (handle_qxfer_threads_proper): ... this.
9061 (handle_threads_qxfer): Rename to ...
9062 (handle_qxfer_threads): ... this. Adjust.
9063 (qxfer_packets): New array.
9064 (handle_qxfer): New function.
9065 (handle_query): Use handle_qxfer.
9067 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9069 * gdbreplay.c: Shorten lines of >= 80 columns.
9070 * linux-low.c: Ditto.
9071 * linux-ppc-low.c: Ditto.
9072 * linux-s390-low.c: Ditto.
9073 * linux-sparc-low.c: Ditto.
9074 * linux-x86-low.c: Ditto.
9075 * linux-xtensa-low.c: Ditto.
9076 * mem-break.c: Ditto.
9078 * regcache.h: Ditto.
9079 * remote-utils.c: Ditto.
9082 * thread-db.c: Ditto.
9083 * tracepoint.c: Ditto.
9085 * win32-low.h: Ditto.
9087 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9089 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9092 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9094 * server.c (gdbserver_version): Update copyright year in version
9096 * gdbreplay.c (gdbreplay_version): Ditto.
9098 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9100 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9101 * linux-bfin-low.c: New file.
9102 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9103 PT_DATA_ADDR for BFIN targets.
9104 * Makefile.in (SFILES): Add linux-bfin-low.c.
9105 (clean): Remove reg-bfin.c.
9106 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9107 * README: Mention supported Blackfin targets.
9109 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9111 * .gitignore: New file.
9113 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9115 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9117 2010-10-22 Jie Zhang <jie@codesourcery.com>
9119 * Makefile.in: Add FLAGS_TO_PASS variable.
9120 (install): Remove dependency of install-only and recursively
9121 invoke make for install-only.
9123 2010-10-04 Doug Evans <dje@google.com>
9125 * Makefile.in (uninstall): Use $(DESTDIR).
9127 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9131 * linux-x86-low.c (compat_siginfo_from_siginfo)
9132 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9133 si_code is < 0. Check for si_code == SI_TIMER before checking for
9136 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9138 * lynx-i386-low.c: New file.
9139 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9141 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9143 * lynx-low.c (ptrace_request_to_str): Remove handling for
9144 request values that have been removed in LynxOS 5.x.
9146 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9148 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9151 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9153 * configure.ac: Add --enable-inprocess-agent option.
9154 * configure: Rebuilt.
9156 2010-09-06 Yao Qi <yao@codesourcery.com>
9158 * linux-low.c (linux_kill): Remove unused variable.
9159 (linux_stabilize_threads): Likewise.
9160 * server.c (start_inferior): Likewise.
9161 (queue_stop_reply_callback): Likewise.
9162 * tracepoint.c (do_action_at_tracepoint): Likewise.
9164 2010-09-06 Yao Qi <yao@codesourcery.com>
9166 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9169 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9171 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9173 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9175 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9178 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9180 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9181 gdbserver/lynx-ppc-low.c: New files.
9182 * Makefile.in (lynx_low_h): New variable.
9183 (lynx-low.o, lynx-ppc-low.o): New rules.
9184 * configure.ac: On LynxOS, link with -lnetinet.
9185 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9186 * configure: regenerate.
9188 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9190 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9191 * configure.ac: Add check for vasprintf and vsnprintf.
9192 * configure, config.in: Regenerate.
9193 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9195 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9197 * gdbreplay.c: Move include of alloca.h up, next to include of
9199 * server.h: Add include of malloc.h.
9200 * mem-break.c: Remove include of malloc.h.
9201 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9203 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9205 * Makefile.in (memmem.o): Build with -Wno-error.
9207 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9209 * utils.c (xsnprintf): Make non-static.
9210 * server.h: Add xsnprintf declaration.
9211 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9212 replace calls to snprintf by calls to xsnprintf throughout.
9214 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9216 * configure.ac: Add configure check for alloca.
9217 * configure, config.in: Regenerate.
9218 * server.h: Include alloca.h if it exists.
9219 * gdbreplay.c: Include alloca.h if it exists.
9221 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9223 * linux-low.c (__SIGRTMIN): Define if not already defined.
9224 (linux_create_inferior): Check for __ANDROID__ rather than
9226 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9227 are already deferred.
9228 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9229 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9230 stopped and already has a pending signal to report.
9231 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9232 a pending signal to report or is moving out of a jump pad.
9233 (linux_init_signals): Check for __ANDROID__ rather than
9236 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9238 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9239 debug_threads check. Avoid a linear search when not doing debug
9242 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9244 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9245 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9246 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9247 (process_event): Change local fd's type to gdb_fildes_t.
9248 (create_file_handler): Adjust prototype.
9249 (delete_file_handler): Adjust prototype.
9250 (handle_file_event): Adjust prototype. Use pfildes.
9251 (create_file_event): Adjsut prototype.
9252 * remote-utils.c (remote_desc, listen_desc): Change type to
9254 * server.h: New gdb_fildes_t typedef.
9255 [USE_WIN32API]: Include winsock2.h.
9256 (delete_file_handler, add_file_handler): Adjust prototypes.
9258 * utils.c (pfildes): New.
9260 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9262 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9263 * configure: Regenerate.
9265 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9267 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9268 (linux_done_accessing_memory): ... this.
9269 (linux_target_ops): Adjust.
9270 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9271 * nto-low.c (nto_target_ops): Adjust comment.
9272 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9273 * spu-low.c (spu_target_ops): Adjust comment.
9274 * target.h (target_ops): Rename unprepare_to_access_memory field
9275 to done_accessing_memory.
9276 (unprepare_to_access_memory): Rename to ...
9277 (done_accessing_memory): ... this.
9279 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9281 * linux-low.c (linux_prepare_to_access_memory): New.
9282 (linux_unprepare_to_access_memory): New.
9283 (linux_target_ops): Install them.
9284 * server.c (read_memory): Rename to ...
9285 (gdb_read_memory): ... this. Use
9286 prepare_to_access_memory/prepare_to_access_memory.
9287 (write_memory): Rename to ...
9288 (gdb_write_memory): ... this. Use
9289 prepare_to_access_memory/prepare_to_access_memory.
9290 (handle_search_memory_1): Adjust.
9291 (process_serial_event): Adjust.
9292 * target.h (struct target_ops): New fields
9293 prepare_to_access_memory and unprepare_to_access_memory.
9294 (prepare_to_access_memory, unprepare_to_access_memory): New.
9295 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9296 prepare_to_access_memory/prepare_to_access_memory.
9297 * nto-low.c (nto_target_ops): Adjust.
9298 * spu-low.c (spu_target_ops): Adjust.
9299 * win32-low.c (win32_target_ops): Adjust.
9301 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9303 * Makefile.in (WARN_CFLAGS): Get it from configure.
9304 (WERROR_CFLAGS): New.
9305 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9306 * configure.ac: Introduce --enable-werror, which adds -Werror to
9307 the compiler command line. Enabled by default. Disable with
9308 --disable-werror. Add -Wdeclaration-after-statement
9309 Wpointer-arith and -Wformat-nonliteral to warning flags.
9310 * configure: Regenerate.
9312 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9314 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9316 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9318 * gdbreplay.c (remote_error): New.
9320 (expect): Use gdbchar. Check for error reading from GDB.
9321 Clarify sync error output.
9322 (play): Check for errors writing to GDB.
9323 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9324 * remote-utils.c (getpkt): Check for errors writing to the remote
9327 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9329 * linux-low.c (linux_wait_1): Move non-debugging code out of
9330 `debug_threads' control.
9332 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9334 * linux-low.c (linux_wait_1): Don't set last_status here.
9335 * server.c (push_event, queue_stop_reply_callback): Assert we're
9336 not pushing a TARGET_WAITKIND_IGNORE event.
9337 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9338 (myresume, handle_target_event): Set the thread's last_resume_kind
9339 and last_status from the target returned status.
9341 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9345 * linux-x86-low.c (update_debug_registers_callback): New.
9346 (i386_dr_low_set_addr): Use it.
9347 (i386_dr_low_get_addr): New.
9348 (i386_dr_low_set_control): Use update_debug_registers_callback.
9349 (i386_dr_low_get_control): New.
9350 (i386_dr_low_get_status): Adjust.
9351 * linux-low.c (linux_stop_lwp): New.
9352 * linux-low.h (linux_stop_lwp): Declare.
9354 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9355 argument instead of a i386_debug_reg_state.
9356 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9357 a i386_debug_reg_state.
9358 (i386_insert_aligned_watchpoint): Adjust.
9359 (i386_remove_aligned_watchpoint): Adjust.
9360 (i386_low_stopped_data_address): Read the debug registers from the
9361 inferior instead of from the mirrors.
9362 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9363 (i386_dr_low_get_addr): Declare.
9364 (i386_dr_low_get_control): Declare.
9365 (i386_dr_low_get_status): Change prototype.
9367 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9368 (i386_dr_low_get_addr): New.
9369 (i386_dr_low_get_control): New.
9370 (i386_dr_low_get_status): Adjust prototype. Return
9372 (i386_initial_stuff): Clear dr_status_mirror and
9374 (i386_get_thread_context): Adjust.
9375 (i386_set_thread_context): Adjust.
9376 (i386_thread_added): Adjust.
9378 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9380 * linux-low.h (linux_thread_area): Delete declaration.
9382 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9384 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9385 after its termination.
9387 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9389 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9390 (gdb_wants_all_stopped): Delete.
9391 (linux_wait_1): Don't call them.
9392 * server.c (handle_v_cont): Tag all threads as want-stopped.
9393 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9394 stopped as "client-wants-stopped".
9396 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9398 * Makefile.in (signals_h): New.
9399 (server_h): Depend on it.
9400 (server.o): Don't depend on $(signals_def).
9401 (signals.o): Depend on $(signals_def).
9403 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9405 * Makefile.in (signals_def): New.
9406 (server_h): Append include/gdb/signals.h and signals_def.
9407 (server.o): Append signals_def.
9409 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9411 * server.c (handle_target_event): Use target_signal_to_host for
9412 resume_info.sig initialization.
9413 * target.h (struct thread_resume) <sig>: New comment.
9415 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9417 * server.c (handle_query): strcpy() the returned string from paddress()
9418 instead of sprintf().
9419 * utils.c (paddress): Return phex_nz().
9421 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9423 * server.c (handle_v_cont): Call mourn_inferior if process
9425 (myresume): Likewise.
9427 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9429 Static tracepoints, and integration with UST.
9431 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9432 * mem-break.c (uninsert_all_breakpoints)
9433 (reinsert_all_breakpoints): New.
9434 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9435 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9436 (gdb_agent_ust_loaded, helper_thread_id)
9437 (gdb_agent_helper_thread_id): New macros.
9438 (struct ipa_sym_addresses): Add addr_ust_loaded,
9439 addr_helper_thread_id, addr_cmd_buf.
9440 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9441 (in_process_agent_loaded_ust): New.
9442 (write_e_ust_not_loaded): New.
9443 (maybe_write_ipa_ust_not_loaded): New.
9444 (struct collect_static_trace_data_action): New.
9445 (enum tracepoint_type) <static_tracepoint>: New.
9446 (struct tracepoint) <handle>: Mention static tracepoints.
9447 (struct static_tracepoint_ctx): New.
9448 (CMD_BUF_SIZE): New.
9449 (add_tracepoint_action): Handle static tracepoint actions.
9450 (unprobe_marker_at): New.
9451 (clear_installed_tracepoints): Handle static tracepoints.
9452 (cmd_qtdp): Handle static tracepoints.
9453 (probe_marker_at): New.
9454 (cmd_qtstart): Handle static tracepoints.
9455 (response_tracepoint): Handle static tracepoints.
9456 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9457 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9458 (get_context_regcache): Handle static tracepoints.
9459 (do_action_at_tracepoint): Handle static tracepoint actions.
9460 (traceframe_find_block_type): Handle static trace data blocks.
9461 (traceframe_read_sdata): New.
9462 (download_tracepoints): Download static tracepoint actions.
9463 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9464 (GDB_PROBE_NAME): New.
9469 (ust_marker_to_static_tracepoint): New.
9471 (collect_ust_data_at_tracepoint): New.
9472 (gdb_ust_probe): New.
9473 (UNIX_PATH_MAX, SOCK_DIR): New.
9474 (gdb_ust_connect_sync_socket): New.
9475 (resume_thread, stop_thread): New.
9476 (run_inferior_command): New.
9477 (init_named_socket): New.
9478 (gdb_ust_socket_init): New.
9479 (cstr_to_hexstr): New.
9481 (first_marker, next_marker): New.
9482 (response_ust_marker): New.
9483 (cmd_qtfstm, cmd_qtsstm): New.
9484 (unprobe_marker_at, probe_marker_at): New.
9485 (cmd_qtstmat, gdb_ust_thread): New.
9486 (gdb_ust_init): New.
9487 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9488 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9490 (x86_64_st_collect_regmap): New.
9491 (X86_64_NUM_ST_COLLECT_GREGS): New.
9492 (AMD64_RIP_REGNUM): New.
9493 (supply_static_tracepoint_registers): New.
9494 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9496 (i386_st_collect_regmap): New.
9497 (i386_NUM_ST_COLLECT_GREGS): New.
9498 (supply_static_tracepoint_registers): New.
9499 * server.c (handle_query): Handle qXfer:statictrace:read.
9500 <qSupported>: Report support for StaticTracepoints, and
9501 qXfer:statictrace:read features.
9502 * server.h (traceframe_read_sdata)
9503 (supply_static_tracepoint_registers): Declare.
9504 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9505 (unpack_varlen_hex): Include in IPA build.
9506 * Makefile.in (ustlibs, ustinc): New.
9507 (IPA_OBJS): Add remote-utils-ipa.o.
9508 ($(IPA_LIB)): Link -ldl and -lpthread.
9510 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9511 * config.in, configure: Regenerate.
9513 2010-06-20 Ian Lance Taylor <iant@google.com>
9514 Pedro Alves <pedro@codesourcery.com>
9516 * linux-x86-low.c (always_true): Delete.
9517 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9518 trying to fool the compiler with always_true.
9520 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9522 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9523 conditions in gdbserver.
9525 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9527 * spu-low.c (spu_read_memory): Wrap around local store limit.
9528 (spu_write_memory): Likewise.
9530 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9532 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9533 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9535 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9537 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9538 uses with LONGEST uses.
9540 2010-06-14 Stan Shebs <stan@codesourcery.com>
9541 Pedro Alves <pedro@codesourcery.com>
9545 * linux-x86-low.c: Include limits.h.
9550 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9551 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9552 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9553 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9554 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9555 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9556 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9557 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9558 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9559 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9560 (amd64_emit_void_call_2): New.
9561 (amd64_emit_ops): New.
9562 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9563 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9564 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9565 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9566 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9567 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9568 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9569 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9570 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9571 (i386_emit_stack_adjust, i386_emit_int_call_1)
9572 (i386_emit_void_call_2): New.
9573 (i386_emit_ops): New.
9574 (x86_emit_ops): New.
9575 (the_low_target): Install x86_emit_ops.
9576 * server.h (struct emit_ops): New.
9577 (get_raw_reg_func_addr): Declare.
9578 (current_insn_ptr, emit_error): Declare.
9579 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9580 (set_trace_state_variable_value): New defines.
9581 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9582 addr_get_trace_state_variable_value and
9583 addr_set_trace_state_variable_value.
9584 (symbol_list): New fields for get_raw_reg,
9585 get_trace_state_variable_value and set_trace_state_variable_value.
9586 (condfn): New typedef.
9587 (struct tracepoint): New field `compiled_cond'.
9588 (do_action_at_tracepoint): Clear compiled_cond.
9589 (get_trace_state_variable_value, set_trace_state_variable_value):
9591 (condition_true_at_tracepoint): If there's a compiled condition,
9593 (current_insn_ptr, emit_error): New globals.
9594 (struct bytecode_address): New.
9595 (get_raw_reg_func_addr): New.
9596 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9597 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9598 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9599 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9600 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9601 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9602 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9603 (compile_tracepoint_condition, compile_bytecodes): New.
9604 * target.h (emit_ops): Forward declare.
9605 (struct target_ops): New field emit_ops.
9606 (target_emit_ops): New.
9607 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9608 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9609 * linux-low.c (linux_emit_ops): New.
9610 (linux_target_ops): Install it.
9611 * linux-low.h (struct linux_target_ops): New field emit_ops.
9613 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9615 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9616 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9618 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9619 Stan Shebs <stan@codesourcery.com>
9621 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9622 (all): Depend on $(extra_libraries).
9623 (install-only): Install the IPA.
9624 (IPA_OBJS, IPA_LIB): New.
9625 (clean): Remove the IPA lib.
9626 (IPAGENT_CFLAGS): New.
9627 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9628 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9629 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9630 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9631 * configure.ac: Check for atomic builtins support in the compiler.
9632 (IPA_DEPFILES, extra_libraries): Define.
9633 * configure.srv (ipa_obj): Add description.
9634 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9635 (i[34567]86-*-linux*): Set ipa_obj.
9636 (x86_64-*-linux*): Set ipa_obj.
9637 * linux-low.c (stabilizing_threads): New.
9638 (supports_fast_tracepoints): New.
9639 (linux_detach): Stabilize threads before detaching.
9640 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9641 the lwp is either not stabilizing, or is moving out of a jump pad.
9642 (linux_fast_tracepoint_collecting): New.
9643 (maybe_move_out_of_jump_pad): New.
9644 (enqueue_one_deferred_signal): New.
9645 (dequeue_one_deferred_signal): New.
9646 (linux_wait_for_event_1): If moving out of a jump pad, defer
9647 pending signals to later.
9648 (linux_stabilize_threads): New.
9649 (linux_wait_1): Check if threads need moving out of jump pads, and
9651 (stuck_in_jump_pad_callback): New.
9652 (move_out_of_jump_pad_callback): New.
9654 (linux_resume_one_lwp): Handle moving out of jump pads.
9655 (linux_set_resume_request): Dequeue deferred signals.
9656 (need_step_over_p): Also step over fast tracepoint jumps.
9657 (start_step_over): Also uninsert fast tracepoint jumps.
9658 (finish_step_over): Also reinsert fast tracepoint jumps.
9659 (linux_install_fast_tracepoint_jump): New.
9660 (linux_target_ops): Install linux_stabilize_threads and
9661 linux_install_fast_tracepoint_jump_pad.
9662 * linux-low.h (linux_target_ops) <get_thread_area,
9663 install_fast_tracepoint_jump_pad>: New fields.
9664 (struct lwp_info) <collecting_fast_tracepoint,
9665 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9666 (linux_get_thread_area): Declare.
9667 * linux-x86-low.c (jump_insn): New.
9668 (x86_get_thread_area): New.
9669 (append_insns): New.
9671 (amd64_install_fast_tracepoint_jump_pad): New.
9672 (i386_install_fast_tracepoint_jump_pad): New.
9673 (x86_install_fast_tracepoint_jump_pad): New.
9674 (the_low_target): Install x86_get_thread_area and
9675 x86_install_fast_tracepoint_jump_pad.
9676 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9677 (struct fast_tracepoint_jump): New.
9678 (fast_tracepoint_jump_insn): New.
9679 (fast_tracepoint_jump_shadow): New.
9680 (find_fast_tracepoint_jump_at): New.
9681 (fast_tracepoint_jump_here): New.
9682 (delete_fast_tracepoint_jump): New.
9683 (set_fast_tracepoint_jump): New.
9684 (uninsert_fast_tracepoint_jumps_at): New.
9685 (reinsert_fast_tracepoint_jumps_at): New.
9686 (set_breakpoint_at): Use write_inferior_memory.
9687 (uninsert_raw_breakpoint): Use write_inferior_memory.
9688 (check_mem_read): Mask out fast tracepoint jumps.
9689 (check_mem_write): Mask out fast tracepoint jumps.
9690 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9691 (set_fast_tracepoint_jump): Declare.
9692 (delete_fast_tracepoint_jump)
9693 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9694 (reinsert_fast_tracepoint_jumps_at): Declare.
9695 * regcache.c: Don't compile many functions when building the
9696 in-process agent library.
9697 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9698 the register buffer in the heap.
9699 (free_register_cache): If the register buffer isn't owned by the
9700 regcache, don't free it.
9701 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9702 pre-existing register caches.
9703 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9705 (convert_ascii_to_int): : Constify `from' parameter type.
9706 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9707 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9708 the needed buffer in-place.
9709 (relocate_instruction): New.
9710 * server.c (handle_query) <qSymbols>: If the target supports
9711 tracepoints, give it a chance of looking up symbols. Report
9712 support for fast tracepoints.
9713 (handle_status): Stabilize threads.
9714 (process_serial_event): Adjust.
9715 * server.h (struct fast_tracepoint_jump): Forward declare.
9716 (struct process_info) <fast_tracepoint_jumps>: New field.
9717 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9718 (decode_X_packet, decode_M_packet): Adjust.
9719 (relocate_instruction): Declare.
9720 (in_process_agent_loaded): Declare.
9721 (tracepoint_look_up_symbols): Declare.
9722 (struct fast_tpoint_collect_status): Declare.
9723 (fast_tracepoint_collecting): Declare.
9724 (force_unlock_trace_buffer): Declare.
9725 (handle_tracepoint_bkpts): Declare.
9726 (initialize_low_tracepoint)
9727 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9728 * target.h (struct target_ops) <stabilize_threads,
9729 install_fast_tracepoint_jump_pad>: New fields.
9730 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9731 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9732 [HAVE_STDINT_H]: Include stdint.h.
9733 (trace_debug_1): Rename to ...
9734 (trace_vdebug): ... this.
9735 (trace_debug): Rename to ...
9736 (trace_debug_1): ... this. Add `level' parameter.
9738 (ATTR_USED, ATTR_NOINLINE): New.
9739 (IP_AGENT_EXPORT): New.
9740 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9741 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9742 (about_to_request_buffer_space, trace_buffer_is_full)
9743 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9744 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9745 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9746 (traceframe_write_count, traceframes_created)
9747 (trace_state_variables)
9748 New renaming defines.
9749 (struct ipa_sym_addresses): New.
9750 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9752 (ipa_sym_addrs): New.
9753 (all_tracepoint_symbols_looked_up): New.
9754 (in_process_agent_loaded): New.
9755 (write_e_ipa_not_loaded): New.
9756 (maybe_write_ipa_not_loaded): New.
9757 (tracepoint_look_up_symbols): New.
9758 (debug_threads) [IN_PROCESS_AGENT]: New.
9759 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9760 (UNKNOWN_SIDE_EFFECTS): New.
9761 (stop_tracing): New.
9762 (flush_trace_buffer): New.
9763 (stop_tracing_bkpt): New.
9764 (flush_trace_buffer_bkpt): New.
9765 (read_inferior_integer): New.
9766 (read_inferior_uinteger): New.
9767 (read_inferior_data_pointer): New.
9768 (write_inferior_data_pointer): New.
9769 (write_inferior_integer): New.
9770 (write_inferior_uinteger): New.
9771 (struct collect_static_trace_data_action): Delete.
9772 (enum tracepoint_type): New.
9773 (struct tracepoint) <type>: New field `type'.
9774 <actions_str, step_actions, step_actions_str>: Only include in
9776 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9777 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9778 (tracepoints): Use IP_AGENT_EXPORT.
9779 (last_tracepoint): Don't include in the IPA.
9780 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9781 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9782 (alloced_trace_state_variables): New.
9783 (trace_state_variables): Use IP_AGENT_EXPORT.
9784 (traceframe_t): Delete unused variable.
9785 (circular_trace_buffer): Don't include in the IPA.
9786 (trace_buffer_start): Delete.
9787 (struct trace_buffer_control): New.
9788 (trace_buffer_free): Delete.
9789 (struct ipa_trace_buffer_control): New.
9790 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9791 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9793 (trace_buffer_ctrl): New.
9794 (TRACE_BUFFER_CTRL_CURR): New.
9795 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9796 Reimplement as macros.
9797 (trace_buffer_wrap): Delete.
9798 (traceframe_write_count, traceframe_read_count)
9799 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9800 (struct tracepoint_hit_ctx) <type>: New field.
9801 (struct fast_tracepoint_ctx): New.
9802 (memory_barrier): New.
9804 (record_tracepoint_error): Update atomically in the IPA.
9805 (clear_inferior_trace_buffer): New.
9806 (about_to_request_buffer_space): New.
9807 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9808 updating the same buffer.
9809 (add_tracepoint): Default the tracepoint's type to trap
9810 tracepoint, and orig_size to -1.
9811 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9813 (create_trace_state_variable): New parameter `gdb'. Handle it.
9814 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9815 (cmd_qtdp): Handle fast tracepoints.
9817 (max_jump_pad_size): New.
9818 (gdb_jump_pad_head): New.
9819 (get_jump_space_head): New.
9820 (claim_jump_space): New.
9821 (sort_tracepoints): New.
9822 (MAX_JUMP_SIZE): New.
9823 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9825 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9826 support. Upload fast traceframes, and delete internal IPA
9828 (stop_tracing_handler): New.
9829 (flush_trace_buffer_handler): New.
9830 (cmd_qtstop): Upload fast tracepoints.
9831 (response_tracepoint): Handle fast tracepoints.
9832 (tracepoint_finished_step): Upload fast traceframes. Set the
9833 tracepoint hit context's tracepoint type.
9834 (handle_tracepoint_bkpts): New.
9835 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9836 type. Add comment about fast tracepoints.
9837 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9838 non-existing action_str field.
9839 (get_context_regcache): Handle fast tracepoints.
9840 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9842 (fast_tracepoint_from_jump_pad_address): New.
9843 (fast_tracepoint_from_ipa_tpoint_address): New.
9844 (collecting_t): New.
9845 (force_unlock_trace_buffer): New.
9846 (fast_tracepoint_collecting): New.
9849 (write_inferior_data_ptr): New.
9850 (target_tp_heap): New.
9851 (target_malloc): New.
9852 (download_agent_expr): New.
9854 (download_tracepoints): New.
9855 (download_trace_state_variables): New.
9856 (upload_fast_traceframes): New.
9857 (IPA_FIRST_TRACEFRAME): New.
9858 (IPA_NEXT_TRACEFRAME_1): New.
9859 (IPA_NEXT_TRACEFRAME): New.
9860 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9861 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9862 (gdb_jump_pad_buffer_end): New.
9863 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9864 (initialize_tracepoint): Adjust.
9865 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9866 buffer. Initialize the low module.
9867 * utils.c (PREFIX, TOOLNAME): New.
9868 (malloc_failure): Use PREFIX.
9869 (error): In the IPA, an error causes an exit.
9870 (fatal, warning): Use PREFIX.
9871 (internal_error): Use TOOLNAME.
9872 (NUMCELLS): Increase to 10.
9873 * configure, config.in: Regenerate.
9875 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9877 * server.c (handle_query) <qSupported>: Do two passes over the
9878 qSupported string to avoid nesting strtok.
9880 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9882 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9884 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9886 * configure: Regenerate.
9887 * proc-service.list: New.
9889 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9891 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9894 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9896 * gdbreplay.c (remote_open): Check error return from socket() call by
9897 its equality to -1 not by it being negative.
9898 * remote-utils.c (remote_open): Likewise.
9900 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9902 * config.h: Regenerate.
9904 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9906 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9907 doesn't provide PTRACE_GET_THREAD_AREA.
9909 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9911 * linux-m68k-low.c: Include <asm/ptrace.h>
9912 (ps_get_thread_area): Implement.
9914 2010-05-03 Doug Evans <dje@google.com>
9916 * event-loop.c (struct callback_event): New struct.
9917 (callback_list): New global.
9918 (append_callback_event, delete_callback_event): New functions.
9919 (process_callback): New function.
9920 (start_event_loop): Call it.
9921 * remote-utils.c (NOT_SCHEDULED): Define.
9922 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9923 moved out of readchar.
9924 (readchar): Rewrite. Call reschedule before returning.
9925 (reset_readchar): New function.
9926 (remote_close): Call it.
9927 (process_remaining, reschedule): New functions.
9928 * server.h (callback_handler_func): New typedef.
9929 (append_callback_event, delete_callback_event): Declare.
9931 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9933 * proc-service.c (ps_pglobal_lookup): Use
9934 thread_db_look_up_one_symbol.
9935 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9936 parameter. Use it instead of all_symbols_looked_up.
9937 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9939 (all_symbols_looked_up): Don't declare.
9940 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9941 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9943 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9944 Set all_symbols_looked_up here.
9945 (thread_db_look_up_one_symbol): New.
9946 (thread_db_get_tls_address): Adjust.
9947 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9948 thread_db object on the heap, and tentatively set it in the
9950 (thread_db_init): Don't set all_symbols_looked_up here.
9951 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9953 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9955 * linux-low.c (linux_kill, linux_detach): Adjust.
9956 (status_pending_p_callback): Remove redundant statement. Check
9957 for !TARGET_WAITIKIND_IGNORE, instead of
9958 TARGET_WAITKIND_STOPPED.
9959 (handle_tracepoints): Make sure LWP is locked. Adjust.
9960 (linux_wait_for_event_1): Adjust.
9961 (linux_cancel_breakpoints): New.
9962 (unsuspend_one_lwp): New.
9963 (unsuspend_all_lwps): New.
9964 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9965 (send_sigstop_callback): Change return type to int, add new
9966 `except' parameter and handle it.
9967 (suspend_and_send_sigstop_callback): New.
9968 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9969 pass them down. If SUSPEND, also increment the lwp's suspend
9971 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9972 (need_step_over_p): Don't consider suspended LWPs.
9973 (start_step_over): Adjust.
9974 (proceed_one_lwp): Change return type to int, add new `except'
9975 parameter and handle it.
9976 (unsuspend_and_proceed_one_lwp): New.
9977 (proceed_all_lwps): Use find_inferior instead of
9979 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9980 also decrement the suspend count of LWPs. Pass `except' down,
9981 instead of hacking its suspend count.
9982 (linux_pause_all): Add `freeze' parameter. Adjust.
9983 (linux_unpause_all): New.
9984 (linux_target_ops): Install linux_unpause_all.
9985 * server.c (handle_status): Adjust.
9986 * target.h (struct target_ops): New fields `unpause_all' and
9987 `cancel_breakpoints'. Add new parameter to `pause_all'.
9988 (pause_all): Add new `freeze' parameter.
9990 (cancel_breakpoints): New.
9991 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9993 (cmd_qtstart): Pause threads.
9994 (stop_tracing): Pause threads, and cancel breakpoints.
9995 * win32-low.c (win32_target_ops): Adjust.
9997 2010-05-03 Pedro Alves <pedro@codesourcery.com>
9999 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10000 the inferior right away from here...
10001 (linux_wait_1): ... to here, and adjust to check the thread's
10002 last_resume_kind instead of the lwp's step or stop_expected flags.
10004 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10006 * README: Use consistent `GDB' and `GDBserver' spellings.
10008 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10010 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10011 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10012 (linux_detach_one_lwp): Assume the lwp is stopped.
10013 (any_thread_of): Delete.
10014 (linux_detach): Stop all lwps here. Don't blindly delete all
10016 (delete_lwp_callback): New.
10017 (linux_mourn): Delete all lwps of the process that is gone.
10018 (linux_wait_1): Don't delete the last lwp of the process here.
10019 * mem-break.h (mark_breakpoints_out): Declare.
10020 * mem-break.c (mark_breakpoints_out): New.
10021 (free_all_breakpoints): Use it.
10022 * server.c (handle_target_event): If the process is gone, mark
10024 * thread-db.c (struct thread_db) <create_bp>: New field.
10025 (thread_db_enable_reporting): Fix prototype. Store a thread event
10026 breakpoint reference in the thread_db struct.
10027 (thread_db_load_search): Clear the thread_db object.
10028 (try_thread_db_load_1): Ditto.
10029 (switch_to_process): New.
10030 (disable_thread_event_reporting): Use it.
10031 (remove_thread_event_breakpoints): New.
10032 (thread_db_detach, thread_db_mourn): Use it.
10034 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10036 * linux-low.c (linux_enable_event_reporting): New.
10037 (linux_wait_for_event_1, handle_extended_wait): Use it.
10039 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10041 * linux-low.c (linux_kill_one_lwp, linux_kill)
10042 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10043 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10044 SIGSTOP even if the LWP is stopped.
10045 (send_sigstop_callback): New.
10046 (stop_all_lwps): Use send_sigstop_callback instead.
10047 (linux_resume_one_thread): Adjust.
10048 (proceed_one_lwp): Still proceed an LWP that the client has
10049 requested to stop, if we haven't reported it as stopped yet. Make
10050 sure that LWPs the client want stopped, have a pending SIGSTOP.
10052 2010-04-26 Doug Evans <dje@google.com>
10054 * server.c (handle_general_set): Make static.
10056 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10057 Print received char after testing for error/eof instead of before.
10058 (input_interrupt): Tweak comment.
10060 2010-04-23 Doug Evans <dje@google.com>
10062 * server.c (start_inferior): Print inferior argv if --debug.
10064 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10066 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10067 * nto-x86-low.c: Include server.h
10069 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10071 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10072 be consistent with other sources of this directory.
10073 (init_registers_amd64): Correct name of source file of this function
10076 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10078 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10079 64-bit executables.
10081 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10083 * win32-i386-low.c: Add 64-bit support.
10084 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10085 (init_registers_amd64): Declare.
10086 (mappings): Add 64-bit version of array.
10087 (init_windows_x86): New function.
10088 (the_low_target): Change init_arch field to init_windows_x86.
10090 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10092 * win32-low.c: Adapt to support also 64-bit architecture.
10093 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10094 (get_image_name): Use SIZE_T type for local variable `done'.
10095 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10096 (toolhelp_get_dll_name): Idem.
10097 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10098 Use uintptr_t typecast to avoid warning.
10099 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10100 (handle_exception): Use phex_nz to avoid warning.
10101 (win32_wait): Remove unused local variable `process'.
10103 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10105 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10108 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10110 * configure.ac: Use `ws2_32' library for srv_mingw.
10111 * configure: Regenerate.
10112 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10113 * remote-utils.c: Likewise.
10115 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10117 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10118 if __x86_64__ is defined.
10120 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10122 * configure: Regenerate.
10124 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10126 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10127 * target.h (target_ops): New get_tib_address field.
10128 * win32-low.h (win32_thread_info): Add thread_local_base field.
10129 * win32-low.c (child_add_thread): Add tlb argument.
10130 Set thread_local_base field to TLB.
10131 (get_child_debug_event): Adapt to child_add_thread change.
10132 (win32_get_tib_address): New function.
10133 (win32_target_ops): Set get_tib_address field to
10134 win32_get_tib_address.
10135 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10137 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10139 * linux-low.c (linux_mourn): Also remove the process.
10140 * server.c (handle_target_event): Don't remove the process here.
10141 * nto-low.c (nto_mourn): New.
10142 (nto_target_ops): Install it.
10143 * spu-low.c (spu_mourn): New.
10144 (spu_target_ops): Install it.
10145 * win32-low.c (win32_mourn): New.
10146 (win32_target_ops): Install it.
10148 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10150 * server.h (buffer_xml_printf): Remove redundant `;'.
10152 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10154 * regcache.c (set_register_cache): Invalidate regcaches before
10155 changing the register cache layout.
10156 (regcache_invalidate_one): Allow a NULL regcache.
10157 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10158 regcaches before changing the register cache layout or the target
10161 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10163 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10164 variable warning on Linux/x86-64.
10166 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10168 GDBserver disconnected tracing support.
10170 * linux-low.c (linux_remove_process): Delete.
10171 (add_lwp): Don't set last_resume_kind here.
10172 (linux_kill): Use `mourn'.
10173 (linux_detach): Use `thread_db_detach', and `mourn'.
10174 (linux_mourn): New.
10175 (linux_attach_lwp_1): Adjust comment.
10176 (linux_attach): last_resume_kind moved the thread_info; adjust.
10177 (status_pending_p_callback): Adjust.
10178 (linux_wait_for_event_1): Adjust.
10179 (count_events_callback, select_singlestep_lwp_callback)
10180 (select_event_lwp_callback, cancel_breakpoints_callback)
10181 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10182 (proceed_one_lwp): Adjust.
10183 (linux_async): Add debug output.
10184 (linux_thread_stopped): New.
10185 (linux_pause_all): New.
10186 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10188 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10189 (thread_db_free): Delete declaration.
10190 (thread_db_detach, thread_db_mourn): Declare.
10191 * thread-db.c (thread_db_init): Use thread_db_mourn.
10192 (thread_db_free): Delete, split in two.
10193 (disable_thread_event_reporting): New.
10194 (thread_db_detach): New.
10195 (thread_db_mourn): New.
10197 * server.h (struct thread_info) <last_resume_kind>: New field.
10198 <attached>: Add comment.
10199 <gdb_detached>: New field.
10200 (handler_func): Change return type to int.
10201 (handle_serial_event, handle_target_event): Ditto.
10202 (gdb_connected): Declare.
10204 (disconnected_tracing): Declare.
10205 (stop_tracing): Declare.
10207 * server.c (handle_query) <qSupported>: Report support for
10208 disconnected tracing.
10209 (queue_stop_reply_callback): Account for running threads.
10210 (gdb_wants_thread_stopped): New.
10211 (gdb_wants_all_threads_stopped): New.
10212 (gdb_reattached_process): New.
10213 (handle_status): Clear the `gdb_detached' flag of all processes.
10214 In all-stop, stop all threads.
10215 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10216 (process_serial_event): If the remote connection breaks, or if an
10217 exit was forced with "monitor exit", force an event loop exit.
10218 Handle disconnected tracing on detach.
10219 (handle_serial_event): Adjust.
10220 (handle_target_event): If GDB isn't connected, forward events back
10221 to the inferior, unless the last process exited, in which case,
10222 exit gdbserver. Adjust interface.
10224 * remote-utils.c (remote_open): Don't block in accept. Instead
10225 register an event loop source on the listen socket file
10226 descriptor. Refactor bits into ...
10227 (listen_desc): ... this new global.
10228 (gdb_connected): ... this new function.
10229 (enable_async_notification): ... this new function.
10230 (handle_accept_event): ... this new function.
10231 (remote_close): Clear remote_desc.
10233 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10235 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10237 (mourn_inferior): Define.
10238 (target_process_qsupported): Avoid the dangling else problem.
10239 (thread_stopped): Define.
10240 (pause_all): Define.
10241 (target_waitstatus_to_string): Declare.
10242 * target.c (target_waitstatus_to_string): New.
10244 * tracepoint.c (tracing): Make extern.
10245 (disconnected_tracing): New.
10246 (stop_tracing): Make extern. Handle tracing stops due to GDB
10248 (cmd_qtdisconnected): New.
10249 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10250 (handle_tracepoint_general_set): Handle QTDisconnected.
10252 * event-loop.c (event_handler_func): Change return type to int.
10253 (process_event): Bail out if the event handler wants the event
10255 (handle_file_event): Ditto.
10256 (start_event_loop): Bail out if the event handler wants the event
10259 * nto-low.c (nto_target_ops): Adjust.
10260 * spu-low.c (spu_wait): Don't remove the process here.
10261 (spu_target_ops): Adjust.
10262 * win32-low.c (win32_wait): Don't remove the process here.
10263 (win32_target_ops): Adjust.
10265 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10267 * regcache.c (realloc_register_cache): Invalidate inferior's
10268 regcache before recreating it.
10270 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10272 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10274 2010-04-09 Stan Shebs <stan@codesourcery.com>
10275 Pedro Alves <pedro@codesourcery.com>
10277 * server.h (LONGEST): New.
10278 (struct thread_info) <while_stepping>: New field.
10279 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10281 (initialize_tracepoint, handle_tracepoint_general_set)
10282 (handle_tracepoint_query, tracepoint_finished_step)
10283 (tracepoint_was_hit, release_while_stepping_state_list):
10284 (current_traceframe): Declare.
10285 * server.c (handle_general_set): Handle tracepoint packets.
10286 (read_memory): New.
10287 (write_memory): New.
10288 (handle_search_memory_1): Use read_memory.
10289 (handle_query): Report support for conditional tracepoints, trace
10290 state variables, and tracepoint sources. Handle tracepoint
10292 (main): Initialize the tracepoints module.
10293 (process_serial_event): Handle traceframe reads/writes.
10295 * linux-low.c (handle_tracepoints): New.
10296 (linux_wait_1): Call it.
10297 (linux_resume_one_lwp): Handle while-stepping.
10298 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10299 (linux_target_ops): Install them.
10300 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10302 * linux-x86-low.c (x86_supports_tracepoints): New.
10303 (the_low_target). Install it.
10305 * mem-break.h (delete_breakpoint): Declare.
10306 * mem-break.c (delete_breakpoint): Make external.
10308 * target.h (struct target_ops): Add `supports_tracepoints',
10309 `read_pc', and `write_pc' fields.
10310 (target_supports_tracepoints): Define.
10311 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10314 * regcache.h (struct regcache) <registers_owned>: New field.
10315 (init_register_cache, regcache_cpy): Declare.
10316 (regcache_read_pc, regcache_write_pc): Declare.
10317 (register_cache_size): Declare.
10318 (supply_regblock): Declare.
10319 * regcache.c (init_register_cache): New.
10320 (new_register_cache): Use it.
10321 (regcache_cpy): New.
10322 (register_cache_size): New.
10323 (supply_regblock): New.
10324 (regcache_read_pc, regcache_write_pc): New.
10326 * tracepoint.c: New.
10328 * Makefile.in (OBS): Add tracepoint.o.
10329 (tracepoint.o): New rule.
10331 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10333 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10335 (i386-mmx.c): Likewise.
10336 (i386-mmx-linux.o): Likewise.
10337 (i386-mmx-linux.c): Likewise.
10339 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10340 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10341 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10342 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10344 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10345 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10346 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10348 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10350 * Makefile.in (clean): Updated.
10352 (i386-avx.c): Likewise.
10353 (i386-avx-linux.o): Likewise.
10354 (i386-avx-linux.c): Likewise.
10355 (amd64-avx.o): Likewise.
10356 (amd64-avx.c): Likewise.
10357 (amd64-avx-linux.o): Likewise.
10358 (amd64-avx-linux.c): Likewise.
10360 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10361 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10362 (srv_amd64_regobj): Add amd64-avx.o.
10363 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10364 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10365 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10366 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10367 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10368 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10369 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10371 * i387-fp.c: Include "i386-xstate.h".
10373 (i387_cache_to_xsave): Likewise.
10374 (i387_xsave_to_cache): Likewise.
10375 (x86_xcr0): Likewise.
10377 * i387-fp.h (i387_cache_to_xsave): Likewise.
10378 (i387_xsave_to_cache): Likewise.
10379 (x86_xcr0): Likewise.
10381 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10382 * linux-crisv32-low.c (target_regsets): Likewise.
10383 * linux-m68k-low.c (target_regsets): Likewise.
10384 * linux-mips-low.c (target_regsets): Likewise.
10385 * linux-ppc-low.c (target_regsets): Likewise.
10386 * linux-s390-low.c (target_regsets): Likewise.
10387 * linux-sh-low.c (target_regsets): Likewise.
10388 * linux-sparc-low.c (target_regsets): Likewise.
10389 * linux-xtensa-low.c (target_regsets): Likewise.
10391 * linux-low.c: Include <sys/uio.h>.
10392 (regsets_fetch_inferior_registers): Support nt_type.
10393 (regsets_store_inferior_registers): Likewise.
10394 (linux_process_qsupported): New.
10395 (linux_target_ops): Add linux_process_qsupported.
10397 * linux-low.h (regset_info): Add nt_type.
10398 (linux_target_ops): Add process_qsupported.
10400 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10402 (init_registers_i386_avx_linux): New.
10403 (init_registers_amd64_avx_linux): Likewise.
10404 (xmltarget_i386_linux_no_xml): Likewise.
10405 (xmltarget_amd64_linux_no_xml): Likewise.
10406 (PTRACE_GETREGSET): Likewise.
10407 (PTRACE_SETREGSET): Likewise.
10408 (x86_fill_xstateregset): Likewise.
10409 (x86_store_xstateregset): Likewise.
10410 (use_xml): Likewise.
10411 (x86_linux_update_xmltarget): Likewise.
10412 (x86_linux_process_qsupported): Likewise.
10413 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10414 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10415 init_registers_i386_linux here. Call
10416 x86_linux_update_xmltarget.
10417 (the_low_target): Add x86_linux_process_qsupported.
10419 * server.c (handle_query): Call target_process_qsupported.
10421 * target.h (target_ops): Add process_qsupported.
10422 (target_process_qsupported): New.
10424 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10426 * inferiors.c (add_thread): Set last_status kind to
10427 TARGET_WAITKIND_IGNORE.
10428 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10429 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10430 (linux_wait_1): Move `thread' local definition to block that uses
10431 it. Don't NULL initialize `event_child'.
10432 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10433 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10434 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10436 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10438 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10439 an extended waitstatus, or by a watchpoint.
10440 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10441 thread was stepping or has been stopped by a watchpoint.
10443 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10445 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10446 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10447 of another, then delete the previous, and validate all
10449 (validate_inserted_breakpoint): New.
10450 (delete_disabled_breakpoints): New.
10451 (validate_breakpoints): New.
10452 (check_mem_read): Validate breakpoints before trusting their
10453 shadow. Delete disabled breakpoints.
10454 (check_mem_write): Validate breakpoints before trusting they
10455 should be inserted. Delete disabled breakpoints.
10456 * mem-break.h (validate_breakpoints):
10457 * server.c (handle_query): Validate breakpoints when we see a
10460 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10462 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10463 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10464 if we could tell there's a GDB breakpoint at stop_pc.
10465 (need_step_over_p): Don't do a step over if we find a GDB
10466 breakpoint at the resume PC.
10468 * mem-break.c (struct raw_breakpoint): New.
10469 (enum bkpt_type): New type `gdb_breakpoint'.
10470 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10471 fields. New field `raw'.
10472 (find_raw_breakpoint_at): New.
10473 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10474 breakpoint instead.
10475 (set_breakpoint_at): Adjust.
10476 (delete_raw_breakpoint): New.
10477 (release_breakpoint): New.
10478 (delete_breakpoint): Rename to...
10479 (delete_breakpoint_1): ... this. Add proc parameter. Use
10480 release_breakpoint. Return ENOENT.
10481 (delete_breakpoint): Reimplement.
10482 (find_breakpoint_at): Delete.
10483 (find_gdb_breakpoint_at): New.
10484 (delete_breakpoint_at): Delete.
10485 (set_gdb_breakpoint_at): New.
10486 (delete_gdb_breakpoint_at): New.
10487 (gdb_breakpoint_here): New.
10488 (set_reinsert_breakpoint): Use release_breakpoint.
10489 (uninsert_breakpoint): Rename to ...
10490 (uninsert_raw_breakpoint): ... this.
10491 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10492 (reinsert_raw_breakpoint): Change parameter type to
10494 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10496 (check_breakpoints): Adjust. Use release_breakpoint.
10497 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10498 (breakpoint_inserted_here): Ditto.
10499 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10500 Don't trust the breakpoint's shadow if it is not inserted.
10501 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10502 (delete_all_breakpoints): Adjust.
10503 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10504 use delete_breakpoint_1.
10506 * mem-break.h (breakpoints_supported): Delete declaration.
10507 (set_gdb_breakpoint_at): Declare.
10508 (gdb_breakpoint_here): Declare.
10509 (delete_breakpoint_at): Delete.
10510 (delete_gdb_breakpoint_at): Declare.
10512 * server.h (struct raw_breakpoint): Forward declare.
10513 (struct process_info): New field `raw_breakpoints'.
10515 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10518 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10520 * linux-low.c (status_pending_p_callback): Fix comment.
10521 (linux_wait_for_event_1): Move most of the internal breakpoint
10522 handling from here...
10523 (linux_wait_1): ... to here.
10524 (count_events_callback): New.
10525 (select_singlestep_lwp_callback): New.
10526 (select_event_lwp_callback): New.
10527 (cancel_breakpoints_callback): New.
10528 (select_event_lwp): New.
10529 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10530 priority to all LWPs that have had events that should be reported
10531 to the client. Cancel breakpoints when about to reporting the
10532 event to the client, not while stopping lwps. No longer cancel
10533 finished single-steps here.
10534 (cancel_finished_single_step): Delete.
10535 (cancel_finished_single_steps): Delete.
10537 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10539 * mem-break.c (enum bkpt_type): New.
10540 (struct breakpoint): New field `type'.
10541 (set_breakpoint_at): Change return type to struct breakpoint
10542 pointer. Set type to `other_breakpoint' by default.
10543 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10544 in the breakpoint list.
10545 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10546 (reinsert_breakpoint): Rename to ...
10547 (reinsert_raw_breakpoint): ... this.
10548 (reinsert_breakpoints_at): Adjust.
10549 * mem-break.h (struct breakpoint): Declare.
10550 (set_breakpoint_at): Change return type to struct breakpoint
10553 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10555 * server.c (handle_query): Assign, not compare.
10557 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10559 Teach linux gdbserver to step-over-breakpoints.
10561 * linux-low.c (can_hardware_single_step): New.
10562 (supports_breakpoints): New.
10563 (handle_extended_wait): If stopping threads, read the stop pc of
10564 the new cloned LWP.
10566 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10567 low target doesn't support retrieving the PC.
10568 (add_lwp): Set last_resume_kind to resume_continue.
10569 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10570 (linux_attach): Don't clear stop_expected. Set the lwp's
10571 last_resume_kind to resume_stop.
10572 (linux_detach_one_lwp): Don't check for removed breakpoints.
10573 (check_removed_breakpoint): Delete.
10574 (status_pending_p): Rename to ...
10575 (status_pending_p_callback): ... this. Don't check for removed
10576 breakpoints. Don't consider threads that are stopped from GDB's
10578 (linux_wait_for_lwp): Always read the stop_pc here.
10579 (cancel_breakpoint): New.
10580 (step_over_bkpt): New global.
10581 (linux_wait_for_event_1): Implement stepping over breakpoints.
10582 (gdb_wants_lwp_stopped): New.
10583 (gdb_wants_all_stopped): New.
10584 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10585 single-step traps here. Store the thread's last reported target
10587 (send_sigstop): Don't clear stop_expected. Always set it,
10589 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10590 (cancel_finished_single_step): New.
10591 (cancel_finished_single_steps): New.
10592 (wait_for_sigstop): Don't cancel finished single-step traps here.
10593 (linux_resume_one_lwp): Don't check for removed breakpoints.
10594 Don't set `step' on non-hardware step archs.
10595 (linux_set_resume_request): Ignore resume_stop requests if already
10596 stopping or stopped. Set the lwp's last_resume_kind.
10597 (resume_status_pending_p): Don't check for removed breakpoints.
10598 (need_step_over_p): New.
10599 (start_step_over): New.
10600 (finish_step_over): New.
10601 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10602 requests. Clear the thread's last reported target waitstatus.
10603 Don't use the `suspended' flag. Don't consider pending breakpoints.
10604 (linux_resume): Start a step-over if necessary.
10605 (proceed_one_lwp): New.
10606 (proceed_all_lwps): New.
10607 (unstop_all_lwps): New.
10608 * linux-low.h (struct lwp_info): Rewrite comment for the
10609 `suspended' flag. Add the `stop_pc' field. Delete the
10610 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10611 Add `'last_resume_kind' and `need_step_over' fields.
10612 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10613 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10614 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10615 (set_raw_breakpoint_at): New.
10616 (set_breakpoint_at): Rewrite to use it.
10617 (reinsert_breakpoint_handler): Delete.
10618 (set_reinsert_breakpoint): New.
10619 (reinsert_breakpoint_by_bp): Delete.
10620 (delete_reinsert_breakpoints): New.
10621 (uninsert_breakpoint): Rewrite.
10622 (uninsert_breakpoints_at): New.
10623 (reinsert_breakpoint): Rewrite.
10624 (reinsert_breakpoints_at): New.
10625 (check_breakpoints): Rewrite.
10626 (breakpoint_here): New.
10627 (breakpoint_inserted_here): New.
10628 (check_mem_read): Adjust.
10629 * mem-break.h (breakpoints_supported, breakpoint_here)
10630 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10631 (reinsert_breakpoint_by_bp): Delete declaration.
10632 (delete_reinsert_breakpoints): Declare.
10633 (reinsert_breakpoint): Delete declaration.
10634 (reinsert_breakpoints_at): Declare.
10635 (uninsert_breakpoint): Delete declaration.
10636 (uninsert_breakpoints_at): Declare.
10637 (check_breakpoints): Adjust prototype.
10638 * server.h: Adjust include order.
10639 (struct thread_info): Declare here. Add a `last_status' field.
10641 2010-03-23 Michael Snyder <msnyder@vmware.com>
10643 * server.c (crc32): New function.
10644 (handle_query): Add handling for 'qCRC:' request.
10646 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10648 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10649 lwp had been stopped by a watchpoint.
10651 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10653 * server.h (internal_error): Declare.
10654 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10655 * utils.c (internal_error): New function.
10657 2010-03-15 Andreas Schwab <schwab@redhat.com>
10659 * configure.srv: Fix typo setting srv_regobj.
10661 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10663 * linux-low.c (fetch_register): Avoid passing a non string literal
10665 (usr_store_inferior_registers): Ditto.
10667 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10669 * linux-low.c (linux_write_memory): Bail out early if peeking
10672 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10674 * linux-low.h (struct lwp_info): New fields
10675 `stopped_by_watchpoint' and `stopped_data_address'.
10676 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10677 here, and cache them in the lwp object.
10678 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10680 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10682 (linux_stopped_by_watchpoint): Rewrite.
10683 (linux_stopped_data_address): Rewrite.
10685 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10687 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10688 switching the current inferior, not before.
10690 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10692 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10693 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10694 i386-linux.c and amd64-linux.c.
10695 (reg-i386.o): Removed.
10696 (reg-i386.c): Likewise.
10697 (reg-i386-linux.o): Likewise.
10698 (reg-i386-linux.c): Likewise.
10699 (reg-x86-64.o): Likewise.
10700 (reg-x86-64.c): Likewise.
10701 (reg-x86-64-linux.o): Likewise.
10702 (reg-x86-64-linux.c): Likewise.
10704 (i386.c): Likewise.
10705 (i386-linux.o): Likewise.
10706 (i386-linux.c): Likewise.
10707 (amd64.o): Likewise.
10708 (amd64.c): Likewise.
10709 (amd64-linux.o): Likewise.
10710 (amd64-linux.c): Likewise.
10712 * configure.srv (srv_i386_regobj): New.
10713 (srv_i386_linux_regobj): Likewise.
10714 (srv_amd64_regobj): Likewise.
10715 (srv_amd64_linux_regobj): Likewise.
10716 (srv_i386_32bit_xmlfiles): Likewise.
10717 (srv_i386_64bit_xmlfiles): Likewise.
10718 (srv_i386_xmlfiles): Likewise.
10719 (srv_amd64_xmlfiles): Likewise.
10720 (srv_i386_linux_xmlfiles): Likewise.
10721 (srv_amd64_linux_xmlfiles): Likewise.
10722 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10723 srv_xmlfiles to $srv_i386_xmlfiles.
10724 (i[34567]86-*-mingw32ce*): Likewise.
10725 (i[34567]86-*-mingw*): Likewise.
10726 (i[34567]86-*-nto*): Likewise.
10727 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10728 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10729 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10730 (x86_64-*-linux*): Likewise.
10732 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10733 (init_registers_amd64_linux): New.
10734 (x86_arch_setup): Replace init_registers_x86_64_linux with
10735 init_registers_amd64_linux.
10737 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10739 * configure.ac: Check for libdl. If it is not available link against
10740 static libthread_db.
10741 * configure: Regenerate.
10743 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10747 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10748 handing a read watchpoint.
10749 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10751 2010-02-12 Doug Evans <dje@google.com>
10753 * linux-low.c (linux_supports_tracefork_flag): Document.
10754 (linux_look_up_symbols): Add comment.
10756 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10758 * regcache.c (supply_register): Clear regcache if buf is NULL.
10760 2010-02-02 Nicolas Roche <roche@sourceware.org>
10761 Joel Brobecker <brobecker@adacore.com>
10763 * inferiors.c (find_inferior): Add function documentation.
10764 (unloaded_dll): Handle the case where the unloaded dll has not
10765 been previously registered in the dll list.
10767 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10769 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10770 (thumb2_breakpoint): New.
10771 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10773 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10775 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10776 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10779 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10781 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10783 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10785 * linux-s390-low.c (s390_collect_ptrace_register)
10786 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10788 2010-01-21 Doug Evans <dje@google.com>
10790 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10791 (PTRACE_ARG4_TYPE): New macro.
10792 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10793 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10794 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10795 (usr_store_inferior_registers): Ditto.
10796 (linux_read_memory, linux_write_memory): Ditto.
10797 (linux_test_for_tracefork): Ditto.
10799 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10800 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10802 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10804 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10807 2010-01-21 Pedro Alves <pedro@codesourcery.com>
10809 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10810 prototype to take a regcache. Adjust.
10812 2010-01-20 Pedro Alves <pedro@codesourcery.com>
10814 * regcache.h (struct thread_info): Forward declare.
10815 (struct regcache): New.
10816 (new_register_cache): Adjust prototype.
10817 (get_thread_regcache): Declare.
10818 (free_register_cache): Adjust prototype.
10819 (registers_to_string, registers_from_string): Ditto.
10820 (supply_register, supply_register_by_name, collect_register)
10821 (collect_register_as_string, collect_register_by_name): Ditto.
10822 * regcache.c (struct inferior_regcache_data): Delete.
10823 (get_regcache): Rename to ...
10824 (get_thread_regcache): ... this. Adjust. Switch inferior before
10825 fetching registers.
10826 (regcache_invalidate_one): Adjust.
10827 (regcache_invalidate): Fix prototype.
10828 (new_register_cache): Return the new register cache.
10829 (free_register_cache): Change prototype.
10830 (realloc_register_cache): Adjust.
10831 (registers_to_string): Change prototype to take a regcache. Adjust.
10832 (registers_from_string): Ditto.
10833 (register_data): Ditto.
10834 (supply_register): Ditto.
10835 (supply_register_by_name): Ditto.
10836 (collect_register): Ditto.
10837 (collect_register_as_string): Ditto.
10838 (collect_register_by_name): Ditto.
10839 * server.c (process_serial_event): Adjust.
10840 * linux-low.h (regset_fill_func, regset_store_func): Change
10842 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10844 * linux-low.c (get_stop_pc): Adjust.
10845 (check_removed_breakpoint): Adjust.
10846 (linux_wait_for_event): Adjust.
10847 (linux_resume_one_lwp): Adjust.
10848 (fetch_register): Add regcache parameter. Adjust.
10849 (usr_store_inferior_registers): Ditto.
10850 (regsets_fetch_inferior_registers): Ditto.
10851 (regsets_store_inferior_registers): Ditto.
10852 (linux_fetch_registers, linux_store_registers): Ditto.
10853 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10855 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10857 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10858 prototype to take a regcache.
10859 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10860 * remote-utils.c (convert_ascii_to_int, outreg)
10861 (prepare_resume_reply): Change prototype to take a regcache.
10863 * target.h (struct target_ops) <fetch_registers, store_registers>:
10864 Change prototype to take a regcache.
10865 (fetch_inferior_registers, store_inferior_registers): Change
10866 prototype to take a regcache. Adjust.
10867 * proc-service.c (ps_lgetregs): Adjust.
10868 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10869 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10870 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10871 take a regcache. Adjust.
10872 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10873 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10874 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10875 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10876 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10877 (cris_cannot_fetch_register):
10878 (cris_breakpoint_at): Change prototype to take a regcache.
10880 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10881 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10882 to take a regcache. Adjust.
10883 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10885 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10886 take a regcache. Adjust.
10887 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10888 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10889 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10890 * linux-mips-low.c (mips_get_pc):
10891 (mips_set_pc): Change prototype to take a regcache. Adjust.
10892 (mips_reinsert_addr): Adjust.
10893 (mips_collect_register): Change prototype to take a regcache.
10895 (mips_supply_register):
10896 (mips_collect_register_32bit, mips_supply_register_32bit)
10897 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10898 (mips_store_fpregset): Ditto.
10899 * linux-ppc-low.c (ppc_supply_ptrace_register)
10900 (ppc_supply_ptrace_register): Ditto.
10901 (parse_spufs_run): Adjust.
10902 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10903 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10904 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10905 take a regcache. Adjust.
10906 * linux-s390-low.c (s390_collect_ptrace_register)
10907 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10908 (s390_set_pc): Change prototype to take a regcache. Adjust.
10909 (s390_arch_setup): Adjust.
10910 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10911 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10912 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10913 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10914 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10916 (sparc_breakpoint_at): Adjust.
10917 * linux-xtensa-low.c (xtensa_fill_gregset):
10918 (xtensa_store_gregset):
10919 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10920 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10921 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10922 prototype to take a regcache. Adjust.
10923 * win32-arm-low.c (arm_fetch_inferior_register)
10924 (arm_store_inferior_register): Change prototype to take a
10926 * win32-i386-low.c (i386_fetch_inferior_register)
10927 (i386_store_inferior_register): Change prototype to take a
10929 * win32-low.c (child_fetch_inferior_registers)
10930 (child_store_inferior_registers): Change prototype to take a
10932 (win32_wait): Adjust.
10933 (win32_fetch_inferior_registers): Change prototype to take a
10935 (win32_store_inferior_registers): Adjust.
10936 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10937 store_inferior_register>: Change prototype to take a regcache.
10939 2010-01-20 Doug Evans <dje@google.com>
10941 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10943 (linux_wait_for_event1, linux_init_signals): Ditto.
10944 (W_STOPCODE): Provide definition if missing.
10946 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10948 * linux-low.c (linux_core_of_thread): New.
10949 (compare_ints, show_process, list_threads): New.
10950 (linux_qxfer_osdata): Report threads and cores.
10951 (linux_target_op): Register linux_core_of_thread.
10952 * remote-utils.c (prepare_resume_reply): Report the core.
10953 (buffer_xml_printf): Support %d specifier.
10954 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10956 (handle_query): Handle qXfer:threads. Announce availability
10958 * target.h (struct target_ops): New field core_of_thread.
10960 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10962 * Makefile.in (clean): Remove new generated files.
10963 (reg-s390.o, reg-s390.c): Remove rules.
10964 (reg-s390x.o, reg-s390x.c): Likewise.
10965 (s390-linux32.o, s390-linux32.c): Add rules.
10966 (s390-linux64.o, s390-linux64.c): Likewise.
10967 (s390x-linux64.o, s390x-linux64.c): Likewise.
10968 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10969 * linux-s390-low.c: Include <elf.h>.
10970 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10971 (init_registers_s390): Remove prototype.
10972 (init_registers_s390x): Likewise.
10973 (init_registers_s390_linux32): Add prototype.
10974 (init_registers_s390_linux64): Likewise.
10975 (init_registers_s390x_linux64): Likewise.
10976 (s390_num_regs_3264): New define.
10977 (s390_regmap_3264): New global variable.
10978 (s390_cannot_fetch_register): Remove obsolete check.
10979 (s390_cannot_store_register): Likewise.
10980 (s390_collect_ptrace_register): Handle upper/lower register halves.
10981 (s390_supply_ptrace_register): Likewise.
10982 (s390_fill_gregset): Update to register number changes.
10983 (s390_get_hwcap): New routine.
10984 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10985 Install appropriate regmap and register set.
10987 2010-01-01 Joel Brobecker <brobecker@adacore.com>
10989 * server.c (gdbserver_version): Update copyright year to 2010.
10990 * gdbreplay.c (gdbreplay_version): Likewise.
10992 2009-12-28 Doug Evans <dje@google.com>
10994 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10995 elf/external.h. Include <elf.h> instead but only if necessary.
10997 2009-12-28 Pedro Alves <pedro@codesourcery.com>
10999 * linux-low.c (linux_remove_process): Remove `detaching'
11000 parameter. Don't release/detach from thread_db here.
11001 (linux_kill): Release/detach from thread_db here, ...
11002 (linux_detach): ... and here, before actually detaching.
11003 (linux_wait_1): ... and here, when a process exits.
11004 * thread-db.c (any_thread_of): New.
11005 (thread_db_free): Switch the current inferior to a thread of the
11008 2009-12-21 Doug Evans <dje@google.com>
11010 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11012 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11013 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11014 warning ifndef __NR_tkill. Move setting of errno there too.
11015 Delete unnecessary resetting of errno after syscall.
11016 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11018 * configure.ac: Check for dladdr.
11019 * config.in: Regenerate.
11020 * configure: Regenerate.
11021 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11022 (try_thread_db_load): Update.
11024 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11026 2009-12-18 Doug Evans <dje@google.com>
11028 * event-loop.c: Include unistd.h if it exists.
11030 * linux-low.c (my_waitpid): Move definition away from being in
11031 between linux_tracefork_child/linux_test_for_tracefork.
11033 * gdb_proc_service.h (psaddr_t): Fix type.
11034 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11035 signature to match glibc.
11037 2009-12-16 Doug Evans <dje@google.com>
11039 * linux-low.c (linux_read_memory): Fix argument to read.
11041 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11043 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11044 events, don't leave current_inferior pointing at null.
11046 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11048 * win32-low.c (LOG): Delete.
11049 (OUTMSG): Output to stderr.
11050 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11051 on compile time LOG macro.
11052 (win32_wait): Fix debug output.
11054 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11056 * win32-low.c (win32_add_one_solib): If the dll name is
11057 "ntdll.dll", prepend the system directory to the dll path.
11059 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11061 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11063 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11064 Vladimir Prus <vladimir@codesourcery.com>
11066 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11067 * configure.ac: Check for __mcoldfire__ and set
11068 gdb_cv_m68k_is_coldfire.
11069 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11070 reg-cf.o and reg-m68k.o.
11071 * configure: Regenerated.
11073 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11075 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11076 Pass it to thread_db_free.
11077 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11078 proper `detaching' argument to linux_remove_process.
11079 * linux-low.h (thread_db_free): Add `detaching' parameter.
11080 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11082 (thread_db_free): Add `detaching' parameter. Only
11083 call td_ta_clear_event if detaching from process.
11085 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11087 * thread-db.c (thread_db_free): Fix typo.
11089 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11092 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11094 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11096 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11097 with an i686 compiler.
11098 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11100 * configure: Rebuilt.
11102 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11106 * server.c (handle_search_memory_1): Correct read_addr initialization
11107 in loop for searching subsequent chunks.
11109 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11111 * configure.ac: New --with-libthread-db option.
11112 * thread-db.c: Allow direct dependence on libthread_db.
11113 (thread_db_free): Adjust.
11114 * config.in: Regenerate.
11115 * configure: Likewise.
11117 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11120 * thread-db.c (attach_thread): New function.
11121 (maybe_attach_thread): Return success/failure.
11122 (find_new_threads_callback): Adjust.
11123 (thread_db_find_new_threads): Loop until no new threads.
11125 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11127 * proc-service.c (ps_lgetregs): Formatting.
11129 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11131 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11132 * configure.ac: Adjust.
11133 * linux-low.h (struct process_info_private): Move members to struct
11135 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11136 * linux-low.c (linux_remove_process): Adjust.
11137 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11138 * server.c (handle_query): Move code ...
11139 (handle_monitor_command): ... here. New function.
11140 * target.h (struct target_ops): New member.
11141 * thread-db.c (struct thread_db): New.
11142 (libthread_db_search_path): New variable.
11143 (thread_db_create_event, thread_db_enable_reporting)
11144 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11145 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11146 (try_thread_db_load_1, dladdr_to_soname): New functions.
11147 (try_thread_db_load, thread_db_load_search): New functions.
11148 (thread_db_init): Search for libthread_db.
11149 (thread_db_free): New function.
11150 (thread_db_handle_monitor_command): Likewise.
11151 * config.in: Regenerate.
11152 * configure: Regenerate.
11154 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11156 * spu-low.c (spu_kill): Wait for inferior to terminate.
11157 Call clear_inferiors.
11158 (spu_detach): Call clear_inferiors.
11160 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11162 * aclocal.m4: Regenerate.
11163 * config.in: Likewise.
11164 * configure: Likewise.
11166 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11168 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11169 (parse_spufs_run): New function.
11170 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11171 (ppc_breakpoint_at): Handle SPU breakpoints.
11173 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11175 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11176 (SPUFS_MAGIC): Define.
11177 (spu_enumerate_spu_ids): New function.
11178 (linux_qxfer_spu): New function.
11179 (linux_target_ops): Install linux_qxfer_spu.
11181 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11183 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11184 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11185 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11186 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11187 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11188 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11189 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11190 (init_registers_powerpc_cell32l): Add prototype.
11191 (init_registers_powerpc_cell64l): Likewise.
11192 (ppc_arch_setup): Detect Cell/B.E. architecture.
11194 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11196 * Makefile.in (datarootdir): New variable.
11198 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11200 * linux-low.c (linux_write_memory): Update debugging output.
11201 * Makefile.in (clean): Add new descriptions.
11202 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11203 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11204 * configure.srv: Add new files for arm*-*-linux*.
11205 * linux-arm-low.c: Add new declarations.
11206 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11207 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11208 (HWCAP_VFPv3D16): New.
11209 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11210 instead of __IWMMXT__.
11211 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11212 (arm_arch_setup): New.
11213 (target_regsets): Remove #ifdef. Add VFP regset.
11214 (the_low_target): Use arm_arch_setup.
11216 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11218 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11219 the main thread again.
11221 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11223 Adding Neutrino gdbserver.
11224 * configure: Regenerated.
11225 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11226 * configure.srv (i[34567]86-*-nto*): New target.
11227 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11228 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11229 (nto_comctrl) [__QNX__]: New function.
11230 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11232 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11234 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11237 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11238 Pedro Alves <pedro@codesourcery.com>
11240 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11241 don't support CONTEXT_EXTENDED_REGISTERS.
11242 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11243 (the_low_target): Install them.
11244 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11245 failing with ERROR_PIPE_NOT_CONNECTED.
11247 2009-06-30 Doug Evans <dje@google.com>
11248 Pierre Muller <muller@ics.u-strasbg.fr>
11250 Add h/w watchpoint support to x86-linux, win32-i386.
11251 * Makefile.in (SFILES): Add i386-low.c
11252 (i386_low_h): Define.
11253 (i386-low.o): Add dependencies.
11254 (linux-x86-low.o): Add i386-low.h dependency.
11255 (win32-i386-low.o): Ditto.
11256 * i386-low.c: New file.
11257 * i386-low.h: New file.
11258 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11259 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11260 * linux-low.c (linux_add_process): Initialize arch_private.
11261 (linux_remove_process): Free arch_private.
11262 (add_lwp): Initialize arch_private.
11263 (delete_lwp): Free arch_private.
11264 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11266 * linux-low.h (process_info_private): New member arch_private.
11267 (lwp_info): New member arch_private.
11268 (linux_target_ops): New members new_process, new_thread,
11270 (ptid_of): New macro.
11271 * linux-x86-low.c: Include stddef.h, i386-low.h.
11272 (arch_process_info): New struct.
11273 (arch_lwp_info): New struct.
11274 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11275 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11276 (i386_dr_low_get_status): New function.
11277 (x86_insert_point, x86_remove_point): New functions.
11278 (x86_stopped_by_watchpoint): New function.
11279 (x86_stopped_data_address): New function.
11280 (x86_linux_new_process, x86_linux_new_thread): New functions.
11281 (x86_linux_prepare_to_resume): New function.
11282 (the_low_target): Add entries for insert_point, remove_point,
11283 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11285 * server.c (debug_hw_points): New global.
11286 (monitor_show_help): Document set debug-hw-points.
11287 (handle_query): Process "set debug-hw-points".
11288 * server.h (debug_hw_points): Declare.
11289 (paddress): Declare.
11290 * utils.c (NUMCELLS, CELLSIZE): New macros.
11291 (get_sell, xsnprintf, paddress): New functions.
11292 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11293 remove_point, stopped_by_watchpoint, stopped_data_address.
11294 * win32-i386-low.c: Include i386-low.h.
11295 (debug_reg_state): Replaces dr.
11296 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11297 (i386_dr_low_get_status): New function.
11298 (i386_insert_point, i386_remove_point): New functions.
11299 (i386_stopped_by_watchpoint): New function.
11300 (i386_stopped_data_address): New function.
11301 (i386_initial_stuff): Update.
11302 (get_thread_context,set_thread_context,i386_thread_added): Update.
11303 (the_low_target): Add entries for insert_point,
11304 remove_point, stopped_by_watchpoint, stopped_data_address.
11305 * win32-low.c (win32_insert_watchpoint): New function.
11306 (win32_remove_watchpoint): New function.
11307 (win32_stopped_by_watchpoint): New function.
11308 (win32_stopped_data_address): New function.
11309 (win32_target_ops): Add entries for insert_watchpoint,
11310 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11311 * win32-low.h (win32_target_ops): New members insert_point,
11312 remove_point, stopped_by_watchpoint, stopped_data_address.
11314 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11316 * server.c (process_serial_event): Re-return unsupported, not
11317 error, if the type isn't recognized. Re-allow supporting only
11318 insert or remove packets. Also call require_running for
11319 breakpoints. Add missing break statement to default case. Tidy.
11320 * target.h (struct target_ops): Rename insert_watchpoint to
11321 insert_point, and remove_watchpoint to remove_point.
11323 * linux-low.h (struct linux_target_ops): Likewise.
11324 * linux-low.c (linux_insert_watchpoint): Rename to ...
11325 (linux_insert_point): ... this. Adjust.
11326 (linux_remove_watchpoint): Rename to ...
11327 (linux_remove_point): ... this. Adjust.
11328 (linux_target_ops): Adjust.
11329 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11330 (cris_insert_point): ... this.
11331 (cris_remove_watchpoint): Rename to ...
11332 (cris_remove_point): ... this.
11333 (the_low_target): Adjust.
11335 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11337 * server.c (handle_v_kill): Pass signal_pid to
11338 kill_inferior if multi_process is zero.
11340 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11342 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11343 * target.h (target_ops): Comment for *_watchpoint to make it clear
11344 the functions can get types '0' and '1'.
11346 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11348 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11349 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11350 * regcache.c (get_regcache): Likewise.
11351 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11352 * win32-low.c (child_fetch_inferior_registers): Remove check for
11355 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11356 Pedro Alves <pedro@codesourcery.com>
11358 * target.h (struct target_ops) <supports_multi_process>: New
11360 (target_supports_multi_process): New.
11361 * server.c (handle_query): Even if GDB reports support, only
11362 enable multi-process if the target also supports it. Report
11363 multi-process support only if the target backend supports it.
11364 * linux-low.c (linux_supports_multi_process): New function.
11365 (linux_target_ops): Install it as target_supports_multi_process
11368 2009-05-24 Doug Evans <dje@google.com>
11370 Global renaming of find_thread_pid to find_thread_ptid.
11371 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11372 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11373 All callers updated.
11375 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11376 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11379 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11380 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11381 (linux_resume_one_lwp): Ditto.
11383 2009-05-23 Doug Evans <dje@google.com>
11385 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11386 from struct inferior_list_entry * to struct lwp_info *.
11387 All callers updated.
11389 2009-05-13 Doug Evans <dje@google.com>
11391 * linux-x86-low.c: Don't include assert.h.
11392 (x86_siginfo_fixup): Use fatal, not assert.
11393 (x86_arch_setup): Fix comment.
11395 2009-05-12 Doug Evans <dje@google.com>
11397 Biarch support for i386/amd64 gdbserver.
11398 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11399 Add linux-x86-low.c.
11400 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11401 (linux-x86-low.o): Add.
11402 * linux-x86-64-low.c: Delete.
11403 * linux-i386-low.c: Delete.
11404 * linux-x86-low.c: New file.
11405 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11407 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11409 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11410 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11411 (linux_child_pid_to_exec_file): New function.
11412 (elf_64_header_p, elf_64_file_p): New functions.
11413 (siginfo_fixup): New function.
11414 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11415 give target a chance to convert layout.
11416 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11417 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11419 2009-05-07 Doug Evans <dje@google.com>
11421 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11422 (regsets_store_inferior_registers): Ditto.
11424 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11428 * linux-low.c (must_set_ptrace_flags): Delete.
11429 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11431 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11432 `lwp->must_set_ptrace_flags' instead.
11433 (linux_wait_for_event_1): Set ptrace options here.
11434 (linux_wait_1): ... not here.
11436 2009-04-30 Doug Evans <dje@google.com>
11438 * inferiors.c (started_inferior_callback): New function.
11439 (attached_inferior_callback): New function.
11440 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11441 * server.c (print_started_pid, print_attached_pid): New functions.
11442 (detach_or_kill_for_exit): New function.
11443 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11444 * server.h (have_started_inferiors_p): Declare.
11445 (have_attached_inferiors_p): Declare.
11447 * inferiors.c (remove_process): Fix memory leak, free process.
11448 * linux-low.c (linux_remove_process): New function.
11449 (linux_kill): Call it instead of remove_process.
11450 (linux_detach, linux_wait_1): Ditto.
11452 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11454 * configure.srv: Add x86 Windows CE target.
11456 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11458 * inferiors.c (get_thread_process): Make global.
11459 * server.h (get_thread_process): Add prototype.
11460 * thread-db.c (find_one_thread): Use get_thread_process
11461 instead of current_process.
11462 (thread_db_get_tls_address): Do not crash if called when
11463 thread layer is not yet initialized.
11465 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11467 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11468 * spu-low.c (current_tid): Rename to ...
11469 (current_ptid): ... this.
11470 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11471 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11472 ptid_get_lwp (current_ptid) instead of current_tid.
11473 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11474 instead of current_tid. Use find_process_pid to verify pid
11475 argument is valid. Pass proper argument to remove_process.
11476 (spu_thread_alive): Compare current_ptid instead of current_tid.
11477 (spu_resume): Likewise.
11479 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11481 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11484 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11486 Implement the multiprocess extensions, and add linux multiprocess
11489 * server.h (ULONGEST): Declare.
11490 (struct ptid, ptid_t): New.
11491 (minus_one_ptid, null_ptid): Declare.
11492 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11493 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11494 (struct inferior_list_entry): Change `id' type from unsigned from
11496 (struct sym_cache, struct breakpoint, struct
11497 process_info_private): Forward declare.
11498 (struct process_info): Declare.
11499 (current_process): Declare.
11500 (all_processes): Declare.
11501 (initialize_inferiors): Declare.
11502 (add_thread): Adjust to use ptid_t.
11503 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11504 (add_process, remove_process, find_thread_pid): Declare.
11505 (find_inferior_id): Adjust to use ptid_t.
11506 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11507 (multi_process): Declare.
11508 (push_event): Adjust to use ptid_t.
11509 (read_ptid, write_ptid): Declare.
11510 (prepare_resume_reply): Adjust to use ptid_t.
11511 (clear_symbol_cache): Declare.
11512 * inferiors.c (all_processes): New.
11513 (null_ptid, minus_one_ptid): New.
11514 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11515 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11516 (add_thread): Change unsigned long to ptid. Remove gdb_id
11518 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11519 (gdb_id_to_thread): Rename to ...
11520 (find_thread_pid): ... this. Change unsigned long to ptid.
11521 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11522 (loaded_dll, pull_pid_from_list): Adjust.
11523 (add_process, remove_process, find_process_pid)
11524 (get_thread_process, current_process, initialize_inferiors): New.
11525 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11526 (struct target_waitstatus) <related_pid>: Ditto.
11527 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11528 return type to int.
11529 (struct target_ops) <join>: Add `pid' argument.
11530 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11531 (struct target_ops) <wait>: Add `ptid' field. Change return type
11533 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11534 (mywait): Add `ptid' argument. Change return type to ptid_t.
11535 (target_pid_to_str): Declare.
11536 * target.c (set_desired_inferior): Adjust to use ptids.
11537 (mywait): Add new `ptid' argument. Adjust.
11538 (target_pid_to_str): New.
11539 * mem-break.h (free_all_breakpoints): Declare.
11540 * mem-break.c (breakpoints): Delelete.
11541 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11542 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11543 to use per-process breakpoint list.
11544 (free_all_breakpoints): New.
11545 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11546 (symbol_cache, all_symbols_looked_up): Delete.
11548 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11550 (prepare_resume_reply): Change ptid argument's type from unsigned
11551 long to ptid_t. Adjust. Implement W;process and X;process.
11552 (free_sym_cache, clear_symbol_cache): New.
11553 (look_up_one_symbol): Adjust to per-process symbol cache. *
11554 * server.c (cont_thread, general_thread, step_thread): Change type
11556 (attached): Delete.
11557 (multi_process): New.
11558 (last_ptid): Change type to ptid_t.
11559 (struct vstop_notif) <ptid>: Change type to ptid_t.
11560 (queue_stop_reply, push_event): Change `ptid' argument's type to
11562 (discard_queued_stop_replies): Add `pid' argument.
11563 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11564 changes. Don't reference the `attached' global.
11565 (attach_inferior): Adjust to mywait interface changes.
11566 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11567 features. Handle and report "multiprocess+". Handle
11569 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11571 (handle_v_kill): New.
11572 (handle_v_stopped): Adjust to use target_pid_to_str.
11573 (handle_v_requests): Allow multiple attaches and runs when
11574 multiprocess extensions are in effect. Handle "vKill".
11575 (myresume): Adjust to use ptids.
11576 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11577 (handle_status): Adjust to discard_queued_stop_replies interface
11579 (first_thread_of, kill_inferior_callback)
11580 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11581 (main): Call initialize_inferiors. Adjust to use ptids, killing
11582 and detaching from all inferiors. Handle multiprocess packet
11584 * linux-low.h: Include gdb_proc_service.h.
11585 (struct process_info_private): New.
11586 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11587 <lwpid_of>: Use ptid_get_lwp.
11588 (get_lwp_thread): Adjust.
11589 (struct lwp_info): Add `dead' member.
11590 (find_lwp_pid): Declare.
11591 * linux-low.c (thread_db_active): Delete.
11592 (new_inferior): Adjust comment.
11593 (inferior_pid): Delete.
11594 (linux_add_process): New.
11595 (handle_extended_wait): Adjust.
11596 (add_lwp): Change unsigned long to ptid.
11597 (linux_create_inferior): Add process to processes table. Adjust
11598 to use ptids. Don't set new_inferior here.
11599 (linux_attach_lwp): Rename to ...
11600 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11601 it. Adjust to use ptids.
11602 (linux_attach_lwp): New.
11603 (linux_attach): Add process to processes table. Don't set
11605 (struct counter): New.
11606 (second_thread_of_pid_p, last_thread_of_process_p): New.
11607 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11608 multiple processes.
11609 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11610 processes. Remove process from process table.
11611 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11612 to multiple processes.
11613 (any_thread_of): New.
11614 (linux_detach): Add `pid' argument, and handle it. Remove process
11615 from processes table.
11616 (linux_join): Add `pid' argument. Handle it.
11617 (linux_thread_alive): Change unsighed long argument to ptid_t.
11618 Consider dead lwps as not being alive.
11619 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11620 threads we're not interested in.
11621 (same_lwp, find_lwp_pid): New.
11622 (linux_wait_for_lwp): Change `pid' argument's type from int to
11624 (linux_wait_for_event): Rename to ...
11625 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11626 from int to ptid_t. Adjust.
11627 (linux_wait_for_event): New.
11628 (linux_wait_1): Add `ptid' argument. Change return type to
11629 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11630 that exit from the process table.
11631 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11633 (mark_lwp_dead): New.
11634 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11635 stopping all threads, mark its main lwp as dead.
11636 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11638 (fetch_register, usr_store_inferior_registers)
11639 (regsets_fetch_inferior_registers)
11640 (regsets_store_inferior_registers, linux_read_memory)
11641 (linux_write_memory): Inline `inferior_pid'.
11642 (linux_look_up_symbols): Adjust to use per-process
11643 `thread_db_active'.
11644 (linux_request_interrupt): Adjust to use ptids.
11645 (linux_read_auxv): Inline `inferior_pid'.
11646 (initialize_low): Don't reference thread_db_active.
11647 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11648 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11649 (ps_getpid): Return the pid of the current inferior.
11650 * thread-db.c (proc_handle, thread_agent): Delete.
11651 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11653 (find_one_thread): Change argument type to ptid_t. Adjust to
11655 (maybe_attach_thread): Adjust to per-process data and ptids.
11656 (thread_db_find_new_threads): Ditto.
11657 (thread_db_init): Ditto.
11658 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11659 processes table. Adjust to use ptids.
11660 (spu_kill, spu_detach): Adjust interface. Remove process from
11662 (spu_join, spu_thread_alive): Adjust interface.
11663 (spu_wait): Adjust interface. Remove process from processes
11664 table. Adjust to use ptids.
11665 * win32-low.c (current_inferior_tid): Delete.
11666 (current_inferior_ptid): New.
11667 (debug_event_ptid): New.
11668 (thread_rec): Take a ptid. Adjust.
11669 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11670 (child_delete_thread): Ditto.
11671 (do_initial_child_stuff): Add `attached' argument. Add process to
11673 (child_fetch_inferior_registers, child_store_inferior_registers):
11675 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11676 (win32_attach): Pass 1 to do_initial_child_stuff.
11677 (win32_kill): Adjust interface. Remove process from processes
11679 (win32_detach): Ditto.
11680 (win32_join): Adjust interface.
11681 (win32_thread_alive): Take a ptid.
11682 (win32_resume): Adjust to use ptids.
11683 (get_child_debug_event): Ditto.
11684 (win32_wait): Adjust interface. Remove exiting process from
11687 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11689 Non-stop mode support.
11691 * server.h (non_stop): Declare.
11692 (gdb_client_data, handler_func): Declare.
11693 (delete_file_handler, add_file_handler, start_event_loop):
11695 (handle_serial_event, handle_target_event, push_event)
11696 (putpkt_notif): Declare.
11697 * target.h (enum resume_kind): New.
11698 (struct thread_resume): Replace `step' field by `kind' field.
11699 (TARGET_WNOHANG): Define.
11700 (struct target_ops) <wait>: Add `options' argument.
11701 <supports_non_stop, async, start_non_stop>: New fields.
11702 (target_supports_non_stop, target_async): New.
11703 (start_non_stop): Declare.
11704 (mywait): Add `options' argument.
11705 * target.c (mywait): Add `options' argument. Print child exit
11706 notifications here.
11707 (start_non_stop): New.
11708 * server.c (non_stop, own_buf, mem_buf): New globals.
11709 (struct vstop_notif): New.
11710 (notif_queue): New global.
11711 (queue_stop_reply, push_event, discard_queued_stop_replies)
11712 (send_next_stop_reply): New.
11713 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11715 (attach_inferior): In non-stop mode, don't wait for the target
11717 (handle_general_set): Handle QNonStop.
11718 (handle_query): When handling qC, return the current general
11719 thread, instead of the first thread of the list.
11720 (handle_query): If the backend supports non-stop mode, include
11721 QNonStop+ in the qSupported query response.
11722 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11724 (handle_v_attach, handle_v_run): Handle non-stop mode.
11725 (handle_v_stopped): New.
11726 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11727 (myresume): Adjust to use resume_kind. Handle non-stop.
11728 (queue_stop_reply_callback): New.
11729 (handle_status): Handle non-stop mode.
11730 (main): Clear non_stop flag on reconnection. Use the event-loop.
11731 Refactor serial protocol handling from here ...
11732 (process_serial_event): ... to this new function. When GDB
11733 selects any thread, select one here. In non-stop mode, wait until
11734 GDB acks all pending events before exiting.
11735 (handle_serial_event, handle_target_event): New.
11736 * remote-utils.c (remote_open): Install remote_desc in the event
11738 (remote_close): Remove remote_desc from the event loop.
11739 (putpkt_binary): Rename to...
11740 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11741 (putpkt_binary): New as wrapper around putpkt_binary_1.
11742 (putpkt_notif): New.
11743 (prepare_resume_reply): In non-stop mode, don't change the
11745 * event-loop.c: New.
11746 * Makefile.in (OBJ): Add event-loop.o.
11747 (event-loop.o): New rule.
11749 * linux-low.h (pid_of): Moved here.
11751 (get_lwp_thread): Use lwpid_of.
11752 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11753 * linux-low.c (pid_of): Delete.
11754 (inferior_pid): Use lwpid_of.
11755 (linux_event_pipe): New.
11756 (target_is_async_p): New.
11758 (handle_extended_wait): Use lwpid_of.
11759 (add_lwp): Don't set lwpid field.
11760 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11761 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11762 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11763 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11764 first. Adjust to linux_wait_for_event interface changes. Use
11766 (linux_detach): Don't delete the main lwp here.
11767 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11768 (status_pending_p): Don't consider explicitly suspended lwps.
11769 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11770 pointer. Add OPTIONS argument. Change return type to int. Use
11771 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11772 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11773 pointer. Add status pointer argument. Return a pid instead of a
11774 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11775 changes. In non-stop mode, don't switch to a random thread.
11776 (linux_wait): Rename to...
11777 (linux_wait_1): ... this. Add target_options argument, and handle
11778 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11779 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11780 clean exit and signal exit code. Don't stop all threads in
11781 non-stop mode. In all-stop mode, only stop all threads when
11782 reporting a stop to GDB. Handle explicit thread stop requests.
11783 (async_file_flush, async_file_mark): New.
11785 (send_sigstop): Use lwpid_of.
11786 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11787 interface changes. In non-stop mode, don't switch to a random
11789 (linux_resume_one_lwp): Use lwpid_of.
11790 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11791 (linux_resume_one_thread): ... this. Handle resume_stop. In
11792 non-stop mode, don't look for pending flag in all threads.
11793 (resume_status_pending_p): Don't consider explicitly suspended
11795 (my_waitpid): Reimplement. Emulate __WALL.
11796 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11798 (sigchld_handler, linux_supports_non_stop, linux_async)
11799 (linux_start_non_stop): New.
11800 (linux_target_ops): Register linux_supports_non_stop, linux_async
11801 and linux_start_non_stop.
11802 (initialize_low): Install SIGCHLD handler.
11803 * thread-db.c (thread_db_create_event, find_one_thread)
11804 (thread_db_get_tls_address): Use lwpid_of.
11805 * win32-low.c (win32_detach): Adjust to use resume_kind.
11806 (win32_wait): Add `options' argument.
11807 * spu-low.c (spu_resume): Adjust to use resume_kind.
11808 (spu_wait): Add `options' argument.
11810 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11812 Decouple target code from remote protocol.
11814 * target.h (enum target_waitkind): New.
11815 (struct target_waitstatus): New.
11816 (struct target_ops) <wait>: Return an unsigned long. Take a
11817 target_waitstatus pointer instead of a char pointer.
11818 (mywait): Likewise.
11819 * target.c (mywait): Change prototype to return an unsigned long.
11820 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11821 * server.h (thread_from_wait, old_thread_from_wait): Delete
11823 (prepare_resume_reply): Change prototype to take a
11825 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11826 (last_status, last_ptid): New.
11827 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11828 pid instead of a signal.
11829 (attach_inferior): Remove "status" and "signal" parameters.
11831 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11833 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11834 (handle_v_requests, myresume): Remove "status" and "signal"
11835 parameters. Adjust.
11836 (handle_status): New.
11837 (main): Delete local `status'. Adjust.
11838 * remote-utils.c: Include target.h.
11839 (prepare_resume_reply): Change prototype to take a
11840 target_waitstatus. Adjust.
11842 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11844 * spu-low.c (spu_wait): Adjust.
11845 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11847 (win32_wait): Adjust.
11849 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11851 * target.h (struct thread_resume): Delete leave_stopped member.
11852 (struct target_ops): Add a `n' argument to the `resume' callback.
11853 * server.c (start_inferior): Adjust.
11854 (handle_v_cont, myresume): Adjust.
11855 * linux-low.c (check_removed_breakpoint): Adjust to resume
11856 interface change, and to removed leave_stopped field.
11857 (resume_ptr): Delete.
11858 (struct thread_resume_array): New.
11859 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11860 resume interface change.
11861 (linux_continue_one_thread, linux_queue_one_thread)
11862 (resume_status_pending_p): Check if the resume field is NULL
11863 instead of checking the leave_stopped member.
11864 (linux_resume): Adjust to the target resume interface change.
11865 * spu-low.c (spu_resume): Adjust to the target resume interface
11867 * win32-low.c (win32_detach, win32_resume): Ditto.
11869 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11871 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11873 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11875 (linux_continue_one_thread): Only preserve the stepping flag if
11876 there's a pending breakpoint.
11878 2009-03-31 Pedro Alves <pedro@codesourcery.com>
11880 * server.c (main): After the inferior having exited, call
11881 remote_close before exiting gdbserver.
11883 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11885 Fix size of FPSCR in Power 7 processors.
11886 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11887 (PPC_FEATURE_HAS_DFP): New #define.
11888 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11891 2009-03-23 Pedro Alves <pedro@codesourcery.com>
11893 * server.c (handle_query) Whitespace and formatting.
11895 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11897 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11898 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11899 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11900 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11901 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11902 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11903 Makefile.in, configure.ac: Fix whitespace throughout.
11904 * configure: Regenerate.
11906 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11908 * inferiors.c (find_inferior): Make it safe for the callback
11909 function to delete the currently iterated inferior.
11911 2009-03-22 Pedro Alves <pedro@codesourcery.com>
11913 * Makefile.in (linuw_low_h): Move higher.
11914 (thread-db.o): Depend on $(linux_low_h).
11916 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11918 Rename "process" to "lwp" throughout.
11920 * linux-low.c (all_processes): Rename to...
11921 (all_lwps): ... this.
11922 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11923 (add_process): Rename to ...
11924 (add_lwp): ... this. Adjust.
11925 (linux_create_inferior): Adjust.
11926 (linux_attach_lwp): Adjust.
11927 (linux_attach): Adjust.
11928 (linux_kill_one_process): Rename to ...
11929 (linux_kill_one_lwp): ... this. Adjust.
11930 (linux_kill): Adjust.
11931 (linux_detach_one_process): Rename to ...
11932 (linux_detach_one_lwp): ... this. Adjust.
11933 (linux_detach): Adjust.
11934 (check_removed_breakpoint): Adjust.
11935 (status_pending_p): Adjust.
11936 (linux_wait_for_process): Rename to ...
11937 (linux_wait_for_lwp): ... this. Adjust.
11938 (linux_wait_for_event): Adjust.
11939 (send_sigstop): Adjust.
11940 (wait_for_sigstop): Adjust.
11941 (stop_all_processes): Rename to ...
11942 (stop_all_lwps): ... this.
11943 (linux_resume_one_process): Rename to ...
11944 (linux_resume_one_lwp): ... this. Adjust.
11945 (linux_set_resume_request, linux_continue_one_thread)
11946 (linux_queue_one_thread, resume_status_pending_p)
11947 (usr_store_inferior_registers, regsets_store_inferior_registers)
11948 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11950 * linux-low.h (get_process): Rename to ...
11951 (get_lwp): ... this. Adjust.
11952 (get_thread_process): Rename to ...
11953 (get_thread_lwp): ... this. Adjust.
11954 (get_process_thread): Rename to ...
11955 (get_lwp_thread): ... this. Adjust.
11956 (struct process_info): Rename to ...
11957 (struct lwp_info): ... this.
11958 (all_processes): Rename to ...
11959 (all_lwps): ... this.
11960 * proc-service.c (ps_lgetregs): Adjust.
11961 * thread-db.c (thread_db_create_event, find_one_thread)
11962 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11964 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11966 * server.c (handle_query): Handle "qAttached".
11968 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11970 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11971 GPLv3, update license URL.
11973 2009-03-01 Doug Evans <dje@google.com>
11975 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11976 (server_h): Add gdb_signals.h.
11977 (signals.o): Update.
11978 * server.h (target_signal_from_host,target_signal_to_host_p)
11979 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11981 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11983 * remote-utils.c (getpkt): Also generate remote-debug
11984 information if noack_mode is set.
11986 2009-02-06 Pedro Alves <pedro@codesourcery.com>
11988 * server.c (handle_query): Report qXfer:siginfo:read and
11989 qXfer:siginfo:write as supported and handle them.
11990 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11991 * linux-low.c (linux_xfer_siginfo): New.
11992 (linux_target_ops): Set it.
11994 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11996 * server.c (gdbserver_usage): Mention --remote-debug.
11997 (main): Accept '--remote-debug' switch.
11999 2009-01-18 Doug Evans <dje@google.com>
12001 * regcache.c (new_register_cache): No need to check result of xcalloc.
12002 * server.c (handle_search_memory): Back out calls to xmalloc,
12003 result is checked and error is returned to user upon failure.
12004 (handle_query): Ditto. Add more checks for result of malloc.
12005 (handle_v_cont): Check result of malloc, report error back to
12007 (handle_v_run): Ditto. Call freeargv.
12008 * server.h (freeargv): Declare.
12009 * utils.c (freeargv): New fn.
12011 2009-01-15 Doug Evans <dje@google.com>
12013 * gdbreplay.c (perror_with_name): Make arg const char *.
12014 * server.h (target_signal_to_name): Make return type const char *.
12015 * thread-db.c (thread_db_err_str): Make return type const char *.
12016 * utils.c (perror_with_name): Make arg const char *.
12018 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12020 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12021 when handling a EXIT_PROCESS_DEBUG_EVENT.
12023 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12025 * gdbreplay.c (gdbreplay_version): Update copyright year.
12026 * server.c (gdbserver_version): Likewise.
12028 2009-01-05 Doug Evans <dje@google.com>
12030 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12031 (handle_extended_wait): Improve comment.
12033 2008-12-13 Doug Evans <dje@google.com>
12035 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12036 * server.h (ATTR_MALLOC): New macro.
12037 (xmalloc,xcalloc,xstrdup): Declare.
12038 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12039 * inferiors.c: Ditto.
12040 * linux-low.c: Ditto.
12041 * mem-break.c: Ditto.
12042 * regcache.c: Ditto.
12043 * remote-utils.c: Ditto.
12046 * win32-low.c: Ditto.
12048 2008-12-12 Doug Evans <dje@google.com>
12050 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12051 in debugging printf.
12053 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12055 2008-12-09 Doug Evans <dje@google.com>
12057 * linux-low.h (struct process_info): Delete member tid, unused.
12058 * thread-db.c (find_one_thread): Update.
12059 (maybe_attach_thread): Update.
12061 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12063 * target.h (struct target_ops): Add qxfer_osdata member.
12064 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12066 (linux_qxfer_osdata): New functions.
12067 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12069 * server.c (handle_query): Handle "qXfer:osdata:read:".
12070 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12071 (buffer_xml_printf): New functions.
12072 * server.h (struct buffer): New.
12073 (buffer_grow_str, buffer_grow_str0): New macros.
12074 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12075 (buffer_xml_printf): Declare.
12077 2008-11-24 Doug Evans <dje@google.com>
12079 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12081 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12083 * server.c (handle_v_run): Always use the supplied argument list.
12085 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12087 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12088 (xtensa_regmap_table): Add entry for scompare1.
12090 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12092 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12093 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12094 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12095 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12096 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12097 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12098 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12099 XML target descriptions.
12100 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12101 when inferior is running on an ISA 2.05 or later processor. Add
12102 special case to return offset for full 64-bit slot of FPSCR when
12105 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12107 * Makefile.in (SFILES, clean): Added sparc64 files.
12108 (reg-sparc64.o, reg-sparc64.c): New.
12109 * configure.srv (sparc*-*-linux*): New configuration.
12110 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12111 syscall arguments for SPARC.
12112 (regsets_store_inferior_registers): Likewise.
12113 * linux-sparc-low.c: New file.
12115 2008-10-21 Doug Evans <dje@google.com>
12117 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12118 (READLINE_DIR,READLINE_DEP): Delete.
12119 (INTERNAL_CFLAGS): Update.
12120 (LINTFLAGS): Update.
12122 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12124 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12125 whole argv from the last run, not just argv[0].
12127 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12129 * regcache.c (new_register_cache): Return NULL if the register
12130 cache size isn't known yet.
12131 (free_register_cache): Avoid dereferencing a NULL regcache.
12133 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12135 * configure.srv: Merge MIPS and MIPS64.
12137 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12139 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12141 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12143 * Makefile.in: Add required vsx dependencies.
12145 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12146 Declare init_registers_powerpc_vsx32l.
12147 Declare init_registers_powerpc_vsx64l.
12148 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12149 (ppc_arch_setup): Check for VSX in hwcap.
12150 (ppc_fill_vsxregset): New function.
12151 (ppc_store_vsxregset): New function.
12152 Add new VSX entry in regset_info target_regsets.
12154 * configure.srv: Add new VSX dependencies.
12156 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12158 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12159 (remote_open): Set or clear transport_is_reliable.
12160 (putpkt_binary): Don't expect acks in noack mode.
12161 (getpkt): Don't send ack/nac in noack mode.
12162 * server.c (handle_general_set): Handle QStartNoAckMode.
12163 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12165 (main): Reset noack_mode on every connection.
12166 * server.h (noack_mode): Declare.
12168 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12170 * Makefile.in (GDBREPLAY_OBS): New variable.
12171 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12173 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12174 Daniel Jacobowitz <dan@codesourcery.com>
12176 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12177 (usr_store_inferior_registers): Likewise.
12178 (regsets_store_inferior_registers): Likewise.
12180 2008-07-31 Rolf Jansen <rj@surtec.com>
12181 Pedro Alves <pedro@codesourcery.com>
12183 * configure.ac: Check for memmem declaration.
12184 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12185 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12186 (disable_packet_qfThreadInfo): Unconditionally compile.
12187 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12188 * configure, config.in: Regenerate.
12190 2008-07-28 Doug Kwan <dougkwan@google.com>
12192 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12193 (linux_write_memory): Remove declaration of errno.
12195 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12197 * linux-low.c (handle_extended_wait): Do not use "status"
12198 variable uninitialized.
12200 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12202 * server.c (handle_v_attach): Inhibit reporting dll changes.
12204 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12206 * remote-utils.c (prepare_resume_reply): If requested, don't
12207 output "thread:TID" in the T stop reply.
12209 * server.c (disable_packet_vCont, disable_packet_Tthread)
12210 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12211 (handle_query): If requested, disable support for qC, qfThreadInfo
12213 (handle_v_requests): If requested, disable support for vCont.
12214 (gdbserver_show_disableable): New.
12215 (main): Handle --disable-packet and --disable-packet=LIST.
12217 * server.h (disable_packet_vCont, disable_packet_Tthread)
12218 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12220 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12222 * server.c (gdbserver_usage): Mention --version.
12224 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12226 * Makefile.in (gdbreplay.o): New rule.
12228 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12230 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12231 message, not gdbserver.
12233 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12234 Nathan Sidwell <nathan@codesourcery.com>
12235 Joseph Myers <joseph@codesourcery.com>
12237 * acinclude.m4: Include ../../config/acx.m4.
12238 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12239 * configure, config.in: Regenerate.
12240 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12241 * server.c (gdbserver_version): Print PKGVERSION.
12242 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12243 (main): Adjust gdbserver_usage calls.
12244 * gdbreplay.c (version, host_name): Add declarations.
12245 (gdbreplay_version, gdbreplay_usage): New.
12246 (main): Accept --version and --help options.
12248 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12250 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12251 (arm_breakpoint_at): Handle Thumb.
12252 (the_low_target): Add comment.
12254 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12256 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12258 2008-05-09 Doug Evans <dje@google.com>
12260 * server.h (decode_search_memory_packet): Declare.
12261 * remote-utils.c (decode_search_memory_packet): New fn.
12262 * server.c (handle_search_memory_1): New fn.
12263 (handle_search_memory): New fn.
12264 (handle_query): Process qSearch:memory packets.
12266 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12268 * regcache.c (registers_length): Remove.
12269 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12270 full register packet.
12271 * regcache.h (registers_length): Remove prototype.
12272 * server.h (PBUFSIZ): Define to 16384.
12274 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12276 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12277 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12278 powerpc-64l.o, and powerpc-altivec64l.o.
12279 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12280 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12281 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12282 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12283 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12286 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12287 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12288 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12289 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12290 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12291 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12292 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12293 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12294 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12295 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12298 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12299 (init_registers_powerpc_32l): ... this new prototype.
12300 (init_registers_powerpc_32): Remove, replace by ...
12301 (init_registers_powerpc_altivec32l): ... this new prototype.
12302 (init_registers_powerpc_e500): Remove, replace by ...
12303 (init_registers_powerpc_e500l): ... this new prototype.
12304 (init_registers_ppc64): Remove, replace by ...
12305 (init_registers_powerpc_64l): ... this new prototype.
12306 (init_registers_powerpc_64): Remove, replace by ...
12307 (init_registers_powerpc_altivec64l): ... this new prototype.
12308 (ppc_num_regs): Set to 73.
12309 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12310 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12311 (ppc_cannot_store_register): Handle orig_r3 and trap.
12312 (ppc_arch_setup): Update init_registers_... calls.
12313 (ppc_fill_gregset): Handle orig_r3 and trap.
12315 * inferiors.c (clear_inferiors): Reset current_inferior.
12317 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12319 * acinclude.m4: Add override.m4.
12320 * configure: Regenerate.
12322 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12324 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12325 initial call to init_register_ppc64.
12327 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12329 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12330 single powerpc*-*-linux* case.
12331 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12333 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12335 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12336 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12338 * linux-ppc-low.c: Include <elf.h>.
12339 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12340 (ppc_hwcap): New global variable.
12341 (ppc_regmap): Remove __SPE__ #ifdef sections.
12342 (ppc_regmap_e500): New global variable.
12343 (ppc_cannot_store_register): Update __SPE__ special case.
12344 (ppc_get_hwcap): New function.
12345 (ppc_arch_setup): Use it to determine whether inferior supports
12346 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12347 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12348 Do not access registers if target does not support AltiVec.
12349 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12350 Do not access registers if target does not support SPE.
12351 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12353 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12355 * linux-low.c (disabled_regsets, num_regsets): New.
12356 (use_regsets_p): Delete.
12357 (linux_wait_for_process): Clear disabled_regsets.
12358 (regsets_fetch_inferior_registers): Check and set it.
12359 (regsets_store_inferior_registers): Likewise.
12360 (linux_fetch_registers, linux_store_registers): Do not use
12362 (initialize_low): Allocate disabled_regsets.
12364 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12366 * Makefile.in (LIBOBJS): New.
12367 (OBS): Use LIBOBJS.
12368 (memmem.o): New rule.
12369 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12370 * configure: Regenerated.
12372 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12374 * server.c (handle_query): Never return "unsupported" for
12375 qXfer:features:read queries.
12377 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12379 * server.c (get_features_xml): Fix inverted condition.
12380 (handle_query): Always support qXfer:feature:read.
12382 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12384 * server.c (wrapper_argv): New.
12385 (start_inferior): Handle wrapper_argv. If set, expect an extra
12387 (gdbserver_usage): Document --wrapper.
12388 (main): Parse --wrapper.
12390 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12392 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12393 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12394 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12395 (ppc_set_pc): Likewise.
12396 (ppc_arch_setup): New function.
12397 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12398 of collect_register.
12399 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12401 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12403 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12404 instead of linux-ppc64-low.o.
12405 * linux-ppc64-low.c: Remove file.
12406 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12407 (linux-ppc64-low.o): Remove rule.
12409 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12410 (init_registers_powerpc_64): Likewise.
12411 (ppc_regmap): Conditionally define depending on __powerpc64__.
12412 (ppc_cannot_store_register): Do not special-case "fpscr" when
12413 compiled on __powerpc64__.
12414 (ppc_collect_ptrace_register): New function.
12415 (ppc_supply_ptrace_register): New function.
12416 (ppc_breakpoint): Change type to "unsigned int".
12417 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12418 (the_low_target): Conditionally provide initializers for the
12419 arch_setup member depending on __powerpc64__. Install
12420 collect_ptrace_register and supply_ptrace_register members.
12422 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12424 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12425 * server.c (gdbserver_xmltarget): Define.
12426 (get_features_xml): Use it to replace "target.xml" and arch_string.
12428 * configure.srv: Remove srv_xmltarget. Add XML files that were
12429 mentioned there to srv_xmlfiles instead. Remove conditional tests
12430 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12431 srv_xmlfiles and srv_regobj to include all possible choices.
12432 * configure.ac (srv_xmltarget): Remove.
12433 (srv_xmlfiles): Do not add "target.xml".
12434 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12435 checks for supplementary target information.
12436 * configure: Regenerate.
12437 * Makefile.in (XML_TARGET): Remove.
12438 (target.xml): Remove rule.
12439 (clean): Do not clean up target.xml.
12440 (.PRECIOUS): Do not mention target.xml.
12442 * target.h (struct target_ops): Remove arch_string member.
12443 * linux-low.c (linux_arch_string): Remove.
12444 (linux_target_ops): Remove arch_string initializer.
12445 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12446 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12447 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12448 * spu-low.c (spu_arch_string): Remove.
12449 (spu_target_ops): Remove arch_string initializer.
12450 * win32-low.c (win32_arch_string): Remove.
12451 (win32_target_ops): Remove arch_string initializer.
12452 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12453 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12454 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12456 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12458 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12459 by collect_ptrace_register and supply_ptrace_register hooks.
12460 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12461 instead of checking for the_low_target.left_pad_xfer.
12462 (usr_store_inferior_registers): Use collect_ptrace_register callback
12463 instead of checking for the_low_target.left_pad_xfer.
12465 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12466 (s390_supply_ptrace_register): Likewise.
12467 (s390_fill_gregset): Call s390_collect_ptrace_register.
12468 (the_low_target): Update.
12470 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12471 (ppc_supply_ptrace_register): Likewise.
12472 (the_low_target): Update.
12474 * linux-i386-low.c (the_low_target): Update.
12475 * linux-x86-64-low.c (the_low_target): Update.
12477 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12479 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12480 reg-s390.o and reg-s390x.o.
12482 * linux-low.c (new_inferior): New global variable.
12483 (linux_create_inferior, linux_attach): Set it.
12484 (linux_wait_for_process): Call the_low_target.arch_setup after the
12485 target has stopped for the first time.
12486 (initialize_low): Do not call the_low_target.arch_setup.
12488 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12489 (s390_set_pc): Likewise.
12490 (s390_arch_setup): New function.
12491 (the_low_target): Use s390_arch_setup as arch_setup routine.
12493 * regcache.c (realloc_register_cache): New function.
12494 (set_register_cache): Call it for each existing regcache.
12496 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12498 * server.h (init_registers): Remove prototype.
12500 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12501 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12502 instead of init_registers ().
12503 * linux-arm-low.c (init_registers_arm): Add prototype.
12504 (init_registers_arm_with_iwmmxt): Likewise.
12505 (the_low_target): Add initializer for arch_setup field.
12506 * linux-cris-low.c (init_registers_cris): Add prototype.
12507 (the_low_target): Add initializer for arch_setup field.
12508 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12509 (the_low_target): Add initializer for arch_setup field.
12510 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12511 (the_low_target): Add initializer for arch_setup field.
12512 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12513 (the_low_target): Add initializer for arch_setup field.
12514 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12515 (the_low_target): Add initializer for arch_setup field.
12516 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12517 (the_low_target): Add initializer for arch_setup field.
12518 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12519 (init_registers_mips64_linux): Likewise.
12520 (the_low_target): Add initializer for arch_setup field.
12521 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12522 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12523 (the_low_target): Add initializer for arch_setup field.
12524 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12525 (init_registers_powerpc_64): Likewise.
12526 (the_low_target): Add initializer for arch_setup field.
12527 * linux-s390-low.c (init_registers_s390): Add prototype.
12528 (init_registers_s390x): Likewise.
12529 (the_low_target): Add initializer for arch_setup field.
12530 * linux-sh-low.c (init_registers_sh): Add prototype.
12531 (the_low_target): Add initializer for arch_setup field.
12532 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12533 (the_low_target): Add initializer for arch_setup field.
12534 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12535 (the_low_target): Add initializer for arch_setup field.
12537 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12538 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12539 instead of init_registers ().
12540 * win32-arm-low.c (init_registers_arm): Add prototype.
12541 (the_low_target): Add initializer for arch_setup field.
12542 * win32-i386-low.c (init_registers_i386): Add prototype.
12543 (the_low_target): Add initializer for arch_setup field.
12545 * spu-low.c (init_registers_spu): Add prototype.
12546 (initialize_low): Call initialie_registers_spu () instead of
12547 initialize_registers ().
12549 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12551 * server.c (handle_v_requests): When handling the vRun and vAttach
12552 packets, if already debugging a process, don't kill it. Return an
12555 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12557 * server.c (handle_query): Correct length check.
12559 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12561 * win32-low.c (do_initial_child_stuff): Add process handle
12562 parameter. Set current_process_handle and current_process_id from the
12563 parameters. Clear globals.
12564 (win32_create_inferior): Don't set current_process_handle and
12565 current_process_id here. Instead pass them on the call to
12566 do_initial_child_stuff.
12567 (win32_attach): Likewise.
12568 (win32_clear_inferiors): New.
12569 (win32_kill): Don't close the current process handle or the
12570 current thread handle here. Instead call win32_clear_inferiors.
12571 (win32_detach): Don't open a new handle to the process. Call
12572 win32_clear_inferiors.
12573 (win32_join): Don't rely on current_process_handle; open a new
12574 handle using the process id.
12575 (win32_wait): Call win32_clear_inferiors when the inferior process
12578 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12580 * server.c (monitor_show_help): Add "exit".
12582 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12584 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12585 (clean): Add reg-xtensa.c.
12586 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12587 * configure.srv (xtensa*-*-linux*) New target.
12588 * linux-xtensa-low.c: New.
12589 * xtensa-xtregs.c: New.
12591 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12593 * hostio.c: Don't include errno.h.
12594 (errno_to_fileio_errno): Move to hostio-errno.
12595 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12596 error number outputting to the target->hostio_last_error callback.
12597 (hostio_packet_error): Use FILEIO_EINVAL directly.
12598 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12599 calls to hostio_error.
12600 * hostio-errno.c: New.
12601 * server.h (hostio_last_error_from_errno): Declare.
12602 * target.h (target_ops): Add hostio_last_error member.
12603 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12604 as hostio_last_error handler.
12605 * spu-low.c (spu_target_ops): Likewise.
12606 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12607 (wince_hostio_last_error): New functions.
12608 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12609 as hostio_last_error handler.
12610 (win32_target_ops) [!_WIN32_WCE]: Register
12611 hostio_last_error_from_errno as hostio_last_error handler.
12612 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12613 (hostio-errno.o): New rule.
12614 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12615 * configure.srv (srv_hostio_err_objs): New variable. Default to
12617 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12618 * configure: Regenerate.
12620 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12622 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12623 (linux_kill, linux_detach): Clean up the process list.
12624 * remote-utils.c (remote_open): Improve port number parsing.
12625 (putpkt_binary, input_interrupt): Only send interrupts if the target
12627 * server.c (extended_protocol): Make static.
12628 (attached): Define earlier.
12629 (exit_requested, response_needed, program_argv): New variables.
12630 (target_running): New.
12631 (start_inferior): Clear attached here.
12632 (attach_inferior): Set attached here.
12633 (require_running): Define.
12634 (handle_query): Use require_running and target_running. Implement
12636 (handle_v_attach, handle_v_run): New.
12637 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12638 (gdbserver_usage): Update.
12639 (main): Redo argument parsing. Handle --debug and --multi. Handle
12640 --attach along with other options or after the port. Save
12641 program_argv. Support no initial program. Resynchronize
12642 communication with GDB after an error. Handle "monitor exit".
12643 Use require_running and target_running. Always allow the extended
12644 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12645 restart in extended mode.
12646 * README: Refer to the GDB manual. Update --attach usage.
12648 2007-12-20 Andreas Schwab <schwab@suse.de>
12650 * linux-low.c (STACK_SIZE): Define.
12651 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12652 (linux_test_for_tracefork): Likewise.
12654 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12656 * linux-low.c (linux_wait_for_event): Update messages. Do not
12657 reinsert auto-delete breakpoints.
12658 * mem-break.c (struct breakpoint): Change return type of handler to
12660 (set_breakpoint_at): Update handler type.
12661 (reinsert_breakpoint_handler): Return 1 instead of calling
12663 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12665 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12666 * mem-break.h (set_breakpoint_at): Update handler type.
12667 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12668 * win32-low.c (auto_delete_breakpoint): New.
12669 (get_child_debug_event): Use it.
12671 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12673 * configure.ac: Check for pread and pwrite.
12674 * hostio.c (handle_pread): Fall back to lseek and read.
12675 (handle_pwrite): Fall back to lseek and write.
12676 * config.in, configure: Regenerated.
12678 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12680 * server.c (myresume): Add own_buf argument.
12681 (main): Update calls.
12683 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12685 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12686 * remote-utils.c (remote_open): Do not call disable_async_io.
12687 (block_async_io): Delete.
12688 (unblock_async_io): Make static.
12689 (initialize_async_io): New.
12690 * server.c (handle_v_cont): Handle async I/O here.
12691 (myresume): Likewise. Move other common resume tasks here...
12692 (main): ... from here. Call initialize_async_io. Disable async
12693 I/O before the main loop.
12694 * server.h (initialize_async_io): Declare.
12695 (block_async_io, unblock_async_io): Delete prototypes.
12696 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12698 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12700 * remote-utils.c (readchar): Allow binary data in received messages.
12702 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12704 * win32-low.c (attaching): New global.
12705 (win32_create_inferior): Clear the `attaching' global.
12706 (win32_attach): Set the `attaching' global.
12707 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12708 attaching. Only set a breakpoint at the entry point if not
12711 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12713 * server.c (main): Don't report dll events on the initial
12714 connection on attaches.
12716 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12718 * server.c (main): Relax numerical bases supported for the pid of
12719 the --attach command line argument.
12721 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12723 * win32-low.c (win32_attach): Call OpenProcess before
12724 DebugActiveProcess, not after. Add last error output to error
12727 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12729 * win32-low.c (win32_get_thread_context)
12730 (win32_set_thread_context): New functions.
12731 (thread_rec): Use win32_get_thread_context.
12732 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12733 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12736 2007-12-03 Leo Zayas
12737 Pedro Alves <pedro_alves@portugalmail.pt>
12739 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12741 (child_add_thread): Minor cleanup.
12742 (child_continue): Resume artificially suspended threads before
12743 calling ContinueDebugEvent.
12744 (suspend_one_thread): New.
12745 (fake_breakpoint_event): New.
12746 (get_child_debug_event): Change return type to int. Check here if
12747 gdb sent an interrupt request. If a soft interrupt was requested,
12748 fake a breakpoint event. Return 0 if there is no event to handle,
12750 (win32_wait): Don't check here if gdb sent an interrupt request.
12751 Ensure there is a valid event to handle.
12752 (win32_request_interrupt): Add soft interruption method as last
12755 2007-12-03 Leo Zayas
12756 Pedro Alves <pedro_alves@portugalmail.pt>
12758 * win32-low.h (win32_thread_info): Add descriptions to the
12759 structure members. Replace `suspend_count' counter by a
12761 * win32-low.c (thread_rec): Update condition of when to get the
12762 context from the inferior. Rely on ContextFlags being set if it
12763 has already been retrieved. Only suspend the inferior thread if
12764 we haven't already. Warn if that fails.
12765 (continue_one_thread): s/suspend_count/suspended/. Only call
12766 ResumeThread once. Warn if that fails.
12768 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12770 * win32-low.c (win32_wait): Don't read from the inferior when it
12771 has already exited.
12773 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12775 * Makefile.in (win32_low_h): New variable.
12776 (win32-low.o): Add dependency on $(win32_low_h).
12777 (win32-arm-low.o, win32-i386-low.o): New rules.
12779 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12781 * hostio.c: Correct copyright year.
12783 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12785 * Makefile.in (OBS): Add hostio.o.
12786 (hostio.o): New rule.
12787 * server.h (handle_vFile): Declare.
12788 * hostio.c: New file.
12789 * server.c (handle_v_requests): Take packet_len and new_packet_len
12790 for binary packets. Call handle_vFile.
12791 (main): Update call to handle_v_requests.
12793 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12795 * linux-low.c: Include <sched.h>.
12797 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12799 * linux-low.c (linux_tracefork_grandchild): New.
12800 (linux_tracefork_child): Use clone.
12801 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12803 2007-10-31 Joel Brobecker <brobecker@adacore.com>
12805 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12807 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12809 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12811 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12813 * inferiors.c (change_inferior_id): Delete.
12814 (add_pid_to_list, pull_pid_from_list): New.
12815 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12816 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12817 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12818 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12819 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12820 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12821 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12822 (using_threads): Always set to 1.
12823 (handle_extended_wait): New.
12824 (add_process): Do not set TID.
12825 (linux_create_inferior): Set must_set_ptrace_flags.
12826 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12827 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12828 (linux_thread_alive): Rename TID argument to LWPID.
12829 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12830 (linux_wait_for_event): Do not use TID or check using_threads. Update
12831 call to dead_thread_notify. Call handle_extended_wait.
12832 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12833 (send_sigstop): Delete sigstop_sent.
12834 (wait_for_sigstop): Avoid TID.
12835 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12836 (linux_test_for_tracefork): New.
12837 (linux_lookup_signals): Use thread_db_active and
12838 linux_supports_tracefork_flag.
12839 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12840 * linux-low.h (get_process_thread): Avoid TID.
12841 (struct process_ifo): Move thread_known and tid to the end. Remove
12843 (linux_attach_lwp, thread_db_init): Update prototypes.
12844 * server.h (change_inferior_id): Delete prototype.
12845 (add_pid_to_list, pull_pid_from_list): New prototypes.
12846 * thread-db.c (thread_db_use_events): New.
12847 (find_first_thread): Rename to...
12848 (find_one_thread): ...this. Update callers and messages. Do not
12849 call fatal. Check thread_db_use_events. Do not call
12850 change_inferior_id or new_thread_notify.
12851 (maybe_attach_thread): Update. Do not call new_thread_notify.
12852 (thread_db_init): Set thread_db_use_events. Check use_events.
12853 * utils.c (fatal, warning): Correct message prefix.
12855 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12857 * Makefile.in (clean): Remove new files.
12858 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12859 (powerpc-64.o, powerpc-64.c): New rules.
12860 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12861 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12863 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12865 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12866 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12867 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12868 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12869 (target_regsets): Add AltiVec and SPE register sets.
12870 * configure.ac: Check for AltiVec and SPE.
12871 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12872 (ppc_fill_vrregset, ppc_store_vrregset): New.
12873 (target_regsets): Add AltiVec register set.
12874 * configure: Regenerated.
12876 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12878 * linux-low.c (O_LARGEFILE): Define.
12879 (linux_read_memory): Use /proc/PID/mem.
12880 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12881 * configure, config.in: Regenerated.
12883 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12885 * linux-low.c (linux_wait_for_event): Do not pass signals while
12888 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12890 * win32-low.c (create_process): New.
12891 (win32_create_inferior): Use create_process instead of
12892 CreateProcess. If create_process failed retry appending an ".exe"
12893 suffix. Store the GetLastError result immediatelly after
12894 create_process calls and use it on the call to error.
12896 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12898 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12900 2007-08-23 Joel Brobecker <brobecker@adacore.com>
12902 * configure.ac: Switch license to GPLv3.
12904 2007-08-01 Michael Snyder <msnyder@access-company.com>
12906 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12908 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12910 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12912 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12913 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12914 CloseToolhelp32Snapshot.
12915 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12916 CloseToolhelp32Snapshot.
12918 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
12920 * server.c (main): Check for inferior exit before main loop.
12922 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12924 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12925 instead of on tmp_desc.
12927 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12928 Daniel Jacobowitz <dan@codesourcery.com>
12930 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12931 (add_thread): Minor cleanups.
12932 (clear_inferiors): Move lower in the file. Clear the DLL
12934 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12935 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12936 (xml_escape_text): New.
12937 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12939 (handle_v_cont): Report errors.
12940 (gdbserver_version): Update.
12941 (main): Correct size of own_buf. Do not report initial DLL events.
12942 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12943 (unloaded_dll, xml_escape_text): New.
12944 * win32-low.c (enum target_waitkind): Update comments.
12945 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12946 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12947 (win32_EnumProcessModules, win32_GetModuleInformation)
12948 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12949 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12950 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12951 (win32_Module32First, win32_Module32Next, load_toolhelp)
12952 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12953 (get_child_debug_event): Handle DLL events.
12954 (win32_wait): Likewise.
12956 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12958 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12959 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12961 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12963 * win32-low.c (handle_output_debug_string): Ignore event if not
12966 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12968 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12970 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12972 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12974 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12976 * inferiors.c (change_inferior_id): Add comment.
12977 * linux-low.c (check_removed_breakpoint): Add an early
12978 prototype. Improve debug output.
12979 (linux_attach): Doc update.
12980 (linux_detach_one_process, linux_detach): Clean up before releasing
12982 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12983 * linux-low.h (struct process_info): Doc improvement.
12984 * mem-break.c (delete_all_breakpoints): New.
12985 * mem-break.h (delete_all_breakpoints): New prototype.
12986 * thread-db.c (find_first_thread): New.
12987 (thread_db_create_event): Call it instead of
12988 thread_db_find_new_threads. Clean up unused variables.
12989 (maybe_attach_thread): Remove first thread handling.
12990 (thread_db_find_new_threads): Use find_first_thread.
12991 (thread_db_get_tls_address): Likewise.
12993 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12995 * thread-db.c (thread_db_find_new_threads): Add prototype.
12996 (thread_db_create_event): Check for the main thread before adding
12998 (maybe_attach_thread): Only enable event reporting if TID == 0.
12999 (thread_db_get_tls_address): Check for new threads.
13001 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13003 * linux-low.c (linux_create_inferior): Try execv before execvp.
13004 * spu-low.c (spu_create_inferior): Likewise.
13006 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13008 * linux-low.c (linux_create_inferior): Change execv to execvp.
13009 * spu-low.c (spu_create_inferior): Likewies.
13011 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13013 * Makefile.in (clean): Clean new files instead of deleted ones.
13014 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13015 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13017 * configure.srv: Specify XML files and new regformats for MIPS and
13019 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13020 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13021 an entry for the restart register.
13022 (mips_cannot_fetch_register, mips_cannot_store_register)
13023 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13024 register names to match the XML descriptions.
13025 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13026 restart register instead of $0.
13028 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13029 Markus Deuling <deuling@de.ibm.com>
13031 * remote-utils.c (decode_xfer_write): New function.
13032 * server.h (decode_xfer_write): Add prototype.
13033 * server.c (handle_query): Add PACKET_LEN argument. Support
13034 qXfer:spu:read and qXfer:spu:write packets.
13035 (main): Pass packet_len to handle_query.
13036 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13037 * target.h (target_ops): Add qxfer_spu.
13039 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13041 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13042 accessing non-seekable spufs files.
13044 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13046 * server.c (handle_query): Add reply for qC packet.
13048 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13049 Leo Zayas <lerele@champenstudios@com>
13051 * server.h (check_remote_input_interrupt_request): New function.
13052 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13053 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13054 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13055 (check_remote_input_interrupt_request): New function.
13056 * server.h (check_remote_input_interrupt_request): Declare.
13057 * win32-low.c (winapi_DebugBreakProcess,
13058 winapi_GenerateConsoleCtrlEvent): New typedefs.
13059 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13061 (win32_wait): Check for remote interrupt request
13062 with check_remote_input_interrupt_request.
13063 (win32_request_interrupt): New function.
13064 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13066 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13068 * win32-low.c (debug_registers_changed,
13069 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13070 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13071 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13072 (thread_rec): Get context using the low target.
13073 (child_add_thread): Call thread_added on the low target,
13074 which does the same thing.
13076 (do_initial_child_stuff): Remove debug registers references.
13077 Set context using the low target. Resume threads after
13078 setting the contexts.
13079 (child_continue): Remove dead variable. Remove debug
13080 registers references.
13081 (child_fetch_inferior_registers): Go through the low target.
13082 (do_child_store_inferior_registers): Remove.
13083 (child_store_inferior_registers): Go through the low target.
13084 (win32_resume): Remove debug registers references.
13085 Set context using the low target.
13086 (handle_exception): Change return type to void. Don't record
13087 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13088 first chance exception.
13089 (get_child_debug_event): Change return type to void. Remove
13090 goto loop. Always return after waiting for debug event.
13091 (win32_wait): Convert to switch statement. Handle spurious
13094 * win32-i386-low.c (debug_registers_changed,
13095 debug_registers_used): New.
13096 (initial_stuff): Rename to ...
13097 (i386_initial_stuff): ... this. Clear debug registers
13099 (store_debug_registers): Delete.
13100 (i386_get_thread_context): New.
13101 (load_debug_registers): Delete.
13102 (i386_set_thread_context): New.
13103 (i386_thread_added): New.
13104 (single_step): Rename to ...
13105 (i386_single_step): ... this.
13106 (do_fetch_inferior_registers): Rename to ...
13107 (i386_fetch_inferior_register): ... this.
13108 (i386_store_inferior_register): New.
13109 (the_low_target): Adapt to new interface.
13111 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13112 (arm_get_thread_context): New.
13113 (arm_set_thread_context): New.
13115 (do_fetch_inferior_registers): Rename to ...
13116 (arm_fetch_inferior_register): ... this.
13117 (arm_store_inferior_register): New.
13118 (arm_wince_breakpoint): Reimplement as unsigned long.
13119 (arm_wince_breakpoint_len): Define.
13120 (the_low_target): Adapt to new interface.
13122 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13123 load_debug_registers. Add get_thread_context, set_thread_context,
13124 thread_added and store_inferior_register. Rename
13125 fetch_inferior_registers to fetch_inferior_register.
13126 (regptr): Remove declaration.
13128 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13130 * linux-low.c (linux_detach): Change return type to int. Return 0.
13131 * spu-low.c (spu_detach): Likewise.
13133 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13135 * target.h (target_ops): Change return type of detach to int.
13137 (join_inferior): New.
13138 * server.c (main): Don't skip detach support on mingw32.
13139 If the inferior doesn't support detaching return error.
13140 Call join_inferior instead of using waitpid.
13141 * linux-low.c (linux_join): New.
13142 (linux_target_op): Add linux_join.
13143 * spu-low.c (spu_join): New.
13144 (spu_target_ops): Add spu_join.
13145 * win32-low.c (win32_detach): Adapt to new interface.
13146 Reopen current_process_handle before detaching. Issue a child
13147 resume before detaching.
13149 (win32_target_op): Add win32_join.
13151 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13153 * win32-low.c (win32-attach): Fix return value.
13154 * target.h (target_ops): Describe ATTACH return values.
13156 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13158 * win32-low.c (GETPROCADDRESS): Define.
13159 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13160 (winapi_DebugSetProcessKillOnExit): Likewise.
13161 (win32_create_inferior): Force usage of ansi CreateProcessA.
13162 (win32_attach): Use GETPROCADDRESS.
13163 (win32_detach): Likewise.
13165 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13167 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13169 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13171 * win32-low.c: Commit leftover changes from 2007-03-29.
13173 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13175 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13176 fields short instead of int. Add explicit padding.
13177 (i387_cache_to_fsave): Remove unnecessary casts.
13178 (i387_fsave_to_cache): Doc fix.
13179 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13181 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13183 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13184 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13186 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13188 * configure.srv (arm*-*-mingw32ce*): Move near the other
13191 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13193 * configure.ac: Add errno checking.
13194 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13195 sys/file.h and malloc.h.
13196 (AC_CHECK_DECLS): Add perror.
13197 (srv_mingwce): Handle.
13198 * configure.srv (i[34567]86-*-cygwin*): Add
13199 win32-i386-low.o to srv_tgtobj.
13200 (i[34567]86-*-mingw*): Likewise.
13201 (arm*-*-mingw32ce*): Add case.
13202 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13203 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13204 [__MINGW32CE__] (strerror): New function.
13205 [__MINGW32CE__] (errno): Define to GetLastError.
13206 [__MINGW32CE__] (COUNTOF): New macro.
13207 (remote_open): Remove extra close call.
13208 * mem-break.c (delete_breakpoint_at): New function.
13209 * mem-break.h (delete_breakpoint_at): Declare.
13210 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13211 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13212 [USE_WIN32API] (read, write): Add char* casts.
13213 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13214 * server.h: Include wincecompat.h on Windows CE.
13215 [HAVE_ERRNO_H]: Check.
13216 (perror): Declare if not declared.
13217 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13218 (perror_with_name): Remove errno declaration.
13219 * wincecompat.h: New.
13220 * wincecompat.c: New.
13221 * win32-low.h: New.
13222 * win32-arm-low.c: New.
13223 * win32-i386-low.c: New.
13224 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13225 (OUTMSG2): Make it safe.
13227 (COUNTOF): New macro.
13228 (NUM_REGS): Get it from the low target.
13229 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13230 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13231 (thread_rec): Let low target handle debug registers.
13232 (child_add_thread): Likewise.
13233 (child_init_thread_list): Likewise.
13234 (continue_one_thread): Likewise.
13236 (do_child_fetch_inferior_registers): Move to ...
13237 * win32-i386-low.c: ... here, and rename to ...
13238 (do_fetch_inferior_registers): ... this.
13239 * win32-low.c (child_fetch_inferior_registers):
13240 Go through the low target.
13241 (do_child_store_inferior_registers): Use regptr.
13242 (strwinerror): New function.
13243 (win32_create_inferior): Handle Windows CE.
13244 Use strwinerror instead of strerror on Windows error
13245 codes. Add program to the error output.
13246 Don't close the main thread handle on Windows CE.
13247 (win32_attach): Use coredll.dll on Windows CE.
13248 (win32_kill): Close current process and current
13250 (win32_detach): Use coredll.dll on Windows CE.
13251 (win32_resume): Let low target handle debug registers, and
13253 (handle_exception): Add/Remove initial breakpoint. Avoid
13254 non-existant WSTOPSIG on Windows CE.
13255 (win32_read_inferior_memory): Cast to remove warning.
13256 (win32_arch_string): Go through the low target.
13257 (initialize_low): Call set_breakpoint_data with the low
13258 target's breakpoint.
13259 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13260 FOP_REGNUM, mappings): Move to ...
13261 * win32-i386-low.c: ... here.
13262 * win32-low.c (win32_thread_info): Move to ...
13263 * win32-low.h: ... here.
13264 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13265 win32-arm-low.c and wincecompat.c.
13266 (all:): Add $EXEEXT.
13267 (install-only:): Likewise.
13268 (gdbserver:): Likewise.
13269 (gdbreplay:): Likewise.
13270 * config.in: Regenerate.
13271 * configure: Regenerate.
13273 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13275 * win32-low.c: Rename typedef thread_info to
13276 win32_thread_info throughout.
13278 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13280 * win32-i386-low.c: Rename to ...
13281 * win32-low.c: ... this.
13282 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13283 * Makefile.in: Likewise.
13285 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13287 * remote-utils.c (monitor_output): Constify msg parameter.
13288 * server.h (monitor_output): Likewise.
13289 * win32-i386-low.c (handle_output_debug_string): New.
13290 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13291 handle_output_debug_string.
13292 (get_child_debug_event): Likewise.
13294 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13296 * server.c (main): Correct strtoul check.
13298 2007-03-27 Jon Ringle <jon@ringle.org>
13300 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13302 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13304 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13306 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13308 * terminal.h: Check HAVE_SGTTY_H.
13310 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13312 * remote-utils.c (remote_open): Print out the assigned port number.
13314 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13316 * remote-utils.c (monitor_output): New function.
13317 * server.c (debug_threads): Define here.
13318 (monitor_show_help): New function.
13319 (handle_query): Handle qRcmd.
13320 (main): Do not handle 'd' packet.
13321 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13322 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13325 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13327 * Makefile.in (EXEEXT): New.
13328 (clean): Use $(EXEEXT).
13330 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13332 * target.h (target_ops): Rename send_signal to request_interrupt,
13333 and remove enum target_signal parameter.
13334 * linux-low.c (linux_request_interrupt): Rename from
13335 linux_send_signal, and always send SIGINT.
13336 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13337 and always send SIGINT.
13338 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13340 (input_interrupt): Likewise.
13342 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13344 * server.c (get_features_xml): Check if target implemented
13346 * win32-i386-low.c (win32_arch_string): New.
13347 (win32_target_ops): Add win32_arch_string as arch_string member.
13349 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13351 * spu-low.c (spu_arch_string): New.
13352 (spu_target_ops): Add spu_arch_string.
13354 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13356 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13357 * configure.ac: Do not check for terminal.h.
13358 * configure, config.in: Regenerated.
13360 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13362 * Makefile.in (OBS): Add $(XML_BUILTIN).
13363 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13365 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13366 (arm-with-iwmmxt.c): New.
13367 * config.in, configure: Regenerate.
13368 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13369 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13370 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13371 (arm*-*-linux*): Add iWMMXt and regset support.
13372 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13373 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13374 (arm_store_wmmxregset, target_regsets): New.
13375 * server.c (get_features_xml): Take annex argument. Check builtin
13377 (handle_query): Handle multiple annexes.
13379 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13381 * remote-utils.c [USE_WIN32API] (read, write): Define.
13382 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13385 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13387 * linux-i386-low.c (the_low_target): Set arch_string.
13388 * linux-x86-64-low.c (the_low_target): Likewise.
13389 * linux-low.c (linux_arch_string): New.
13390 (linux_target_ops): Add it.
13391 * linux-low.h (struct linux_target_ops): Add arch_string.
13392 * server.c (write_qxfer_response): Use const void * for DATA.
13393 (get_features_xml): New.
13394 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13395 * target.h (struct target_ops): Add arch_string method.
13397 2007-01-03 Denis Pilat <denis.pilat@st.com>
13398 Daniel Jacobowitz <dan@codesourcery.com>
13400 * linux-low.c (linux_kill): Handle being called with no threads.
13401 * win32-i386-low.c (win32_kill): Likewise.
13402 (get_child_debug_event): Clear current_process_handle.
13404 2006-12-30 Denis PILAT <denis.pilat@st.com>
13405 Daniel Jacobowitz <dan@codesourcery.com>
13407 * remote-utils.c (remote_open): Check the type of specified
13408 serial port devices before opening them.
13409 * server.c (main): Kill the inferior if an error occurs during
13410 the first remote_open.
13412 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13414 * README: Update supported targets.
13416 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13418 * Makefile.in (clean): Remove reg-mips64.c.
13419 (reg-mips64.c, reg-mips64.o): New rules.
13420 * configure.srv: Handle mips64. Include regset support for mips.
13421 * linux-mips-low.c (union mips_register): New.
13422 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13423 (mips_breakpoint, mips_breakpoint_at): Use int.
13424 (mips_collect_register, mips_supply_register)
13425 (mips_collect_register_32bit, mips_supply_register_32bit)
13426 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13427 (mips_store_fpregset, target_regsets): New.
13428 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13430 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13432 * configure.srv: Add target "spu*-*-*".
13433 * Makefile.in (clean): Remove reg-spu.c.
13434 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13435 * spu-low.c: New file.
13437 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13439 * configure.ac: Correct td_thr_tls_get_addr test.
13440 * configure: Regenerated.
13442 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13444 * linux-low.c (linux_wait_for_event): Reformat. Use the
13445 pass_signals array.
13446 * remote-utils.c (decode_address_to_semicolon): New.
13447 * server.c (pass_signals, handle_general_set): New.
13448 (handle_query): Mention QPassSignals for qSupported.
13449 (main): Call handle_general_set.
13450 * server.h (pass_signals, decode_address_to_semicolon): New.
13452 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13454 * server.c (handle_query): Correct error handling for read_auxv.
13456 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13458 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13459 and srv_linux_thread_db to yes.
13460 * linux-s390-low.c (s390_fill_gregset): New function.
13461 (target_regsets): Define data structure.
13463 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13465 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13466 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13467 * config.in, configure: Regenerated.
13468 * inferiors.c (gdb_id_to_thread): New function.
13469 (gdb_id_to_thread_id): Use it.
13470 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13471 * linux-low.h (struct process_info): Add th member.
13472 (thread_db_get_tls_address): New prototype.
13473 * remote-utils.c (decode_address): Make non-static.
13474 * server.c (handle_query): Handle qGetTLSAddr.
13475 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13476 * target.h (struct target_ops): Add get_tls_address.
13477 * thread-db.c (maybe_attach_thread): Save the thread handle.
13478 (thread_db_get_tls_address): New.
13480 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13482 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13483 (linux_resume_one_process): Take a siginfo_t *. Update all
13484 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13485 (struct pending_signals): Add a siginfo_t.
13486 (linux_wait_for_process): Always set last_status.
13487 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13488 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13489 * linux-low.h (struct process_info): Add last_status.
13491 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13493 * remote-utils.c (try_rle): New function.
13494 (putpkt_binary): Use it.
13496 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13498 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13499 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13500 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13501 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13502 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13505 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13507 * server.c (terminal_fd): New variable.
13508 (old_foreground_pgrp): Likewise.
13509 (restore_old_foreground_pgrp): New function.
13510 (start_inferior): Record the terminal file descriptor in terminal_fd
13511 and its original foreground group in old_foreground_pgrp. Register
13512 restore_old_foreground_pgrp with atexit().
13514 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13516 * server.c (handle_query): Correct qPart to qXfer.
13518 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13520 * configure.ac: Check for more headers which are missing on
13521 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13522 * configure.srv: Add Cygwin and mingw32.
13523 * remote-utils.c: Don't include headers unconditionally which
13524 are missing on mingw32. Include <winsock.h> for mingw32.
13525 (remote_open): Adjust for mingw32 support. Flush
13526 standard error after writing to it.
13527 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13528 (unblock_async_io, enable_async_io, disable_async_io)
13529 (readchar, getpkt): Update for Winsock support.
13530 (prepare_resume_reply): Expect a protocol signal number.
13531 * server.c: Disable <sys/wait.h> on mingw32.
13532 (start_inferior): Adjust for mingw32 support. Flush
13533 standard error after writing to it.
13534 (attach_inferior): Likewise. Use protocol signal
13536 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13538 * win32-i386-low.c: New file.
13539 * Makefile.in (XM_CLIBS): Set.
13540 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13541 (win32-i386-low.o): New dependency rule.
13542 * linux-low.c (linux_wait): Use target signal numbers.
13543 * target.h (struct target_ops): Doc fix.
13544 * server.h (target_signal_to_name): New prototype.
13545 * gdbreplay.c: Don't include headers unconditionally which
13546 are missing on mingw32. Include <winsock.h> for mingw32.
13547 (remote_close, remote_open): Adjust for Winsock support.
13548 * configure, config.in: Regenerated.
13550 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13552 * server.c (decode_xfer_read, write_qxfer_response): New.
13553 (handle_query): Take a packet length argument. Handle
13554 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13555 the qSupported response.
13556 (main): Update call to handle_query.
13558 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13560 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13561 (putpkt_binary): Renamed from putpkt and adjusted for binary
13563 (putpkt): New wrapper for putpkt_binary.
13564 (readchar): Don't mask off the high bit.
13565 (decode_X_packet): New function.
13566 * server.c (main): Call putpkt_binary if a handler sets the packet
13567 length. Save the length of the incoming packet. Handle 'X'.
13568 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13570 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13572 * server.c (handle_query): Handle qSupported.
13574 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13576 * remote-utils.c (all_symbols_looked_up): New variable.
13577 (look_up_one_symbol): Check it.
13578 * server.h (look_up_one_symbol): New declaration.
13579 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13581 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13583 * Makefile.in (linux-arm-low.o): Update dependencies.
13584 * linux-arm-low.c: Include "gdb_proc_service.h".
13585 (PTRACE_GET_THREAD_AREA): Define.
13586 (ps_get_thread_area): New function.
13588 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13590 * configure.srv (m68k*-*-uclinux*): New target.
13591 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13592 (linux_resume_one_process): Remove extraneous cast.
13593 (linux_read_offsets): New.
13594 (linux_target_op): Add linux_read_offsets on mmuless systems.
13595 * server.c (handle_query): Add qOffsets logic.
13596 * target.h (struct target_ops): Add read_offsets.
13598 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13600 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13601 (PTRACE_GET_THREAD_AREA): Define.
13602 (ps_get_thread_area): New function.
13603 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13604 (linux-x86-64-low.o): Update.
13606 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13608 * configure.ac: Remove checks for prfpregset_t.
13609 * gdb_proc_service.h: New file.
13610 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13611 new "gdb_proc_service.h".
13612 * proc-service.c: Likewise.
13613 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13614 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13615 * Makefile.in (gdb_proc_service_h): Updated.
13616 * configure, config.in: Regenerated.
13618 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13620 * remote-utils.c (prepare_resume_reply): Move declaration
13621 of gdb_id_from_wait to the top of the block.
13623 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13625 * linux-low.c (regsets_store_inferior_registers): Read the regset
13626 from the target before filling it.
13628 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13630 * server.c (attach_inferior): Return SIGTRAP for a successful
13633 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13635 * Makefile.in (OBS): Add version.o.
13636 (STAGESTUFF): Delete.
13637 (version.o): Add dependencies.
13638 (version.c): Replace rule.
13639 (clean): Remove version.c.
13640 * server.c (gdbserver_version): New.
13641 (gdbserver_usage): Use printf.
13642 (main): Handle --version and --help.
13643 * server.h (version, host_name): Add declarations.
13645 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13657 * linux-x86-64-low.c:
13659 * linux-s390-low.c:
13660 * linux-ppc64-low.c:
13662 * linux-mips-low.c:
13663 * linux-m68k-low.c:
13664 * linux-m32r-low.c:
13667 * linux-ia64-low.c:
13668 * linux-i386-low.c:
13669 * linux-crisv32-low.c:
13681 * gdbserver.1: Add (C) after Copyright. Update the FSF
13684 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13686 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13687 (arm_breakpoint_at): Recognize both breakpoints.
13688 (the_low_target): Use the correct breakpoint instruction.
13690 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13692 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13693 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13694 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13695 (the_low_target): Update.
13697 2005-10-25 Andreas Schwab <schwab@suse.de>
13699 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13701 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13702 (ia64_num_regs): Reduce to 462.
13704 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13706 * acinclude.m4: Correct quoting.
13707 * aclocal.m4: Regenerated.
13709 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13710 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13711 (thread_db_init): Call thread_db_err_str.
13712 * configure.ac: Check for TD_VERSION.
13713 * config.in, configure: Regenerated.
13715 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13717 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13719 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13721 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13722 is not available. Define HAVE_PTRACE_GETREGS if it is.
13723 * config.in, configure: Regenerated.
13724 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13725 * linux-i386-low.c, linux-m68k-low.c: Update to use
13726 HAVE_PTRACE_GETREGS.
13727 * linux-low.c (regsets_fetch_inferior_registers)
13728 (regsets_store_inferior_registers): Only return 0 if we processed
13730 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13731 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13733 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13735 * inferiors.c (struct thread_info): Add gdb_id.
13736 (add_thread): Add gdb_id argument.
13737 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13738 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13739 calls to add_thread.
13740 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13741 * server.c (handle_query): Use thread_to_gdb_id.
13742 (handle_v_cont, main): Use gdb_id_to_thread_id.
13743 * server.h (add_thread): Update prototype.
13744 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13747 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13749 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13750 left-padded registers.
13751 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13752 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13754 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13756 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13757 * configure: Regenerate.
13758 * config.in: Regenerate.
13759 * server.h (NEED_DECLARATION_STRERROR):
13760 Replace with !HAVE_DECL_STRERROR.
13762 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13764 * linux-low.c (linux_wait, linux_send_signal): Don't test
13765 an unsigned long variable for > 0 if it could be MAX_ULONG.
13766 * server.c (myresume): Likewise.
13767 * target.c (set_desired_inferior): Likewise.
13769 2005-06-13 Mark Kettenis <kettenis@gnu.org>
13771 * configure.ac: Simplify and improve check for socklen_t.
13772 * configure, config.in: Regenerate.
13774 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13776 * acconfig.h: Remove.
13777 * configure.ac: Add a test for socklen_t. Use three-argument
13778 AC_DEFINE throughout.
13779 * config.in: Regenerated using autoheader 2.59.
13780 * configure: Regenerated.
13782 * gdbreplay.c (socklen_t): Provide a default.
13783 (remote_open): Use socklen_t.
13784 * remote-utils.c (socklen_t): Provide a default.
13785 (remote_open): Use socklen_t.
13786 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13789 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13791 * linux-low.c (linux_read_memory, linux_write_memory)
13792 (linux_read_auxv): Likewise.
13793 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13794 (check_mem_write): Likewise.
13795 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13797 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13798 (registers_from_string, register_data): Likewise.
13799 * server.c (handle_query, main): Likewise.
13800 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13801 (decode_M_packet): Likewise.
13802 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13803 * target.h (struct target_ops): Update read_memory, write_memory,
13805 (read_inferior_memory, write_inferior_memory): Update.
13806 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13807 to unsigned char *.
13808 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13809 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13810 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13811 linux-s390-low.c, linux-sh-low.c: Update for changes in
13812 read_inferior_memory and the_low_target->breakpoint.
13814 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13816 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13817 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13818 * configure.srv: Add powerpc64-*-linux*.
13819 * linux-ppc64-low.c: New file.
13821 2005-05-23 Orjan Friberg <orjanf@axis.com>
13823 * linux-cris-low.c: New file with support for CRIS.
13824 * linux-crisv32-low.c: Ditto for CRISv32.
13825 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13826 (clean): Add reg-cris.c and reg-crisv32.c.
13827 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13828 reg-crisv32.o, and reg-crisv32.c to make rules.
13829 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13830 recognized targets.
13832 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13834 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13835 of sizeof (PTRACE_XFER_TYPE).
13836 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13838 2005-05-12 Orjan Friberg <orjanf@axis.com>
13840 * target.h (struct target_ops): Add insert_watchpoint,
13841 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13842 pointers for hardware watchpoint support.
13843 * linux-low.h (struct linux_target_ops): Ditto.
13844 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13845 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13846 to linux_target_ops.
13847 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13849 * server.c (main): Recognize 'Z' and 'z' packets.
13851 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13853 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13854 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13855 (the_low_target): Add new members.
13857 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13859 * proc-service.c (ps_lgetregs): Search all_processes instead of
13862 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13864 * server.c (start_inferior): Change return type to int.
13865 (attach_inferior): Change sigptr to int *.
13866 (handle_v_cont, handle_v_requests): Change signal to int *.
13867 (main): Change signal to int.
13869 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13871 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13872 * configure.srv: Add m32r*-*-linux*.
13873 * linux-m32r-low.c: New file.
13875 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13877 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13879 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13881 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13882 Take unsigned long arguments for PIDs.
13883 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13884 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13885 (wait_for_sigstop, linux_resume_one_process)
13886 (regsets_fetch_inferior_registers, linux_send_signal)
13887 (linux_read_auxv): Likewise. Update the types of variables holding
13888 PIDs. Update format string specifiers.
13889 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13890 * remote-utils.c (prepare_resume_reply): Likewise.
13891 * server.c (cont_thread, general_thread, step_thread)
13892 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13894 (handle_query): Update format specifiers.
13895 (handle_v_cont, main): Use strtoul for thread IDs.
13896 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13897 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13898 (general_thread, step_thread, thread_from_wait)
13899 (old_thread_from_wait): Update.
13900 * target.h (struct thread_resume): Use unsigned long for THREAD.
13901 (struct target_ops): Use unsigned long for arguments to attach and
13904 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13906 * acinclude.m4: Include bfd/bfd.m4 directly.
13907 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13908 <agriffis@toolchain.org>.
13909 * aclocal.m4, configure: Regenerated.
13911 2005-01-07 Andrew Cagney <cagney@gnu.org>
13913 * configure.ac: Rename configure.in, require autoconf 2.59.
13914 * configure: Re-generate.
13916 2004-12-08 Daniel Jacobowitz <dan@debian.org>
13918 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13919 LIBS when finished.
13920 * aclocal.m4: Regenerated.
13921 * configure: Regenerated.
13923 2004-11-21 Andreas Schwab <schwab@suse.de>
13925 * linux-m68k-low.c (m68k_num_gregs): Define.
13926 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13927 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13928 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13929 (m68k_breakpoint_at): New. Add to the_low_target.
13931 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13932 srv_linux_thread_db to yes.
13934 2004-10-20 Joel Brobecker <brobecker@gnat.com>
13936 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13937 (ARCH_SET_FS): Likewise.
13938 (ARCH_GET_FS): Likewise.
13939 (ARCH_GET_GS): Likewise.
13941 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13943 * linux-i386-low.c (ps_get_thread_area): New.
13944 * linux-x86-64-low.c (ps_get_thread_area): New.
13945 * linux-low.c: Include <sys/syscall.h>.
13946 (linux_kill_one_process): Don't kill the first thread here.
13947 (linux_kill): Kill the first thread here.
13948 (kill_lwp): New function.
13949 (send_sigstop, linux_send_signal): Use it.
13950 * proc-service.c: Clean up #ifdefs.
13951 (fpregset_info): Delete.
13952 (ps_lgetregs): Update and enable implementation.
13953 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13955 * remote-utils.c (struct sym_cache, symbol_cache): New.
13956 (input_interrupt): Print a clearer message.
13957 (async_io_enabled): New variable.
13958 (enable_async_io, disable_async_io): Use it. Update comments.
13959 (look_up_one_symbol): Use the symbol cache.
13960 * thread-db.c (thread_db_look_up_symbols): New function.
13961 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13963 2004-10-16 Daniel Jacobowitz <dan@debian.org>
13965 * configure.in: Test for -rdynamic.
13966 * configure: Regenerated.
13967 * Makefile (INTERNAL_LDFLAGS): New.
13968 (gdbserver, gdbreplay): Use it.
13970 2004-09-02 Andrew Cagney <cagney@gnu.org>
13972 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13974 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
13976 * linux-low.c (linux_wait): Clear all_processes list also.
13978 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13980 * linux-low.c: Include <errno.h>. Remove extern declaration of
13983 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
13985 * gdbreplay.c, server.h, utils.c: Update copyright years.
13987 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13989 * server.c (main): Print child status or termination signal from
13990 variable 'signal', not 'sig'.
13992 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13994 * linux-low.c (linux_read_memory): Change return type to
13995 int. Check for and return error from ptrace().
13996 * target.c (read_inferior_memory): Change return type to int. Pass
13997 back return status from the_target->read_memory().
13998 * target.h (struct target_ops): Adapt *read_memory() prototype.
14000 (read_inferior_memory): Adapt prototype.
14001 * server.c (main): Return an error packet if
14002 read_inferior_memory() returns an error.
14004 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14006 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14007 Unify with other clean targets.
14009 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14011 * server.c (handle_v_cont): Call set_desired_inferior.
14013 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14015 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14017 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14019 * linux-low.c (linux_wait): Unblock async I/O.
14020 (linux_resume): Block and enable async I/O.
14021 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14022 * server.h (block_async_io, unblock_async_io): Add prototypes.
14024 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14026 * remote-utils.c (remote_open): Print a status notice after
14027 opening a TCP port.
14028 * server.c (attach_inferior): Print a status notice after
14031 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14033 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14035 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14037 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14039 * server.c, target.h: Update copyright years.
14041 2004-02-25 Roland McGrath <roland@redhat.com>
14043 * target.h (struct target_ops): New member `read_auxv'.
14044 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14045 * linux-low.c (linux_read_auxv): New function.
14046 (linux_target_ops): Initialize `read_auxv' member to that.
14048 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14050 Committed by Jim Blandy <jimb@redhat.com>.
14052 * linux-s390-low.c (s390_num_regs): Update.
14053 (s390_regmap): Remove control registers. Use __s390x__ predefine
14054 instead of GPR_SIZE to distiguish s390 and s390x targets.
14056 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14058 * linux-low.c: Update copyright year.
14059 (check_removed_breakpoint): Clear pending_is_breakpoint.
14060 (linux_set_resume_request, linux_queue_one_thread)
14061 (resume_status_pending_p): New functions.
14062 (linux_continue_one_thread): Use process->resume.
14063 (linux_resume): Only resume threads if there are no pending events.
14064 * linux-low.h (struct process_info): Add resume request
14067 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14069 * regcache.c (new_register_cache): Clear the allocated register
14070 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14072 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14074 * linux-low.c (linux_resume): Take a struct thread_resume *
14076 (linux_wait): Update call.
14077 (resume_ptr): New static variable.
14078 (linux_continue_one_thread): Renamed from
14079 linux_continue_one_process. Use resume_ptr.
14080 (linux_resume): Use linux_continue_one_thread.
14081 * server.c (handle_v_cont, handle_v_requests): New functions.
14082 (myresume): New function.
14083 (main): Handle 'v' case.
14084 * target.h (struct thread_resume): New type.
14085 (struct target_ops): Change argument of "resume" to struct
14087 (myresume): Delete macro.
14089 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14091 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14092 (uninstall): Support DESTDIR.
14094 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14096 * configure.srv: Add xscale*linux copy of arm*linux entry.
14098 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14100 * linux-arm-low.c (arm_reinsert_addr): New function.
14101 (the_low_target): Add arm_reinsert_addr.
14103 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14105 * mem-break.c: Remove whitespace at end of file.
14107 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14109 * configure.in: Check whether we need to prototype strerror.
14110 * server.h: Optionally prototype strerror.
14111 * gdbreplay.c (perror_with_name): Use strerror.
14112 * linux-low.c (linux_attach_lwp): Use strerror.
14113 * utils.c (perror_with_name): Use strerror.
14114 * config.in, configure: Regenerated.
14116 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14118 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14119 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14121 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14123 * Makefile.in (SFILES): Update.
14124 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14125 low-sun3.c: Remove files.
14127 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14129 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14130 (linux_detach_one_process, linux_detach): New functions.
14131 (linux_target_ops): Add linux_detach.
14132 * server.c (main): Handle 'D' packet.
14133 * target.h (struct target_ops): Add "detach" member.
14134 (detach_inferior): Define.
14136 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14138 From Kelley Cook <kelleycook@wideopenwest.com>:
14139 * configure.srv: Accept i[34567]86 variants.
14141 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14143 * linux-low.c (linux_wait_for_event): Correct comment typos.
14144 (linux_resume_one_process): Call check_removed_breakpoint.
14145 (linux_send_signal): New function.
14146 (linux_target_ops): Add linux_send_signal.
14147 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14149 * target.h (struct target_ops): Add send_signal.
14151 2003-05-29 Jim Blandy <jimb@redhat.com>
14153 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14154 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14155 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14156 away part of the register's value.
14158 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14160 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14161 (linux_wait_for_event, linux_init_signals): Likewise.
14163 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14165 * configure.in: Check for stdlib.h.
14166 * configure: Regenerated.
14167 * config.in: Regenerated.
14169 2003-01-04 Andreas Schwab <schwab@suse.de>
14171 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14173 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14175 * Makefile.in: Remove obsolete code.
14177 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14179 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14180 defined(PT_FPR0_HI).
14182 2002-11-17 Stuart Hughes <seh@zee2.com>
14184 * linux-arm-low.c (arm_num_regs): Increase.
14185 (arm_regmap): Include status register.
14187 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14189 * linux-low.c (register_addr): Remove incorrect -1 check.
14191 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14193 * linux-low.c (linux_create_inferior): Call setpgid. Return
14195 (unstopped_p, linux_signal_pid): Remove.
14196 (linux_target_ops): Remove linux_signal_pid.
14197 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14198 global instead of target method.
14199 * target.h (struct target_ops): Remove signal_pid. Update comment
14200 for create_inferior.
14201 * server.c (signal_pid): New variable.
14202 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14203 gdbserver. Set the child to be the foreground process group.
14204 (attach_inferior): Set signal_pid.
14206 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14208 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14210 2002-08-20 Jim Blandy <jimb@redhat.com>
14212 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14215 2002-08-01 Andrew Cagney <cagney@redhat.com>
14217 * Makefile.in: Make chill references obsolete.
14219 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14221 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14222 * configure: Regenerate.
14223 * config.in: Regenerate.
14225 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14227 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14228 (perror_with_name, remote_close, remote_open, expect, play): Static.
14230 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14232 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14233 byte offsets instead of an array of indexes.
14234 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14236 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14238 * regcache.c: Add comment.
14240 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14242 * thread-db.c: New file.
14243 * proc-service.c: New file.
14244 * acinclude.m4: New file.
14245 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14246 proc-service.o, and thread-db.o.
14247 (linux-low.o): Add USE_THREAD_DB.
14248 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14249 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14250 * aclocal.m4: Regenerated.
14251 * config.in: Regenerated.
14252 * configure: Regenerated.
14253 * configure.in: Check for proc_service.h, sys/procfs.h,
14254 thread_db.h, and linux/elf.h headrs.
14255 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14256 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14257 Check for -lthread_db and thread support.
14258 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14259 PowerPC, and SuperH.
14260 * i387-fp.c: Constify arguments.
14261 * i387-fp.h: Likewise.
14262 * inferiors.c: (struct thread_info): Renamed from
14263 `struct inferior_info'. Remove PID member. Use generic inferior
14264 list header. All uses updated.
14265 (inferiors, signal_pid): Removed.
14266 (all_threads): New variable.
14267 (get_thread): Define.
14268 (add_inferior_to_list): New function.
14269 (for_each_inferior): New function.
14270 (change_inferior_id): New function.
14271 (add_inferior): Removed.
14272 (remove_inferior): New function.
14273 (add_thread): New function.
14274 (free_one_thread): New function.
14275 (remove_thread): New function.
14276 (clear_inferiors): Use for_each_inferior and free_one_thread.
14277 (find_inferior): New function.
14278 (find_inferior_id): New function.
14279 (inferior_target_data): Update argument type.
14280 (set_inferior_target_data): Likewise.
14281 (inferior_regcache_data): Likewise.
14282 (set_inferior_regcache_data): Likewise.
14283 * linux-low.c (linux_bp_reinsert): Remove.
14284 (all_processes, stopping_threads, using_thrads)
14285 (struct pending_signals, debug_threads, pid_of): New.
14286 (inferior_pid): Replace with macro.
14287 (struct inferior_linux_data): Remove.
14288 (get_stop_pc, add_process): New functions.
14289 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14290 Use add_process and add_thread.
14291 (linux_attach_lwp): New function, based on old linux_attach. Use
14292 add_process and add_thread. Set stop_expected for new threads.
14293 (linux_attach): New function.
14294 (linux_kill_one_process): New function.
14295 (linux_kill): Kill all LWPs.
14296 (linux_thread_alive): Use find_inferior_id.
14297 (check_removed_breakpoints, status_pending_p): New functions.
14298 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14299 Update. Use WNOHANG. Wait for cloned processes also. Update process
14300 struct for the found process.
14301 (linux_wait_for_event): New function.
14302 (linux_wait): Use it. Support LWPs.
14303 (send_sigstop, wait_for_sigstop, stop_all_processes)
14304 (linux_resume_one_process, linux_continue_one_process): New functions.
14305 (linux_resume): Support LWPs.
14306 (REGISTER_RAW_SIZE): Remove.
14307 (fetch_register): Use register_size instead. Call supply_register.
14308 (usr_store_inferior_registers): Likewise. Call collect_register.
14309 Fix recursive case.
14310 (regsets_fetch_inferior_registers): Improve error message.
14311 (regsets_store_inferior_registers): Add debugging.
14312 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14313 (unstopped_p, linux_signal_pid): New functions.
14314 (linux_target_ops): Add linux_signal_pid.
14315 (linux_init_signals): New function.
14316 (initialize_low): Call it. Initialize using_threads.
14317 * regcache.c (inferior_regcache_data): Add valid
14319 (get_regcache): Fetch registers lazily. Add fetch argument
14320 and update all callers.
14321 (regcache_invalidate_one, regcache_invalidate): New
14323 (new_register_cache): Renamed from create_register_cache.
14324 Return the new regcache.
14325 (free_register_cache): Change argument to a void *.
14326 (registers_to_string, registers_from_string): Call get_regcache
14327 with fetch flag set.
14328 (register_data): Make static. Pass fetch flag to get_regcache.
14329 (supply_register): Call get_regcache with fetch flag clear.
14330 (collect_register): Call get_regcache with fetch flag set.
14331 (collect_register_as_string): New function.
14332 * regcache.h: Update.
14333 * remote-utils.c (putpkt): Flush after debug output and use
14335 Handle input interrupts while waiting for an ACK.
14336 (input_interrupt): Use signal_pid method.
14337 (getpkt): Flush after debug output and use stderr.
14338 (outreg): Use collect_register_as_string.
14339 (new_thread_notify, dead_thread_notify): New functions.
14340 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14341 and general_thread.
14342 (look_up_one_symbol): Flush after debug output.
14343 * server.c (step_thread, server_waiting): New variables.
14344 (start_inferior): Don't use signal_pid. Update call to mywait.
14345 (attach_inferior): Update call to mywait.
14346 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14347 (main): Don't fetch/store registers explicitly. Use
14348 set_desired_inferior. Support proposed ``Hs'' packet. Update
14350 * server.h: Update.
14351 (struct inferior_list, struct_inferior_list_entry): New.
14352 * target.c (set_desired_inferior): New.
14353 (write_inferior_memory): Constify.
14354 (mywait): New function.
14355 * target.h: Update.
14356 (struct target_ops): New signal_pid method.
14357 (mywait): Removed macro, added prototype.
14359 * linux-low.h (regset_func): Removed.
14360 (regset_fill_func, regset_store_func): New.
14361 (enum regset_type): New.
14362 (struct regset_info): Add type field. Use new operation types.
14363 (struct linux_target_ops): stop_pc renamed to get_pc.
14364 Add decr_pc_after_break and breakpoint_at.
14365 (get_process, get_thread_proess, get_process_thread)
14366 (strut process_info, all_processes, linux_attach_lwp)
14367 (thread_db_init): New.
14369 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14370 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14371 (the_low_target): Add new members.
14372 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14373 (i386_store_fpxregset): Constify.
14374 (target_regsets): Add new kind identifier.
14375 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14376 (i386_set_pc): Add debugging.
14377 (i386_breakpoint_at): New function.
14378 (the_low_target): Add new members.
14379 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14380 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14381 (mips_breakpoint_at): New.
14382 (the_low_target): Add new members.
14383 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14384 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14385 (the_low_target): Add new members.
14386 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14387 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14388 (the_low_target): Add new members.
14389 * linux-x86-64-low.c (target_regsets): Add new kind
14392 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14394 From Martin Pool <mbp@samba.org>:
14395 * server.c (gdbserver_usage): New function.
14398 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14400 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14401 stop_at -> stop_pc.
14403 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14405 * Makefile.in: Remove obsolete code.
14407 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14409 * linux-low.c (regsets_fetch_inferior_registers),
14410 (regsets_store_inferior_registers): Removed cast to int from
14412 * regcache.h: Added declaration of struct inferior_info.
14414 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14416 * inferiors.c (struct inferior_info): Add regcache_data.
14417 (add_inferior): Call create_register_cache.
14418 (clear_inferiors): Call free_register_cache.
14419 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14420 * regcache.c (struct inferior_regcache_data): New.
14421 (registers): Remove.
14422 (get_regcache): New function.
14423 (create_register_cache, free_register_cache): New functions.
14424 (set_register_cache): Don't initialize the register cache here.
14425 (registers_to_string, registers_from_string, register_data): Call
14427 * regcache.h: Add prototypes.
14428 * server.h: Likewise.
14430 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14432 * mem-break.c: New file.
14433 * mem-break.h: New file.
14434 * Makefile.in: Add mem-break.o rule; update server.h
14436 * inferiors.c (struct inferior_info): Add target_data
14438 (clear_inferiors): Free target_data member if set.
14439 (inferior_target_data, set_inferior_target_data): New functions.
14440 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14441 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14442 * linux-low.c (linux_bp_reinsert): New variable.
14443 (struct inferior_linux_data): New.
14444 (linux_create_inferior): Use set_inferior_target_data.
14445 (linux_attach): Likewise. Call add_inferior.
14446 (linux_wait_for_one_inferior): New function.
14447 (linux_wait): Call it.
14448 (linux_write_memory): Add const.
14449 (initialize_low): Call set_breakpoint_data.
14450 * linux-low.h (struct linux_target_ops): Add breakpoint
14452 * server.c (attach_inferior): Remove extra add_inferior
14454 * server.h: Include mem-break.h. Update inferior.c
14456 * target.c (read_inferior_memory)
14457 (write_inferior_memory): New functions.
14458 * target.h (read_inferior_memory)
14459 (write_inferior_memory): Change macros to prototypes.
14460 (struct target_ops): Update comments. Add const to write_memory
14463 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14465 * linux-low.c (usr_store_inferior_registers): Support
14466 registers which are allowed to fail to store.
14467 * linux-low.h (linux_target_ops): Likewise.
14468 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14469 (ppc_cannot_store_register): FPSCR may not be storable.
14471 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14473 * server.h: Include <string.h> if HAVE_STRING_H.
14474 * ChangeLog: Correct paths in last ChangeLog entry.
14476 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14478 * linux-low.h: Remove obsolete prototypes.
14479 (struct linux_target_ops): New.
14480 (extern the_low_target): New.
14481 * linux-low.c (num_regs, regmap): Remove declarations.
14482 (register_addr): Use the_low_target explicitly.
14483 (fetch_register): Likewise.
14484 (usr_fetch_inferior_registers): Likewise.
14485 (usr_store_inferior_registers): Likewise.
14486 * linux-arm-low.c (num_regs): Remove.
14487 (arm_num_regs): Define.
14488 (arm_regmap): Renamed from regmap, made static.
14489 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14491 (arm_cannot_store_register): Renamed from cannot_store_register,
14493 (the_low_target): New.
14494 * linux-i386-low.c (num_regs): Remove.
14495 (i386_num_regs): Define.
14496 (i386_regmap): Renamed from regmap, made static.
14497 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14499 (i386_cannot_store_register): Renamed from cannot_store_register,
14501 (the_low_target): New.
14502 * linux-ia64-low.c (num_regs): Remove.
14503 (ia64_num_regs): Define.
14504 (ia64_regmap): Renamed from regmap, made static.
14505 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14507 (ia64_cannot_store_register): Renamed from cannot_store_register,
14509 (the_low_target): New.
14510 * linux-m68k-low.c (num_regs): Remove.
14511 (m68k_num_regs): Define.
14512 (m68k_regmap): Renamed from regmap, made static.
14513 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14515 (m68k_cannot_store_register): Renamed from cannot_store_register,
14517 (the_low_target): New.
14518 * linux-mips-low.c (num_regs): Remove.
14519 (mips_num_regs): Define.
14520 (mips_regmap): Renamed from regmap, made static.
14521 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14523 (mips_cannot_store_register): Renamed from cannot_store_register,
14525 (the_low_target): New.
14526 * linux-ppc-low.c (num_regs): Remove.
14527 (ppc_num_regs): Define.
14528 (ppc_regmap): Renamed from regmap, made static.
14529 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14531 (ppc_cannot_store_register): Renamed from cannot_store_register,
14533 (the_low_target): New.
14534 * linux-s390-low.c (num_regs): Remove.
14535 (s390_num_regs): Define.
14536 (s390_regmap): Renamed from regmap, made static.
14537 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14539 (s390_cannot_store_register): Renamed from cannot_store_register,
14541 (the_low_target): New.
14542 * linux-sh-low.c (num_regs): Remove.
14543 (sh_num_regs): Define.
14544 (sh_regmap): Renamed from regmap, made static.
14545 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14547 (sh_cannot_store_register): Renamed from cannot_store_register,
14549 (the_low_target): New.
14550 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14551 (the_low_target): New.
14553 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14555 * Makefile.in: Add stamp-h target.
14556 * configure.in: Create stamp-h.
14557 * configure: Regenerated.
14559 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14561 * inferiors.c: New file.
14562 * target.c: New file.
14563 * target.h: New file.
14564 * Makefile.in: Add target.o and inferiors.o. Update
14566 * linux-low.c (inferior_pid): New static variable,
14567 moved from server.c.
14568 (linux_create_inferior): Renamed from create_inferior.
14569 Call add_inferior. Return 0 on success instead of a PID.
14570 (linux_attach): Renamed from myattach.
14571 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14572 (linux_thread_alive): Renamed from mythread_alive.
14573 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14575 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14576 (regsets_store_inferior_registers): Correct error message.
14577 Add missing ``return 0''.
14578 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14579 (linux_store_registers): Renamed from store_inferior_registers.
14580 (linux_read_memory): Renamed from read_inferior_memory.
14581 (linux_write_memory): Renamed from write_inferior_memory.
14582 (linux_target_ops): New structure.
14583 (initialize_low): Call set_target_ops ().
14584 * remote-utils.c (unhexify): New function.
14585 (hexify): New function.
14586 (input_interrupt): Send signals to ``signal_pid''.
14587 * server.c (inferior_pid): Remove.
14588 (start_inferior): Update create_inferior call.
14589 (attach_inferior): Call add_inferior.
14590 (handle_query): New function.
14591 (main): Call handle_query for `q' packets.
14592 * server.h: Include "target.h". Remove obsolete prototypes.
14593 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14595 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14597 * Makefile.in: Add WARN_CFLAGS. Update configury
14599 * configure.in: Check for <string.h>
14600 * configure: Regenerate.
14601 * config.in: Regenerate.
14602 * gdbreplay.c: Include needed system headers.
14603 (remote_open): Remove strchr prototype.
14604 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14605 * regcache.c (supply_register): Change buf argument to const void *.
14606 (supply_register_by_name): Likewise.
14607 (collect_register): Change buf argument to void *.
14608 (collect_register_by_name): Likewise.
14609 * regcache.h: Add missing prototypes.
14610 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14611 * server.c (handle_query): New function.
14612 (attached): New static variable, moved out of main.
14613 (main): Quiet longjmp clobber warnings.
14614 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14615 * utils.c (error): Remove NORETURN.