1 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3 * linux-low.c (linux_look_up_symbols): Don't call
4 linux_supports_traceclone.
5 * linux-low.h (thread_db_init): Remove use_events argument.
6 * thread-db.c (thread_db_use_event): Remove global variable.
7 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8 (struct thread_db) <td_create_bp>: Remove field.
9 (thread_db_create_event): Remove function.
10 (thread_db_enable_reporting): Likewise.
11 (find_one_thread): Don't check for thread_db_use_events.
12 (attach_thread): Likewise.
13 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
14 (try_thread_db_load_1): Don't check for thread_db_use_events.
15 (thread_db_init): Remove use_events argument and thread events
17 (remove_thread_event_breakpoints): Remove function.
18 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
20 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
22 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
24 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
25 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
26 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
27 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
28 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
30 * linux-crisv32-low.c (cris_supports_hardware_single_step):
32 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
33 * linux-low.c (can_hardware_single_step): Use
34 supports_hardware_single_step.
35 (can_software_single_step): New function.
36 (start_step_over): Call can_software_single_step.
37 (linux_supports_hardware_single_step): New function.
38 (struct target_ops) <supports_software_single_step>: Initialize.
39 * linux-low.h (struct linux_target_ops)
40 <supports_hardware_single_step>: Initialize.
41 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
42 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
43 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
44 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
45 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
46 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
47 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
48 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
49 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
50 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
52 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
53 (struct linux_target_ops) <tile_supports_hardware_single_step>:
55 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
56 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
57 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
59 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
60 * target.h (struct target_ops): <supports_software_single_step>:
62 (target_supports_software_single_step): New macro.
64 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
66 * linux-low.c (linux_wait_1): Fix pc advance condition.
67 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
68 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
70 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
72 * linux-arm-low.c (arm_is_thumb_mode): New function.
73 (arm_breakpoint_at): Use arm_is_thumb_mode.
74 (arm_breakpoint_kind_from_current_state): New function.
75 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
77 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
78 (linux_breakpoint_kind_from_current_state): New function.
79 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
80 * linux-low.h (struct linux_target_ops)
81 <breakpoint_kind_from_current_state>: New field.
82 * target.h (struct target_ops): Likewise.
83 (target_breakpoint_kind_from_current_state): New macro.
85 2015-11-30 Pedro Alves <palves@redhat.com>
87 * linux-low.c (linux_resume): Wake up the event loop before
90 2015-11-30 Pedro Alves <palves@redhat.com>
92 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
94 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
96 * target.c (struct thread_search): New structure.
97 (thread_search_callback): New function.
98 (prev_general_thread): New global.
99 (prepare_to_access_memory, done_accessing_memory): New functions.
100 * target.h (prepare_to_access_memory, done_accessing_memory):
101 Replace macros with function declarations.
103 2015-11-30 Pedro Alves <palves@redhat.com>
106 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
107 report TARGET_WAITKIND_NO_RESUMED.
108 * remote-utils.c (prepare_resume_reply): Handle
109 TARGET_WAITKIND_NO_RESUMED.
110 * server.c (report_no_resumed): New global.
111 (handle_query) <qSupported>: Handle "no-resumed+". Report
112 "no-resumed+" support.
113 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
114 return error if the client doesn't support no-resumed events.
115 (push_stop_notification): New function.
116 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
117 events if the client supports them.
119 2015-11-30 Pedro Alves <palves@redhat.com>
121 * linux-low.c (thread_still_has_status_pending_p): Don't check
123 (lwp_resumed): New function.
124 (status_pending_p_callback): Return early if the LWP is not
125 supposed to be resumed.
127 2015-11-30 Pedro Alves <palves@redhat.com>
129 * linux-low.c (handle_extended_wait): Assert that the LWP's
130 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
131 thread create events, leave the new child's status pending.
132 (linux_low_filter_event): If GDB wants to hear about thread exit
133 events, leave the LWP marked dead and don't delete it.
134 (linux_wait_for_event_filtered): Don't check for thread exit.
135 (filter_exit_event): New function.
136 (linux_wait_1): Use it, when returning an exit event.
137 (linux_resume_one_lwp_throw): Assert that the LWP's
138 waitstatus is TARGET_WAITKIND_IGNORE.
139 * remote-utils.c (prepare_resume_reply): Handle
140 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
141 * server.c (report_thread_events): New global.
142 (handle_general_set): Handle QThreadEvents.
143 (handle_query) <qSupported>: Handle and report QThreadEvents+;
144 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
145 TARGET_WAITKIND_THREAD_EXITED.
146 * server.h (report_thread_events): Declare.
148 2015-11-30 Pedro Alves <palves@redhat.com>
150 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
151 the thread's last_resume_kind was resume_stop.
153 2015-11-30 Pedro Alves <palves@redhat.com>
155 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
158 2015-11-30 Pedro Alves <palves@redhat.com>
160 * server.c (handle_v_requests): Handle vCtrlC.
162 2015-11-30 Pedro Alves <palves@redhat.com>
164 * gdbthread.h (find_any_thread_of_pid): Declare.
165 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
167 * server.c (handle_query): If current_thread is NULL, look for
168 another thread of the selected process.
170 2015-11-26 Daniel Colascione <dancol@dancol.org>
171 Simon Marchi <simon.marchi@ericsson.com>
173 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
174 * server.c (handle_qxfer_threads_worker): Refactor to include thread
176 * target.h (struct target_ops) <thread_name>: New field.
177 (target_thread_name): New macro.
179 2015-11-23 Joel Brobecker <brobecker@adacore.com>
181 * regcache.h (regcache_invalidate_pid): Add declaration.
182 * regcache.c (regcache_invalidate_pid): New function, extracted
183 from regcache_invalidate.
184 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
185 Add trivial documentation comment.
186 * lynx-low.c: Use regcache_invalidate_pid instead of
189 2015-11-23 Joel Brobecker <brobecker@adacore.com>
191 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
192 and Elf64_auxv_t if the target is Android.
194 2015-11-22 Doug Evans <xdje42@gmail.com>
196 * target.h: #include <sys/types.h>.
198 2015-11-19 Pedro Alves <palves@redhat.com>
200 * linux-low.c (linux_process_qsupported): Change prototype.
202 * linux-low.h (struct linux_target_ops) <process_qsupported>:
204 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
205 and adjust to loop over all features.
206 * server.c (handle_query) <qSupported>: Adjust to call
207 target_process_qsupported once, passing it a vector of unprocessed
209 * target.h (struct target_ops) <process_qsupported>: Change
211 (target_process_qsupported): Adjust.
213 2015-11-19 Pedro Alves <palves@redhat.com>
215 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
217 * configure: Regenerate.
219 2015-11-19 Pedro Alves <palves@redhat.com>
221 * configure: Regenerate.
223 2015-11-19 Yao Qi <yao.qi@linaro.org>
225 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
228 2015-11-19 Yao Qi <yao.qi@linaro.org>
230 * linux-aarch64-low.c (enum aarch64_operand_type): New.
231 (struct aarch64_operand): Move enum out.
233 2015-11-19 Yao Qi <yao.qi@linaro.org>
235 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
236 struct user_fpsimd_state *.
237 (aarch64_store_fpregset): Likewise.
239 2015-11-19 Yao Qi <yao.qi@linaro.org>
241 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
242 struct user_pt_regs *.
243 (aarch64_store_gregset): Likewise.
245 2015-11-18 Pedro Alves <palves@redhat.com>
247 * Makefile.in (all_object_files): Add $IPA_OBJS.
249 2015-11-17 Pedro Alves <palves@redhat.com>
251 * win32-low.c (win32_resume): Use gdb_signal_from_host,
252 GDB_SIGNAL_0 and gdb_signal_to_string.
254 2015-11-17 Pedro Alves <palves@redhat.com>
256 * win32-low.c (handle_output_debug_string): Remove parameter.
257 (win32_kill): Remove our_status local and adjust call to
258 handle_output_debug_string.
259 (get_child_debug_event): Adjust call to
260 handle_output_debug_string.
262 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
264 * linux-mips-low.c (mips_fill_gregset): Add cast.
265 (mips_store_gregset): Likewise.
266 (mips_fill_fpregset): Likewise.
267 (mips_store_fpregset): Likewise.
269 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
271 * linux-mips-low.c (mips_add_watchpoint): Rename private to
274 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
276 * linux-mips-low.c (mips_linux_new_thread): Change type of
277 watch_type to enum target_hw_bp_type.
279 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
281 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
282 Change return type to arm_hwbp_type.
284 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
286 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
287 (arm_store_gregset): Likewise.
288 * linux-arm-low.c (arm_get_hwcap): Likewise.
289 (arm_read_description): Likewise.
291 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
293 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
295 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
297 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
298 (ppc_fill_vsxregset): Likewise.
299 (ppc_store_vsxregset): Likewise.
300 (ppc_fill_vrregset): Likewise.
301 (ppc_store_vrregset): Likewise.
302 (ppc_fill_evrregset): Likewise.
303 (ppc_store_evrregset): Likewise.
305 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
307 * linux-ppc-low.c (ppc_usrregs_info): Remove
309 (ppc_arch_setup): Move lower in file.
311 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
313 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
314 (ps_pdwrite): Likewise.
316 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
318 * linux-arm-low.c (arm_new_thread): Move pointer dereference
319 to after assert checks.
321 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
323 * proc-service.c (ps_pdread): Add/adjust casts.
324 (ps_pdwrite): Add/adjust casts.
326 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
328 * server.c (handle_search_memory_1): Cast return value of
331 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
333 * server.c (write_qxfer_response): Change type of data to
336 2015-10-29 Pedro Alves <palves@redhat.com>
338 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
340 2015-10-29 Pedro Alves <palves@redhat.com>
342 * tracepoint.c (clear_installed_tracepoints): Add casts.
344 2015-10-29 Pedro Alves <palves@redhat.com>
346 * server.c (handle_v_cont, process_serial_event): Add enum
347 gdb_signal casts to signal parsing code.
349 2015-10-29 Pedro Alves <palves@redhat.com>
351 * linux-low.h (NULL_REGSET): Define.
352 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
353 * linux-arm-low.c (arm_regsets): Likewise.
354 * linux-crisv32-low.c (cris_regsets): Likewise.
355 * linux-m68k-low.c (m68k_regsets): Likewise.
356 * linux-mips-low.c (mips_regsets): Likewise.
357 * linux-nios2-low.c (nios2_regsets): Likewise.
358 * linux-ppc-low.c (ppc_regsets): Likewise.
359 * linux-s390-low.c (s390_regsets): Likewise.
360 * linux-sh-low.c (sh_regsets): Likewise.
361 * linux-sparc-low.c (sparc_regsets): Likewise.
362 * linux-tic6x-low.c (tic6x_regsets): Likewise.
363 * linux-tile-low.c (tile_regsets): Likewise.
364 * linux-x86-low.c (x86_regsets): Likewise.
365 * linux-xtensa-low.c (xtensa_regsets): Likewise.
367 2015-10-29 Pedro Alves <palves@redhat.com>
369 * linux-low.h (NULL_REGSET): Define.
370 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
371 * linux-arm-low.c (arm_regsets): Likewise.
372 * linux-crisv32-low.c (cris_regsets): Likewise.
373 * linux-m68k-low.c (m68k_regsets): Likewise.
374 * linux-mips-low.c (mips_regsets): Likewise.
375 * linux-nios2-low.c (nios2_regsets): Likewise.
376 * linux-ppc-low.c (ppc_regsets): Likewise.
377 * linux-s390-low.c (s390_regsets): Likewise.
378 * linux-sh-low.c (sh_regsets): Likewise.
379 * linux-sparc-low.c (sparc_regsets): Likewise.
380 * linux-tic6x-low.c (tic6x_regsets): Likewise.
381 * linux-tile-low.c (tile_regsets): Likewise.
382 * linux-x86-low.c (x86_regsets): Likewise.
383 * linux-xtensa-low.c (xtensa_regsets): Likewise.
385 2015-10-26 Doug Evans <dje@google.com>
387 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
389 2015-10-26 Doug Evans <dje@google.com>
391 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
393 2015-10-26 Doug Evans <dje@google.com>
395 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
397 (attach_thread, find_new_threads_callback): Ditto.
399 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
401 * mem-break.h (set_breakpoint_data): Remove.
403 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
405 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
406 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
407 (initialize_low): Remove set_breakpoint_data call.
408 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
409 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
410 (initialize_low): Remove set_breakpoint_data call.
411 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
412 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
413 (initialize_low): Remove set_breakpoint_data call.
415 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
417 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
418 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
419 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
420 * target.h (target_breakpoint_kind_from_pc): New macro.
422 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
424 * linux-low.c (default_breakpoint_kind_from_pc): New function.
425 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
426 the default breakpoint kind.
428 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
430 * linux-arm-low.c (arm_supports_z_point_type): Add software
433 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
435 * linux-arm-low.c: Refactor breakpoint definitions.
436 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
437 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
439 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
441 * Makefile.in: Add arm.c/o.
442 * configure.srv: Likewise.
443 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
444 (arm_breakpoint_kind_from_pc): New function.
445 (arm_sw_breakpoint_from_kind): Return proper kind.
446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
448 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
450 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
452 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
453 (struct raw_breakpoint) <size>: Remove.
454 (struct raw_breakpoint) <kind>: Add.
455 (bp_size): New function.
456 (bp_opcode): Likewise.
457 (find_raw_breakpoint_at): Adjust for kind.
458 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
459 (remove_memory_breakpoint): Adjust for kind call bp_size.
460 (set_raw_breakpoint_at): Adjust for kind.
461 (set_breakpoint): Likewise.
462 (set_breakpoint_at): Call breakpoint_kind_from_pc.
463 (delete_raw_breakpoint): Adjust for kind.
464 (delete_breakpoint): Likewise.
465 (find_gdb_breakpoint): Likewise.
466 (set_gdb_breakpoint_1): Likewise.
467 (set_gdb_breakpoint): Likewise.
468 (delete_gdb_breakpoint_1): Likewise.
469 (delete_gdb_breakpoint): Likewise.
470 (uninsert_raw_breakpoint): Likewise.
471 (reinsert_raw_breakpoint): Likewise.
472 (set_breakpoint_data): Remove.
473 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
474 (check_mem_read): Adjust for kind call bp_size.
475 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
476 (clone_one_breakpoint): Adjust for kind.
477 * mem-break.h (set_gdb_breakpoint): Likewise.
478 (delete_gdb_breakpoint): Likewise.
479 * server.c (process_serial_event): Likewise.
481 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
483 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
484 (struct linux_target_ops) <breakpoint>: Remove.
485 (struct linux_target_ops) <breakpoint_len>: Remove.
486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
488 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
489 (arm_sw_breakpoint_from_kind): New function.
490 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
491 (struct linux_target_ops) <breakpoint>: Remove.
492 (struct linux_target_ops) <breakpoint_len>: Remove.
493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
495 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
496 (struct linux_target_ops) <breakpoint>: Remove.
497 (struct linux_target_ops) <breakpoint_len>: Remove.
498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
500 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
501 (struct linux_target_ops) <breakpoint>: Remove.
502 (struct linux_target_ops) <breakpoint_len>: Remove.
503 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
504 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
505 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
506 and sw_breakpoint_from_kind to increment the pc.
507 (linux_breakpoint_kind_from_pc): New function.
508 (linux_sw_breakpoint_from_kind): New function.
509 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
510 (initialize_low): Call breakpoint_kind_from_pc and
511 sw_breakpoint_from_kind to replace breakpoint_data/len.
512 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
514 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
515 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
516 (struct linux_target_ops) <breakpoint>: Remove.
517 (struct linux_target_ops) <breakpoint_len>: Remove.
518 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
519 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
520 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
521 (struct linux_target_ops) <breakpoint>: Remove.
522 (struct linux_target_ops) <breakpoint_len>: Remove.
523 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
524 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
525 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
526 (struct linux_target_ops) <breakpoint>: Remove.
527 (struct linux_target_ops) <breakpoint_len>: Remove.
528 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
529 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
530 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
531 (struct linux_target_ops) <breakpoint>: Remove.
532 (struct linux_target_ops) <breakpoint_len>: Remove.
533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
534 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
535 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
536 (struct linux_target_ops) <breakpoint>: Remove.
537 (struct linux_target_ops) <breakpoint_len>: Remove.
538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
539 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
540 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
541 (struct linux_target_ops) <breakpoint>: Remove.
542 (struct linux_target_ops) <breakpoint_len>: Remove.
543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
545 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
546 (struct linux_target_ops) <breakpoint>: Remove.
547 (struct linux_target_ops) <breakpoint_len>: Remove.
548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
550 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
551 (struct linux_target_ops) <breakpoint>: Remove.
552 (struct linux_target_ops) <breakpoint_len>: Remove.
553 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
554 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
555 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
556 (struct linux_target_ops) <breakpoint>: Remove.
557 (struct linux_target_ops) <breakpoint_len>: Remove.
558 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
559 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
560 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
561 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
562 (struct linux_target_ops) <breakpoint>: Remove.
563 (struct linux_target_ops) <breakpoint_len>: Remove.
564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
566 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
567 (struct linux_target_ops) <breakpoint>: Remove.
568 (struct linux_target_ops) <breakpoint_len>: Remove.
569 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
570 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
572 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
574 * linux-cris-low.c (cris_get_pc): Remove void arg.
576 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
578 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
581 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
583 * inferiors.c (thread_pid_matches_callback): New function.
584 (find_thread_process): New function.
585 (remove_thread): Reset current_thread.
586 (remove_process): Assert threads have been removed first.
588 2015-10-15 Yao Qi <yao.qi@linaro.org>
590 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
592 (aarch64_remove_point): Likewise.
593 * regcache.c (regcache_register_size): New function.
595 2015-10-12 Yao Qi <yao.qi@linaro.org>
597 * linux-aarch64-low.c: Update all callers as emit_load_store
598 is renamed to aarch64_emit_load_store.
600 2015-10-12 Yao Qi <yao.qi@linaro.org>
602 * linux-aarch64-low.c: Update all callers of function renaming
603 from emit_insn to aarch64_emit_insn.
605 2015-10-12 Yao Qi <yao.qi@linaro.org>
607 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
609 (struct aarch64_memory_operand): Likewise.
611 (emit_insn): Move to arch/aarch64-insn.c.
612 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
613 (emit_load_store): Move to arch/aarch64-insn.c.
614 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
615 (can_encode_int32): Remove.
617 2015-10-12 Yao Qi <yao.qi@linaro.org>
619 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
620 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
621 (aarch64_relocate_instruction): Likewise.
622 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
623 (struct aarch64_insn_visitor): Likewise.
625 2015-10-12 Yao Qi <yao.qi@linaro.org>
627 * linux-aarch64-low.c (struct aarch64_insn_data): New.
628 (struct aarch64_insn_visitor): New.
629 (struct aarch64_insn_relocation_data): New.
630 (aarch64_ftrace_insn_reloc_b): New function.
631 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
632 (aarch64_ftrace_insn_reloc_cb): Likewise.
633 (aarch64_ftrace_insn_reloc_tb): Likewise.
634 (aarch64_ftrace_insn_reloc_adr): Likewise.
635 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
636 (aarch64_ftrace_insn_reloc_others): Likewise.
638 (aarch64_relocate_instruction): Use visitor.
640 2015-10-12 Yao Qi <yao.qi@linaro.org>
642 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
643 int. Add argument buf.
644 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
645 aarch64_relocate_instruction.
647 2015-10-12 Yao Qi <yao.qi@linaro.org>
649 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
650 argument insn. Remove local variable insn. Don't call
652 (aarch64_install_fast_tracepoint_jump_pad): Call
655 2015-09-30 Yao Qi <yao.qi@linaro.org>
657 * linux-aarch64-low.c (emit_movk): Shorten a long line.
658 (emit_load_store_pair): Likewise.
660 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
662 * dll.c (match_dll): Add cast(s).
663 (unloaded_dll): Likewise.
664 * linux-low.c (second_thread_of_pid_p): Likewise.
665 (delete_lwp_callback): Likewise.
666 (count_events_callback): Likewise.
667 (select_event_lwp_callback): Likewise.
668 (linux_set_resume_request): Likewise.
669 * server.c (accumulate_file_name_length): Likewise.
670 (emit_dll_description): Likewise.
671 (handle_qxfer_threads_worker): Likewise.
672 (visit_actioned_threads): Likewise.
673 * thread-db.c (any_thread_of): Likewise.
674 * tracepoint.c (same_process_p): Likewise.
675 (match_blocktype): Likewise.
676 (build_traceframe_info_xml): Likewise.
678 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
680 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
682 (gdb_unparse_agent_expr): Likewise.
683 * hostio.c (require_data): Likewise.
684 (handle_pread): Likewise.
685 * linux-low.c (disable_regset): Likewise.
686 (fetch_register): Likewise.
687 (store_register): Likewise.
688 (get_dynamic): Likewise.
689 (linux_qxfer_libraries_svr4): Likewise.
690 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
691 (set_fast_tracepoint_jump): Likewise.
692 (uninsert_fast_tracepoint_jumps_at): Likewise.
693 (reinsert_fast_tracepoint_jumps_at): Likewise.
694 (validate_inserted_breakpoint): Likewise.
695 (clone_agent_expr): Likewise.
696 * regcache.c (init_register_cache): Likewise.
697 * remote-utils.c (putpkt_binary_1): Likewise.
698 (decode_M_packet): Likewise.
699 (decode_X_packet): Likewise.
700 (look_up_one_symbol): Likewise.
701 (relocate_instruction): Likewise.
702 (monitor_output): Likewise.
703 * server.c (handle_search_memory): Likewise.
704 (handle_qxfer_exec_file): Likewise.
705 (handle_qxfer_libraries): Likewise.
706 (handle_qxfer): Likewise.
707 (handle_query): Likewise.
708 (handle_v_cont): Likewise.
709 (handle_v_run): Likewise.
710 (captured_main): Likewise.
711 * target.c (write_inferior_memory): Likewise.
712 * thread-db.c (try_thread_db_load_from_dir): Likewise.
713 * tracepoint.c (init_trace_buffer): Likewise.
714 (add_tracepoint_action): Likewise.
715 (add_traceframe): Likewise.
716 (add_traceframe_block): Likewise.
717 (cmd_qtdpsrc): Likewise.
718 (cmd_qtdv): Likewise.
719 (cmd_qtstatus): Likewise.
720 (response_source): Likewise.
721 (response_tsv): Likewise.
722 (cmd_qtnotes): Likewise.
723 (gdb_collect): Likewise.
724 (initialize_tracepoint): Likewise.
726 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
728 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
729 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
730 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
732 (enum aarch64_condition_codes): New enum.
733 (w0): New static global.
736 (struct aarch64_memory_operand) <type>: New
737 MEMORY_OPERAND_POSTINDEX type.
738 (postindex_memory_operand): New helper function.
739 (emit_ret): New function.
740 (emit_load_store_pair): New function, factored out of emit_stp
741 with support for MEMORY_OPERAND_POSTINDEX.
742 (emit_stp): Rewrite using emit_load_store_pair.
743 (emit_ldp): New function.
744 (emit_load_store): Likewise.
745 (emit_ldr): Mention post-index instruction in comment.
746 (emit_ldrh): New function.
747 (emit_ldrb): New function.
748 (emit_ldrsw): Mention post-index instruction in comment.
749 (emit_str): Likewise.
750 (emit_subs): New function.
751 (emit_cmp): Likewise.
752 (emit_and): Likewise.
753 (emit_orr): Likewise.
754 (emit_orn): Likewise.
755 (emit_eor): Likewise.
756 (emit_mvn): Likewise.
757 (emit_lslv): Likewise.
758 (emit_lsrv): Likewise.
759 (emit_asrv): Likewise.
760 (emit_mul): Likewise.
761 (emit_sbfm): Likewise.
762 (emit_sbfx): Likewise.
763 (emit_ubfm): Likewise.
764 (emit_ubfx): Likewise.
765 (emit_csinc): Likewise.
766 (emit_cset): Likewise.
767 (emit_nop): Likewise.
768 (emit_ops_insns): New helper function.
769 (emit_pop): Likewise.
770 (emit_push): Likewise.
771 (aarch64_emit_prologue): New function.
772 (aarch64_emit_epilogue): Likewise.
773 (aarch64_emit_add): Likewise.
774 (aarch64_emit_sub): Likewise.
775 (aarch64_emit_mul): Likewise.
776 (aarch64_emit_lsh): Likewise.
777 (aarch64_emit_rsh_signed): Likewise.
778 (aarch64_emit_rsh_unsigned): Likewise.
779 (aarch64_emit_ext): Likewise.
780 (aarch64_emit_log_not): Likewise.
781 (aarch64_emit_bit_and): Likewise.
782 (aarch64_emit_bit_or): Likewise.
783 (aarch64_emit_bit_xor): Likewise.
784 (aarch64_emit_bit_not): Likewise.
785 (aarch64_emit_equal): Likewise.
786 (aarch64_emit_less_signed): Likewise.
787 (aarch64_emit_less_unsigned): Likewise.
788 (aarch64_emit_ref): Likewise.
789 (aarch64_emit_if_goto): Likewise.
790 (aarch64_emit_goto): Likewise.
791 (aarch64_write_goto_address): Likewise.
792 (aarch64_emit_const): Likewise.
793 (aarch64_emit_call): Likewise.
794 (aarch64_emit_reg): Likewise.
795 (aarch64_emit_pop): Likewise.
796 (aarch64_emit_stack_flush): Likewise.
797 (aarch64_emit_zero_ext): Likewise.
798 (aarch64_emit_swap): Likewise.
799 (aarch64_emit_stack_adjust): Likewise.
800 (aarch64_emit_int_call_1): Likewise.
801 (aarch64_emit_void_call_2): Likewise.
802 (aarch64_emit_eq_goto): Likewise.
803 (aarch64_emit_ne_goto): Likewise.
804 (aarch64_emit_lt_goto): Likewise.
805 (aarch64_emit_le_goto): Likewise.
806 (aarch64_emit_gt_goto): Likewise.
807 (aarch64_emit_ge_got): Likewise.
808 (aarch64_emit_ops_impl): New static global variable.
809 (aarch64_emit_ops): New target function, return
810 &aarch64_emit_ops_impl.
811 (struct linux_target_ops): Install it.
813 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
815 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
816 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
818 * linux-aarch64-ipa.c: New file.
819 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
821 (aarch64_get_thread_area): New target method.
822 (extract_signed_bitfield): New helper function.
823 (aarch64_decode_ldr_literal): New function.
824 (enum aarch64_opcodes): New enum.
825 (struct aarch64_register): New struct.
826 (struct aarch64_operand): New struct.
827 (x0): New static global.
836 (aarch64_register): New helper function.
837 (register_operand): Likewise.
838 (immediate_operand): Likewise.
839 (struct aarch64_memory_operand): New struct.
840 (offset_memory_operand): New helper function.
841 (preindex_memory_operand): Likewise.
842 (enum aarch64_system_control_registers): New enum.
844 (emit_insn): New helper function.
845 (emit_b): New function.
846 (emit_bcond): Likewise.
849 (emit_blr): Likewise.
850 (emit_stp): Likewise.
851 (emit_ldp_q_offset): Likewise.
852 (emit_stp_q_offset): Likewise.
853 (emit_load_store): Likewise.
854 (emit_ldr): Likewise.
855 (emit_ldrsw): Likewise.
856 (emit_str): Likewise.
857 (emit_ldaxr): Likewise.
858 (emit_stxr): Likewise.
859 (emit_stlr): Likewise.
860 (emit_data_processing_reg): Likewise.
861 (emit_data_processing): Likewise.
862 (emit_add): Likewise.
863 (emit_sub): Likewise.
864 (emit_mov): Likewise.
865 (emit_movk): Likewise.
866 (emit_mov_addr): Likewise.
867 (emit_mrs): Likewise.
868 (emit_msr): Likewise.
869 (emit_sevl): Likewise.
870 (emit_wfe): Likewise.
871 (append_insns): Likewise.
872 (can_encode_int32_in): New helper function.
873 (aarch64_relocate_instruction): New function.
874 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
875 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
876 (struct linux_target_ops): Install aarch64_get_thread_area,
877 aarch64_install_fast_tracepoint_jump_pad and
878 aarch64_get_min_fast_tracepoint_insn_len.
880 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
882 * Makefile.in (aarch64-insn.o): New rule.
883 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
885 2015-09-21 Yao Qi <yao.qi@linaro.org>
887 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
889 2015-09-21 Yao Qi <yao.qi@linaro.org>
891 * tracepoint.c (max_jump_pad_size): Remove.
893 2015-09-18 Yao Qi <yao.qi@linaro.org>
895 * linux-aarch64-low.c: Don't include sys/uio.h.
896 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
898 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
900 * tracepoint.c (eval_result_type): Change prototype.
901 (condition_true_at_tracepoint): Fix argument to compiled_cond.
903 2015-09-15 Pedro Alves <palves@redhat.com>
905 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
906 Check whether to report exec events instead of checking whether
907 multiprocess is enabled.
909 2015-09-15 Pedro Alves <palves@redhat.com>
912 * remote-utils.c (prepare_resume_reply): Merge
913 TARGET_WAITKIND_VFORK_DONE switch case with the
914 TARGET_WAITKIND_FORKED case.
916 2015-09-15 Yao Qi <yao.qi@linaro.org>
918 * server.c (handle_query): Check string comparison using
919 "else if" instead of "if".
921 2015-09-15 Yao Qi <yao.qi@linaro.org>
923 * server.c (vCont_supported): New global variable.
924 (handle_query): Set vCont_supported to 1 if "vContSupported+"
925 matches. Append ";vContSupported+" to own_buf.
926 (handle_v_requests): Append ";s;S" to own_buf if target supports
927 hardware single step or vCont_supported is false.
928 (capture_main): Set vCont_supported to zero.
930 2015-09-15 Yao Qi <yao.qi@linaro.org>
932 * linux-low.c (linux_supports_conditional_breakpoints): Rename
934 (linux_supports_hardware_single_step): ... New function.
935 (linux_target_ops): Update.
936 * lynx-low.c (lynx_target_ops): Set field
937 supports_hardware_single_step to target_can_do_hardware_single_step.
938 * nto-low.c (nto_target_ops): Likewise.
939 * spu-low.c (spu_target_ops): Likewise.
940 * win32-low.c (win32_target_ops): Likewise.
941 * target.c (target_can_do_hardware_single_step): New function.
942 * target.h (struct target_ops) <supports_conditional_breakpoints>:
943 Remove. <supports_hardware_single_step>: New field.
944 (target_supports_conditional_breakpoints): Remove.
945 (target_supports_hardware_single_step): New macro.
946 (target_can_do_hardware_single_step): Declare.
947 * server.c (handle_query): Use target_supports_hardware_single_step
948 instead of target_supports_conditional_breakpoints.
950 2015-09-15 Yao Qi <yao.qi@linaro.org>
952 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
954 (struct linux_target_ops the_low_target): Install
955 aarch64_linux_siginfo_fixup.
957 2015-09-11 Don Breazeal <donb@codesourcery.com>
958 Luis Machado <lgustavo@codesourcery.com>
960 * linux-low.c (linux_mourn): Static declaration.
961 (linux_arch_setup): Move in front of
962 handle_extended_wait.
963 (linux_arch_setup_thread): New function.
964 (handle_extended_wait): Handle exec events. Call
965 linux_arch_setup_thread. Make event_lwp argument a
966 pointer-to-a-pointer.
967 (check_zombie_leaders): Do not check stopped threads.
968 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
969 (linux_low_filter_event): Add lwp and thread for exec'ing
970 non-leader thread if leader thread has been deleted.
971 Refactor code into linux_arch_setup_thread and call it.
972 Pass child lwp pointer by reference to handle_extended_wait.
973 (linux_wait_for_event_filtered): Update comment.
974 (linux_wait_1): Prevent clobbering exec event status.
975 (linux_supports_exec_events): New function.
976 (linux_target_ops) <supports_exec_events>: Initialize new member.
977 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
979 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
980 * server.c (report_exec_events): New global variable.
981 (handle_query): Handle qSupported query for exec-events feature.
982 (captured_main): Initialize report_exec_events.
983 * server.h (report_exec_events): Declare new global variable.
984 * target.h (struct target_ops) <supports_exec_events>: New
986 (target_supports_exec_events): New macro.
987 * win32-low.c (win32_target_ops) <supports_exec_events>:
988 Initialize new member.
990 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
992 * linux-low.c (linux_low_enable_btrace): Remove.
993 (linux_target_ops): Replace linux_low_enable_btrace with
996 2015-09-03 Yao Qi <yao.qi@linaro.org>
998 * linux-aarch64-low.c (aarch64_insert_point): Call
999 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1002 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1004 * linux-low.c (check_stopped_by_breakpoint): Use
1005 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1007 2015-08-27 Pedro Alves <palves@redhat.com>
1009 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1011 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1013 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1014 the XNEW-family equivalent.
1015 (compile_bytecodes): Likewise.
1016 * dll.c (loaded_dll): Likewise.
1017 * event-loop.c (append_callback_event): Likewise.
1018 (create_file_handler): Likewise.
1019 (create_file_event): Likewise.
1020 * hostio.c (handle_open): Likewise.
1021 * inferiors.c (add_thread): Likewise.
1022 (add_process): Likewise.
1023 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1024 * linux-arm-low.c (arm_new_process): Likewise.
1025 (arm_new_thread): Likewise.
1026 * linux-low.c (add_to_pid_list): Likewise.
1027 (linux_add_process): Likewise.
1028 (handle_extended_wait): Likewise.
1029 (add_lwp): Likewise.
1030 (enqueue_one_deferred_signal): Likewise.
1031 (enqueue_pending_signal): Likewise.
1032 (linux_resume_one_lwp_throw): Likewise.
1033 (linux_resume_one_thread): Likewise.
1034 (linux_read_memory): Likewise.
1035 (linux_write_memory): Likewise.
1036 * linux-mips-low.c (mips_linux_new_process): Likewise.
1037 (mips_linux_new_thread): Likewise.
1038 (mips_add_watchpoint): Likewise.
1039 * linux-x86-low.c (initialize_low_arch): Likewise.
1040 * lynx-low.c (lynx_add_process): Likewise.
1041 * mem-break.c (set_raw_breakpoint_at): Likewise.
1042 (set_breakpoint): Likewise.
1043 (add_condition_to_breakpoint): Likewise.
1044 (add_commands_to_breakpoint): Likewise.
1045 (clone_agent_expr): Likewise.
1046 (clone_one_breakpoint): Likewise.
1047 * regcache.c (new_register_cache): Likewise.
1048 * remote-utils.c (look_up_one_symbol): Likewise.
1049 * server.c (queue_stop_reply): Likewise.
1050 (start_inferior): Likewise.
1051 (queue_stop_reply_callback): Likewise.
1052 (handle_target_event): Likewise.
1053 * spu-low.c (fetch_ppc_memory): Likewise.
1054 (store_ppc_memory): Likewise.
1055 * target.c (set_target_ops): Likewise.
1056 * thread-db.c (thread_db_load_search): Likewise.
1057 (try_thread_db_load_1): Likewise.
1058 * tracepoint.c (add_tracepoint): Likewise.
1059 (add_tracepoint_action): Likewise.
1060 (create_trace_state_variable): Likewise.
1061 (cmd_qtdpsrc): Likewise.
1062 (cmd_qtro): Likewise.
1063 (add_while_stepping_state): Likewise.
1064 * win32-low.c (child_add_thread): Likewise.
1065 (get_image_name): Likewise.
1067 2015-08-25 Yao Qi <yao.qi@linaro.org>
1069 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1071 2015-08-25 Yao Qi <yao.qi@linaro.org>
1073 * Makefile.in (aarch64-linux.o): New rule.
1074 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1076 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1077 (aarch64_init_debug_reg_state): Make it extern.
1078 (aarch64_linux_prepare_to_resume): Remove.
1080 2015-08-25 Yao Qi <yao.qi@linaro.org>
1082 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1083 lwp_arch_private_info and ptid_of_lwp.
1085 2015-08-25 Yao Qi <yao.qi@linaro.org>
1087 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1088 Find proc_info by find_process_pid. All callers updated.
1090 2015-08-25 Yao Qi <yao.qi@linaro.org>
1092 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1094 (debug_reg_change_callback): Remove.
1095 (aarch64_notify_debug_reg_change): Remove.
1097 2015-08-25 Yao Qi <yao.qi@linaro.org>
1099 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1100 Call current_lwp_ptid.
1102 2015-08-25 Yao Qi <yao.qi@linaro.org>
1104 * linux-aarch64-low.c (debug_reg_change_callback): Use
1107 2015-08-25 Yao Qi <yao.qi@linaro.org>
1109 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1111 2015-08-25 Yao Qi <yao.qi@linaro.org>
1113 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1115 2015-08-25 Yao Qi <yao.qi@linaro.org>
1117 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1120 2015-08-25 Yao Qi <yao.qi@linaro.org>
1122 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1124 (debug_reg_change_callback): Remove argument entry and add argument
1125 lwp. Remove local variable thread. Don't print thread id in the
1126 debugging output. Don't check whether pid of thread equals to pid.
1127 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1128 iterate_over_lwps instead find_inferior.
1130 2015-08-24 Pedro Alves <palves@redhat.com>
1132 * inferiors.c (get_first_process): New function.
1133 * inferiors.h (get_first_process): New declaration.
1134 * remote-utils.c (read_ptid): Default to the first process in the
1135 list, instead of to the current thread's process.
1137 2015-08-24 Pedro Alves <palves@redhat.com>
1139 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1140 * event-loop.c: Likewise.
1141 * remote-utils.c: Likewise.
1142 * tracepoint.c: Likewise.
1144 2015-08-24 Pedro Alves <palves@redhat.com>
1146 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1149 2015-08-21 Pedro Alves <palves@redhat.com>
1151 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1152 instead of literal 1.
1154 2015-08-21 Pedro Alves <palves@redhat.com>
1156 * tdesc.c (default_description): Explicitly zero-initialize.
1158 2015-08-21 Pedro Alves <palves@redhat.com>
1161 * inferiors.c (remove_thread): Discard any pending stop reply for
1163 * server.c (remove_all_on_match_pid): Rename to ...
1164 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1166 (discard_queued_stop_replies): Change parameter to a ptid. Now
1168 (handle_v_kill, kill_inferior_callback, captured_main)
1169 (process_serial_event): Adjust.
1170 * server.h (discard_queued_stop_replies): Declare.
1172 2015-08-21 Pedro Alves <palves@redhat.com>
1174 * linux-low.c (wait_for_sigstop): Always switch to no thread
1175 selected if the previously current thread dies.
1176 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1177 process instead of the current thread's.
1178 * remote-utils.c (input_interrupt): Don't check if there's no
1180 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1181 current thread to the general thread fails, error out.
1182 (handle_qxfer_auxv, handle_qxfer_libraries)
1183 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1184 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1185 (handle_query): Check if there's a thread selected instead of
1186 checking whether there's any thread in the thread list.
1187 (handle_qxfer_threads, handle_qxfer_btrace)
1188 (handle_qxfer_btrace_conf): Don't error out early if there's no
1189 thread in the thread list.
1190 (handle_v_cont, myresume): Don't set the current thread to the
1192 (process_serial_event) <Hg handling>: Also set thread_id if the
1193 previous general thread is still alive.
1194 (process_serial_event) <g/G handling>: If setting the current
1195 thread to the general thread fails, error out.
1196 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1197 thread's lwp instead of the current thread's.
1198 * target.c (set_desired_thread): If the desired thread was not
1199 found, leave the current thread pointing to NULL. Return an int
1200 (boolean) indicating success.
1201 * target.h (set_desired_thread): Change return type to int.
1203 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1205 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1206 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1208 (ps_get_thread_area): New function.
1210 2015-08-19 Gary Benson <gbenson@redhat.com>
1212 * hostio.c (handle_pread): Do not attempt to read more data
1213 than hostio_reply_with_data can fit in a packet.
1215 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1217 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1219 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1221 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1223 2015-08-06 Pedro Alves <palves@redhat.com>
1225 * tracepoint.c (expr_eval_result): Now an int.
1227 2015-08-06 Pedro Alves <palves@redhat.com>
1229 * gdbthread.h (struct regcache): Forward declare.
1230 (struct thread_info) <regcache_data>: Now a struct regcache
1232 * inferiors.c (inferior_regcache_data)
1233 (set_inferior_regcache_data): Now work with struct regcache
1235 * inferiors.h (struct regcache): Forward declare.
1236 (inferior_regcache_data, set_inferior_regcache_data): Now work
1237 with struct regcache pointers.
1238 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1239 (free_register_cache_thread): Remove struct regcache pointer
1242 2015-08-06 Pedro Alves <palves@redhat.com>
1244 * server.c (captured_main): On error, print the exception message
1245 to stderr, and if run_once is set, throw a quit.
1247 2015-08-06 Pedro Alves <palves@redhat.com>
1249 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1252 2015-08-06 Pedro Alves <palves@redhat.com>
1254 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1255 reading beyond the passed in buffer length.
1257 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1259 * tracepoint.c (symbol_list) <required>: Remove.
1261 2015-08-06 Pedro Alves <palves@redhat.com>
1263 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1264 count if stopping and suspending threads.
1265 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1266 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1267 (linux_detach): Complete an ongoing step-over.
1268 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1270 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1271 (linux_wait_1): If passing a signal to the inferior after
1272 finishing a step-over, unsuspend and re-resume all lwps. If we
1273 see a single-step event but the thread should be continuing, don't
1274 pass the trap to gdb.
1275 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1276 internal_error instead of gdb_assert.
1277 (enqueue_pending_signal): New function.
1278 (check_ptrace_stopped_lwp_gone): Add debug output.
1279 (start_step_over): Use internal_error instead of gdb_assert.
1280 (complete_ongoing_step_over): New function.
1281 (linux_resume_one_thread): Don't resume a suspended thread.
1282 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1285 2015-08-06 Pedro Alves <palves@redhat.com>
1287 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1288 (linux_thread_alive): Use lwp_is_marked_dead.
1289 (extended_event_reported): Delete.
1290 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1291 instead of extended_event_reported.
1292 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1294 (lwp_is_marked_dead): New function.
1295 (lwp_running): Use lwp_is_marked_dead.
1296 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1299 2015-08-06 Pedro Alves <palves@redhat.com>
1301 * linux-low.c (linux_wait_1): Move fork event output out of the
1302 !report_to_gdb check. Pass event_child->waitstatus to
1303 target_waitstatus_to_string instead of ourstatus.
1305 2015-08-04 Yao Qi <yao.qi@linaro.org>
1307 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1308 if current_thread is 32 bit.
1310 2015-08-04 Yao Qi <yao.qi@linaro.org>
1312 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1313 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1314 * server.c (extended_protocol): Remove "static".
1315 * server.h (extended_protocol): Declare it.
1317 2015-08-04 Yao Qi <yao.qi@linaro.org>
1319 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1320 both aarch64 and aarch32.
1321 (aarch64_set_pc): Likewise.
1323 2015-08-04 Yao Qi <yao.qi@linaro.org>
1325 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1326 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1327 arm-with-neon.xml to srv_xmlfiles.
1328 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1329 (is_64bit_tdesc): New function.
1330 (aarch64_linux_read_description): New function.
1331 (aarch64_arch_setup): Call aarch64_linux_read_description.
1332 (regs_info): Rename to regs_info_aarch64.
1333 (aarch64_regs_info): Return right regs_info.
1334 (initialize_low_arch): Call initialize_low_arch_aarch32.
1336 2015-08-04 Yao Qi <yao.qi@linaro.org>
1338 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1339 * linux-aarch32-low.c: New file.
1340 * linux-aarch32-low.h: New file.
1341 * linux-arm-low.c (arm_fill_gregset): Move it to
1342 linux-aarch32-low.c.
1343 (arm_store_gregset): Likewise.
1344 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1345 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1346 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1347 (regs_info): Rename to regs_info_arm.
1348 (arm_regs_info): Return regs_info_aarch32 if
1349 have_ptrace_getregset is 1 and target description is
1350 arm_with_neon or arm_with_vfpv3.
1351 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1352 Call initialize_low_arch_aarch32 instead.
1354 2015-08-04 Yao Qi <yao.qi@linaro.org>
1356 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1357 * linux-low.c: ... here.
1358 * linux-low.h (have_ptrace_getregset): Declare it.
1360 2015-08-04 Pedro Alves <palves@redhat.com>
1362 * thread-db.c (struct thread_db): Use new typedefs.
1363 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1365 (disable_thread_event_reporting): Cast result of dlsym to
1366 destination function pointer type.
1367 (thread_db_mourn): Use td_ta_delete_ftype.
1369 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1371 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1373 (CDX_BREAKPOINT): Define for R2.
1374 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1375 (the_low_target): Add comments.
1377 2015-07-30 Yao Qi <yao.qi@linaro.org>
1379 * linux-arm-low.c (arm_hwcap): Remove it.
1380 (arm_read_description): New local variable arm_hwcap. Don't
1381 set arm_hwcap to zero.
1383 2015-07-30 Yao Qi <yao.qi@linaro.org>
1385 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1386 Use regcache->tdesc instead.
1387 (arm_store_wmmxregset): Likewise.
1388 (arm_fill_vfpregset): Likewise.
1389 (arm_store_vfpregset): Likewise.
1391 2015-07-30 Yao Qi <yao.qi@linaro.org>
1393 * linux-arm-low.c: Include arch/arm.h.
1394 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1395 (arm_store_gregset): Likewise.
1397 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1399 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1400 ptrace's 4th parameter.
1402 2015-07-27 Yao Qi <yao.qi@linaro.org>
1404 * configure.srv (case aarch64*-*-linux*): Don't set
1407 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1409 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1411 * linux-arm-low.c: Likewise.
1412 * linux-cris-low.c: Likewise.
1413 * linux-crisv32-low.c: Likewise.
1414 * linux-low.c: Likewise.
1415 * linux-m68k-low.c: Likewise.
1416 * linux-mips-low.c: Likewise.
1417 * linux-nios2-low.c: Likewise.
1418 * linux-s390-low.c: Likewise.
1419 * linux-sparc-low.c: Likewise.
1420 * linux-tic6x-low.c: Likewise.
1421 * linux-tile-low.c: Likewise.
1422 * linux-x86-low.c: Likewise.
1424 2015-07-24 Pedro Alves <palves@redhat.com>
1426 * config.in: Regenerate.
1427 * configure: Regenerate.
1429 2015-07-24 Pedro Alves <palves@redhat.com>
1431 * acinclude.m4: Include ../ptrace.m4.
1432 * configure.ac: Call GDB_AC_PTRACE.
1433 * config.in, configure: Regenerate.
1435 2015-07-24 Yao Qi <yao.qi@linaro.org>
1437 * linux-low.c (linux_create_inferior): Remove setting to
1438 proc->priv->new_inferior.
1439 (linux_attach): Likewise.
1440 (linux_low_filter_event): Likewise.
1441 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1443 2015-07-24 Yao Qi <yao.qi@linaro.org>
1445 * linux-low.c (linux_arch_setup): New function.
1446 (linux_low_filter_event): If proc->tdesc is NULL and
1447 proc->attached is true, call the_low_target.arch_setup.
1448 Otherwise, keep status pending, and return.
1449 (linux_resume_one_lwp_throw): Don't call get_pc if
1450 thread->while_stepping isn't NULL. Don't call
1451 get_thread_regcache if proc->tdesc is NULL.
1452 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1453 (linux_target_ops): Install arch_setup.
1454 * server.c (start_inferior): Call the_target->arch_setup.
1455 * target.h (struct target_ops) <arch_setup>: New field.
1456 (target_arch_setup): New marco.
1457 * lynx-low.c (lynx_target_ops): Update.
1458 * nto-low.c (nto_target_ops): Update.
1459 * spu-low.c (spu_target_ops): Update.
1460 * win32-low.c (win32_target_ops): Update.
1462 2015-07-24 Yao Qi <yao.qi@linaro.org>
1464 * linux-low.c (linux_add_process): Don't set
1465 proc->priv->new_inferior.
1466 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1467 (linux_attach): Likewise.
1469 2015-07-24 Yao Qi <yao.qi@linaro.org>
1471 * server.c (start_inferior): Code refactor.
1473 2015-07-24 Yao Qi <yao.qi@linaro.org>
1475 * server.c (process_serial_event): Set general_thread.
1477 2015-07-21 Yao Qi <yao.qi@linaro.org>
1479 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1480 aarch64_linux_get_debug_reg_capacity.
1482 2015-07-17 Yao Qi <yao.qi@linaro.org>
1484 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1485 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1486 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1487 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1488 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1489 (AARCH64_HWP_ALIGNMENT): Likewise.
1490 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1491 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1492 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1493 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1494 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1495 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1496 (struct aarch64_debug_reg_state): Likewise.
1497 (struct arch_lwp_info): Likewise.
1498 (aarch64_align_watchpoint): Likewise.
1499 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1500 (aarch64_watchpoint_length): Likewise.
1501 (aarch64_point_encode_ctrl_reg): Likewise
1502 (aarch64_point_is_aligned): Likewise.
1503 (aarch64_align_watchpoint): Likewise.
1504 (aarch64_linux_set_debug_regs):
1505 (aarch64_dr_state_insert_one_point): Likewise.
1506 (aarch64_dr_state_remove_one_point): Likewise.
1507 (aarch64_handle_breakpoint): Likewise.
1508 (aarch64_handle_aligned_watchpoint): Likewise.
1509 (aarch64_handle_unaligned_watchpoint): Likewise.
1510 (aarch64_handle_watchpoint): Likewise.
1512 2015-07-17 Yao Qi <yao.qi@linaro.org>
1514 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1515 and don't aarch64_get_debug_reg_state. All callers update.
1516 (aarch64_handle_aligned_watchpoint): Likewise.
1517 (aarch64_handle_unaligned_watchpoint): Likewise.
1518 (aarch64_handle_watchpoint): Likewise.
1519 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1520 (aarch64_remove_point): Likewise.
1522 2015-07-17 Yao Qi <yao.qi@linaro.org>
1524 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1526 (aarch64_handle_unaligned_watchpoint): Likewise.
1528 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1530 Revert the previous 3 commits:
1531 Move gdb_regex* to common/
1532 Move linux_find_memory_regions_full & co.
1533 gdbserver build-id attribute generator
1535 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1536 Jan Kratochvil <jan.kratochvil@redhat.com>
1538 gdbserver build-id attribute generator.
1539 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1540 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1541 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1543 (get_dynamic): Use find_pdhr to traverse program headers.
1544 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1545 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1546 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1547 (get_hex_build_id): New.
1548 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1549 to reply XML document.
1551 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1552 Jan Kratochvil <jan.kratochvil@redhat.com>
1554 * target.c: Include target/target-utils.h and fcntl.h.
1555 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1556 (target_fileio_read_stralloc): New functions.
1558 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1560 * Makefile.in (OBS): Add gdb_regex.o.
1562 * config.in: Rebuilt.
1563 * configure: Rebuilt.
1565 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1566 Jan Kratochvil <jan.kratochvil@redhat.com>
1568 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1569 * Makefile.in (OBS): Add target-utils.o.
1570 (linux-maps.o, target-utils.o): New.
1571 * configure.srv (srv_linux_obj): Add linux-maps.o.
1573 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1575 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1577 (the_low_target): Install it.
1579 2015-07-14 Pedro Alves <palves@redhat.com>
1581 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1582 Instead, ignore ECHILD, and throw an error for other errnos.
1584 2015-07-10 Pedro Alves <palves@redhat.com>
1586 * event-loop.c (struct callback_event) <data>: Change type to
1587 gdb_client_data instance instead of gdb_client_data pointer.
1588 (append_callback_event): Adjust.
1590 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1592 * linux-aarch64-low.c: Add comments for each linux_target_ops
1593 method. Remove comments already covered in target_ops and
1594 linux_target_ops definitions.
1595 (the_low_target): Add comments for each unimplemented method.
1597 2015-07-09 Yao Qi <yao.qi@linaro.org>
1599 * linux-aarch64-low.c (aarch64_regmap): Remove.
1600 (aarch64_usrregs_info): Remove.
1601 (regs_info): Set field usrregs to NULL.
1603 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1605 * linux-low.c: Include "rsp-low.h"
1606 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1607 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1608 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1609 (handle_btrace_enable_pt): New.
1610 (handle_btrace_general_set): Support "pt".
1611 (handle_btrace_conf_general_set): Support "pt:size".
1613 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1615 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1618 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1620 * linux-aarch64-low.c: Remove comment about endianness.
1621 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1622 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1625 2015-06-24 Gary Benson <gbenson@redhat.com>
1627 * linux-i386-ipa.c (stdint.h): Do not include.
1628 * lynx-i386-low.c (stdint.h): Likewise.
1629 * lynx-ppc-low.c (stdint.h): Likewise.
1630 * mem-break.c (stdint.h): Likewise.
1631 * thread-db.c (stdint.h): Likewise.
1632 * tracepoint.c (stdint.h): Likewise.
1633 * win32-low.c (stdint.h): Likewise.
1635 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1637 * server.c (write_qxfer_response): Update call to
1638 remote_escape_output.
1640 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1641 Jan Kratochvil <jan.kratochvil@redhat.com>
1643 Merge multiple hex conversions.
1644 * gdbreplay.c (tohex): Rename to 'fromhex'.
1645 (logchar): Use fromhex.
1647 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1649 * server.c (handle_qxfer_libraries): Set `version' attribute for
1652 2015-06-10 Gary Benson <gbenson@redhat.com>
1654 * target.h (struct target_ops) <multifs_open>: New field.
1655 <multifs_unlink>: Likewise.
1656 <multifs_readlink>: Likewise.
1657 * linux-low.c (nat/linux-namespaces.h): New include.
1658 (linux_target_ops): Initialize the_target->multifs_open,
1659 the_target->multifs_unlink and the_target->multifs_readlink.
1660 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1661 * hostio.c (hostio_fs_pid): New static variable.
1662 (hostio_handle_new_gdb_connection): New function.
1663 (handle_setfs): Likewise.
1664 (handle_open): Use the_target->multifs_open as appropriate.
1665 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1666 (handle_readlink): Use the_target->multifs_readlink as
1668 (handle_vFile): Handle vFile:setfs packets.
1669 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1670 after target_handle_new_gdb_connection.
1672 2015-06-10 Gary Benson <gbenson@redhat.com>
1674 * configure.ac (AC_CHECK_FUNCS): Add setns.
1675 * config.in: Regenerate.
1676 * configure: Likewise.
1677 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1678 (linux-namespaces.o): New rule.
1679 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1681 2015-06-09 Gary Benson <gbenson@redhat.com>
1683 * hostio.c (handle_open): Process mode argument with
1684 fileio_to_host_mode.
1686 2015-06-01 Yao Qi <yao.qi@linaro.org>
1688 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1689 * linux-x86-low.c: Likewise.
1691 2015-05-28 Don Breazeal <donb@codesourcery.com>
1693 * linux-low.c (handle_extended_wait): Initialize
1694 thread_info.last_resume_kind for new fork children.
1696 2015-05-15 Pedro Alves <palves@redhat.com>
1698 * target.h (target_handle_new_gdb_connection): Rewrite using if
1699 wrapped in do/while.
1701 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1703 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1704 * configure, config.in: Regenerate.
1705 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1708 2015-05-12 Don Breazeal <donb@codesourcery.com>
1710 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1711 PTRACE_EVENT_VFORK_DONE.
1712 (linux_low_ptrace_options, extended_event_reported): Add vfork
1714 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1715 and "vforkdone" for RSP 'T' Stop Reply Packet.
1716 * server.h (report_vfork_events): Declare
1719 2015-05-12 Don Breazeal <donb@codesourcery.com>
1721 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1722 (the_low_target) <new_fork>: Initialize new member.
1723 * linux-arm-low.c (arm_new_fork): New function.
1724 (the_low_target) <new_fork>: Initialize new member.
1725 * linux-low.c (handle_extended_wait): Call new target function
1727 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1728 * linux-mips-low.c (mips_add_watchpoint): New function
1729 extracted from mips_insert_point.
1730 (the_low_target) <new_fork>: Initialize new member.
1731 (mips_linux_new_fork): New function.
1732 (mips_insert_point): Call mips_add_watchpoint.
1733 * linux-x86-low.c (x86_linux_new_fork): New function.
1734 (the_low_target) <new_fork>: Initialize new member.
1736 2015-05-12 Don Breazeal <donb@codesourcery.com>
1738 * linux-low.c (handle_extended_wait): Implement return value,
1739 rename argument 'event_child' to 'event_lwp', handle
1740 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1741 (linux_low_ptrace_options): New function.
1742 (linux_low_filter_event): Call linux_low_ptrace_options,
1743 use different argument fo linux_enable_event_reporting,
1744 use return value from handle_extended_wait.
1745 (extended_event_reported): New function.
1746 (linux_wait_1): Call extended_event_reported and set
1747 status to report fork events.
1748 (linux_write_memory): Add pid to debug message.
1749 (reset_lwp_ptrace_options_callback): New function.
1750 (linux_handle_new_gdb_connection): New function.
1751 (linux_target_ops): Initialize new structure member.
1752 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1753 * lynx-low.c: Initialize new structure member.
1754 * remote-utils.c (prepare_resume_reply): Implement stop reason
1755 "fork" for "T" stop message.
1756 * server.c (handle_query): Call handle_new_gdb_connection.
1757 * server.h (report_fork_events): Declare global flag.
1758 * target.h (struct target_ops) <handle_new_gdb_connection>:
1760 (target_handle_new_gdb_connection): New macro.
1761 * win32-low.c: Initialize new structure member.
1763 2015-05-12 Don Breazeal <donb@codesourcery.com>
1765 * mem-break.c (APPEND_TO_LIST): Define macro.
1766 (clone_agent_expr): New function.
1767 (clone_one_breakpoint): New function.
1768 (clone_all_breakpoints): New function.
1769 * mem-break.h: Declare new functions.
1771 2015-05-12 Don Breazeal <donb@codesourcery.com>
1773 * linux-low.c (linux_supports_fork_events): New function.
1774 (linux_supports_vfork_events): New function.
1775 (linux_target_ops): Initialize new structure members.
1776 (initialize_low): Call linux_check_ptrace_features.
1777 * lynx-low.c (lynx_target_ops): Initialize new structure
1779 * server.c (report_fork_events, report_vfork_events):
1781 (handle_query): Add new features to qSupported packet and
1783 (captured_main): Initialize new global variables.
1784 * target.h (struct target_ops) <supports_fork_events>:
1786 <supports_vfork_events>: New member.
1787 (target_supports_fork_events): New macro.
1788 (target_supports_vfork_events): New macro.
1789 * win32-low.c (win32_target_ops): Initialize new structure
1792 2015-05-12 Gary Benson <gbenson@redhat.com>
1794 * server.c (handle_qxfer_exec_file): Use current process
1797 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1799 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1800 Remove HAVE_PTRACE_GETREGS conditionals.
1801 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1802 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1804 2015-05-08 Yao Qi <yao.qi@linaro.org>
1806 * linux-low.c (linux_supports_conditional_breakpoints): New
1808 (linux_target_ops): Install new target method.
1809 * lynx-low.c (lynx_target_ops): Install NULL hook for
1810 supports_conditional_breakpoints.
1811 * nto-low.c (nto_target_ops): Likewise.
1812 * spu-low.c (spu_target_ops): Likewise.
1813 * win32-low.c (win32_target_ops): Likewise.
1814 * server.c (handle_query): Check
1815 target_supports_conditional_breakpoints.
1816 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1818 (target_supports_conditional_breakpoints): New macro.
1820 2015-05-06 Pedro Alves <palves@redhat.com>
1823 * server.c (start_inferior): If the process exits, mourn it.
1825 2015-04-21 Gary Benson <gbenson@redhat.com>
1827 * hostio.c (fileio_open_flags_to_host): Factored out to
1828 fileio_to_host_openflags in common/fileio.c. Single use
1831 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1833 * linux-xtensa-low.c (xtensa_fill_gregset)
1834 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1837 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1839 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1840 (regs_info): Replace usrregs pointer with NULL.
1842 2015-04-17 Gary Benson <gbenson@redhat.com>
1844 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1845 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1846 * server.c (handle_qxfer_exec_file): New function.
1847 (qxfer_packets): Add exec-file entry.
1848 (handle_query): Report qXfer:exec-file:read as supported packet.
1850 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1852 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1854 2015-04-09 Gary Benson <gbenson@redhat.com>
1856 * hostio-errno.c (errno_to_fileio_error): Remove function.
1857 Update caller to use remote_fileio_to_fio_error.
1859 2015-04-09 Yao Qi <yao.qi@linaro.org>
1861 * linux-low.c (linux_insert_point): Call
1862 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1863 (linux_remove_point): Call remove_memory_breakpoint if type is
1865 * linux-x86-low.c (x86_insert_point): Don't call
1866 insert_memory_breakpoint.
1867 (x86_remove_point): Don't call remove_memory_breakpoint.
1869 2015-04-01 Pedro Alves <palves@redhat.com>
1870 Cleber Rosa <crosa@redhat.com>
1872 * server.c (gdbserver_usage): Reorganize and extend the usage
1875 2015-03-24 Pedro Alves <palves@redhat.com>
1877 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1878 output. Also dump TRAP_TRACE.
1879 (linux_low_filter_event): In debug output, distinguish a
1880 resume_stop SIGSTOP from a delayed SIGSTOP.
1882 2015-03-24 Gary Benson <gbenson@redhat.com>
1884 * linux-x86-low.c (x86_linux_new_thread): Moved to
1886 (x86_linux_prepare_to_resume): Likewise.
1888 2015-03-24 Gary Benson <gbenson@redhat.com>
1890 * Makefile.in (x86-linux-dregs.o): New rule.
1891 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1892 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1893 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1894 (x86_linux_dr_get): Likewise.
1895 (x86_linux_dr_set): Likewise.
1896 (update_debug_registers_callback): Likewise.
1897 (x86_linux_dr_set_addr): Likewise.
1898 (x86_linux_dr_get_addr): Likewise.
1899 (x86_linux_dr_set_control): Likewise.
1900 (x86_linux_dr_get_control): Likewise.
1901 (x86_linux_dr_get_status): Likewise.
1902 (x86_linux_update_debug_registers): Likewise.
1904 2015-03-24 Gary Benson <gbenson@redhat.com>
1906 * linux-x86-low.c (x86_linux_update_debug_registers):
1907 New function, factored out from...
1908 (x86_linux_prepare_to_resume): ...this.
1910 2015-03-24 Gary Benson <gbenson@redhat.com>
1912 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1913 (x86_linux_dr_set): Likewise.
1914 (update_debug_registers_callback): Likewise.
1915 (x86_linux_dr_set_addr): Likewise.
1916 (x86_linux_dr_get_addr): Likewise.
1917 (x86_linux_dr_set_control): Likewise.
1918 (x86_linux_dr_get_control): Likewise.
1919 (x86_linux_dr_get_status): Likewise.
1920 (x86_linux_prepare_to_resume): Likewise.
1922 2015-03-24 Gary Benson <gbenson@redhat.com>
1924 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1925 Use perror_with_name. Pass string through gettext.
1926 (x86_linux_dr_set): Likewise.
1928 2015-03-24 Gary Benson <gbenson@redhat.com>
1930 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1931 (x86_linux_dr_set_addr): ...this.
1932 (x86_dr_low_get_addr): Rename to...
1933 (x86_linux_dr_get_addr): ...this.
1934 (x86_dr_low_set_control): Rename to...
1935 (x86_linux_dr_set_control): ...this.
1936 (x86_dr_low_get_control): Rename to...
1937 (x86_linux_dr_get_control): ...this.
1938 (x86_dr_low_get_status): Rename to...
1939 (x86_linux_dr_get_status): ...this.
1940 (x86_dr_low): Update with new function names.
1942 2015-03-24 Gary Benson <gbenson@redhat.com>
1944 * Makefile.in (x86-linux.o): New rule.
1945 * configure.srv: Add x86-linux.o to relevant targets.
1946 * linux-low.c (lwp_set_arch_private_info): New function.
1947 (lwp_arch_private_info): Likewise.
1948 * linux-x86-low.c: Include nat/x86-linux.h.
1949 (arch_lwp_info): Removed structure.
1950 (update_debug_registers_callback):
1951 Use lwp_set_debug_registers_changed.
1952 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1953 and lwp_set_debug_registers_changed.
1954 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1956 2015-03-24 Gary Benson <gbenson@redhat.com>
1958 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1959 * linux-arm-low.c (arm_new_thread): Likewise.
1960 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1961 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1962 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1963 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1965 2015-03-24 Gary Benson <gbenson@redhat.com>
1967 * linux-low.c (ptid_of_lwp): New function.
1968 (lwp_is_stopped): Likewise.
1969 (lwp_stop_reason): Likewise.
1970 * linux-x86-low.c (update_debug_registers_callback):
1972 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1975 2015-03-24 Gary Benson <gbenson@redhat.com>
1977 * linux-low.h (linux_stop_lwp): Remove declaration.
1979 2015-03-24 Gary Benson <gbenson@redhat.com>
1981 * linux-low.h: Include nat/linux-nat.h.
1982 * linux-low.c (iterate_over_lwps_args): New structure.
1983 (iterate_over_lwps_filter): New function.
1984 (iterate_over_lwps): Likewise.
1985 * linux-x86-low.c (update_debug_registers_callback):
1986 Update signature to what iterate_over_lwps expects.
1987 Remove PID check that iterate_over_lwps now performs.
1988 (x86_dr_low_set_addr): Use iterate_over_lwps.
1989 (x86_dr_low_set_control): Likewise.
1991 2015-03-24 Gary Benson <gbenson@redhat.com>
1993 * linux-x86-low.c (x86_debug_reg_state): New function.
1994 (x86_linux_prepare_to_resume): Use the above.
1996 2015-03-24 Gary Benson <gbenson@redhat.com>
1998 * linux-low.c (current_lwp_ptid): New function.
1999 * linux-x86-low.c: Include nat/linux-nat.h.
2000 (x86_dr_low_get_addr): Use current_lwp_ptid.
2001 (x86_dr_low_get_control): Likewise.
2002 (x86_dr_low_get_status): Likewise.
2004 2015-03-20 Pedro Alves <palves@redhat.com>
2006 * tracepoint.c (cmd_qtstatus): Make "str" const.
2008 2015-03-20 Pedro Alves <palves@redhat.com>
2010 * server.c (handle_general_set): Make "req_str" const.
2012 2015-03-19 Pedro Alves <palves@redhat.com>
2014 * linux-low.c (linux_resume_one_lwp): Rename to ...
2015 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2016 instead call perror_with_name.
2017 (check_ptrace_stopped_lwp_gone): New function.
2018 (linux_resume_one_lwp): Reimplement as wrapper around
2019 linux_resume_one_lwp_throw that swallows errors if the LWP is
2022 2015-03-19 Pedro Alves <palves@redhat.com>
2024 * linux-low.c (count_events_callback, select_event_lwp_callback):
2025 No longer check whether the thread has resume_stop as last resume
2028 2015-03-19 Pedro Alves <palves@redhat.com>
2030 * linux-low.c (count_events_callback, select_event_lwp_callback):
2031 Use the lwp's status_pending_p field, not the thread's.
2033 2015-03-19 Pedro Alves <palves@redhat.com>
2035 * linux-low.c (select_event_lwp_callback): Update comments to
2036 no longer mention SIGTRAP.
2038 2015-03-18 Gary Benson <gbenson@redhat.com>
2040 * server.c (handle_query): Do not report vFile:fstat as supported.
2042 2015-03-11 Gary Benson <gbenson@redhat.com>
2044 * hostio.c (sys/types.h): New include.
2045 (sys/stat.h): Likewise.
2046 (common-remote-fileio.h): Likewise.
2047 (handle_fstat): New function.
2048 (handle_vFile): Handle vFile:fstat packets.
2050 2015-03-11 Gary Benson <gbenson@redhat.com>
2052 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2053 struct stat.st_blocks and struct stat.st_blksize.
2054 * configure: Regenerate.
2055 * config.in: Likewise.
2056 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2057 (OBS): Add common-remote-fileio.o.
2058 (common-remote-fileio.o): New rule.
2060 2015-03-09 Pedro Alves <palves@redhat.com>
2062 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2063 'struct sockaddr' pointer in 'accept' call.
2065 2015-03-09 Pedro Alves <palves@redhat.com>
2068 2015-03-07 Pedro Alves <palves@redhat.com>
2069 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2070 or <winsock2.h> here. Instead include "gdb_socket.h".
2071 (remote_open): Use union gdb_sockaddr_u.
2072 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2073 or <winsock2.h> here. Instead include "gdb_socket.h".
2074 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2075 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2077 (init_named_socket, gdb_agent_helper_thread): Use union
2080 2015-03-07 Pedro Alves <palves@redhat.com>
2082 * configure.ac (build_warnings): Move
2083 -Wdeclaration-after-statement to the C-specific set.
2084 * configure: Regenerate.
2086 2015-03-07 Pedro Alves <palves@redhat.com>
2088 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2089 or <winsock2.h> here. Instead include "gdb_socket.h".
2090 (remote_open): Use union gdb_sockaddr_u.
2091 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2092 or <winsock2.h> here. Instead include "gdb_socket.h".
2093 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2094 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2096 (init_named_socket, gdb_agent_helper_thread): Use union
2099 2015-03-07 Pedro Alves <palves@redhat.com>
2101 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2104 2015-03-06 Yao Qi <yao.qi@linaro.org>
2106 * linux-aarch64-low.c (aarch64_insert_point): Use
2107 show_debug_regs as a boolean.
2108 (aarch64_remove_point): Likewise.
2110 2015-03-05 Pedro Alves <palves@redhat.com>
2112 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2113 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2114 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2115 * nto-low.c (nto_target_ops): Likewise.
2116 * spu-low.c (spu_target_ops): Likewise.
2117 * win32-low.c (win32_target_ops): Likewise.
2119 2015-03-04 Pedro Alves <palves@redhat.com>
2121 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2122 Decide whether a breakpoint triggered based on the SIGTRAP's
2124 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2125 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2126 (linux_low_filter_event): Check for breakpoints before checking
2128 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2130 (linux_stopped_by_sw_breakpoint)
2131 (linux_supports_stopped_by_sw_breakpoint)
2132 (linux_stopped_by_hw_breakpoint)
2133 (linux_supports_stopped_by_hw_breakpoint): New functions.
2134 (linux_target_ops): Install new target methods.
2136 2015-03-04 Pedro Alves <palves@redhat.com>
2138 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2139 * server.c (swbreak_feature, hwbreak_feature): New globals.
2140 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2141 (captured_main): Clear swbreak_feature and hwbreak_feature.
2142 * server.h (swbreak_feature, hwbreak_feature): Declare.
2143 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2144 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2145 supports_stopped_by_hw_breakpoint>: New fields.
2146 (target_supports_stopped_by_sw_breakpoint)
2147 (target_stopped_by_sw_breakpoint)
2148 (target_supports_stopped_by_hw_breakpoint)
2149 (target_stopped_by_hw_breakpoint): Declare.
2151 2015-03-04 Pedro Alves <palves@redhat.com>
2153 enum lwp_stop_reason -> enum target_stop_reason
2154 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2155 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2156 (linux_wait_1, stuck_in_jump_pad_callback)
2157 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2158 (linux_stopped_by_watchpoint):
2159 * linux-low.h (enum lwp_stop_reason): Delete.
2160 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2161 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2163 2015-03-04 Yao Qi <yao.qi@linaro.org>
2165 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2167 2015-03-03 Gary Benson <gbenson@redhat.com>
2169 * hostio.c (handle_vFile): Fix prefix lengths.
2171 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2173 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2176 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2178 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2179 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2180 (clean): Add "rm -f" for above C files.
2181 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2182 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2183 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2184 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2185 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2186 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2187 (init_registers_s390x_vx_linux64)
2188 (init_registers_s390x_tevx_linux64)
2189 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2190 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2192 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2193 (s390_store_vxrs_high): New functions.
2194 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2196 (s390_arch_setup): Add logic for selecting one of the new target
2197 descriptions. Activate the new vector regsets if applicable.
2198 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2199 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2200 and init_registers_s390x_tevx_linux64.
2202 2015-03-01 Pedro Alves <palves@redhat.com>
2204 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2207 2015-02-27 Pedro Alves <palves@redhat.com>
2209 * linux-x86-low.c (u_debugreg_offset): New function.
2210 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2212 2015-02-27 Pedro Alves <palves@redhat.com>
2214 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2215 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2216 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2217 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2218 (ps_lsetfpregs, ps_getpid)
2219 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2220 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2221 (ps_lsetxregs, ps_plog): Declare.
2223 2015-02-27 Pedro Alves <palves@redhat.com>
2225 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2226 IP_AGENT_EXPORT_FUNC.
2227 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2228 IP_AGENT_EXPORT_FUNC.
2229 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2230 (IP_AGENT_EXPORT): Delete.
2231 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2232 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2233 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2234 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2235 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2236 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2237 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2238 (traceframe_read_count, traceframe_write_count)
2239 (traceframes_created, trace_state_variables, get_raw_reg)
2240 (get_trace_state_variable_value, set_trace_state_variable_value)
2241 (ust_loaded, helper_thread_id, cmd_buf): Use
2242 IPA_SYM_EXPORTED_NAME.
2243 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2244 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2245 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2246 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2247 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2248 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2249 EXTERN_C_PUSH/EXTERN_C_POP.
2250 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2251 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2252 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2253 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2254 (traceframe_write_count, traceframe_read_count)
2255 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2256 (about_to_request_buffer_space, get_trace_state_variable_value)
2257 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2258 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2259 EXTERN_C_PUSH/EXTERN_C_POP.
2260 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2261 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2262 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2263 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2264 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2265 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2266 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2267 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2269 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2270 (IP_AGENT_EXPORT_VAR_DECL): Define.
2272 (gdb_agent_get_raw_reg): Declare.
2274 2015-02-27 Tom Tromey <tromey@redhat.com>
2275 Pedro Alves <palves@redhat.com>
2277 Rename symbols whose names are reserved C++ keywords throughout.
2279 2015-02-27 Pedro Alves <palves@redhat.com>
2281 * Makefile.in (COMPILER): New, get it from autoconf.
2282 (CXX): Get from autoconf instead.
2283 (COMPILE.pre): Use COMPILER.
2284 (CC-LD): Rename to ...
2285 (CC_LD): ... this. Use COMPILER.
2286 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2287 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2288 * acinclude.m4: Include build-with-cxx.m4.
2289 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2290 Disable -Werror by default if building in C++ mode.
2291 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2292 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2293 the C++ compiler. Save/restore CXXFLAGS too.
2294 * configure: Regenerate.
2296 2015-02-27 Pedro Alves <palves@redhat.com>
2298 * acinclude.m4: Include libiberty.m4.
2299 * configure.ac: Call libiberty_INIT.
2300 * config.in, configure: Regenerate.
2302 2015-02-26 Pedro Alves <palves@redhat.com>
2304 * linux-low.c (linux_wait_1): When incrementing the PC past a
2305 program breakpoint always use the_low_target.breakpoint_len as
2306 increment, rather than the maximum between that and
2307 the_low_target.decr_pc_after_break.
2309 2015-02-23 Pedro Alves <palves@redhat.com>
2311 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2312 thread was doing a step-over; always adjust the PC if
2313 we stepped over a permanent breakpoint.
2314 (linux_wait_1): If we stepped over breakpoint that was on top of a
2315 permanent breakpoint, manually advance the PC past it.
2317 2015-02-23 Pedro Alves <palves@redhat.com>
2319 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2321 (x86_fill_gregset, x86_store_gregset): Use it when handling
2324 2015-02-20 Pedro Alves <palves@redhat.com>
2326 * thread-db.c: Include "nat/linux-procfs.h".
2327 (thread_db_init): Skip listing new threads if the kernel supports
2328 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2330 2015-02-20 Pedro Alves <palves@redhat.com>
2332 * linux-low.c (status_pending_p_callback): Use ptid_match.
2334 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2336 PR breakpoints/16812
2337 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2338 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2339 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2341 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2343 PR breakpoints/15956
2344 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2346 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2348 * linux-low.c (linux_low_btrace_conf): Print size.
2349 * server.c (handle_btrace_conf_general_set): New.
2350 (hanle_general_set): Call handle_btrace_conf_general_set.
2351 (handle_query): Report Qbtrace-conf:bts:size as supported.
2353 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2355 * linux-low.c (linux_low_enable_btrace): Update parameters.
2356 (linux_low_btrace_conf): New.
2357 (linux_target_ops)<to_btrace_conf>: Initialize.
2358 * server.c (current_btrace_conf): New.
2359 (handle_btrace_enable): Rename to ...
2360 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2361 to target_enable_btrace. Update comment. Update users.
2362 (handle_qxfer_btrace_conf): New.
2363 (qxfer_packets): Add btrace-conf entry.
2364 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2365 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2366 (target_ops)<read_btrace_conf>: New.
2367 (target_enable_btrace): Update parameters.
2368 (target_read_btrace_conf): New.
2370 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2372 * server.c (handle_btrace_general_set): Remove call to
2373 target_supports_btrace.
2374 (supported_btrace_packets): New.
2375 (handle_query): Call supported_btrace_packets.
2376 * target.h: include btrace-common.h.
2377 (btrace_target_info): Removed.
2378 (supports_btrace, target_supports_btrace): Update parameters.
2380 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2382 * Makefile.in (SFILES): Add common/btrace-common.c.
2383 (OBS): Add common/btrace-common.o.
2384 (btrace-common.o): Add build rules.
2385 * linux-low: Include btrace-common.h.
2386 (linux_low_read_btrace): Use struct btrace_data. Call
2387 btrace_data_init and btrace_data_fini.
2389 2015-02-06 Pedro Alves <palves@redhat.com>
2391 * thread-db.c (find_new_threads_callback): Add debug output.
2393 2015-02-04 Pedro Alves <palves@redhat.com>
2395 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2396 (resume_stopped_resumed_lwps): New function.
2397 (linux_wait_for_event_filtered): Use it.
2399 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2401 * Makefile.in (SFILES): Add linux-personality.c.
2402 (linux-personality.o): New rule.
2403 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2404 list of objects to be built.
2405 * linux-low.c: Include nat/linux-personality.h.
2406 (linux_create_inferior): Remove code to disable address space
2407 randomization (moved to ../nat/linux-personality.c). Create
2408 cleanup to disable address space randomization.
2410 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2412 * Makefile.in (posix-strerror.o): New rule.
2413 (mingw-strerror.o): Likewise.
2414 * configure: Regenerated.
2415 * configure.ac: Source file ../common/common.host. Initialize new
2416 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2418 2015-01-14 Yao Qi <yao@codesourcery.com>
2420 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2421 (ppc-linux.o): New rule.
2422 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2423 * configure.ac: AC_CHECK_FUNCS(getauxval).
2424 * config.in: Re-generated.
2425 * configure: Re-generated.
2426 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2427 ppc64_64bit_inferior_p
2429 2015-01-14 Yao Qi <yao@codesourcery.com>
2431 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2432 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2433 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2434 (PT_ORIG_R3, PT_TRAP): Likewise.
2435 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2436 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2437 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2439 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2441 * i387-fp.c (i387_cache_to_xsave): In look over
2442 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2443 zmmh_low_space field by use of zmmh_high_space.
2445 2015-01-09 Pedro Alves <palves@redhat.com>
2447 * linux-low.c (step_over_bkpt): Move higher up in the file.
2448 (handle_extended_wait): Don't store the stop_pc here.
2449 (get_stop_pc): Adjust comments and rename to ...
2450 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2451 stopped for a software breakpoint or hardware breakpoint.
2452 (thread_still_has_status_pending_p): New function.
2453 (status_pending_p_callback): Use
2454 thread_still_has_status_pending_p. If the event is no longer
2455 interesting, resume the LWP.
2456 (handle_tracepoints): Add assert.
2457 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2458 (wstatus_maybe_breakpoint): New function.
2459 (cancel_breakpoint): Delete function.
2460 (check_stopped_by_watchpoint): New function, factored out from
2461 linux_low_filter_event.
2462 (lp_status_maybe_breakpoint): Delete function.
2463 (linux_low_filter_event): Remove filter_ptid argument.
2464 Leave thread group exits pending here. Store the LWP's stop PC.
2465 Always leave events pending.
2466 (linux_wait_for_event_filtered): Pull all events out of the
2467 kernel, and leave them all pending.
2468 (count_events_callback, select_event_lwp_callback): Consider all
2470 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2471 (select_event_lwp): Only give preference to the stepping LWP in
2472 all-stop mode. Adjust comments.
2473 (ignore_event): New function.
2474 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2475 references to cancel_breakpoints. Adjust to renames. Also give
2476 equal priority to all LWPs that have had events in non-stop mode.
2477 If reporting a software breakpoint event, unadjust the LWP's PC.
2478 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2479 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2481 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2482 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2483 (linux_stopped_by_watchpoint): Adjust.
2484 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2485 * linux-low.h (enum lwp_stop_reason): New.
2486 (struct lwp_info) <stop_pc>: Adjust comment.
2487 <stopped_by_watchpoint>: Delete field.
2488 <stop_reason>: New field.
2489 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2490 * mem-break.c (software_breakpoint_inserted_here)
2491 (hardware_breakpoint_inserted_here): New function.
2492 * mem-break.h (software_breakpoint_inserted_here)
2493 (hardware_breakpoint_inserted_here): Declare.
2494 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2495 (cancel_breakpoints): Delete.
2496 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2497 (upload_fast_traceframes): Remove references to
2500 2015-01-09 Pedro Alves <palves@redhat.com>
2502 * thread-db.c (find_new_threads_callback): Ignore thread if the
2503 kernel thread ID is -1.
2505 2015-01-09 Pedro Alves <palves@redhat.com>
2507 * linux-low.c (linux_attach_fail_reason_string): Move to
2508 nat/linux-ptrace.c, and rename.
2509 (linux_attach_lwp): Update comment.
2510 (attach_proc_task_lwp_callback): New function.
2511 (linux_attach): Adjust to rename and use
2512 linux_proc_attach_tgid_threads.
2513 (linux_attach_fail_reason_string): Delete declaration.
2515 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2517 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2518 * server.c (gdbserver_version): Likewise.
2520 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2522 * remote-utils.c: Include ctype.h.
2523 (input_interrupt): Explicitly handle the case when the char
2524 received is the NUL byte. Improve the printing of non-ASCII
2527 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2529 * linux-low.c (linux_low_filter_event): Update call to
2530 linux_enable_event_reporting following the addition of
2531 a new parameter to that function.
2533 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2536 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2537 (AARCH64_FPCR_REGNO): Likewise.
2538 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2539 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2540 (aarch64_store_fpregset): Likewise.
2542 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2544 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2545 Remove FIXME comment about assumption about N.
2547 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2549 * configure.ac: If large-file support is disabled in GDBserver,
2550 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2551 * configure: Regenerate.
2553 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2555 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2556 warning upon ENODATA from ptrace.
2557 * linux-s390-low.c (s390_store_tdb): New.
2558 (s390_regsets): Add regset for NT_S390_TDB.
2560 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2562 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2563 without a fill_function.
2564 * linux-s390-low.c (s390_fill_last_break): Remove.
2565 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2566 (s390_arch_setup): Use regset's size instead of fill_function for
2569 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2571 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2572 the regset's store function when ptrace returned an error.
2573 * regcache.c (get_thread_regcache): Invalidate register cache
2574 before fetching inferior's registers.
2576 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2578 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2579 while-loop as for-loop.
2580 (regsets_store_inferior_registers): Likewise.
2582 2014-11-28 Yao Qi <yao@codesourcery.com>
2584 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2585 * config.in, configure: Re-generate.
2586 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2589 2014-11-21 Yao Qi <yao@codesourcery.com>
2591 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2592 (AC_CHECK_HEADERS): Remove malloc.h.
2593 * configure: Re-generated.
2594 * config.in: Re-generated.
2595 * server.h: Don't include alloca.h and malloc.h.
2596 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2597 Don't include malloc.h.
2599 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2601 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2602 corresponding ERRNO check in same block.
2604 2014-11-12 Pedro Alves <palves@redhat.com>
2606 * server.c (cont_thread): Update comment.
2607 (start_inferior, attach_inferior): No longer clear cont_thread.
2608 (handle_v_cont): No longer set cont_thread.
2609 (captured_main): Clear cont_thread each time a GDB connects.
2611 2014-11-12 Pedro Alves <palves@redhat.com>
2613 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2614 thread, and don't resume all threads if the Hc thread has exited.
2616 2014-11-12 Pedro Alves <palves@redhat.com>
2618 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2619 the process group instead of to a specific LWP.
2621 2014-10-15 Pedro Alves <palves@redhat.com>
2624 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2626 (arm_set_thread_context): Delete.
2627 (the_low_target): Adjust.
2628 * win32-i386-low.c (debug_registers_changed)
2629 (debug_registers_used): Delete.
2630 (update_debug_registers_callback): New function.
2631 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2632 needing to update their debug registers.
2633 (win32_get_current_dr): New function.
2634 (x86_dr_low_get_addr, x86_dr_low_get_control)
2635 (x86_dr_low_get_status): Fetch the debug register from the thread
2637 (i386_initial_stuff): Adjust.
2638 (i386_get_thread_context): Remove current_event parameter. Don't
2639 clear debug_registers_changed nor copy DR values to
2641 (i386_set_thread_context): Delete.
2642 (i386_prepare_to_resume): New function.
2643 (i386_thread_added): Mark the thread as needing to update irs
2645 (the_low_target): Remove i386_set_thread_context and install
2646 i386_prepare_to_resume.
2647 * win32-low.c (win32_get_thread_context): Adjust.
2648 (win32_set_thread_context): Use SetThreadContext
2650 (win32_prepare_to_resume): New function.
2651 (win32_require_context): New function, factored out from ...
2652 (thread_rec): ... this.
2653 (continue_one_thread): Call win32_prepare_to_resume on each thread
2654 we're about to continue.
2655 (win32_resume): Call win32_prepare_to_resume on the event thread.
2656 * win32-low.h (struct win32_thread_info)
2657 <debug_registers_changed>: New field.
2658 (struct win32_target_ops): Change prototype of set_thread_context,
2659 delete set_thread_context and add prepare_to_resume.
2660 (win32_require_context): New declaration.
2662 2014-10-08 Gary Benson <gbenson@redhat.com>
2664 * server.h: Do not include common-exceptions.h.
2666 2014-10-08 Gary Benson <gbenson@redhat.com>
2668 * server.h: Do not include cleanups.h.
2670 2014-09-30 James Hogan <james.hogan@imgtec.com>
2672 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2675 2014-09-23 Yao Qi <yao@codesourcery.com>
2677 * linux-low.c (lp_status_maybe_breakpoint): New function.
2678 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2679 (count_events_callback): Likewise.
2680 (select_event_lwp_callback): Likewise.
2681 (cancel_breakpoints_callback): Likewise.
2683 2014-09-19 Don Breazeal <donb@codesourcery.com>
2685 * linux-low.c (handle_extended_wait): Call
2686 linux_ptrace_get_extended_event.
2687 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2688 linux_is_extended_waitstatus.
2690 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2692 * Makefile.in (CPPFLAGS): Define.
2693 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2694 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2696 2014-09-16 Gary Benson <gbenson@redhat.com>
2698 * inferiors.h (current_inferior): Renamed as...
2699 (current_thread): New variable. All uses updated.
2700 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2701 (maybe_move_out_of_jump_pad): Likewise.
2702 (cancel_breakpoint): Likewise.
2703 (linux_low_filter_event): Likewise.
2704 (wait_for_sigstop): Likewise.
2705 (linux_resume_one_lwp): Likewise.
2706 (need_step_over_p): Likewise.
2707 (start_step_over): Likewise.
2708 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2709 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2710 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2711 and save_inferior as saved_thread.
2712 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2714 (regcache_invalidate_thread): Likewise.
2715 * remote-utils.c (prepare_resume_reply): Likewise.
2716 * thread-db.c (thread_db_get_tls_address): Likewise.
2717 (disable_thread_event_reporting): Likewise.
2718 (remove_thread_event_breakpoints): Likewise.
2719 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2721 * target.h (set_desired_inferior): Renamed as...
2722 (set_desired_thread): New declaration. All uses updated.
2723 * server.c (myresume): Updated comment to reference thread instead
2725 (handle_serial_event): Likewise.
2726 (handle_target_event): Likewise.
2728 2014-09-12 Tom Tromey <tromey@redhat.com>
2729 Gary Benson <gbenson@redhat.com>
2731 * regcache.h: Include common-regcache.h.
2732 (regcache_read_pc): Don't declare.
2733 * regcache.c (get_thread_regcache_for_ptid): New function.
2735 2014-09-11 Tom Tromey <tromey@redhat.com>
2736 Gary Benson <gbenson@redhat.com>
2738 * symbol.c: New file.
2739 * Makefile.in (SFILES): Add symbol.c.
2740 (OBS): Add symbol.o.
2742 2014-09-11 Gary Benson <gbenson@redhat.com>
2744 * target.c (target_stop_ptid, target_continue_ptid): New
2747 2014-09-11 Tom Tromey <tromey@redhat.com>
2748 Gary Benson <gbenson@redhat.com>
2750 * target.h: Include target/target.h.
2751 * target.c (target_read_memory, target_read_uint32)
2752 (target_write_memory): New functions.
2754 2014-09-11 Gary Benson <gbenson@redhat.com>
2756 * server.h (debug_hw_points): Don't declare.
2757 * server.c (debug_hw_points): Don't define. Replace all uses
2758 with show_debug_regs.
2759 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2760 all uses with show_debug_regs.
2762 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2764 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2765 endianness into account.
2766 (ppc_supply_ptrace_register): Likewise.
2768 2014-09-03 James Hogan <james.hogan@imgtec.com>
2770 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2771 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2773 2014-09-03 Gary Benson <gbenson@redhat.com>
2775 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2776 ALL_DEBUG_ADDRESS_REGISTERS.
2778 2014-09-02 Gary Benson <gbenson@redhat.com>
2780 * i386-low.h: Renamed as...
2781 * x86-low.h: New file. All type, function and variable name
2782 prefixes changed from "i386_" to "x86_". All references updated.
2783 * i386-low.c: Renamed as...
2784 * x86-low.c: New file. All type, function and variable name
2785 prefixes changed from "i386_" to "x86_". All references updated.
2787 2014-09-02 Gary Benson <gbenson@redhat.com>
2789 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2790 (x86_linux_new_thread): Likewise.
2792 2014-08-29 Gary Benson <gbenson@redhat.com>
2794 * server.h (setjmp.h): Do not include.
2795 (toplevel): Do not declare.
2796 (common-exceptions.h): Include.
2797 (cleanups.h): Likewise.
2798 * server.c (toplevel): Do not define.
2799 (exit_code): New static global.
2800 (detach_or_kill_for_exit_cleanup): New function.
2801 (main): New function. Original main renamed to...
2802 (captured_main): New function.
2803 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2805 2014-08-29 Gary Benson <gbenson@redhat.com>
2807 * Makefile.in (SFILES): Add common/common-exceptions.c.
2808 (OBS): Add common-exceptions.o.
2809 (common-exceptions.o): New rule.
2810 * utils.c (prepare_to_throw_exception): New function.
2812 2014-08-29 Gary Benson <gbenson@redhat.com>
2814 * config.in: Regenerate.
2815 * configure: Likewise.
2817 2014-08-29 Gary Benson <gbenson@redhat.com>
2819 * Makefile.in (SFILES): Add common/cleanups.c.
2821 (cleanups.o): New rule.
2823 2014-08-29 Gary Benson <gbenson@redhat.com>
2825 * utils.c (internal_vwarning): New function.
2827 2014-08-28 Gary Benson <gbenson@redhat.com>
2829 * utils.h (fatal): Remove declaration.
2830 * utils.c (fatal): Remove function.
2832 2014-08-28 Gary Benson <gbenson@redhat.com>
2834 * tracepoint.c (gdb_agent_init): Replace fatal with
2836 (initialize_tracepoint): Likewise.
2838 2014-08-28 Gary Benson <gbenson@redhat.com>
2840 * remote-utils.c (remote_prepare): Replace fatal with error.
2842 2014-08-28 Gary Benson <gbenson@redhat.com>
2844 * linux-low.c (linux_async): Replace fatal with warning.
2846 (linux_start_non_stop): Return -1 if linux_async failed.
2848 2014-08-28 Gary Benson <gbenson@redhat.com>
2850 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2852 (i386_dr_low_get_addr): Remove vague comment.
2853 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2856 2014-08-28 Gary Benson <gbenson@redhat.com>
2858 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2859 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2861 (linux_resume_one_lwp): Likewise.
2862 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2864 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2865 with internal_error.
2866 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2867 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2868 (find_register_by_name): Replace fatal with internal_error.
2869 (find_regno): Likewise.
2870 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2871 * thread-db.c (thread_db_create_event): Likewise.
2872 (thread_db_load_search): Likewise.
2873 (try_thread_db_load_1): Likewise.
2874 * tracepoint.c (get_jump_space_head): Replace fatal with
2876 (claim_trampoline_space): Likewise.
2877 (have_fast_tracepoint_trampoline_buffer): Likewise.
2878 (cmd_qtstart): Likewise.
2879 (stop_tracing): Likewise.
2880 (fast_tracepoint_collecting): Likewise.
2881 (target_malloc): Likewise.
2882 (download_tracepoint): Likewise.
2883 (download_trace_state_variables): Replace check with gdb_assert.
2884 (upload_fast_traceframes): Replace fatal with internal_error.
2886 2014-08-19 Tom Tromey <tromey@redhat.com>
2887 Gary Benson <gbenson@redhat.com>
2889 * Makefile.in (SFILES): Add common/common-debug.c.
2890 (OBS): Add common-debug.o.
2891 (common-debug.o): New rule.
2892 * debug.h (debug_printf): Don't declare.
2893 * debug.c (debug_printf): Renamed and rewritten as...
2894 (debug_vprintf): New function.
2896 2014-08-19 Gary Benson <gbenson@redhat.com>
2898 * utils.h: Do not include print-utils.h.
2900 2014-08-19 Tom Tromey <tromey@redhat.com>
2901 Gary Benson <gbenson@redhat.com>
2903 * server.h: Add static assertion.
2904 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2906 2014-08-19 Tom Tromey <tromey@redhat.com>
2907 Gary Benson <gbenson@redhat.com>
2909 * Makefile.in (SFILES): Add common/errors.c.
2910 (OBS): Add errors.o.
2911 (IPA_OBS): Add errors-ipa.o.
2912 (errors.o): New rule.
2913 (errors-ipa.o): Likewise.
2914 * utils.h (perror_with_name, error, warning): Don't declare.
2915 * utils.c (warning): Renamed and rewritten as...
2916 (vwarning): New function.
2917 (error): Renamed and rewritten as...
2918 (verror): New function.
2919 (internal_error): Renamed and rewritten as...
2920 (internal_verror): New function.
2922 2014-08-07 Gary Benson <gbenson@redhat.com>
2924 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2925 * configure: Regenerate.
2926 * config.in: Likewise.
2927 * server.h: Do not include errno.h.
2928 * event-loop.c: Likewise.
2929 * hostio-errno.c: Likewise.
2930 * linux-low.c: Likewise.
2931 * remote-utils.c: Likewise.
2932 * spu-low.c: Likewise.
2933 * utils.c: Likewise.
2934 * gdbreplay.c: Unconditionally include errno.h.
2936 2014-08-07 Gary Benson <gbenson@redhat.com>
2938 * server.h: Do not include string.h.
2939 * event-loop.c: Likewise.
2940 * linux-low.c: Likewise.
2941 * regcache.c: Likewise.
2942 * remote-utils.c: Likewise.
2943 * spu-low.c: Likewise.
2944 * utils.c: Likewise.
2946 2014-08-07 Gary Benson <gbenson@redhat.com>
2948 * server.h: Do not include gdb_assert.h.
2950 2014-08-07 Gary Benson <gbenson@redhat.com>
2952 * server.h: Do not include common-utils.h.
2954 2014-08-07 Gary Benson <gbenson@redhat.com>
2956 * server.h: Do not include ptid.h.
2957 * notif.h: Likewise.
2959 2014-08-07 Gary Benson <gbenson@redhat.com>
2961 * server.h: Do not include gdb_locale.h.
2963 2014-08-07 Gary Benson <gbenson@redhat.com>
2965 * server.h: Do not include gdb/signals.h.
2966 * win32-low.c: Likewise.
2968 2014-08-07 Gary Benson <gbenson@redhat.com>
2970 * server.h: Do not include pathmax.h.
2972 2014-08-07 Gary Benson <gbenson@redhat.com>
2974 * server.h: Do not include libiberty.h.
2975 * linux-bfin-low.c: Likewise.
2977 2014-08-07 Gary Benson <gbenson@redhat.com>
2979 * server.h: Do not include ansidecl.h.
2981 2014-08-07 Gary Benson <gbenson@redhat.com>
2983 * linux-x86-low.c: Do not include stddef.h.
2984 * lynx-ppc-low.c: Likewise.
2985 * tracepoint.c: Likewise.
2987 2014-08-07 Gary Benson <gbenson@redhat.com>
2989 * server.h: Do not include stdarg.h.
2990 * nto-low.c: Likewise.
2992 2014-08-07 Gary Benson <gbenson@redhat.com>
2994 * server.h: Do not include stdlib.h.
2995 * inferiors.c: Likewise.
2996 * linux-low.c: Likewise.
2997 * regcache.c: Likewise.
2998 * spu-low.c: Likewise.
2999 * tracepoint.c: Likewise.
3000 * utils.c: Likewise.
3002 2014-08-07 Gary Benson <gbenson@redhat.com>
3004 * server.h: Do not include stdio.h.
3005 * linux-low.c: Likewise.
3006 * remote-utils.c: Likewise.
3007 * spu-low.c: Likewise.
3008 * utils.c: Likewise.
3009 * wincecompat.c: Likewise.
3011 2014-08-06 Gary Benson <gbenson@redhat.com>
3013 * regcache.c (init_register_cache): Move conditionals inside if.
3015 2014-08-06 Gary Benson <gbenson@redhat.com>
3017 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3019 2014-07-31 Gary Benson <gbenson@redhat.com>
3021 * ax.h: Do not include server.h.
3022 * gdbthread.h: Likewise.
3023 * lynx-low.h: Likewise.
3024 * notif.h: Likewise.
3026 2014-07-30 Gary Benson <gbenson@redhat.com>
3028 * server.h: Include common-defs.h.
3029 Do not include config.h or build-gnulib-gdbserver/config.h.
3031 2014-07-30 Gary Benson <gbenson@redhat.com>
3033 * hostio-errno.c: Move server.h to top of includes list.
3034 * inferiors.c: Likewise.
3035 * linux-x86-low.c: Likewise.
3036 * notif.c: Include server.h.
3038 2014-07-24 Tom Tromey <tromey@redhat.com>
3039 Gary Benson <gbenson@redhat.com>
3041 * server.h (CORE_ADDR): Now unsigned.
3043 2014-07-16 Pedro Alves <palves@redhat.com>
3045 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3047 2014-07-15 Pedro Alves <palves@redhat.com>
3049 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3052 2014-07-11 Pedro Alves <palves@redhat.com>
3054 * linux-low.c (kill_wait_lwp): New function, based on
3055 kill_one_lwp_callback, but use my_waitpid directly.
3056 (kill_one_lwp_callback, linux_kill): Use it.
3058 2014-06-23 Pedro Alves <palves@redhat.com>
3060 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3061 before setting DR0..DR3.
3063 2014-06-20 Gary Benson <gbenson@redhat.com>
3065 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3066 * configure: Regenerated.
3067 * config.in: Likewise.
3069 2014-06-20 Gary Benson <gbenson@redhat.com>
3071 * Makefile.in (SFILES): Update locations for files moved
3073 (object file files): Reordered.
3075 2014-06-20 Gary Benson <gbenson@redhat.com>
3077 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3078 (i386_dr_low_set_addr): Likewise.
3079 (i386_dr_low_get_addr): Likewise.
3080 (i386_dr_low_can_set_control): Likewise.
3081 (i386_dr_low_set_control): Likewise.
3082 (i386_dr_low_get_control): Likewise.
3083 (i386_dr_low_get_status): Likewise.
3084 (i386_get_debug_register_length): Likewise.
3085 * linux-x86-low.c (i386_dr_low_set_addr):
3086 Changed signature. Made static.
3087 (i386_dr_low_get_addr): Likewise.
3088 (i386_dr_low_set_control): Likewise.
3089 (i386_dr_low_get_control): Likewise.
3090 (i386_dr_low_get_status): Likewise.
3091 (i386_dr_low): New global variable.
3092 * win32-i386-low.c (i386_dr_low_set_addr):
3093 Changed signature. Made static.
3094 (i386_dr_low_get_addr): Likewise.
3095 (i386_dr_low_set_control): Likewise.
3096 (i386_dr_low_get_control): Likewise.
3097 (i386_dr_low_get_status): Likewise.
3098 (i386_dr_low): New global variable.
3100 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3102 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3103 * Makefile.in (AR, AR_FLAGS): Define.
3104 * configure: Regenerate.
3106 2014-06-19 Gary Benson <gbenson@redhat.com>
3108 * Makefile.in (i386-dregs.o): New rule.
3109 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3110 * i386-low.c (target.h): Remove include.
3111 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3112 (DR_CONTROL_SHIFT): Likewise.
3113 (DR_CONTROL_SIZE): Likewise.
3114 (DR_RW_EXECUTE): Likewise.
3115 (DR_RW_WRITE): Likewise.
3116 (DR_RW_READ): Likewise.
3117 (DR_RW_IORW): Likewise.
3118 (DR_LEN_1): Likewise.
3119 (DR_LEN_2): Likewise.
3120 (DR_LEN_4): Likewise.
3121 (DR_LEN_8): Likewise.
3122 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3123 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3124 (DR_ENABLE_SIZE): Likewise.
3125 (DR_LOCAL_SLOWDOWN): Likewise.
3126 (DR_GLOBAL_SLOWDOWN): Likewise.
3127 (DR_CONTROL_RESERVED): Likewise.
3128 (I386_DR_CONTROL_MASK): Likewise.
3129 (I386_DR_VACANT): Likewise.
3130 (I386_DR_LOCAL_ENABLE): Likewise.
3131 (I386_DR_GLOBAL_ENABLE): Likewise.
3132 (I386_DR_DISABLE): Likewise.
3133 (I386_DR_SET_RW_LEN): Likewise.
3134 (I386_DR_GET_RW_LEN): Likewise.
3135 (I386_DR_WATCH_HIT): Likewise.
3136 (i386_wp_op_t): Likewise.
3137 (i386_show_dr): Likewise.
3138 (i386_length_and_rw_bits): Likewise.
3139 (i386_insert_aligned_watchpoint): Likewise.
3140 (i386_remove_aligned_watchpoint): Likewise.
3141 (i386_handle_nonaligned_watchpoint): Likewise.
3142 i386_update_inferior_debug_regs(): Likewise.
3143 (i386_dr_insert_watchpoint): Likewise.
3144 (i386_dr_remove_watchpoint): Likewise.
3145 (i386_dr_region_ok_for_watchpoint): Likewise.
3146 (i386_dr_stopped_data_address): Likewise.
3147 (i386_dr_stopped_by_watchpoint): Likewise.
3149 2014-06-19 Gary Benson <gbenson@redhat.com>
3151 * i386-low.c (i386_dr_show): Renamed to
3152 i386_show_dr and made static. All uses updated.
3153 (i386_dr_length_and_rw_bits): Renamed to
3154 i386_length_and_rw_bits and made static.
3156 (i386_dr_insert_aligned_watchpoint): Renamed to
3157 i386_insert_aligned_watchpoint and made static.
3159 (i386_dr_remove_aligned_watchpoint): Renamed to
3160 i386_remove_aligned_watchpoint and made static.
3162 (i386_dr_update_inferior_debug_regs): Renamed to
3163 i386_update_inferior_debug_regs and made static.
3166 2014-06-18 Gary Benson <gbenson@redhat.com>
3168 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3169 (i386_dr_low_can_set_control): Likewise.
3170 (i386_get_debug_register_length): Likewise.
3171 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3172 (i386_dr_low_can_set_control): Likewise.
3173 (i386_get_debug_register_length): Likewise.
3175 2014-06-17 Gary Benson <gbenson@redhat.com>
3177 * i386-low.h (i386-dregs.h): New include.
3178 (DR_FIRSTADDR): Now in i386-dregs.h.
3179 (DR_LASTADDR): Likewise.
3180 (DR_NADDR): Likewise.
3181 (DR_STATUS): Likewise.
3182 (DR_CONTROL): Likewise.
3183 (i386_debug_reg_state): Likewise.
3184 (i386_dr_insert_watchpoint): Likewise.
3185 (i386_dr_remove_watchpoint): Likewise.
3186 (i386_dr_region_ok_for_watchpoint): Likewise.
3187 (i386_dr_stopped_data_address): Likewise.
3188 (i386_dr_stopped_by_watchpoint): Likewise.
3189 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3191 2014-06-18 Gary Benson <gbenson@redhat.com>
3193 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3194 i386_dr_insert_watchpoint.
3195 (i386_low_remove_watchpoint): Renamed to
3196 i386_dr_remove_watchpoint.
3197 (i386_low_region_ok_for_watchpoint): Renamed to
3198 i386_dr_region_ok_for_watchpoint.
3199 (i386_low_stopped_data_address): Renamed to
3200 i386_dr_stopped_data_address.
3201 (i386_low_stopped_by_watchpoint): Renamed to
3202 i386_dr_stopped_by_watchpoint.
3203 * i386-low.c (i386_show_dr): Renamed to
3204 i386_dr_show and made nonstatic. All uses updated.
3205 (i386_length_and_rw_bits): Renamed to
3206 i386_dr_length_and_rw_bits and made nonstatic.
3208 (i386_insert_aligned_watchpoint): Renamed to
3209 i386_dr_insert_aligned_watchpoint and made nonstatic.
3211 (i386_remove_aligned_watchpoint): Renamed to
3212 i386_dr_remove_aligned_watchpoint and made nonstatic.
3214 (i386_update_inferior_debug_regs): Renamed to
3215 i386_dr_update_inferior_debug_regs and made nonstatic.
3217 (i386_low_insert_watchpoint): Renamed to
3218 i386_dr_insert_watchpoint. All uses updated.
3219 (i386_low_remove_watchpoint): Renamed to
3220 i386_dr_remove_watchpoint. All uses updated.
3221 (i386_low_region_ok_for_watchpoint): Renamed to
3222 i386_dr_region_ok_for_watchpoint. All uses updated.
3223 (i386_low_stopped_data_address): Renamed to
3224 i386_dr_stopped_data_address. All uses updated.
3225 (i386_low_stopped_by_watchpoint): Renamed to
3226 i386_dr_stopped_by_watchpoint. All uses updated.
3228 2014-06-18 Gary Benson <gbenson@redhat.com>
3230 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3231 (i386_dr_low_can_set_control): Likewise.
3232 (i386_insert_aligned_watchpoint): New check.
3234 2014-06-18 Gary Benson <gbenson@redhat.com>
3236 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3239 2014-06-18 Gary Benson <gbenson@redhat.com>
3241 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3242 instead of fatal and error.
3243 (i386_handle_nonaligned_watchpoint): Likewise.
3245 2014-06-18 Gary Benson <gbenson@redhat.com>
3247 * i386-low.c (i386_get_debug_register_length): New macro.
3248 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3249 (i386_show_dr): Use debug_printf instead of fprintf. Use
3250 phex to format values.
3252 2014-06-18 Gary Benson <gbenson@redhat.com>
3254 * i386-low.h: Comment changes.
3255 * i386-low.c: Likewise.
3257 2014-06-18 Gary Benson <gbenson@redhat.com>
3259 * i386-low.c: Whitespace changes.
3261 2014-06-12 Tom Tromey <tromey@redhat.com>
3263 * utils.c (freeargv): Remove.
3265 2014-06-12 Tom Tromey <tromey@redhat.com>
3267 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3268 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3269 (parse_debug_format_options): Likewise.
3270 (gdbserver_usage): Likewise.
3271 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3272 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3273 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3275 ($(LIBGNU)): Depend on libiberty.
3276 (all-lib): Recurse into all subdirs.
3277 (install-only): Invoke "install" target in subdirs.
3278 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3280 * configure: Rebuild.
3281 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3282 for vasprintf, vsnprintf, or gettimeofday.
3283 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3286 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3288 * development.sh: Delete.
3289 * Makefile.in (config.status): Adjust dependency on development.sh.
3290 * configure.ac: Adjust development.sh source call.
3291 * configure: Regenerate.
3293 2014-06-02 Pedro Alves <palves@redhat.com>
3295 * ax.c (gdb_free_agent_expr): New function.
3296 * ax.h (gdb_free_agent_expr): New declaration.
3297 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3299 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3301 (clear_breakpoint_conditions_and_commands): New function.
3302 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3303 (clear_breakpoint_conditions_and_commands): New declaration.
3305 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3307 * linux-aarch64-low.c (asm/ptrace.h): Include.
3309 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3311 Fix TLS access for -static -pthread.
3312 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3313 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3314 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3316 2014-05-20 Pedro Alves <palves@redhat.com>
3318 * linux-aarch64-low.c (aarch64_insert_point)
3319 (aarch64_remove_point): No longer check whether the type is
3320 supported here. Adjust to new interface.
3321 (the_low_target): Install aarch64_supports_z_point_type as
3322 supports_z_point_type method.
3323 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3324 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3325 instead of a Z packet char. Adjust.
3326 (arm_supports_z_point_type): New function.
3327 (arm_insert_point, arm_remove_point): Adjust to new interface.
3328 (the_low_target): Install arm_supports_z_point_type.
3329 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3330 (cris_insert_point, cris_remove_point): Adjust to new interface.
3331 Don't check whether the type is supported here.
3332 (the_low_target): Install cris_supports_z_point_type.
3333 * linux-low.c (linux_supports_z_point_type): New function.
3334 (linux_insert_point, linux_remove_point): Adjust to new interface.
3335 * linux-low.h (struct linux_target_ops) <insert_point,
3336 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3337 raw_breakpoint pointer parameter.
3338 <supports_z_point_type>: New method.
3339 * linux-mips-low.c (mips_supports_z_point_type): New function.
3340 (mips_insert_point, mips_remove_point): Adjust to new interface.
3341 Use mips_supports_z_point_type.
3342 (the_low_target): Install mips_supports_z_point_type.
3343 * linux-ppc-low.c (the_low_target): Install NULL as
3344 supports_z_point_type method.
3345 * linux-s390-low.c (the_low_target): Install NULL as
3346 supports_z_point_type method.
3347 * linux-sparc-low.c (the_low_target): Install NULL as
3348 supports_z_point_type method.
3349 * linux-x86-low.c (x86_supports_z_point_type): New function.
3350 (x86_insert_point): Adjust to new insert_point interface. Use
3351 insert_memory_breakpoint. Adjust to new
3352 i386_low_insert_watchpoint interface.
3353 (x86_remove_point): Adjust to remove_point interface. Use
3354 remove_memory_breakpoint. Adjust to new
3355 i386_low_remove_watchpoint interface.
3356 (the_low_target): Install x86_supports_z_point_type.
3357 * lynx-low.c (lynx_target_ops): Install NULL as
3358 supports_z_point_type callback.
3359 * nto-low.c (nto_supports_z_point_type): New.
3360 (nto_insert_point, nto_remove_point): Adjust to new interface.
3361 (nto_target_ops): Install nto_supports_z_point_type.
3362 * mem-break.c: Adjust intro comment.
3363 (struct raw_breakpoint) <raw_type, size>: New fields.
3364 <inserted>: Update comment.
3365 <shlib_disabled>: Delete field.
3366 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3367 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3368 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3369 (raw_bkpt_type_to_target_hw_bp_type): New function.
3370 (find_enabled_raw_code_breakpoint_at): New function.
3371 (find_raw_breakpoint_at): New type and size parameters. Use them.
3372 (insert_memory_breakpoint): New function, based off
3373 set_raw_breakpoint_at.
3374 (remove_memory_breakpoint): New function.
3375 (set_raw_breakpoint_at): Reimplement.
3376 (set_breakpoint): New, based on set_breakpoint_at.
3377 (set_breakpoint_at): Reimplement.
3378 (delete_raw_breakpoint): Go through the_target->remove_point
3379 instead of assuming memory breakpoints.
3380 (find_gdb_breakpoint_at): Delete.
3381 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3382 (find_gdb_breakpoint): New function.
3383 (set_gdb_breakpoint_at): Delete.
3384 (z_type_supported): New function.
3385 (set_gdb_breakpoint_1): New function, loosely based off
3386 set_gdb_breakpoint_at.
3387 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3388 (delete_gdb_breakpoint_at): Delete.
3389 (delete_gdb_breakpoint_1): New function, loosely based off
3390 delete_gdb_breakpoint_at.
3391 (delete_gdb_breakpoint): New function.
3392 (clear_gdb_breakpoint_conditions): Rename to ...
3393 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3395 (add_condition_to_breakpoint): Make static.
3396 (add_breakpoint_condition): Take a struct breakpoint pointer
3397 instead of an address. Adjust.
3398 (gdb_condition_true_at_breakpoint): Rename to ...
3399 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3401 (gdb_condition_true_at_breakpoint): Reimplement.
3402 (add_breakpoint_commands): Take a struct breakpoint pointer
3403 instead of an address. Adjust.
3404 (gdb_no_commands_at_breakpoint): Rename to ...
3405 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3406 parameter. Return true if no breakpoint was found. Change debug
3408 (gdb_no_commands_at_breakpoint): Reimplement.
3409 (run_breakpoint_commands): Rename to ...
3410 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3411 and change return type to boolean.
3412 (run_breakpoint_commands): New function.
3413 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3414 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3415 breakpoint. Go through the_target->remove_point instead of
3416 assuming memory breakpoint.
3417 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3418 software and hardware breakpoints.
3419 (reinsert_raw_breakpoint): Go through the_target->insert_point
3420 instead of assuming memory breakpoint.
3421 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3422 software and hardware breakpoints.
3423 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3424 Check both software and hardware breakpoints.
3425 (validate_inserted_breakpoint): Assert the breakpoint is a
3426 software breakpoint. Set the inserted flag to -1 instead of
3427 setting shlib_disabled.
3428 (delete_disabled_breakpoints): Adjust.
3429 (validate_breakpoints): Only validate software breakpoints.
3430 Adjust to inserted flag change.
3431 (check_mem_read, check_mem_write): Skip breakpoint types other
3432 than software breakpoints. Adjust to inserted flag change.
3433 * mem-break.h (enum raw_bkpt_type): New enum.
3434 (raw_breakpoint, struct process_info): Forward declare.
3435 (Z_packet_to_target_hw_bp_type): Delete declaration.
3436 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3437 (set_gdb_breakpoint, delete_gdb_breakpoint)
3438 (clear_breakpoint_conditions): New declarations.
3439 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3440 (breakpoint_inserted_here): Update comment.
3441 (add_breakpoint_condition, add_breakpoint_commands): Replace
3442 address parameter with a breakpoint pointer parameter.
3443 (gdb_breakpoint_here): Update comment.
3444 (delete_gdb_breakpoint_at): Delete.
3445 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3446 * server.c (process_point_options): Take a struct breakpoint
3447 pointer instead of an address. Adjust.
3448 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3449 delete_gdb_breakpoint.
3450 * spu-low.c (spu_target_ops): Install NULL as
3451 supports_z_point_type method.
3452 * target.h: Include mem-break.h.
3453 (struct target_ops) <prepare_to_access_memory>: Update comment.
3454 <supports_z_point_type>: New field.
3455 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3456 instead of a char. Also take a raw breakpoint pointer.
3457 * win32-arm-low.c (the_low_target): Install NULL as
3458 supports_z_point_type.
3459 * win32-i386-low.c (i386_supports_z_point_type): New function.
3460 (i386_insert_point, i386_remove_point): Adjust to new interface.
3461 (the_low_target): Install i386_supports_z_point_type.
3462 * win32-low.c (win32_supports_z_point_type): New function.
3463 (win32_insert_point, win32_remove_point): Adjust to new interface.
3464 (win32_target_ops): Install win32_supports_z_point_type.
3465 * win32-low.h (struct win32_target_ops):
3466 <supports_z_point_type>: New method.
3467 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3468 instead of a char. Also take a raw breakpoint pointer.
3470 2014-05-20 Pedro Alves <palves@redhat.com>
3472 * mem-break.h: Include break-common.h.
3473 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3474 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3475 (Z_packet_to_target_hw_bp_type): New declaration.
3476 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3477 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3478 (Z_PACKET_ACCESS_WP): Delete macros.
3479 (Z_packet_to_hw_type): Delete function.
3480 * i386-low.h: Don't include break-common.h here.
3481 (Z_packet_to_hw_type): Delete declaration.
3482 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3483 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3484 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3485 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3486 * linux-aarch64-low.c: Don't include break-common.h here.
3487 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3488 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3489 (Z_packet_to_target_hw_bp_type): Delete function.
3490 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3492 (mips_insert_point, mips_remove_point): Use
3493 Z_packet_to_target_hw_bp_type.
3495 2014-05-20 Pedro Alves <palves@redhat.com>
3497 * linux-aarch64-low.c: Include break-common.h.
3498 (enum target_point_type): Delete.
3499 (Z_packet_to_point_type): Rename to ...
3500 (Z_packet_to_target_hw_bp_type): ... this, and return a
3501 target_hw_bp_type instead.
3502 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3503 instead of an enum target_point_type.
3504 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3506 (aarch64_dr_state_insert_one_point)
3507 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3508 (aarch64_handle_aligned_watchpoint)
3509 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3510 Take an enum target_hw_bp_type instead of an enum
3512 (aarch64_supports_z_point_type): New function.
3513 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3514 use Z_packet_to_target_hw_bp_type.
3516 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3518 * configure.ac: Only use -Werror by default when DEVELOPMENT
3520 * configure: Regenerate.
3522 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3524 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3525 * linux-x86-low.c (X86_64_USER_REGS): New.
3526 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3528 2014-04-28 Yao Qi <yao@codesourcery.com>
3530 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3533 2014-04-25 Pedro Alves <palves@redhat.com>
3536 * linux-low.c (linux_attach_fail_reason_string): New function.
3537 (linux_attach_lwp): Delete.
3538 (linux_attach_lwp_1): Rename to ...
3539 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3540 argument. Remove "initial" parameter. Return int instead of
3541 void. Don't error or warn here.
3542 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3543 failure to attach to the tgid. Call warning when failing to
3545 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3546 argument. Remove "initial" parameter. Return int instead of
3547 void. Don't error or warn here.
3548 (linux_attach_fail_reason_string): New declaration.
3549 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3550 interface change. Use linux_attach_fail_reason_string.
3552 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3553 Walfred Tedeschi <walfred.tedeschi@intel.com>
3555 * Makefile.in: Added rules to handle new files
3556 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3557 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3558 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3559 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3560 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3561 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3563 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3564 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3565 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3566 i386/x32-avx512.xml.
3567 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3568 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3569 i386/x32-avx512-linux.xml.
3570 * i387-fp.c (num_avx512_k_registers): New constant for number
3572 (num_avx512_zmmh_low_registers): New constant for number of
3573 lower ZMM registers (0-15).
3574 (num_avx512_zmmh_high_registers): New constant for number of
3575 higher ZMM registers (16-31).
3576 (num_avx512_ymmh_registers): New contant for number of higher
3577 YMM registers (ymm16-31 added by avx521 on x86_64).
3578 (num_avx512_xmm_registers): New constant for number of higher
3579 XMM registers (xmm16-31 added by AVX512 on x86_64).
3580 (struct i387_xsave): Add space for AVX512 registers.
3581 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3582 Add code to handle AVX512 registers.
3583 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3584 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3585 prototypei from generated file.
3586 (tdesc_amd64_avx512_linux): Likewise.
3587 (init_registers_x32_avx512_linux): Likewise.
3588 (tdesc_x32_avx512_linux): Likewise.
3589 (init_registers_i386_avx512_linux): Likewise.
3590 (tdesc_i386_avx512_linux): Likewise.
3591 (x86_64_regmap): Add AVX512 registers.
3592 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3594 (initialize_low_arch): Add code to initialize AVX512 registers.
3596 2014-04-23 Pedro Alves <palves@redhat.com>
3598 * mem-break.c (find_gdb_breakpoint_at): Make static.
3599 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3601 2014-04-23 Pedro Alves <palves@redhat.com>
3603 * i386-low.c: Don't include break-common.h here.
3604 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3605 prototype to take target_hw_bp_type as argument instead of a Z
3607 * i386-low.h: Include break-common.h here.
3608 (Z_packet_to_hw_type): Declare.
3609 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3611 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3612 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3613 (x86_remove_point): Convert the packet number to a
3614 target_hw_bp_type before calling i386_low_remove_watchpoint.
3615 * win32-i386-low.c (i386_insert_point): Convert the packet number
3616 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3617 (i386_remove_point): Convert the packet number to a
3618 target_hw_bp_type before calling i386_low_remove_watchpoint.
3620 2014-04-23 Pedro Alves <palves@redhat.com>
3622 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3624 2014-04-10 Pedro Alves <palves@redhat.com>
3626 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3627 Check if the condition or command is NULL before checking if the
3628 breakpoint is known. On success, return true.
3629 * mem-break.h (add_breakpoint_condition): Document return.
3630 (add_breakpoint_commands): Add describing comment.
3631 * server.c (skip_to_semicolon): New function.
3632 (process_point_options): Use it.
3634 2014-04-09 Pedro Alves <palves@redhat.com>
3636 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3639 2014-02-27 Pedro Alves <palves@redhat.com>
3642 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3644 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3646 (last_thread_of_process_p): Take a PID argument instead of a
3648 (linux_wait_for_lwp): Delete.
3649 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3651 (linux_low_filter_event): New function, party factored out from
3652 linux_wait_for_event.
3653 (linux_wait_for_event): Rename to ...
3654 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3655 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3656 sigsuspend. Check for zombie leaders.
3657 (linux_wait_for_event): Reimplement as wrapper around
3658 linux_wait_for_event_filtered.
3659 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3660 a normal or signal exit is seen, it's the whole process exiting.
3661 (wait_for_sigstop): No longer a for_each_inferior callback.
3662 Rewrite on top of linux_wait_for_event_filtered.
3663 (stop_all_lwps): Call wait_for_sigstop directly.
3664 * server.c (resume, handle_target_event): Handle
3665 TARGET_WAITKIND_NO_RESUMED.
3667 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3669 * win32-low.c (psapi_get_dll_name,
3670 * win32_CreateToolhelp32Snapshot): Delete.
3671 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3672 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3674 (handle_load_dll): Add function description.
3675 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3677 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3679 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3681 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3682 base address when calling win32_add_one_solib.
3683 (handle_load_dll): Delete local variable load_addr.
3684 Remove 0x1000 offset applied to DLL base address when calling
3685 win32_add_one_solib.
3686 (handle_unload_dll): Add comment.
3688 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3690 * win32-low.c (win32_add_all_dlls): Renames
3691 win32_ensure_ntdll_loaded. Rewrite function documentation.
3692 Adjust implementation to always load all DLLs.
3693 Add 0x1000 offset to DLL base address when calling
3694 win32_add_one_solib.
3695 (child_initialization_done): New static global.
3696 (do_initial_child_stuff): Set child_initialization_done to
3697 zero during child initialization, and 1 after. Replace call
3698 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3700 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3701 (handle_unload_dll): Add function documentation.
3702 (get_child_debug_event): Ignore load and unload DLL events
3703 during child initialization.
3705 2014-02-20 Doug Evans <dje@google.com>
3707 Remove global all_lwps.
3708 * inferiors.h (ptid_of): Move here from linux-low.h.
3709 (pid_of, lwpid_of): Ditto.
3710 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3711 parameter is a struct thread_info * now.
3712 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3713 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3714 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3716 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3717 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3718 * linux-arm-low.c (update_registers_callback): Update, "entry"
3719 parameter is a struct thread_info * now.
3720 Fetch lwpid from current_inferior directly.
3721 (arm_insert_point): Pass &all_threads to find_inferior instead of
3723 (arm_remove_point): Ditto.
3724 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3725 (arm_prepare_to_resume): Fetch pid from thread.
3726 (arm_read_description): Fetch lwpid from current_inferior directly.
3727 * linux-low.c (all_lwps): Delete.
3728 (delete_lwp): Delete call to remove_inferior.
3729 (handle_extended_wait): Fetch lwpid from thread.
3730 (add_lwp): Don't set lwp->entry.id. Remove call to
3731 add_inferior_to_list.
3732 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3733 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3734 (kill_one_lwp_callback): Ditto.
3735 (linux_kill): Don't dereference NULL pointer.
3736 Fetch ptid,lwpid from thread.
3737 (get_detach_signal): Fetch ptid from thread.
3738 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3739 Simplify call to regcache_invalidate_thread.
3740 (delete_lwp_callback): Update, "entry" parameter is a
3741 struct thread_info * now. Fetch pid from thread.
3742 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3743 (status_pending_p_callback): Update, "entry" parameter is a
3744 struct thread_info * now. Fetch ptid from thread.
3745 (find_lwp_pid): Update, "entry" parameter is a
3746 struct thread_info * now.
3747 (linux_wait_for_lwp): Fetch pid from thread.
3748 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3749 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3750 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3751 (dequeue_one_deferred_signal): Ditto.
3752 (cancel_breakpoint): Fetch ptid from current_inferior.
3753 (linux_wait_for_event): Pass &all_threads to find_inferior,
3754 not &all_lwps. Fetch ptid, lwpid from thread.
3755 (count_events_callback): Update, "entry" parameter is a
3756 struct thread_info * now.
3757 (select_singlestep_lwp_callback): Ditto.
3758 (select_event_lwp_callback): Ditto.
3759 (cancel_breakpoints_callback): Ditto.
3760 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3762 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3763 (unsuspend_one_lwp): Update, "entry" parameter is a
3764 struct thread_info * now.
3765 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3767 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3768 Fetch lwpid from thread, not lwp.
3769 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3770 Pass &all_threads to find_inferior, not &all_lwps.
3771 (send_sigstop): Fetch lwpid from thread, not lwp.
3772 (send_sigstop_callback): Update, "entry" parameter is a
3773 struct thread_info * now.
3774 (suspend_and_send_sigstop_callback): Ditto.
3775 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3776 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3777 struct thread_info * now.
3778 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3780 (lwp_running): Update, "entry" parameter is a
3781 struct thread_info * now.
3782 (stop_all_lwps): Fetch ptid from thread.
3783 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3784 (linux_resume_one_lwp): Fetch lwpid from thread.
3785 (linux_set_resume_request): Update, "entry" parameter is a
3786 struct thread_info * now. Fetch pid, lwpid from thread.
3787 (resume_status_pending_p): Update, "entry" parameter is a
3788 struct thread_info * now.
3789 (need_step_over_p): Ditto. Fetch lwpid from thread.
3790 (start_step_over): Fetch lwpid from thread.
3791 (linux_resume_one_thread): Update, "entry" parameter is a
3792 struct thread_info * now. Fetch lwpid from thread.
3793 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3794 (proceed_one_lwp): Update, "entry" parameter is a
3795 struct thread_info * now. Fetch lwpid from thread.
3796 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3797 struct thread_info * now.
3798 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3799 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3800 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3802 (regsets_store_inferior_registers): Ditto.
3803 (fetch_register, store_register): Ditto.
3804 (linux_read_memory, linux_write_memory): Ditto.
3805 (linux_request_interrupt): Ditto.
3806 (linux_read_auxv): Ditto.
3807 (linux_xfer_siginfo): Ditto.
3808 (linux_qxfer_spu): Ditto.
3809 (linux_qxfer_libraries_svr4): Ditto.
3810 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3811 moved to inferiors.h.
3813 (get_thread_lwp): Update.
3814 (struct lwp_info): Delete member "entry". Simplify comment for
3817 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3818 current_inferior directly.
3819 (update_watch_registers_callback): Update, "entry" parameter is a
3820 struct thread_info * now. Fetch pid from thread.
3821 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3822 (mips_insert_point): Fetch lwpid from current_inferior.
3823 Pass &all_threads to find_inferior, not &all_lwps.
3824 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3825 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3827 (mips_stopped_data_address): Ditto.
3828 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3830 * linux-tile-low.c (tile_arch_setup): Ditto.
3831 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3832 (update_debug_registers_callback): Update, "entry" parameter is a
3833 struct thread_info * now. Fetch pid from thread.
3834 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3835 Pass &all_threads to find_inferior, not &all_lwps.
3836 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3837 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3838 Pass &all_threads to find_inferior, not &all_lwps.
3839 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3840 (i386_dr_low_get_status): Ditto.
3841 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3842 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3843 (x86_linux_read_description): Ditto.
3844 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3846 2014-02-20 Doug Evans <dje@google.com>
3848 * inferiors.c (get_first_inferior): Fix buglet.
3850 2014-02-19 Doug Evans <dje@google.com>
3852 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3853 * inferiors.c (add_thread): Change result type to struct thread_info *.
3854 All callers updated.
3855 (add_lwp): Call add_thread here instead of in callers.
3856 All callers updated.
3857 * linux-low.h (get_lwp_thread): Rewrite.
3858 (struct lwp_info): New member "thread".
3860 2014-02-19 Doug Evans <dje@google.com>
3862 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3863 All callers updated.
3865 2014-02-19 Doug Evans <dje@google.com>
3867 * inferiors.c (add_thread): Fix whitespace.
3869 2014-02-19 Doug Evans <dje@google.com>
3871 * dll.c (clear_dlls): Replace accessing list implemention details
3873 * gdbthread.h (get_first_thread): Declare.
3874 * inferiors.c (for_each_inferior_with_data): New function.
3875 (get_first_thread): New function.
3876 (find_thread_ptid): Simplify.
3877 (get_first_inferior): New function.
3878 (clear_list): Delete.
3879 (one_inferior_p): New function.
3880 (clear_inferior_list): New function.
3881 (clear_inferiors): Update.
3882 * inferiors.h (for_each_inferior_with_data): Declare.
3883 (clear_inferior_list): Declare.
3884 (one_inferior_p): Declare.
3885 (get_first_inferior): Declare.
3886 * linux-low.c (linux_wait_for_event): Replace accessing list
3887 implemention details with API function.
3888 * server.c (target_running): Ditto.
3889 (accumulate_file_name_length): New function.
3890 (emit_dll_description): New function.
3891 (handle_qxfer_libraries): Replace accessing list implemention
3892 details with API function.
3893 (handle_qxfer_threads_worker): New function.
3894 (handle_qxfer_threads_proper): Replace accessing list implemention
3895 details with API function.
3896 (handle_query): Ditto.
3897 (visit_actioned_threads_callback_ftype): New typedef.
3898 (visit_actioned_threads_data): New struct.
3899 (visit_actioned_threads): Rewrite to be find_inferior callback.
3900 (resume): Call find_inferior.
3901 (handle_status): Replace accessing list implemention
3902 details with API function.
3903 (process_serial_event): Replace accessing list implemention details
3905 * target.c (set_desired_inferior): Replace accessing list implemention
3906 details with API function.
3907 * tracepoint.c (same_process_p): New function.
3908 (gdb_agent_about_to_close): Replace accessing list implemention
3909 details with API function.
3910 * win32-low.c (child_delete_thread): Replace accessing list
3911 implemention details with API function.
3912 (match_dll_by_basename): New function.
3913 (dll_is_loaded_by_basename): New function.
3914 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3915 details call to dll_is_loaded_by_basename.
3917 2014-02-19 Doug Evans <dje@google.com>
3919 * dll.h (struct dll_info): Add comment.
3920 * gdbthread.h (struct thread_info): Add comment.
3921 (current_ptid): Simplify.
3922 * inferiors.c (add_process): Update.
3923 (remove_process): Update.
3924 * inferiors.h (struct process_info): Rename member "head" to "entry".
3925 * linux-low.c (delete_lwp): Update.
3927 (last_thread_of_process_p): Update.
3928 (kill_one_lwp_callback, linux_kill): Update.
3929 (status_pending_p_callback): Update.
3930 (wait_for_sigstop): Update. Simplify read of ptid.
3931 (start_step_over): Update.
3932 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3933 (get_lwp_thread): Update.
3934 (struct lwp_info): Rename member "head" to "entry".
3935 * regcache.h (inferior_list_entry): Delete.
3936 * server.c (kill_inferior_callback): Update.
3937 (detach_or_kill_inferior_callback): Update.
3938 (print_started_pid): Update.
3939 (print_attached_pid): Update.
3940 (process_serial_event): Simplify read of ptid.
3941 * thread-db.c (thread_db_create_event): Update.
3942 (thread_db_get_tls_address): Update.
3943 * win32-low.c (current_inferior_ptid): Simplify.
3945 2014-02-19 Tom Tromey <tromey@redhat.com>
3947 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3949 (target_supports_btrace): Update.
3951 2014-02-14 Yao Qi <yao@codesourcery.com>
3953 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3954 (rsp-low-ipa.o): New target.
3956 2014-02-12 Tom Tromey <tromey@redhat.com>
3958 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3959 convert_ascii_to_int.
3960 * regcache.c (registers_to_string): Likewise.
3961 * remote-utils.c (decode_M_packet): Likewise.
3962 * server.c (process_serial_event): Likewise.
3964 2014-02-12 Tom Tromey <tromey@redhat.com>
3966 * server.c (handle_query, handle_v_run): Use hex2bin, not
3968 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3970 2014-02-12 Tom Tromey <tromey@redhat.com>
3972 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3973 convert_int_to_ascii.
3974 * regcache.c (registers_to_string, collect_register_as_string):
3976 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3978 * server.c (process_serial_event): Likewise.
3979 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3980 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3982 2014-02-12 Tom Tromey <tromey@redhat.com>
3984 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3985 bin2hex, not hexify.
3986 * tracepoint.c (cmd_qtstatus): Likewise.
3988 2014-02-12 Tom Tromey <tromey@redhat.com>
3990 * remote-utils.c (monitor_output): Pass explicit length to
3993 2014-02-12 Tom Tromey <tromey@redhat.com>
3995 * tracepoint.c: Include rsp-low.h.
3996 * server.c: Include rsp-low.h.
3997 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3998 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4000 * remote-utils.c: Include rsp-low.h.
4001 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4002 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4003 (convert_int_to_ascii, convert_ascii_to_int): Move to
4005 * regcache.c: Include rsp-low.h.
4006 * ax.c: Include rsp-low.h.
4007 * Makefile.in (SFILES): Add common/rsp-low.c.
4008 (OBS): Add rsp-low.o.
4009 (rsp-low.o): New target.
4011 2014-02-12 Tom Tromey <tromey@redhat.com>
4013 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4014 Include print-utils.h.
4015 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4016 (plongest, thirty_two, phex_nz): Remove.
4017 * Makefile.in (SFILES): Add common/print-utils.c.
4018 (OBS): Add print-utils.o.
4019 (print-utils-ipa.o): New target.
4020 (print-utils.o): New target.
4021 (IPA_OBJS): Add print-utils-ipa.o.
4023 2014-02-06 Tom Tromey <tromey@redhat.com>
4025 * Makefile.in (SFILES): Fix indentation.
4027 2014-02-05 Doug Evans <dje@google.com>
4029 * linux-low.c (linux_wait_for_event): Improve comment.
4030 (linux_wait_1): Keep current_inferior in sync with event_child.
4032 2014-01-22 Doug Evans <dje@google.com>
4034 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4036 2014-01-22 Doug Evans <dje@google.com>
4038 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4039 * configure: Regenerate.
4040 * config.in: Regenerate.
4041 * Makefile.in (SFILES): Add debug.c.
4043 * debug.c: New file.
4044 * debug.h: New file.
4045 * linux-aarch64-low.c (*): Update all debugging printfs to use
4046 debug_printf instead of fprintf.
4047 * linux-arm-low.c (*): Ditto.
4048 * linux-cris-low.c (*): Ditto.
4049 * linux-crisv32-low.c (*): Ditto.
4050 * linux-m32r-low.c (*): Ditto.
4051 * linux-sparc-low.c (*): Ditto.
4052 * linux-x86.c (*): Ditto.
4053 * linux-low.c (*): Ditto.
4054 (linux_wait_1): Add calls to debug_enter, debug_exit.
4055 (linux_wait): Remove redundant debugging printf.
4056 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4057 (linux_resume, unstop_all_lwps): Ditto.
4058 * mem-break.c (*): Update all debugging printfs to use
4059 debug_printf instead of fprintf.
4060 * remote-utils.c (*): Ditto.
4061 * thread-db.c (*): Ditto.
4062 * server.c #include <ctype.h>, "gdb_vecs.h".
4063 (debug_threads): Moved to debug.c.
4064 (*): Update all debugging printfs to use debug_printf instead of
4066 (start_inferior): Replace call to fflush with call to debug_flush.
4067 (monitor_show_help): Mention set debug-format.
4068 (parse_debug_format_options): New function.
4069 (handle_monitor_command): Handle "monitor set debug-format".
4070 (gdbserver_usage): Mention --debug-format.
4071 (main): Parse --debug-format.
4072 * server.h (debug_threads): Declaration moved to debug.h.
4074 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4075 trace_debug_1 that uses debug_printf.
4076 (tracepoint_look_up_symbols): Update all debugging printfs to use
4077 debug_printf instead of fprintf.
4079 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4081 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4084 2014-01-17 Pedro Alves <palves@redhat.com>
4087 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4088 defined after including gdb_proc_service.h.
4090 2014-01-16 Doug Evans <dje@google.com>
4092 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4093 (match_dll): Use it.
4095 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4097 * target.h (target_ops) <read_btrace>: Change parameters and
4098 return type to allow error reporting.
4099 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4100 trace reading errors on.
4101 * linux-low.c (linux_low_read_btrace): Pass trace reading
4103 (linux_low_disable_btrace): New.
4105 2014-01-15 Doug Evans <dje@google.com>
4107 * inferiors.c (thread_id_to_gdb_id): Delete.
4108 * inferiors.h (thread_id_to_gdb_id): Delete.
4110 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4112 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4113 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4116 2014-01-08 Pedro Alves <palves@redhat.com>
4118 * server.c (handle_status): Don't discard previous queued stop
4119 replies or thread's pending status here.
4120 (main) <disconnection>: Do it here instead.
4122 2014-01-08 Pedro Alves <palves@redhat.com>
4124 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4125 * server.c (visit_actioned_threads, handle_pending_status): New
4127 (handle_v_cont): Factor out parts to ...
4128 (resume): ... this new function. If in all-stop, and a thread
4129 being resumed has a pending status, report it without actually
4131 (myresume): Adjust to use the new 'resume' function.
4132 (clear_pending_status_callback, set_pending_status_callback)
4133 (find_status_pending_thread_callback): New functions.
4134 (handle_status): Handle the case of multiple threads having
4135 interesting statuses to report. Report threads' real last signal
4136 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4137 with an interesting thread to report the status for, instead of
4138 always reporting the status of the first thread.
4140 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4142 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4143 * gdbreplay.c (gdbreplay_version): Likewise.
4145 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4147 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4148 iov.iov_len with the real length in use.
4150 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4152 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4153 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4154 for all targets that use win32-low.c.
4155 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4156 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4158 2013-12-13 Pedro Alves <palves@redhat.com>
4160 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4161 if equal to TARGET_WAITKIND_LOADED.
4162 * win32-low.c (cached_status): New static global.
4163 (win32_wait): Add declaration.
4164 (do_initial_child_stuff): Flush all initial pending debug events
4165 up to the initial breakpoint.
4166 (win32_wait): If CACHED_STATUS was set, return that instead
4167 of doing a real wait. Remove the code resuming the execution
4168 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4169 during the initial phase. Also remove the code changing
4170 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4171 TARGET_WAITKIND_STOPPED.
4173 2013-12-11 Yao Qi <yao@codesourcery.com>
4175 * notif.c (handle_notif_ack): Return 0 if no notification
4178 2013-11-20 Doug Evans <dje@google.com>
4180 * linux-low.c (linux_set_resume_request): Fix comment.
4182 2013-11-20 Doug Evans <dje@google.com>
4184 * linux-low.c (resume_status_pending_p): Tweak comment.
4186 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4188 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4189 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4190 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4191 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4192 (srv_amd64_regobj): Add amd64-mpx.o.
4193 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4194 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4195 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4196 * i387-fp.c (num_pl_bnd_register) Added constant.
4197 (num_pl_bnd_cfg_registers) Added constant.
4198 (struct i387_xsave) Added reserved area and MPX fields.
4199 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4200 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4202 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4203 (init_registers_amd64_mpx_linux): Declare new function.
4204 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4205 (x86_64_regmap): Add MPX registers.
4206 (x86_linux_read_description): Add MPX case.
4207 (initialize_low_arch): Initialize MPX targets.
4209 2013-11-18 Tom Tromey <tromey@redhat.com>
4211 * configure: Rebuild.
4212 * configure.ac: Don't check for stdlib.h.
4213 * gdbreplay.c: Unconditionally include stdlib.h.
4215 2013-11-18 Tom Tromey <tromey@redhat.com>
4217 * config.in: Rebuild.
4218 * configure: Rebuild.
4219 * configure.ac: Don't use AC_HEADER_DIRENT.
4221 2013-11-18 Tom Tromey <tromey@redhat.com>
4223 * server.h: Don't check HAVE_STRING_H.
4224 * gdbreplay.c: Don't check HAVE_STRING_H.
4225 * configure: Rebuild.
4227 2013-11-18 Tom Tromey <tromey@redhat.com>
4229 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4232 2013-11-08 Tom Tromey <tromey@redhat.com>
4234 * configure, config.in: Rebuild.
4235 * configure.ac: Remove unused configury.
4237 2013-11-08 Tom Tromey <tromey@redhat.com>
4239 * acinclude.m4: Include common.m4, codeset.m4.
4240 * configure, config.in: Rebuild.
4241 * configure.ac: Use GDB_AC_COMMON.
4243 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4245 * linux-s390-low.c (HWCAP_S390_TE): New define.
4246 (s390_arch_setup): Consider the TE field in the HWCAP for
4247 determining 'have_regset_tdb'.
4249 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4252 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4255 2013-10-02 Pedro Alves <palves@redhat.com>
4257 * server.c (process_serial_event): Don't output "GDBserver
4258 exiting" if GDB is connected through stdio.
4259 * target.c (mywait): Likewise, be silent if GDB is connected
4262 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4264 * lynx-low.c (lynx_add_threads_after_attach): New function.
4265 (lynx_attach): Remove call to add_thread. Add call to
4266 lynx_add_threads_after_attach instead.
4268 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4270 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4271 * config.in, configure: Regenerated.
4273 2013-09-18 Yao Qi <yao@codesourcery.com>
4276 * server.c (start_inferior): Clear 'resume_info'.
4278 2013-09-16 Jiong Wang <jiwang@tilera.com>
4280 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4283 2013-09-16 Jiong Wang <jiwang@tilera.com>
4285 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4286 linux-tile-low.o to srv_tgtobj.
4288 2013-09-16 Will Newton <will.newton@linaro.org>
4290 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4293 2013-09-06 Pedro Alves <palves@redhat.com>
4295 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4296 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4297 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4298 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4299 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4300 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4302 2013-09-06 Pedro Alves <palves@redhat.com>
4304 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4305 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4307 2013-09-06 Pedro Alves <palves@redhat.com>
4309 * linux-amd64-ipa.c: Include tracepoint.h.
4310 * linux-i386-ipa.c: Include tracepoint.h.
4312 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4314 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4315 (ps_get_thread_area): New function.
4317 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4319 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4320 (initialize_low_arch): Call init_registers_crisv32 rather than
4321 init_register_crisv32.
4323 2013-09-05 Pedro Alves <palves@redhat.com>
4325 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4327 * hostio.h: ... this new file.
4328 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4329 win32-low.c: Include hostio.h.
4331 2013-09-05 Pedro Alves <palves@redhat.com>
4333 * server.h (gdb_client_data, handler_func, callback_handler_func)
4334 (delete_file_handler, add_file_handler, append_callback_event)
4335 (delete_callback_event, start_event_loop, initialize_event_loop):
4336 Move to event-loop.h and include it.
4337 * event-loop.h: New file.
4339 2013-09-05 Pedro Alves <palves@redhat.com>
4341 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4342 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4343 (loaded_dll, unloaded_dll): Move to ...
4344 * dll.h: ... this new file.
4345 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4347 2013-09-05 Pedro Alves <palves@redhat.com>
4349 * server.h (current_process, get_thread_process, all_processes)
4350 (add_inferior_to_list, for_each_inferior, current_inferior)
4351 (remove_inferior, add_process, remove_process, find_process_pid)
4352 (have_started_inferiors_p, have_attached_inferiors_p)
4353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4354 (clear_inferiors, find_inferior, find_inferior_id)
4355 (inferior_target_data, set_inferior_target_data)
4356 (inferior_regcache_data, set_inferior_regcache_data): Move to
4357 inferiors.h, and include it.
4358 * inferiors.h: New file.
4360 2013-09-05 Pedro Alves <palves@redhat.com>
4362 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4366 2013-09-05 Pedro Alves <palves@redhat.com>
4368 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4370 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4371 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4372 (handle_tracepoint_general_set, handle_tracepoint_query)
4373 (tracepoint_finished_step, tracepoint_was_hit)
4374 (release_while_stepping_state_list, current_traceframe)
4375 (in_readonly_region, traceframe_read_mem)
4376 (fetch_traceframe_registers, traceframe_read_sdata)
4377 (traceframe_read_info, struct fast_tpoint_collect_status)
4378 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4379 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4380 (supply_fast_tracepoint_registers)
4381 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4382 (ipa_tdesc, claim_trampoline_space)
4383 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4384 (agent_mem_read, agent_get_trace_state_variable_value)
4385 (agent_set_trace_state_variable_value, agent_tsv_read)
4386 (agent_mem_read_string, get_raw_reg_func_addr)
4387 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4388 * tracepoint.h: ... this new file.
4390 2013-09-05 Pedro Alves <palves@redhat.com>
4392 * server.h (perror_with_name, error, fatal, warning, paddress)
4393 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4395 * utils.h: New file.
4397 2013-09-05 Pedro Alves <palves@redhat.com>
4399 * server.h (remote_debug, noack_mode, transport_is_reliable)
4400 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4401 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4402 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4403 (write_enn, initialize_async_io, enable_async_io)
4404 (disable_async_io, check_remote_input_interrupt_request)
4405 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4406 (dead_thread_notify, prepare_resume_reply)
4407 (decode_address_to_semicolon, decode_address, decode_m_packet)
4408 (decode_M_packet, decode_X_packet, decode_xfer_write)
4409 (decode_search_memory_packet, unhexify, hexify)
4410 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4411 (look_up_one_symbol, relocate_instruction)
4412 (monitor_output): Move to remote-utils.h, and include it.
4413 * remote-utils.h: New file.
4415 2013-09-05 Pedro Alves <palves@redhat.com>
4417 * server.h (_): Delete.
4419 2013-09-02 Pedro Alves <palves@redhat.com>
4421 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4422 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4424 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4426 2013-09-02 Pierre Muller <muller@sourceware.org>
4428 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4429 or WriteProcessMemory complete successfully and handle
4430 ERROR_PARTIAL_COPY error.
4432 2013-09-02 Pedro Alves <palves@redhat.com>
4434 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4435 error instead of EIO.
4437 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4440 * linux-low.c: Include filestuff.h.
4441 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4442 * lynx-low.c: Include filestuff.h.
4443 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4444 * server.c: Include filestuff.h.
4445 (main): Call notice_open_fds.
4446 * spu-low.c: Include filestuff.h.
4447 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4449 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4451 * Makefile.in: Explain why ../target and ../nat are not
4452 listed as include file search paths.
4453 (linux-waitpid.o): New object file rule.
4454 * configure.srv (srv_native_linux_obj): New variable.
4455 Replace all occurrences of linux native object files with
4456 $srv_native_linux_obj.
4457 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4458 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4459 (linux_enable_event_reporting): Remove declaration.
4460 (my_waitpid): Moved to common/linux-waitpid.c.
4461 (linux_wait_for_event): Pass ptid when calling
4462 linux_enable_event_reporting.
4463 (linux_supports_tracefork_flag): Remove.
4464 (linux_enable_event_reporting): Likewise.
4465 (linux_tracefork_grandchild): Remove.
4466 (STACK_SIZE): Moved to common/linux-ptrace.c.
4467 (linux_tracefork_child): Remove.
4468 (linux_test_for_tracefork): Remove.
4469 (linux_look_up_symbols): Call linux_supports_traceclone.
4470 (initialize_low): Remove call to linux_test_for_tracefork.
4471 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4472 common/linux-ptrace.h.
4473 (PTRACE_TYPE_ARG4): Likewise.
4474 Include linux-ptrace.h.
4476 2013-08-21 Pedro Alves <palves@redhat.com>
4478 * config.in: Renegerate.
4480 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4482 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4483 (SFILES): Remove $(srcdir)/common/target-common.c and
4484 add $(srcdir)/target/waitstatus.c.
4485 (OBS): Remove target-common.o and add waitstatus.o.
4486 (server_h): Remove $(srcdir)/../common/target-common.h and
4487 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4488 and $(srcdir)/../target/waitstatus.h.
4489 (target-common.o): Remove.
4490 (waitstatus.o): New target object file.
4491 * target.h: Do not include target-common.h and
4492 include target/resume.h, target/wait.h and
4493 target/waitstatus.h.
4495 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4497 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4498 to PTRACE_TYPE_ARG3.
4499 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4500 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4502 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4503 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4505 2013-07-27 Jie Zhang <jie@codesourcery.com>
4506 Daniel Jacobowitz <dan@codesourcery.com>
4507 Yao Qi <yao@codesourcery.com>
4509 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4510 (mips-linux-watch.o): New rule.
4511 (mips_linux_watch_h): New variable.
4512 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4514 * linux-mips-low.c: Include mips-linux-watch.h.
4515 (struct arch_process_info, struct arch_lwp_info): New.
4516 (update_watch_registers_callback): New function.
4517 (mips_linux_new_process, mips_linux_new_thread) New functions.
4518 (mips_linux_prepare_to_resume, mips_insert_point): New
4520 (mips_remove_point, mips_stopped_by_watchpoint): New
4522 (rsp_bp_type_to_target_hw_bp_type): New function.
4523 (mips_stopped_data_address): New function.
4524 (the_low_target): Add watchpoint support functions.
4526 2013-07-27 Yao Qi <yao@codesourcery.com>
4528 * i386-low.c: Include break-common.h.
4529 (enum target_hw_bp_type): Remove.
4531 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4533 * Makefile.in (SFILES): /common/target-common.c.
4534 (OBS): Add target-common.o.
4535 (server_h): Add $(srcdir)/../common/target-common.h.
4536 (target-common.o): New target.
4537 * server.c (queue_stop_reply_callback): Free
4538 status string after use.
4539 * target.c (target_waitstatus_to_string): Remove.
4540 * target.h: Include target-common.h.
4541 (resume_kind): Likewise.
4542 (target_waitkind): Likewise.
4543 (target_waitstatus): Likewise.
4544 (TARGET_WNOHANG): Likewise.
4546 2013-07-04 Yao Qi <yao@codesourcery.com>
4548 * Makefile.in (host_alias): Use @host_noncanonical@.
4549 (target_alias): Use @target_noncanonical@.
4550 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4551 ACX_NONCANONICAL_HOST.
4552 * configure: Regenerated.
4555 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4557 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4558 * configure: Rebuild.
4559 * Makefile.in (version_host, version_target): Get from configure.
4560 (version.c): Use $(version_host) and $(version_target).
4562 2013-07-03 Pedro Alves <palves@redhat.com>
4564 * Makefile.in (config.status): Depend on development.sh.
4565 * acinclude.m4: Include libmcheck.m4.
4566 * configure: Regenerate.
4568 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4570 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4571 attribute inside the parentheses.
4572 (winapi_DebugSetProcessKillOnExit): Ditto.
4573 (winapi_DebugBreakProcess): Ditto.
4574 (winapi_GenerateConsoleCtrlEvent): Ditto.
4576 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4578 * notif.h (notif_event): Add a dummy member to avoid compiler
4581 2013-07-01 Pedro Alves <palves@redhat.com>
4583 * hostio.c (HOSTIO_PATH_MAX): Define.
4584 (require_filename, handle_open, handle_unlink, handle_readlink):
4587 2013-07-01 Pedro Alves <palves@redhat.com>
4589 * server.h: Include "pathmax.h".
4590 * linux-low.c: Don't include sys/param.h.
4591 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4593 * win32-low.c: Don't include sys/param.h.
4594 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4596 2013-07-01 Pedro Alves <palves@redhat.com>
4598 * event-loop.c: Don't check HAVE_UNISTD_H before including
4600 * gdbreplay.c: Likewise.
4601 * remote-utils.c: Likewise.
4602 * server.c: Likewise.
4603 * configure.ac: Don't check for unistd.h.
4604 * configure: Regenerate.
4606 2013-06-28 Tom Tromey <tromey@redhat.com>
4608 * Makefile.in (version.c): Use version.in, not
4611 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4613 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4614 * configure: Rebuild.
4615 * Makefile.in (version_host, version_target): Get from configure.
4616 (version.c): Use $(version_host) and $(version_target).
4618 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4620 Fix trace-status to output user name without trailing colon.
4621 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4623 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4625 Fix trace-status to output proper start-time and stop-time.
4626 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4627 output start time and stop time in hex as gdb expects.
4629 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4631 * tracepoint.c (build_traceframe_info_xml): Output trace state
4632 variables present in the trace buffer.
4634 2013-06-24 Tom Tromey <tromey@redhat.com>
4636 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4638 (version.o): Remove.
4639 * gdbreplay.c: Include version.h.
4640 (version, host_name): Don't declare.
4641 * server.h: Include version.h.
4642 (version, host_name): Don't declare.
4644 2013-06-12 Pedro Alves <palves@redhat.com>
4646 * linux-x86-low.c (linux_is_elf64): Delete global.
4647 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4648 with local linux_pid_exe_is_elf_64_file use.
4650 2013-06-11 Pedro Alves <palves@redhat.com>
4652 * linux-low.c (regset_disabled, disable_regset): New functions.
4653 (regsets_fetch_inferior_registers)
4654 (regsets_store_inferior_registers): Use them.
4655 (initialize_regsets_info); Don't allocate the disabled_regsets
4657 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4660 2013-06-11 Pedro Alves <palves@redhat.com>
4662 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4665 2013-06-11 Pedro Alves <palves@redhat.com>
4667 * linux-x86-low.c (initialize_low_arch): Call
4668 init_registers_x32_avx_linux.
4670 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4672 Fix compatibility with Android Bionic.
4673 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4676 2013-06-07 Pedro Alves <palves@redhat.com>
4679 * Makefile.in (OBS): Add tdesc.o.
4680 (IPA_OBJS): Add tdesc-ipa.o.
4681 (tdesc-ipa.o): New rule.
4682 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4684 * linux-low.c (new_inferior): Delete.
4685 (disabled_regsets, num_regsets): Delete.
4686 (linux_add_process): Adjust to set the new per-process
4688 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4689 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4690 was a stop. When calling arch_setup, switch the current inferior
4691 to the thread that got an event.
4692 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4693 (regsets_fetch_inferior_registers)
4694 (regsets_store_inferior_registers): New regsets_info parameter.
4696 (linux_register_in_regsets): New regs_info parameter. Adjust to
4698 (register_addr, fetch_register, store_register): New usrregs_info
4699 parameter. Adjust to use it.
4700 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4701 parameter regs_info. Adjust to use it.
4702 (linux_fetch_registers): Get the current inferior's regs_info, and
4704 (linux_store_registers): Ditto.
4705 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4706 (initialize_low): Don't initialize the target_regsets here. Call
4707 initialize_low_arch.
4708 * linux-low.h (target_regsets): Delete declaration.
4709 (struct regsets_info): New.
4710 (struct usrregs_info): New.
4711 (struct regs_info): New.
4712 (struct process_info_private) <new_inferior>: New field.
4713 (struct linux_target_ops): Delete the num_regs, regmap, and
4714 regset_bitmap fields. New field regs_info.
4715 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4716 * i387-fp.c (num_xmm_registers): Delete.
4717 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4718 calls to new interface.
4719 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4720 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4721 Infer the number of xmm registers from the regcache's target
4723 * i387-fp.h (num_xmm_registers): Delete.
4724 * inferiors.c (add_thread): Don't install the thread's regcache
4726 * proc-service.c (gregset_info): Fetch the current inferior's
4727 regs_info. Adjust to use it.
4728 * regcache.c: Include tdesc.h.
4729 (register_bytes, reg_defs, num_registers)
4730 (gdbserver_expedite_regs): Delete.
4731 (get_thread_regcache): If the thread doesn't have a regcache yet,
4732 create one, instead of aborting gdbserver.
4733 (regcache_invalidate_one): Rename to ...
4734 (regcache_invalidate_thread): ... this.
4735 (regcache_invalidate_one): New.
4736 (regcache_invalidate): Only invalidate registers of the current
4738 (init_register_cache): Add target_desc parameter, and use it.
4739 (new_register_cache): Ditto. Assert the target description has a
4740 non zero registers_size.
4741 (regcache_cpy): Add assertions. Adjust.
4742 (realloc_register_cache, set_register_cache): Delete.
4743 (registers_to_string, registers_from_string): Adjust.
4744 (find_register_by_name, find_regno, find_register_by_number)
4745 (register_cache_size): Add target_desc parameter, and use it.
4746 (free_register_cache_thread, free_register_cache_thread_one)
4747 (regcache_release, register_cache_size): New.
4748 (register_size): Add target_desc parameter, and use it.
4749 (register_data, supply_register, supply_register_zeroed)
4750 (supply_regblock, supply_register_by_name, collect_register)
4751 (collect_register_as_string, collect_register_by_name): Adjust.
4752 * regcache.h (struct target_desc): Forward declare.
4753 (struct regcache) <tdesc>: New field.
4754 (init_register_cache, new_register_cache): Add target_desc
4756 (regcache_invalidate_thread): Declare.
4757 (regcache_invalidate_one): Delete declaration.
4758 (regcache_release): Declare.
4759 (find_register_by_number, register_cache_size, register_size)
4760 (find_regno): Add target_desc parameter.
4761 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4763 * remote-utils.c: Include tdesc.h.
4764 (outreg, prepare_resume_reply): Adjust.
4765 * server.c: Include tdesc.h.
4766 (gdbserver_xmltarget): Delete declaration.
4767 (get_features_xml, process_serial_event): Adjust.
4768 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4770 (struct process_info) <tdesc>: New field.
4771 (ipa_tdesc): Declare.
4772 * tdesc.c: New file.
4773 * tdesc.h: New file.
4774 * tracepoint.c: Include tdesc.h.
4775 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4776 (get_context_regcache): Adjust to pass ipa_tdesc down.
4777 (do_action_at_tracepoint): Adjust to get the register cache size
4778 from the context regcache's description.
4779 (traceframe_walk_blocks): Adjust to get the register cache size
4780 from the current trace frame's description.
4781 (traceframe_get_pc): Adjust to get current trace frame's
4782 description and pass it down.
4783 (gdb_collect): Adjust to get the register cache size from the
4785 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4786 (gdbserver_xmltarget): Delete.
4787 (initialize_low_tracepoint): Set the ipa's target description.
4788 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4789 (initialize_low_tracepoint): Set the ipa's target description.
4790 * linux-x86-low.c: Include tdesc.h.
4791 [__x86_64__] (is_64bit_tdesc): New.
4792 (ps_get_thread_area, x86_get_thread_area): Use it.
4793 (i386_cannot_store_register): Rename to ...
4794 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4795 (i386_cannot_fetch_register): Rename to ...
4796 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4797 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4799 (target_regsets): Rename to ...
4800 (x86_regsets): ... this.
4801 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4803 (x86_siginfo_fixup): Use is_64bit_tdesc.
4804 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4805 (tdesc_x32_avx_linux, tdesc_x32_linux)
4806 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4808 (x86_linux_update_xmltarget): Delete.
4809 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4810 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4811 (AMD64_LINUX_USER64_CS): New.
4812 (x86_linux_read_description): New, based on
4813 x86_linux_update_xmltarget.
4814 (same_process_callback): New.
4815 (x86_arch_setup_process_callback): New.
4816 (x86_linux_update_xmltarget): New.
4817 (x86_regsets_info): New.
4818 (amd64_linux_regs_info): New.
4819 (i386_linux_usrregs_info): New.
4820 (i386_linux_regs_info): New.
4821 (x86_linux_regs_info): New.
4822 (x86_arch_setup): Reimplement.
4823 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4824 (x86_emit_ops): Ditto.
4825 (the_low_target): Adjust. Install x86_linux_regs_info,
4826 x86_cannot_fetch_register, and x86_cannot_store_register.
4827 (initialize_low_arch): New.
4828 * linux-ia64-low.c (tdesc_ia64): Declare.
4829 (ia64_fetch_register): Adjust.
4830 (ia64_usrregs_info, regs_info): New globals.
4831 (ia64_regs_info): New function.
4832 (the_low_target): Adjust.
4833 (initialize_low_arch): New function.
4834 * linux-sparc-low.c (tdesc_sparc64): Declare.
4835 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4837 (sparc_arch_setup): New function.
4838 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4839 (the_low_target): Adjust.
4840 (initialize_low_arch): New function.
4841 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4842 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4843 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4844 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4845 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4846 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4847 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4848 (tdesc_powerpc_isa205_vsx64l): Declare.
4849 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4850 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4851 (ppc_set_pc, ppc_get_hwcap): Adjust.
4852 (ppc_usrregs_info): Forward declare.
4853 (!__powerpc64__) ppc_regmap_adjusted: New global.
4854 (ppc_arch_setup): Adjust to the current process'es target
4856 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4857 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4858 (ppc_store_evrregset): Adjust.
4859 (target_regsets): Rename to ...
4860 (ppc_regsets): ... this, and make static.
4861 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4862 (ppc_regs_info): New function.
4863 (the_low_target): Adjust.
4864 (initialize_low_arch): New function.
4865 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4866 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4867 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4868 (tdesc_s390x_linux64v2): Declare.
4869 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4870 (s390_fill_gregset, s390_store_last_break): Adjust.
4871 (target_regsets): Rename to ...
4872 (s390_regsets): ... this, and make static.
4873 (s390_get_pc, s390_set_pc): Adjust.
4874 (s390_get_hwcap): New target_desc parameter, and use it.
4875 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4876 (s390_arch_setup): Adjust to set the current process'es target
4877 description. Don't adjust the regmap.
4878 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4879 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4880 (regs_info_3264): New globals.
4881 (s390_regs_info): New function.
4882 (the_low_target): Adjust.
4883 (initialize_low_arch): New function.
4884 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4885 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4886 [__mips64] (init_registers_mips_linux)
4887 (init_registers_mips_dsp_linux): Delete defines.
4888 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4889 (have_dsp): New global.
4890 (mips_read_description): New, based on mips_arch_setup.
4891 (mips_arch_setup): Reimplement.
4892 (get_usrregs_info): New function.
4893 (mips_cannot_fetch_register, mips_cannot_store_register)
4894 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4895 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4896 (target_regsets): Rename to ...
4897 (mips_regsets): ... this, and make static.
4898 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4899 (dsp_regs_info, regs_info): New globals.
4900 (mips_regs_info): New function.
4901 (the_low_target): Adjust.
4902 (initialize_low_arch): New function.
4903 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4904 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4906 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4907 (arm_read_description): New, with bits factored from
4909 (arm_arch_setup): Reimplement.
4910 (target_regsets): Rename to ...
4911 (arm_regsets): ... this, and make static.
4912 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4913 (arm_regs_info): New function.
4914 (the_low_target): Adjust.
4915 (initialize_low_arch): New function.
4916 * linux-m68k-low.c (tdesc_m68k): Declare.
4917 (target_regsets): Rename to ...
4918 (m68k_regsets): ... this, and make static.
4919 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4920 (m68k_regs_info): New function.
4921 (m68k_arch_setup): New function.
4922 (the_low_target): Adjust.
4923 (initialize_low_arch): New function.
4924 * linux-sh-low.c (tdesc_sharch): Declare.
4925 (target_regsets): Rename to ...
4926 (sh_regsets): ... this, and make static.
4927 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4928 (sh_regs_info, sh_arch_setup): New functions.
4929 (the_low_target): Adjust.
4930 (initialize_low_arch): New function.
4931 * linux-bfin-low.c (tdesc_bfin): Declare.
4932 (bfin_arch_setup): New function.
4933 (bfin_usrregs_info, regs_info): New globals.
4934 (bfin_regs_info): New function.
4935 (the_low_target): Adjust.
4936 (initialize_low_arch): New function.
4937 * linux-cris-low.c (tdesc_cris): Declare.
4938 (cris_arch_setup): New function.
4939 (cris_usrregs_info, regs_info): New globals.
4940 (cris_regs_info): New function.
4941 (the_low_target): Adjust.
4942 (initialize_low_arch): New function.
4943 * linux-cris-low.c (tdesc_crisv32): Declare.
4944 (cris_arch_setup): New function.
4945 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4946 (cris_regs_info): New function.
4947 (the_low_target): Adjust.
4948 (initialize_low_arch): New function.
4949 * linux-m32r-low.c (tdesc_m32r): Declare.
4950 (m32r_arch_setup): New function.
4951 (m32r_usrregs_info, regs_info): New globals.
4952 (m32r_regs_info): Adjust.
4953 (initialize_low_arch): New function.
4954 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4955 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4956 (tic6x_usrregs_info): Forward declare.
4957 (tic6x_read_description): New function, based on ...
4958 (tic6x_arch_setup): ... this. Reimplement.
4959 (target_regsets): Rename to ...
4960 (tic6x_regsets): ... this, and make static.
4961 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4962 (tic6x_regs_info): New function.
4963 (the_low_target): Adjust.
4964 (initialize_low_arch): New function.
4965 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4966 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4967 (target_regsets): Rename to ...
4968 (xtensa_regsets): ... this, and make static.
4969 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4971 (xtensa_arch_setup, xtensa_regs_info): New functions.
4972 (the_low_target): Adjust.
4973 (initialize_low_arch): New function.
4974 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4975 (nios2_arch_setup): Set the current process'es tdesc.
4976 (target_regsets): Rename to ...
4977 (nios2_regsets): ... this.
4978 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4979 (nios2_regs_info): New function.
4980 (the_low_target): Adjust.
4981 (initialize_low_arch): New function.
4982 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4983 (aarch64_arch_setup): Set the current process'es tdesc.
4984 (target_regsets): Rename to ...
4985 (aarch64_regsets): ... this.
4986 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4987 (aarch64_regs_info): New function.
4988 (the_low_target): Adjust.
4989 (initialize_low_arch): New function.
4990 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4992 (target_regsets): Rename to ...
4993 (tile_regsets): ... this.
4994 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4995 (tile_regs_info): New function.
4996 (tile_arch_setup): Set the current process'es tdesc.
4997 (the_low_target): Adjust.
4998 (initialize_low_arch): New function.
4999 * spu-low.c (tdesc_spu): Declare.
5000 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5001 * win32-arm-low.c (tdesc_arm): Declare.
5002 (arm_arch_setup): New function.
5003 (the_low_target): Install arm_arch_setup instead of
5005 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5006 (init_windows_x86): Rename to ...
5007 (i386_arch_setup): ... this. Set `win32_tdesc'.
5008 (the_low_target): Adjust.
5009 * win32-low.c (win32_tdesc): New global.
5010 (child_add_thread): Don't create the thread cache here.
5011 (do_initial_child_stuff): Set the new process'es tdesc.
5012 * win32-low.h (struct target_desc): Forward declare.
5013 (win32_tdesc): Declare.
5014 * lynx-i386-low.c (tdesc_i386): Declare global.
5015 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5016 * lynx-low.c (lynx_tdesc): New global.
5017 (lynx_add_process): Set the new process'es tdesc.
5018 * lynx-low.h (struct target_desc): Forward declare.
5019 (lynx_tdesc): Declare global.
5020 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5021 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5022 * nto-low.c (nto_tdesc): New global.
5023 (do_attach): Set the new process'es tdesc.
5024 * nto-low.h (struct target_desc): Forward declare.
5025 (nto_tdesc): Declare.
5026 * nto-x86-low.c (tdesc_i386): Declare.
5027 (nto_x86_arch_setup): Set `nto_tdesc'.
5029 2013-06-04 Gary Benson <gbenson@redhat.com>
5031 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5032 to qSupported response when appropriate.
5033 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5034 with nonzero-length annex.
5035 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5036 arguments supplied in annex.
5038 2013-05-31 Doug Evans <dje@google.com>
5041 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5042 64 bits in 64-cross-32 environment.
5044 2013-05-28 Pedro Alves <palves@redhat.com>
5046 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5047 (aarch64-without-fpu.c): Delete rule.
5048 * configure.srv (aarch64*-*-linux*): Remove references to
5049 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5050 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5053 2013-05-24 Pedro Alves <palves@redhat.com>
5055 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5056 instead of strchr/decode_address. Error if the range isn't split
5057 with a ','. Don't assume there's be a ':' in the action.
5059 2013-05-23 Yao Qi <yao@codesourcery.com>
5060 Pedro Alves <palves@redhat.com>
5062 * linux-low.c (lwp_in_step_range): New function.
5063 (linux_wait_1): If the thread was range stepping and stopped
5064 outside the stepping range, report the stop to GDB. Otherwise,
5065 continue stepping. Add range stepping debug output.
5066 (linux_set_resume_request): Copy the step range from the resume
5068 (linux_supports_range_stepping): New.
5069 (linux_target_ops) <supports_range_stepping>: Set to
5070 linux_supports_range_stepping.
5071 * linux-low.h (struct linux_target_ops)
5072 <supports_range_stepping>: New field.
5073 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5074 * linux-x86-low.c (x86_supports_range_stepping): New.
5075 (the_low_target) <supports_range_stepping>: Set to
5076 x86_supports_range_stepping.
5077 * server.c (handle_v_cont): Handle 'r' action.
5078 (handle_v_requests): Append ";r" if the target supports range
5080 * target.h (struct thread_resume) <step_range_start,
5081 step_range_end>: New fields.
5082 (struct target_ops) <supports_range_stepping>:
5084 (target_supports_range_stepping): New macro.
5086 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5088 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5089 confusion in comment.
5091 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5093 * lynx-low.c (struct process_info_private): New type.
5094 (lynx_add_process): New function.
5095 (lynx_create_inferior, lynx_attach): Replace calls to
5096 add_process by calls to lynx_add_process.
5097 (lynx_resume): If PTID is null, then try using
5098 current_process()->private->last_wait_event_ptid.
5100 (lynx_clear_inferiors): Delete. The contents of that function
5101 has been inlined in lynx_mourn;
5102 (lynx_wait_1): Save the ptid in the process's private data.
5103 (lynx_mourn): Free the process' private data. Replace call
5104 to lynx_clear_inferiors by call to clear_inferiors.
5106 2013-05-17 Yao Qi <yao@codesourcery.com>
5108 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5111 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5113 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5114 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5115 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5116 PT_TEXT_END_ADDR guards. Update comments.
5117 (linux_target_op) <read_offsets>: Conditionally define to
5118 linux_read_offsets if the target is UCLIBC and if it defines
5119 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5121 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5122 Andrew Jenner <andrew@codesourcery.com>
5124 * Makefile.in (SFILES): Add linux-nios2-low.c.
5125 (clean): Add action to delete nios2-linux.c.
5126 (nios2-linux.c): New rule.
5127 * configure.srv: Add nios2*-*-linux*.
5128 * linux-nios2-low.c: New.
5130 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5132 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5134 2013-04-25 Hui Zhu <hui@codesourcery.com>
5137 * ax.c (ax_printf): Add fflush.
5139 2013-04-22 Tom Tromey <tromey@redhat.com>
5141 * Makefile.in (SFILES): Add filestuff.c.
5142 (OBS): Add filestuff.o.
5143 (filestuff.o): New target.
5144 * config.in, configure: Rebuild.
5145 * configure.ac: Check for fdwalk, pipe2.
5147 2013-04-17 Pedro Alves <palves@redhat.com>
5149 * configure.ac (USE_THREAD_DB): Delete variable.
5150 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5151 Don't AC_SUBST USE_THREAD_DB.
5152 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5153 * config.in, configure: Regenerate.
5155 2013-04-16 Pedro Alves <palves@redhat.com>
5157 * linux-low.h (struct lwp_info) <thread_known>: Move under
5158 the USE_THREAD_DB #ifdef.
5160 2013-04-16 Pedro Alves <palves@redhat.com>
5162 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5163 (linux-low.o): Delete rule.
5164 * linux-low.h: Always include "gdb_thread_db.h" instead of
5165 conditionally including thread_db.h.
5166 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5169 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5171 * Makefile.in (install-only): Fix make install regression.
5173 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5175 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5176 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5178 * gdbserver.1: Remove.
5180 2013-03-22 Pedro Alves <palves@redhat.com>
5182 * linux-low.c (handle_extended_wait): Don't call
5183 linux_enable_event_reporting.
5185 2013-03-15 Tony Theodore <tonyt@logyst.com>
5188 * Makefile.in (SHELL): Use @SHELL@.
5190 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5192 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5195 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5197 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5198 Remove extraneous NULL element.
5200 2013-03-13 Yao Qi <yao@codesourcery.com>
5202 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5203 'V' block in trace frame.
5205 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5207 * target.h (struct target_ops): Add btrace ops.
5208 (target_supports_btrace): New macro.
5209 (target_enable_btrace): New macro.
5210 (target_disable_btrace): New macro.
5211 (target_read_btrace): New macro.
5212 * gdbthread.h (struct thread_info): Add btrace field.
5213 * server.c: Include btrace-common.h.
5214 (handle_btrace_general_set): New function.
5215 (handle_btrace_enable): New function.
5216 (handle_btrace_disable): New function.
5217 (handle_general_set): Call handle_btrace_general_set.
5218 (handle_qxfer_btrace): New function.
5219 (struct qxfer qxfer_packets[]): Add btrace entry.
5220 * inferiors.c (remove_thread): Disable btrace.
5221 * linux-low: Include linux-btrace.h.
5222 (linux_low_enable_btrace): New function.
5223 (linux_low_read_btrace): New function.
5224 (linux_target_ops): Add btrace ops.
5225 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5226 Add srv_linux_btrace=yes.
5227 (x86_64-*-linux*): Add linux-btrace.o.
5228 Add srv_linux_btrace=yes.
5229 * configure.ac: Define HAVE_LINUX_BTRACE.
5230 * config.in: Regenerated.
5231 * configure: Regenerated.
5233 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5235 * server.c (handle_qxfer): Preserve error message if -3 is
5237 (qxfer): Document the -3 return value.
5239 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5241 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5242 (linux_btrace_h): New variable.
5243 (linux-btrace.o): New rule.
5245 2013-03-08 Stan Shebs <stan@codesourcery.com>
5246 Hafiz Abid Qadeer <abidh@codesourcery.com>
5248 * tracepoint.c (trace_buffer_size): New global.
5249 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5250 (init_trace_buffer): Change to one-argument function. Allocate
5251 trace buffer memory.
5252 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5253 handle QTBuffer:size packet.
5254 (cmd_bigqtbuffer_size): New function.
5255 (initialize_tracepoint): Call init_trace_buffer with
5256 DEFAULT_TRACE_BUFFER_SIZE.
5257 * server.c (handle_query): Add QTBuffer:size in the
5260 2013-03-07 Yao Qi <yao@codesourcery.com>
5262 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5263 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5265 (cmd_qtsp): Adjust condition. Do post increment.
5266 Set cur_action and cur_step_action back to 0.
5268 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5271 * linux-low.c (linux_write_memory): Return early success if LEN is
5274 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5276 * configure.srv: Add x86_64-*-cygwin* as target.
5278 2013-02-28 Tom Tromey <tromey@redhat.com>
5280 * configure.ac: Invoke AC_SYS_LARGEFILE.
5281 * configure, config.in: Rebuild.
5283 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5285 * win32-low.c: Throughout, fix format strings and casts of
5286 printf-like functions to avoid type related warnings on all
5288 (get_child_debug_event): Print dwDebugEventCode as hex since
5289 that's how it's usually documented.
5291 2013-02-28 Yao Qi <yao@codesourcery.com>
5293 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5296 2013-02-27 Jiong Wang <jiwang@tilera.com>
5298 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5299 (reg-tilegx32.c): New rule.
5300 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5301 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5302 different register info initializer according to elf class.
5303 (init_registers_tilgx32): New function. The tilegx32 register info
5305 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5306 (tile_store_gregset): Likewise.
5308 2013-02-27 Yao Qi <yao@codesourcery.com>
5310 * server.c (process_point_options): Print debug message when
5311 debug_threads is true.
5313 2013-02-26 Yao Qi <yao@codesourcery.com>
5315 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5317 2013-02-19 Pedro Alves <palves@redhat.com>
5318 Kai Tietz <ktietz@redhat.com>
5322 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5323 instead of strtoul to extract address from packet.
5324 (process_serial_event) <'z'>: Likewise.
5326 2013-02-18 Yao Qi <yao@codesourcery.com>
5328 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5330 2013-02-14 Pedro Alves <palves@redhat.com>
5334 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5335 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5337 2013-02-14 Pedro Alves <palves@redhat.com>
5339 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5341 2013-02-14 Pedro Alves <palves@redhat.com>
5343 * tracepoint.c (save_string): Delete.
5344 (add_tracepoint_action): Use savestring instead of save_string.
5346 2013-02-12 Pedro Alves <palves@redhat.com>
5348 * linux-xtensa-low.c: Ditto.
5349 * xtensa-xtregs.c: Ditto.
5351 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5353 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5356 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5358 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5359 aarch64_num_wp_regs and aarch64_num_bp_regs to
5360 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5362 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5364 * linux-aarch64-low.c (ps_get_thread_area): Replace
5365 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5367 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5368 Marcus Shawcroft <marcus.shawcroft@arm.com>
5369 Nigel Stephens <nigel.stephens@arm.com>
5370 Yufeng Zhang <yufeng.zhang@arm.com>
5372 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5373 (aarch64.c, aarch64-without-fpu.c): New targets.
5374 * configure.srv (aarch64*-*-linux*): New.
5375 * linux-aarch64-low.c: New file.
5377 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5379 * linux-low.c (handle_extended_wait, linux_create_inferior)
5380 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5381 (dequeue_one_deferred_signal, linux_resume_one_thread)
5382 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5383 (linux_tracefork_grandchild, linux_test_for_tracefork)
5384 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5385 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5386 where the argument is 0.
5388 2013-01-25 Yao Qi <yao@codesourcery.com>
5390 * event-loop.c: Include "queue.h".
5391 (gdb_event_p): New typedef.
5392 (struct gdb_event) <next_event>: Remove.
5393 (event_queue): Change to QUEUE(gdb_event_p).
5394 (async_queue_event): Remove.
5395 (gdb_event_xfree): New.
5396 (initialize_event_loop): New.
5397 (process_event): Use API from QUEUE.
5398 (wait_for_event): Likewise.
5399 * server.c (main): Call initialize_event_loop.
5400 * server.h (initialize_event_loop): Declare.
5402 2013-01-18 Yao Qi <yao@codesourcery.com>
5404 * ax.h (struct eval_agent_expr_context): New.
5405 (gdb_eval_agent_expr): Update declaration.
5406 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5407 TFRAME. Add new argument CTX.
5408 * server.h (struct eval_agent_expr_context): Declare.
5409 (agent_mem_read, agent_tsv_read): Update declaration.
5410 (agent_mem_read_string): Likewise.
5411 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5412 (add_traceframe_block): Add new argument TPOINT.
5413 Increase TPOINT->traceframe_usage.
5414 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5415 eval_tracepoint_agent_expr.
5416 (condition_true_at_tracepoint): Likewise.
5417 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5418 (agent_mem_read_string, agent_tsv_read): Likewise.
5420 2013-01-16 Yao Qi <yao@codesourcery.com>
5422 * linux-low.c (linux_resume_one_lwp): Don't check
5423 'lwp->bp_reinsert != 0'.
5425 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5426 Pedro Alves <palves@redhat.com>
5428 * lynx-low.c (ptrace_request_to_str): Define a temporary
5429 macro and use it to simplify this function's implementation.
5431 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5433 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5436 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5438 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5440 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5442 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5444 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5446 * lynx-low.c (lynx_resume): Use the resume_info parameter
5447 to determine the ptid for the lynx_ptrace call, unless
5448 it is equal to minus_one_ptid, in which case we use the
5449 ptid of the current_inferior.
5450 (lynx_wait_1): After having received a thread create/exit
5451 event, resume the inferior's execution using the signaling
5452 thread's ptid, rather than the old ptid.
5454 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5456 * lynx-low.c (lynx_resume): Delete variable ret.
5458 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5460 * gdbreplay.c (gdbreplay_version): Update copyright year.
5461 * server.c (gdbserver_version): Likewise.
5463 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5465 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5468 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5470 * lynx-low.c (ptrace_request_to_str): Add handling for
5473 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5475 * lynx-low.c (lynx_attach): Delete variable new_process.
5477 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5479 * lynx-low.c (lynx_create_inferior): Delete variable
5482 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5484 * lynx-low.c (ptrace_request_to_str): Do not handle
5485 PTRACE_GETTHREADLIST if this macro does not exist.
5487 2012-12-15 Yao Qi <yao@codesourcery.com>
5489 * Makefile.in (OBS): Add notif.o.
5490 * notif.c, notif.h: New.
5491 * server.c: Include "notif.h".
5492 (struct vstop_notif) <next>: Remove.
5494 (queue_stop_reply): Update.
5495 (push_event, send_next_stop_reply): Remove.
5496 (discard_queued_stop_replies): Update.
5497 (notif_stop): New variable.
5498 (handle_v_stopped): Remove.
5499 (handle_v_requests): Don't call handle_v_stopped. Call
5500 handle_ack_notif instead.
5501 (queue_stop_reply_callback): Call notif_event_enque instead
5502 of queue_stop_reply.
5503 (handle_status): Don't call send_next_stop_reply, call
5504 notif_write_event instead.
5505 (kill_inferior_callback): Likewise.
5506 (detach_or_kill_inferior_callback): Likewise.
5507 (main): Call initialize_notif.
5508 (process_serial_event): Call QUEUE_is_empty.
5509 (handle_target_event): Call notif_push instead of push event.
5510 * server.h (push_event): Remove declaration.
5512 2012-12-10 Tom Tromey <tromey@redhat.com>
5514 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5515 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5518 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5519 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5520 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5521 (amd64-linux-ipa.o, ax.o): Rewrite.
5522 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5523 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5524 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5525 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5526 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5527 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5528 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5529 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5530 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5531 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5532 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5533 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5534 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5535 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5536 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5537 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5538 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5539 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5540 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5541 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5542 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5543 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5544 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5545 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5546 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5547 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5548 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5549 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5550 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5551 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5552 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5553 (reg-tilegx.o): Remove.
5554 (all_object_files): New macro.
5555 Include .deps files.
5556 * aclocal.m4, configure: Rebuild.
5557 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5558 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5559 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5561 2012-12-05 Tom Tromey <tromey@redhat.com>
5564 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5566 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5568 * configure.ac: Check for linux/perf_event.h.
5569 * config.in: Regenerated.
5570 * configure: Regenerated.
5572 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5574 * hostio.c (handle_readlink): Decrease buffer size
5575 parameter passed to readlink by one byte.
5577 2012-11-26 Yao Qi <yao@codesourcery.com>
5579 * configure.ac (build_warnings): Append '-Wempty-body'.
5580 * configure: Regenerated.
5581 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5584 2012-11-15 Pierre Muller <muller@sourceware.org>
5586 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5587 * config.in: Regenerate.
5588 * configure: Regenerate.
5589 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5590 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5591 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5592 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5594 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5595 instead of <sys/wait.h> header.
5596 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5598 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5600 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5601 (various make rules): Remove -DGDBSERVER
5603 2012-11-09 Yao Qi <yao@codesourcery.com>
5605 * spu-low.c (current_ptid): Move it to ..
5606 * gdbthread.h: ... here. New.
5607 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5608 * server.c (myresume, process_serial_event): Likewise.
5609 * thread-db.c (thread_db_find_new_threads): Likewise.
5610 * tracepoint.c (run_inferior_command): Likewise.
5612 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5614 * server.c (handle_search_memory_1): Include access length in
5617 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5619 * linux-crisv32-low.c: Fix compile errors.
5621 2012-09-04 Yao Qi <yao@codesourcery.com>
5623 * tracepoint.c (cmd_qtsv): Adjust debug message.
5624 Don't check CUR_TPOINT.
5626 2012-08-28 Yao Qi <yao@codesourcery.com>
5628 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5629 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5630 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5631 Remove declarations of xmalloc, xreallloc, xstrdup and
5633 * Makefile.in (libiberty_h): New.
5634 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5635 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5637 2012-08-23 Yao Qi <yao@codesourcery.com>
5639 * server.h: Remove declaration of 'xsnprintf'.
5641 2012-08-22 Keith Seitz <keiths@redhat.com>
5643 * server.h: Include build-gnulib-gbserver/config.h.
5644 * gdbreplay.c: Likewise.
5646 2012-08-08 Doug Evans <dje@google.com>
5648 * Makefile.in (SFILES): Add gdb_vecs.c.
5649 (OBS): Add gdb_vecs.o.
5650 (gdb_vecs_h, host_defs_h): New variables.
5651 (thread-db.o): Add $(gdb_vecs_h) dependency.
5652 (gdb_vecs.o): New rule.
5653 * thread-db.c: #include "gdb_vecs.h".
5654 (thread_db_load_search): Use a vector to iterate over path elements.
5655 Handle text appearing after "$pdir".
5657 * configure.ac: Add check for strstr.
5658 * config.in: Regenerate.
5659 * configure: Regenerate.
5661 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5663 * hostio.c (handle_pread): If pread fails, fall back to attempting
5665 (handle_pwrite): Likewise for pwrite.
5667 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5669 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5670 between unsupported TYPE and unimplementable ADDR/LEN combination.
5671 (arm_insert_point): Act on new return value.
5673 2012-07-31 Pedro Alves <palves@redhat.com>
5675 * server.c (process_point_options): Only skip tokens if we find
5676 one that is unrecognized. Don't treat 'X' specially while
5677 skipping unrecognized tokens.
5679 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5681 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5682 to 4-byte-align HW breakpoint addresses for Thumb.
5684 2012-07-27 Yao Qi <yao@codesourcery.com>
5688 * server.h: Declare gdb_agent_about_to_close.
5689 * target.c (kill_inferior): Include "agent.h".
5690 New. Send command 'kill'.
5691 * target.h (kill_inferior): Removed macro.
5692 * tracepoint.c (gdb_agent_about_to_close): New.
5693 (gdb_agent_helper_thread): Handle command 'close'.
5694 Wait endlessly until the inferior stops.
5695 Install gdb_agent_remove_socket to atexit hook.
5696 (agent_socket_name): New static variable.
5697 (gdb_agent_socket_init): Replace local variable 'name' with
5698 'agent_socket_name'.
5699 (gdb_agent_remove_socket): New.
5701 2012-07-27 Yao Qi <yao@codesourcery.com>
5703 * server.c (process_point_options): Stop at 'X' when parsing.
5705 2012-07-19 Michael Eager <eager@eagercon.com>
5707 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5709 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5710 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5711 hardware breakpoint.
5713 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5715 * gdbserver/linux-low.c (initialize_low): Call
5716 linux_ptrace_init_warnings.
5718 2012-07-02 Doug Evans <dje@google.com>
5720 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5723 2012-07-02 Stan Shebs <stan@codesourcery.com>
5725 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5726 (ax.o): Add it to build rule.
5728 (OBS): Add format.o.
5729 (IPA_OBS): Add format.o.
5730 * server.c (handle_query): Claim support for breakpoint commands.
5731 (process_point_options): Add command case.
5732 (process_serial_event): Leave running if there are printfs in
5734 * mem-break.h (any_persistent_commands): Declare.
5735 (add_breakpoint_commands): Declare.
5736 (gdb_no_commands_at_breakpoint): Declare.
5737 (run_breakpoint_commands): Declare.
5738 * mem-break.c (struct point_command_list): New struct.
5739 (struct breakpoint): New field command_list.
5740 (any_persistent_commands): New function.
5741 (add_commands_to_breakpoint): New function.
5742 (add_breakpoint_commands): New function.
5743 (gdb_no_commands_at_breakpoint): New function.
5744 (run_breakpoint_commands): New function.
5745 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5747 * ax.c: Include format.h.
5748 (ax_printf): New function.
5749 (gdb_eval_agent_expr): Add printf opcode.
5751 2012-06-13 Yao Qi <yao@codesourcery.com>
5753 * server.c (start_inferior): Remove duplicated writes to fields
5754 'last_resume_kind' and 'last_status' of 'current_inferior'.
5756 2012-06-12 Yao Qi <yao@codesourcery.com>
5757 Pedro Alves <palves@redhat.com>
5759 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5761 * server.c (handle_v_cont): Extend comment.
5763 2012-06-11 Yao Qi <yao@codesourcery.com>
5765 * linux-low.c (linux_attach): Add 'static'.
5767 2012-06-06 Yao Qi <yao@codesourcery.com>
5769 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5771 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5773 Fix gcc -flto compilation warning.
5774 * server.c (main): Make variable multi_mode and attach volatile.
5776 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5778 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5779 if the platform doesn't know about it.
5781 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5783 * Makefile.in (SFILES): Add linux-tile-low.c.
5784 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5785 * configure.srv: Handle tilegx-*-linux*.
5786 * linux-tile-low.c: New file.
5788 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5790 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5792 2012-05-24 Pedro Alves <palves@redhat.com>
5796 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5798 2012-05-24 Pedro Alves <palves@redhat.com>
5802 Replace target_signal with gdb_signal throughout.
5804 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5806 * linux-low.c (linux_store_registers): Avoid the copying sequence
5807 when no data has been retrieved by ptrace.
5809 2012-05-22 Will Deacon <will.deacon@arm.com>
5811 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5812 Include asm/ptrace.h.
5813 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5816 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5818 * linux-low.c (linux_store_registers): Don't re-retrieve data
5819 with ptrace that has already been obtained from /proc. Always
5820 copy any data retrieved with ptrace to the buffer supplied.
5822 2012-05-11 Yao Qi <yao@codesourcery.com>
5823 Pedro Alves <palves@redhat.com>
5825 * linux-low.c (enum stopping_threads_kind): New.
5826 (stopping_threads): Change type to `enum stopping_threads_kind'.
5827 (handle_extended_wait): If stopping and suspending threads, leave
5828 the new_lwp suspended too.
5829 (linux_wait_for_event): Adjust.
5830 (stop_all_lwps): Set `stopping_threads' to
5831 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5832 whether we're suspending threads or just stopping them. Assert no
5835 2012-04-29 Yao Qi <yao@codesourcery.com>
5837 * server.h: Move some code to ...
5838 * gdbthread.h: ... here. New.
5839 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5840 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5841 (nto-low.o, win32-low.o): Likewise.
5842 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5843 * regcache.c, remote-utils.c, server.c: Likewise.
5844 * target.c, tracepoint.c, win32-low.c: Likewise.
5846 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5848 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5849 (PTRACE_ARG4_TYPE): Likewise.
5850 (PTRACE_XFER_TYPE): Likewise.
5851 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5852 ptrace to PTRACE_ARG3_TYPE.
5853 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5854 (PTRACE_ARG4_TYPE): Likewise.
5855 (PTRACE_XFER_TYPE): Likewise.
5856 (linux_detach_one_lwp): Cast fourth argument of
5857 ptrace to long then PTRACE_ARG4_TYPE.
5858 (regsets_fetch_inferior_registers): Cast third argument of
5859 ptrace to long then PTRACE_ARG3_TYPE.
5860 (regsets_store_inferior_registers): Likewise.
5862 2012-04-20 Pedro Alves <palves@redhat.com>
5864 * configure: Regenerate.
5866 2012-04-19 Pedro Alves <palves@redhat.com>
5868 * Makefile.in (GNULIB_BUILDDIR): New.
5869 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5870 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5871 (all, install-only, uninstall, clean-info, all-lib, clean): No
5872 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5873 (maintainer-clean realclean distclean): Use subdir_do.
5875 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5876 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5877 * acinclude.m4: Include acx_configure_dir.m4.
5878 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5879 calls. Call AC_PROG_RANLIB. Configure gnulib using
5882 (GNULIB_STDINT_H): Adjust.
5883 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5884 * gdbreplay.c: Include build-gnulib/config.h.
5885 * server.h: Likewise.
5886 * aclocal.m4: Regenerate.
5887 * config.in: Regenerate.
5888 * configure: Regenerate.
5890 2012-04-19 Pedro Alves <palves@redhat.com>
5892 * Makefile.in (LIBGNU, INCGNU): Adjust.
5893 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5894 (all, install-only, uninstall, clean-info, all-lib, clean)
5895 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5896 * configure.ac: Adjust AC_OUTPUT output.
5897 * aclocal.m4: Regenerate.
5898 * configure: Regenerate.
5900 2012-04-19 Pedro Alves <palves@redhat.com>
5902 * Makefile.in (generated_files): New.
5903 (server_h): Remove the explicit dependency on config.h, and depend
5904 on $generated_files.
5906 2012-04-19 Pedro Alves <palves@redhat.com>
5908 * Makefile.in (INCGNU): Add -Ignulib.
5910 2012-04-19 Pedro Alves <palves@redhat.com>
5912 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5913 (INCGNU): ... this, and spell out -I here.
5914 (GNULIB_LIB): Rename to ...
5916 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5918 2012-04-19 Pedro Alves <palves@redhat.com>
5920 * config.in: Regenerate.
5922 2012-04-19 Pedro Alves <palves@redhat.com>
5924 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5925 * server.h (memmem): Remove declaration.
5926 * config.in: Regenerate.
5927 * configure: Regenerate.
5929 2012-04-19 Yao Qi <yao@codesourcery.com>
5931 * Makefile.in (SFILES): Add common/vec.c.
5935 2012-04-19 Yao Qi <yao@codesourcery.com>
5937 * remote-utils.c (prepare_resume_reply): Replace with macro
5938 target_core_of_thread.
5939 * server.c (handle_qxfer_threads_proper): Likewise.
5940 * target.h (traget_core_of_thread): New macro.
5942 2012-04-18 Pedro Alves <palves@redhat.com>
5944 * aclocal.m4: Regenerate.
5945 * configure: Regenerate.
5947 2012-04-16 Yao Qi <yao@codesourcery.com>
5949 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5950 duplicated on address.
5952 2012-04-16 Yao Qi <yao@codesourcery.com>
5954 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5955 (struct tracepoint_action_ops) <send>: New field.
5956 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5957 (agent_expr_send, x_tracepoint_action_send): New.
5958 (l_tracepoint_action_send): New.
5959 (cmd_qtdp): Download and install tracepoint
5960 according to `use_agent'.
5961 (run_inferior_command): Add one more parameter `len'.
5963 (tracepoint_send_agent): New.
5964 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5966 2012-04-16 Yao Qi <yao@codesourcery.com>
5968 * tracepoint.c (download_tracepoints): Moved to ...
5969 (cmd_qtstart): ... here.
5971 2012-04-14 Yao Qi <yao@codesourcery.com>
5973 * tracepoint.c: Include inttypes.h.
5974 (struct collect_memory_action): Use sized types.
5975 (struct tracepoint): Likewise.
5976 (cmd_qtdp, stop_tracing): Update print specifiers.
5977 (cmd_qtp, response_tracepoint): Likewise.
5978 (collect_data_at_tracepoint): Likewise.
5979 (collect_data_at_step): Likewise.
5981 2012-04-14 Yao Qi <yao@codesourcery.com>
5983 Import gnulib module inttypes.
5984 * aclocal.m4, config.in, configure: Regenerated.
5986 2012-04-14 Yao Qi <yao@codesourcery.com>
5988 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5989 Makefile and config.status at last.
5991 2012-04-13 Yao Qi <yao@codesourcery.com>
5993 * tracepoint.c: Include stdint.h unconditionally.
5995 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5997 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5998 on BFD_HAVE_SYS_PROCFS_TYPE.
5999 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6000 * configure: Regenerate.
6001 * config.in: Likewise.
6003 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6005 * Makefile.in (clean): Also remove x32.c x32-linux.c
6006 x32-avx.c x32-avx-linux.c.
6007 (x32.o): New target.
6009 (x32-linux.o): Likewise.
6010 (x32-linux.c): Likewise.
6011 (x32-avx.o): Likewise.
6012 (x32-avx.c): Likewise.
6013 (x32-avx-linux.o): Likewise.
6014 (x32-avx-linux.c): Likewise.
6016 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6017 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6018 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6019 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6020 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6021 i386/x32-avx-linux.xml.
6023 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6024 (init_registers_x32_avx_linux): Likwise.
6025 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6026 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6028 2012-04-13 Pedro Alves <palves@redhat.com>
6030 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6031 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6032 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6033 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6036 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6038 * linux-x86-low.c (compat_x32_clock_t): New.
6039 (compat_x32_siginfo_t): Likewise.
6040 (compat_x32_siginfo_from_siginfo): Likewise.
6041 (siginfo_from_compat_x32_siginfo): Likewise.
6042 (linux_is_elf64): Likewise.
6043 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6044 and siginfo_from_compat_x32_siginfo for x32.
6045 (x86_arch_setup): Set linux_is_elf64.
6047 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6050 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6052 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6053 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6054 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6055 compatible with process.
6057 2012-04-12 Yao Qi <yao@codesourcery.com>
6059 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6060 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6061 (install-only, install-info, clean): Handle sub dir gnulib.
6062 (all-lib, am--refresh): New targets.
6063 (memmem.o): Remove target.
6064 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6065 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6066 (AC_REPLACE_FUNCS): Remove memmem.
6067 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6068 (AC_OUTPUT): Generate Makefile in gnulib/.
6069 * aclocal.m4, config.in, configure: Regenerated.
6071 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6073 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6075 2012-04-05 Pedro Alves <palves@redhat.com>
6077 -Werror=strict-aliasing
6079 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6082 2012-04-04 Pedro Alves <palves@redhat.com>
6084 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6085 (sparc_store_gregset_from_stack, sparc_store_gregset)
6086 (sparc_breakpoint_at): Fix formatting.
6088 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6090 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6092 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6093 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6094 * config.in: Regenerate.
6095 * configure: Likewise.
6097 2012-03-29 Pedro Alves <palves@redhat.com>
6099 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6100 Correct ptrace arguments.
6102 2012-03-28 Pedro Alves <palves@redhat.com>
6104 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6105 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6106 (IA64_FR1_REGNUM): New defines.
6107 (ia64_fetch_register): New.
6108 (the_low_target): Install it.
6109 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6111 * linux-low.c (linux_fetch_registers): Try the
6112 the_low_target.fetch_register hook first.
6114 * linux-arm-low.c (the_low_target): Adjust.
6115 * linux-bfin-low.c (the_low_target): Adjust.
6116 * linux-cris-low.c (the_low_target): Adjust.
6117 * linux-crisv32-low.c (the_low_target): Adjust.
6118 * linux-m32r-low.c (the_low_target): Adjust.
6119 * linux-m68k-low.c (the_low_target): Adjust.
6120 * linux-mips-low.c (the_low_target): Adjust.
6121 * linux-ppc-low.c (the_low_target): Adjust.
6122 * linux-s390-low.c (the_low_target): Adjust.
6123 * linux-sh-low.c (the_low_target): Adjust.
6124 * linux-sparc-low.c (the_low_target): Adjust.
6125 * linux-tic6x-low.c (the_low_target): Adjust.
6126 * linux-x86-low.c (the_low_target): Adjust.
6127 * linux-xtensa-low.c (the_low_target): Adjust.
6129 2012-03-26 Pedro Alves <palves@redhat.com>
6131 * server.c (handle_qxfer_libraries): Don't bail early if
6132 the_target->qxfer_libraries_svr4 is not NULL.
6134 2012-03-26 Pedro Alves <palves@redhat.com>
6136 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6138 2012-03-23 Pedro Alves <palves@redhat.com>
6140 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6141 "library-list-svr4" element's start tag when the the DSO list is
6144 2012-03-23 Pedro Alves <palves@redhat.com>
6146 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6147 a variable whose type size is the same as the inferior's pointer
6150 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6152 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6154 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6155 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6156 * linux-low.h: Include <signal.h>.
6157 (struct siginfo): Remove forward declaration.
6158 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6161 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6163 * .gitignore: Ignore more files.
6165 2012-03-19 Pedro Alves <palves@redhat.com>
6166 Jan Kratochvil <jan.kratochvil@redhat.com>
6168 * server.c (cont_thread, general_thread): Add describing comments.
6169 (start_inferior): Clear `cont_thread'.
6170 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6173 2012-03-15 Yao Qi <yao@codesourcery.com>
6175 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6177 (cmd_qtdp): ... here.
6179 2012-03-15 Yao Qi <yao@codesourcery.com>
6181 * tracepoint.c (struct tracepoint_action_ops): New.
6182 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6183 (m_tracepoint_action_download): New.
6184 (r_tracepoint_action_download): New.
6185 (x_tracepoint_action_download): New.
6186 (l_tracepoint_action_download): New.
6187 (add_tracepoint_action): Install `action->ops' according type.
6188 (download_tracepoint_1): Move code `download' function pointer
6189 of various tracepoint_action_ops.
6191 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6193 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6194 linux_ptrace_attach_warnings.
6196 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6198 * Makefile.in (linux-ptrace.o): New.
6199 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6200 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6201 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6202 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6203 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6205 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6207 2012-03-08 Yao Qi <yao@codesourcery.com>
6208 Pedro Alves <palves@redhat.com>
6210 Fix PR server/13392.
6211 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6213 * tracepoint.c (remove_tracepoint): New.
6214 (cmd_qtdp): Call remove_tracepoint when failed to install.
6216 2012-03-07 Pedro Alves <palves@redhat.com>
6218 * linux-low.c (get_detach_signal): New.
6219 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6220 Pass on pending signals to PTRACE_DETACH. Check the result of the
6222 * server.c (program_signals, program_signals_p): New.
6223 (handle_general_set): Handle QProgramSignals.
6224 * server.h (program_signals, program_signals_p): Declare.
6226 2012-03-05 Pedro Alves <palves@redhat.com>
6227 Jan Kratochvil <jan.kratochvil@redhat.com>
6229 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6232 2012-03-03 Yao Qi <yao@codesourcery.com>
6234 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6235 agent_look_up_symbols.
6237 2012-03-03 Yao Qi <yao@codesourcery.com>
6239 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6240 (linux-x86-low.o): Likewise.
6241 * server.h: Remove in_process_agent_loaded.
6242 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6246 2012-03-03 Yao Qi <yao@codesourcery.com>
6248 * tracepoint.c (gdb_agent_capability): New global.
6249 (in_process_agent_loaded_ust): Renamed to
6250 `in_process_agent_supports_ust'.
6252 (in_process_agent_supports_ust): Call agent_capability_check.
6253 (clear_installed_tracepoints): Assert that agent supports
6256 2012-03-03 Yao Qi <yao@codesourcery.com>
6258 * linux-low.c (linux_supports_agent): New.
6259 (linux_target_ops): Initialize field `supports_agent' with
6260 linux_supports_agent.
6261 * target.h (struct target_ops) <supports_agent>: New.
6262 (target_supports_agent): New macro.
6263 * server.c (handle_general_set): Handle packet 'QAgent'.
6264 (handle_query): Send `QAgent+'.
6265 * Makefile.in (server.o): Depends on agent.h.
6267 2012-03-03 Yao Qi <yao@codesourcery.com>
6269 * Makefile.in (OBS): Add agent.o.
6270 Add new rule for agent.o.
6271 Track dependence of tracepoint.c on agent.h.
6272 * tracepoint.c (run_inferior_command_1):
6273 (run_inferior_command): Call agent_run_command.
6274 (gdb_ust_connect_sync_socket): Deleted. Move it to
6276 (resume_thread, stop_thread): Likewise.
6277 (gdb_ust_socket_init): Renamed to ...
6278 (gdb_agent_socket_init): ... New.
6279 (gdb_ust_thread): Renamed to ...
6280 (gdb_agent_helper_thread): ... New.
6281 (gdb_ust_init): Move some code to ...
6282 (gdb_agent_init): ... here. New.
6283 [HAVE_UST]: Call gdb_ust_init.
6284 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6285 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6286 * config.in, configure: Regenerated.
6288 2012-03-02 Pedro Alves <palves@redhat.com>
6290 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6291 * linux-low.c (struct simple_pid_list): New.
6292 (stopped_pids): New a struct simple_pid_list pointer.
6293 (add_to_pid_list, pull_pid_from_list): New.
6294 (handle_extended_wait): Don't assume the first signal new children
6295 report is SIGSTOP. Adjust call to pull_pid_from_list.
6296 (linux_wait_for_lwp): Adjust.
6298 2012-03-02 Yao Qi <yao@codesourcery.com>
6300 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6303 2012-03-02 Yao Qi <yao@codesourcery.com>
6305 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6306 `stop_pc' and `tpoint'. Update caller.
6308 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6310 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6311 * linux-low.c (use_linux_regsets): New macro.
6312 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6313 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6314 (linux_register_in_regsets): New function.
6315 (usr_fetch_inferior_registers): Skip registers covered by
6317 (usr_store_inferior_registers): Likewise.
6318 (usr_fetch_inferior_registers): New macro.
6319 (usr_store_inferior_registers): Likewise.
6320 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6321 (linux_store_registers): Likewise.
6322 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6324 (init_registers_mips64_dsp_linux): Likewise.
6325 (init_registers_mips_linux): New macro.
6326 (init_registers_mips_dsp_linux): Likewise.
6327 (mips_dsp_num_regs): Likewise.
6328 (DSP_BASE, DSP_CONTROL): New fallback macros.
6329 (mips_base_regs): New macro.
6330 (mips_regmap): Use it. Fix the size.
6331 (mips_dsp_regmap): New variable.
6332 (mips_dsp_regset_bitmap): Likewise.
6333 (mips_arch_setup): New function.
6334 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6336 (mips_cannot_store_register): Likewise.
6337 (the_low_target): Update .arch_setup, .num_regs and .regmap
6338 initializers. Add .regset_bitmap initializer.
6339 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6341 * linux-bfin-low.c (the_low_target): Likewise.
6342 * linux-cris-low.c (the_low_target): Likewise.
6343 * linux-crisv32-low.c (the_low_target): Likewise.
6344 * linux-ia64-low.c (the_low_target): Likewise.
6345 * linux-m32r-low.c (the_low_target): Likewise.
6346 * linux-m68k-low.c (the_low_target): Likewise.
6347 * linux-ppc-low.c (the_low_target): Likewise.
6348 * linux-s390-low.c (the_low_target): Likewise.
6349 * linux-sh-low.c (the_low_target): Likewise.
6350 * linux-sparc-low.c (the_low_target): Likewise.
6351 * linux-tic6x-low.c (the_low_target): Likewise.
6352 * linux-x86-low.c (the_low_target): Likewise.
6353 * linux-xtensa-low.c (the_low_target): Likewise.
6354 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6355 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6356 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6358 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6359 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6361 2012-02-29 Yao Qi <yao@codesourcery.com>
6362 Pedro Alves <palves@redhat.com>
6364 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6365 `step_over_finished' is true.
6367 2012-02-27 Pedro Alves <palves@redhat.com>
6369 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6370 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6372 2012-02-27 Pedro Alves <palves@redhat.com>
6375 * linux-low.c (pid_is_stopped): New.
6376 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6378 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6380 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6383 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6385 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6387 2012-02-24 Luis Machado <lgustavo@codesourcery>
6389 * server.c (handle_query): Advertise support for target-side
6390 breakpoint condition evaluation.
6391 (process_point_options): New function.
6392 (process_serial_event): When inserting a breakpoint, check for
6393 a target-side condition that should be evaluated.
6395 * mem-break.c: Include regcache.h and ax.h.
6396 (point_cond_list_t): New data structure.
6397 (breakpoint) <cond_list>: New field.
6398 (find_gdb_breakpoint_at): Make non-static.
6399 (delete_gdb_breakpoint_at): Clear any target-side
6401 (clear_gdb_breakpoint_conditions): New function.
6402 (add_condition_to_breakpoint): Likewise.
6403 (add_breakpoint_condition): Likewise.
6404 (gdb_condition_true_at_breakpoint): Likewise.
6405 (gdb_breakpoint_here): Return result directly instead
6406 of going through a local variable.
6408 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6409 (clear_gdb_breakpoint_conditions): Likewise.
6410 (add_breakpoint_condition): Likewise.
6411 (gdb_condition_true_at_breakpoint): Likewise.
6413 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6414 (need_step_over_p): Take target-side breakpoint condition into
6417 2012-02-24 Luis Machado <lgustavo@codesourcery>
6419 * server.h: Include tracepoint.h.
6420 (agent_mem_read, agent_get_trace_state_variable_value,
6421 agent_set_trace_state_variable_value,
6422 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6423 get_set_tsv_func_addr): New prototypes.
6425 * ax.h: New include file.
6426 * ax.c: New source file.
6428 * tracepoint.c: Include ax.h.
6429 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6430 agent_expr, eval_result_type): Move to ax.h.
6431 (parse_agent_expr): Rename to ...
6432 (gdb_parse_agent_expr): ... this, make it non-static and move
6434 (unparse_agent_expr) Rename to ...
6435 (gdb_unparse_agent_expr): ... this, make it non-static and move
6437 (eval_agent_expr): Rename to ...
6438 (eval_tracepoint_agent_expr): ... this.
6439 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6440 forward declarations.
6441 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6442 (agent_get_trace_state_variable_value): New function.
6443 (agent_set_trace_state_variable_value): New function.
6444 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6445 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6446 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6447 (condition_true_at_tracepoint): Likewise.
6448 (parse_agent_expr): Rename to ...
6449 (gdb_parse_agent_expr): ... this and move to ax.c.
6450 (unparse_agent_expr): Rename to ...
6451 (gdb_unparse_agent_expr): ... this and move to ax.c.
6452 (gdb_agent_op_name): Move to ax.c.
6453 (eval_agent_expr): Rename to ...
6454 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6456 (eval_tracepoint_agent_expr): New function.
6457 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6459 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6461 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6462 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6463 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6464 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6465 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6466 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6467 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6468 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6469 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6470 (compile_bytecodes): Remove forward declaration.
6471 (is_goto_target): Move to ax.c.
6472 (compile_bytecodes): Move to ax.c and call
6473 agent_get_trace_state_variable_value (...) and
6474 agent_set_trace_state_variable_value (...).
6476 * Makefile.in: Update ax.c and IPA dependencies.
6478 2012-02-24 Pedro Alves <palves@redhat.com>
6480 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6481 (cmd_bigqtbuffer_circular): ... this. Only handle
6482 'QTBuffer:circular:'.
6483 (handle_tracepoint_general_set): Adjust.
6485 2012-02-16 Yao Qi <yao@codesourcery.com>
6487 * inferiors.c: Move code to ...
6488 * dll.c: .... here. New.
6489 * server.h: Declare clear_dlls.
6490 * Makefile.in (SFILES): Add dll.c.
6494 2012-02-11 Yao Qi <yao@codesourcery.com>
6496 * server.c: (handle_monitor_command): Add a new parameter
6498 (handle_query): Update caller.
6500 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6502 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6503 * configure, config.in: Regenerate.
6504 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6507 2012-02-02 Pedro Alves <palves@redhat.com>
6509 Try SIGKILL first, then PTRACE_KILL.
6510 * linux-low.c (linux_kill_one_lwp): New.
6511 (linux_kill_one_lwp): Rename to ...
6512 (kill_one_lwp_callback): ... this. Use the new
6515 2012-02-02 Pedro Alves <palves@redhat.com>
6517 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6520 2012-01-27 Pedro Alves <palves@redhat.com>
6522 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6523 (elf_64_file_p): Make static.
6524 (linux_pid_exe_is_elf_64_file): New.
6525 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6526 Delete declarations.
6527 (linux_pid_exe_is_elf_64_file): Declare.
6528 * linux-x86-low.c (x86_arch_setup): Use
6529 linux_pid_exe_is_elf_64_file.
6531 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6533 * linux-low.c (linux_wait_for_event_1): Rename to ...
6534 (linux_wait_for_event): ... here and merge it with former
6535 linux_wait_for_event - new variable wait_ptid, use it.
6536 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6538 2012-01-23 Pedro Alves <palves@redhat.com>
6540 * server.c (main): Avoid yet another case of infinite loop while
6541 detaching/killing after a longjmp.
6543 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6546 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6548 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6550 * hostio.c (handle_readlink): New function.
6551 (handle_vFile): Call it to handle "vFile:readlink" packets.
6553 2012-01-20 Pedro Alves <palves@redhat.com>
6554 Ulrich Weigand <ulrich.weigand@linaro.org>
6556 * server.c (handle_v_requests): Only support vAttach and vRun to
6557 start multiple processes when in extended protocol mode.
6559 2012-01-17 Pedro Alves <palves@redhat.com>
6561 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6562 memalign plus mprotect to allocate the scratch buffer.
6564 2012-01-13 Pedro Alves <palves@redhat.com>
6566 * server.c (attach_inferior): Clear `cont_thread'.
6568 2012-01-13 Pedro Alves <palves@redhat.com>
6570 * server.c (main): Avoid infinite loop while detaching/killing
6573 2012-01-09 Doug Evans <dje@google.com>
6575 * server.c (start_inferior): Set last_ptid in --wrapper case.
6577 2012-01-06 Yao Qi <yao@codesourcery.com>
6579 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6581 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6583 2012-01-04 Yao Qi <yao@codesourcery.com>
6585 * tracepoint.c (cmd_qtdp): Print debug message
6586 for static tracepoint.
6588 2012-01-04 Yao Qi <yao@codesourcery.com>
6590 * tracepoint.c (trace_vdebug): Differentiate debug message
6591 between gdbserver and IPA.
6593 2012-01-03 Yao Qi <yao@codesourcery.com>
6595 * tracepoint.c (tracepoint_was_hit): Don't collect for
6598 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6600 * terminal.h: Reformat copyright header.
6602 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6604 * server.c (gdbserver_version): Update copyright year.
6605 * gdbreplay.c (gdbreplay_version): Likewise.
6607 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6609 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6612 2011-12-18 Hui Zhu <teawater@gmail.com>
6613 * linux-low.c (linux_create_inferior): Save return value to ret.
6615 2011-12-18 Hui Zhu <teawater@gmail.com>
6617 * linux-low.c (linux_create_inferior): Save return value to ret.
6619 2011-12-16 Doug Evans <dje@google.com>
6621 * linux-low.c (linux_create_inferior): If stdio connection,
6622 redirect stdin from /dev/null, stdout to stderr.
6623 * remote-utils.c (remote_is_stdio): New static global.
6624 (remote_connection_is_stdio): New function.
6625 (remote_prepare): Handle stdio connection.
6626 (remote_open): Ditto.
6627 (remote_close): Don't close stdin for stdio connections.
6628 (read_prim,write_prim): New functions. Replace all calls to
6629 read/write to these.
6630 * server.c (main): Watch for "-" argument. Move call to
6631 remote_prepare before start_inferior.
6632 * server.h (STDIO_CONNECTION_NAME): New macro.
6633 (remote_connection_is_stdio): Declare.
6635 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6636 in debugging output.
6638 2011-12-15 Yao Qi <yao@codesourcery.com>
6640 * tracepoint.c: Include sys/syscall.h.
6641 (gdb_ust_thread): Remove preprocessor conditional.
6643 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6645 * linux-low.c (linux_detach_one_lwp): Call
6646 the_low_target.prepare_to_resume before detaching.
6648 2011-12-14 Yao Qi <yao@codesourcery.com>
6650 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6653 2011-12-14 Yao Qi <yao@codesourcery.com>
6655 * i386-low.c (i386_low_stopped_data_address): Initialize local
6658 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6662 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6663 DR_CONTROL unless necessary. Extend comments.
6664 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6665 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6667 2011-12-13 Yao Qi <yao@codesourcery.com>
6669 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6671 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6673 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6675 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6676 Print new debug message for such case.
6678 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6680 Fix overlapping memcpy.
6681 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6682 the read_inferior_memory transfer.
6683 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6684 write_inferior_memory transfer.
6685 (set_fast_tracepoint_jump): New variable buf. Use it for the
6686 read_inferior_memory and write_inferior_memory transfers.
6687 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6688 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6689 Use it for the write_inferior_memory transfer.
6690 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6693 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6695 * linux-low.c (fetch_register, store_register): Make code
6696 consistent, fix formatting.
6698 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6700 * linux-low.c (usr_store_inferior_registers): Factor out code
6701 to handle individual registers into...
6702 (store_register): ... this new function.
6704 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6706 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6707 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6708 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6709 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6710 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6711 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6712 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6713 (srv_xmlfiles): Add new XML files.
6715 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6717 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6718 (init_registers_s390_linux32v1): Add prototype.
6719 (init_registers_s390_linux32v2): Likewise.
6720 (init_registers_s390_linux64v1): Likewise.
6721 (init_registers_s390_linux64v2): Likewise.
6722 (init_registers_s390x_linux64v1): Likewise.
6723 (init_registers_s390x_linux64v2): Likewise.
6724 (s390_num_regs): Increment to 52.
6725 (s390_regmap): Add orig_r2 register.
6726 (s390_num_regs_3264): Increment to 68.
6727 (s390_regmap_3264): Add orig_r2 register.
6728 (s390_collect_ptrace_register): Handle orig_r2 register.
6729 (s390_supply_ptrace_register): Likewise.
6730 (s390_fill_last_break): New function.
6731 (s390_store_last_break): Likewise.
6732 (s390_fill_system_call): New function.
6733 (s390_store_system_call): Likewise.
6734 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6736 (s390_check_regset): New function.
6737 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6738 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6739 Update target_regsets for available register sets.
6741 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6742 Jan Kratochvil <jan.kratochvil@redhat.com>
6744 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6745 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6747 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6748 * linux-low.h (struct process_info_private): New member r_debug.
6749 * server.c (handle_qxfer_libraries): Call
6750 the_target->qxfer_libraries_svr4.
6751 (handle_qxfer_libraries_svr4): New function.
6752 (qxfer_packets): New entry "libraries-svr4".
6753 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6754 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6755 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6756 PACKET_qXfer_libraries_svr4.
6758 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6760 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6761 PSW address/mask between 8-byte and 16-byte formats.
6762 (s390_supply_ptrace_register): Likewise.
6763 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6764 basic addressing mode bit.
6766 2011-11-24 Stan Shebs <stan@codesourcery.com>
6768 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6770 2011-11-17 Stan Shebs <stan@codesourcery.com>
6772 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6773 (tracing_start_time): New global.
6774 (tracing_stop_time): New global.
6775 (tracing_user_name): New global.
6776 (tracing_notes): New global.
6777 (tracing_stop_note): New global.
6778 (cmd_qtstart): Set traceframe_usage, start_time.
6779 (stop_tracing): Set stop_time.
6780 (cmd_qtstatus): Report additional status.
6781 (cmd_qtp): New function.
6782 (handle_tracepoint_query): Call it.
6783 (cmd_qtnotes): New function.
6784 (handle_tracepoint_general_set): Call it.
6785 (get_timestamp): Rename from tsv_get_timestamp.
6787 2011-11-14 Stan Shebs <stan@codesourcery.com>
6788 Kwok Cheung Yeung <kcy@codesourcery.com>
6790 * linux-x86-low.c (small_jump_insn): New.
6791 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6792 trampoline and error message, build a trampoline and issue a small
6793 jump instruction to it.
6794 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6795 trampoline and error message.
6796 (x86_get_min_fast_tracepoint_insn_len): New.
6797 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6798 * linux-low.h (struct linux_target_ops): Add arguments to
6799 install_fast_tracepoint_jump_pad operation, add new operation.
6800 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6802 (linux_get_min_fast_tracepoint_insn_len): New function.
6803 (linux_target_op): Add new operation.
6804 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6805 (gdb_trampoline_buffer_end): Ditto.
6806 (gdb_trampoline_buffer_error): Ditto.
6807 (struct ipa_sym_addresses): Add fields for new IPA variables.
6808 (symbol_list): Add entries for new IPA variables.
6809 (struct tracepoint): Add fields to hold the address range of the
6810 trampoline used by the tracepoint.
6811 (trampoline_buffer_head): New static variable.
6812 (trampoline_buffer_tail): Ditto.
6813 (claim_trampoline_space): New function.
6814 (have_fast_tracepoint_trampoline_buffer): New function.
6815 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6817 (install_fast_tracepoint): Ditto, also add error buffer argument.
6818 (cmd_qtminftpilen): New function.
6819 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6820 (fast_tracepoint_from_trampoline_address): New function.
6821 (fast_tracepoint_collecting): Handle trampoline as part of jump
6823 (set_trampoline_buffer_space): New function.
6824 (initialize_tracepoint): Initialize new IPA variables.
6825 * target.h (struct target_ops): Add arguments to
6826 install_fast_tracepoint_jump_pad operation, add new
6827 get_min_fast_tracepoint_insn_len operation.
6828 (target_get_min_fast_tracepoint_insn_len): New.
6829 (install_fast_tracepoint_jump_pad): Add arguments.
6830 * server.h (IPA_BUFSIZ): Define.
6831 * linux-i386-ipa.c: Include extra header files.
6832 (initialize_fast_tracepoint_trampoline_buffer): New function.
6833 (initialize_low_tracepoint): Call it.
6834 * server.h (set_trampoline_buffer_space): Declare.
6835 (claim_trampoline_space): Ditto.
6836 (have_fast_tracepoint_trampoline_buffer): Ditto.
6838 2011-11-14 Yao Qi <yao@codesourcery.com>
6840 * server.c (handle_query): Handle InstallInTrace for qSupported.
6841 * tracepoint.c (add_tracepoint): Sort list.
6842 (install_tracepoint, download_tracepoint): New.
6843 (cmd_qtdp): Call them to install and download tracepoints.
6844 (sort_tracepoints): Removed.
6845 (cmd_qtstart): Update.
6847 2011-11-14 Yao Qi <yao@codesourcery.com>
6849 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6850 * mem-break.h: Declare.
6851 * tracepoint.c (cmd_qtstart): Move some code to ...
6852 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6854 (download_tracepoints): Move some code to ...
6855 (download_tracepoint_1): ... here. New.
6857 2011-11-08 Yao Qi <yao@codesourcery.com>
6859 * remote-utils.c (relocate_instruction): A comment fix.
6861 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6863 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6864 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6865 dr_status_mirror and dr_control_mirror from debug_reg_state.
6866 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6867 (i386_initial_stuff): Remove use of deleted globals.
6868 (i386_get_thread_context, i386_set_thread_context,
6869 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6870 from debug_reg_state.
6872 2011-11-05 Yao Qi <yao@codesourcery.com>
6874 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6875 address as TPOINT's.
6877 2011-11-02 Stan Shebs <stan@codesourcery.com>
6879 * tracepoint.c (agent_mem_read_string): New function.
6880 (eval_agent_expr): Call it for tracenz.
6881 * server.c (handle_query): Report support for tracenz.
6883 2011-11-02 Yao Qi <yao@codesourcery.com>
6885 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6887 2011-11-02 Yao Qi <yao@codesourcery.com>
6889 * target.h: Fix a typo in comment.
6891 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6893 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6894 clobber the breakpoints' shadows with fast tracepoint jumps.
6895 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6896 * target.c (write_inferior_memory): Also pass MYADDR down to
6899 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6901 * configure.ac: Check support for personality routine.
6902 * configure: Regenerate.
6903 * config.in: Likewise.
6904 * linux-low.c: Include <sys/personality.h>.
6905 Define ADDR_NO_RANDOMIZE if necessary.
6906 (linux_create_inferior): Disable address space randomization when
6907 forking inferior, if requested.
6908 (linux_supports_disable_randomization): New function.
6909 (linux_target_ops): Install it.
6910 * server.h (disable_randomization): Declare.
6911 * server.c (disable_randomization): New global variable.
6912 (handle_general_set): Handle QDisableRandomization.
6913 (handle_query): Likewise for qSupported.
6914 (main): Support --disable-randomization and --no-disable-randomization
6915 command line arguments.
6916 * target.h (struct target_ops): Add supports_disable_randomization.
6917 (target_supports_disable_randomization): New macro.
6919 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6921 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6923 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6924 [!PT_GETDSBT] (target_loadmap): New definition.
6925 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6926 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6927 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6928 and PT_GETDSBT to LINUX_LOADMAP.
6929 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6930 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6932 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6934 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6935 (arm_linux_hwbp_cap): New static variable.
6936 (arm_linux_get_hwbp_cap): Replace by ...
6937 (arm_linux_init_hwbp_cap): ... this new function.
6938 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6939 (arm_linux_get_hw_watchpoint_count): Likewise.
6940 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6941 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6942 (arm_prepare_to_resume): Use perror_with_name instead of error.
6944 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6946 * linux-arm-low.c: Include <signal.h>.
6947 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6948 (struct arm_linux_hwbp_cap): New data type.
6949 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6950 (struct arm_linux_hw_breakpoint): New data type.
6951 (MAX_BPTS, MAX_WPTS): Define.
6952 (struct arch_process_info, struct arch_lwp_info): New data types.
6953 (arm_linux_get_hwbp_cap): New function.
6954 (arm_linux_get_hw_breakpoint_count): Likewise.
6955 (arm_linux_get_hw_watchpoint_count): Likewise.
6956 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6957 (arm_hwbp_control_initialize): Likewise.
6958 (arm_hwbp_control_is_enabled): Likewise.
6959 (arm_hwbp_control_is_initialized): Likewise.
6960 (arm_hwbp_control_disable): Likewise.
6961 (arm_linux_hw_breakpoint_equal): Likewise.
6962 (arm_linux_hw_point_initialize): Likewise.
6963 (struct update_registers_data): New data structure.
6964 (update_registers_callback: New function.
6965 (arm_insert_point): Likewise.
6966 (arm_remove_point): Likewise.
6967 (arm_stopped_by_watchpoint): Likewise.
6968 (arm_stopped_data_address): Likewise.
6969 (arm_new_process): Likewise.
6970 (arm_new_thread): Likewise.
6971 (arm_prepare_to_resume): Likewise.
6972 (the_low_target): Register arm_insert_point, arm_remove_point,
6973 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6974 arm_new_thread, and arm_prepare_to_resume.
6976 2011-09-15 Stan Shebs <stan@codesourcery.com>
6978 * server.h (struct emit_ops): Add compare-goto fields.
6979 * tracepoint.c (gdb_agent_op_sizes): New table.
6980 (emit_eq_goto): New function.
6981 (emit_ne_goto): New function.
6982 (emit_lt_goto): New function.
6983 (emit_le_goto): New function.
6984 (emit_gt_goto): New function.
6985 (emit_ge_goto): New function.
6986 (is_goto_target): New function.
6987 (compile_bytecodes): Recognize special cases of compare-goto
6988 combinations and call specialized emitters for them.
6989 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6990 (amd64_emit_ne_goto): New function.
6991 (amd64_emit_lt_goto): New function.
6992 (amd64_emit_le_goto): New function.
6993 (amd64_emit_gt_goto): New function.
6994 (amd64_emit_ge_goto): New function.
6995 (amd64_emit_ops): Add the new functions.
6996 (i386_emit_eq_goto): New function.
6997 (i386_emit_ne_goto): New function.
6998 (i386_emit_lt_goto): New function.
6999 (i386_emit_le_goto): New function.
7000 (i386_emit_gt_goto): New function.
7001 (i386_emit_ge_goto): New function.
7002 (i386_emit_ops): Add the new functions.
7004 2011-09-08 Stan Shebs <stan@codesourcery.com>
7006 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7007 (i386_emit_epilogue): Restore %ebx.
7009 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7011 * server.c (step_thread): Remove definition.
7012 (process_serial_event): Don't handle Hs.
7013 * server.h (step_thread): Remove declaration.
7014 * target.c (set_desired_inferior): Remove use of step_thread.
7016 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7018 * linux-low.c: Include linux-procfs.h.
7019 (linux_attach_lwp_1): Update comments.
7020 (linux_attach): Scan for existing threads when attaching to a
7021 process that is the tgid.
7022 * Makefile.in: Update dependencies.
7024 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7026 * configure.srv: Add linux-procfs.o dependencies.
7028 2011-08-14 Yao Qi <yao@codesourcery.com>
7030 * target.h (struct target_ops): Fix indent.
7031 * win32-low.c (win32_target_ops): Fix comment.
7033 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7034 Yao Qi <yao@codesourcery.com>
7036 * Makefile.in (clean): Remove tic6x-*.c files.
7037 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7038 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7039 (tic6x-c64xp-linux.c): Likewise.
7040 * configure.srv: Add support for tic6x-*-uclinux.
7041 * linux-tic6x-low.c: New.
7042 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7044 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7045 Yao Qi <yao@codesourcery.com>
7047 * target.h (struct target_ops): Add read_loadmap.
7048 * linux-low.c (struct target_loadseg): New type.
7049 (struct target_loadmap): New type.
7050 (linux_read_loadmap): New function.
7051 (linux_target_ops): Add linux_read_loadmap.
7052 * server.c (handle_query): Support qXfer:fdpic:read packet.
7053 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7056 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7058 * win32-low.c: Include <stdint.h>.
7060 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7062 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7063 to the inferior here.
7064 (i386_remove_aligned_watchpoint): Ditto.
7065 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7066 fit part of the watchpoint in the debug registers.
7067 (i386_update_inferior_debug_regs): New.
7068 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7069 registers, and only update the inferior on success.
7070 (i386_low_remove_watchpoint): Ditto.
7072 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7074 * linux-low.c (compare_ints, unique, list_threads, show_process,
7075 linux_core_of_thread): Delete.
7076 (linux_target_ops): Change linux_core_of_thread to
7077 linux_common_core_of_thread.
7078 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7079 * utils.c (malloc_failure): Change type of argument.
7080 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7081 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7082 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7083 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7084 (IPA_OBJS): Add common-utils-ipa.o.
7085 (ptid_h, linux_osdata_h): New macros.
7086 (server_h): Add common/common-utils.h, common/xml-utils.h,
7087 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7089 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7090 ptid.o, buffer.o): New rules.
7091 (linux-low.o): Add common/linux-osdata.h as a dependency.
7092 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7093 * configure.ac: Add AC_HEADER_DIRENT check.
7094 * config.in: Regenerate.
7095 * configure: Regenerate.
7096 * remote-utils.c (xml_escape_text): Delete.
7097 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7098 buffer_xml_printf): Move to common/buffer.c.
7099 * server.c (main): Remove call to initialize_inferiors.
7100 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7101 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7102 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7103 internal_error, gdb_assert, gdb_assert_fail): Delete.
7104 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7105 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7107 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7108 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7109 initialize_inferiors): Delete.
7111 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7113 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7116 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7118 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7120 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7122 2011-05-26 Yao Qi <yao@codesourcery.com>
7124 * Makefile.in (thread-db.o): Track dependence to
7125 common/gdb_thread_db.h.
7126 * thread-db.c: include gdb_thread_db.h from right place.
7128 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7130 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7131 __FILE__ and __LINE__ to internal_error.
7133 2011-05-13 Doug Evans <dje@google.com>
7135 * thread-db.c (try_thread_db_load_from_sdir): New function.
7136 (try_thread_db_load_from_dir): New function.
7137 (thread_db_load_search): Handle $sdir, ignore $pdir.
7138 Remove trying of system directories if search of
7139 libthread-db-search-path fails, that is now done via $sdir.
7141 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7143 * server.c (handle_query): Add EnableDisableTracepoints to the list
7144 of supported features.
7145 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7147 (cmd_qtenable_disable): New.
7148 (cmd_qtstart): Install tracepoints even if disabled.
7149 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7150 receiving a QTEnable or QTDisable packet.
7151 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7152 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7154 (gdb_probe): Skip data collection if static tracepoint is disabled.
7156 2011-05-10 Doug Evans <dje@google.com>
7158 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7160 2011-05-04 Doug Evans <dje@google.com>
7162 * linux-low.c (linux_join): Skip process lookup.
7163 * spu-low.c (spu_join): Ditto.
7164 * server.c (join_inferiors_callback): Delete.
7165 (process_serial_event): For 'D' packet (detach) call join_inferior
7168 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7170 * README: Don't mention xscale*-*-linux*.
7171 * configure.srv (xscale*-*-linux*): Don't handle target.
7173 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7175 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7177 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7178 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7179 (i386_emit_void_call_2): Likewise.
7181 2011-04-26 Yao Qi <yao@codesourcery.com>
7183 * linux-low.c: Move common macros to linux-ptrace.h.
7184 Include linux-ptrace.h.
7185 * Makefile.in (linux_ptrace_h): New.
7186 (linux-low.o): Depends on linux-ptrace.h.
7188 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7190 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7191 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7192 (remote_prepare): New function with most of the TCP code from ...
7193 (remote_open): ... here. Detect PORT here unconditionally. Move also
7194 setting transport_is_reliable.
7195 * server.c (run_once): New variable.
7196 (gdbserver_usage): Document it.
7197 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7198 the first run if RUN_ONCE.
7199 * server.h (run_once, remote_prepare): New declarations.
7201 2011-04-19 Tom Tromey <tromey@redhat.com>
7203 * win32-low.c (handle_load_dll): Remove duplicate "the".
7205 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7207 Remove support for old Cygwin 1.5 versions.
7208 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7209 function to avoid warning.
7210 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7213 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7215 * gdbserver/server.h (Macro _): Define it if not available.
7217 2011-03-14 Michael Snyder <msnyder@vmware.com>
7219 * hostio.c (handle_close): Remove unnecessary null test.
7221 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7223 * Makefile.in (maintainer-clean realclean distclean): Remove
7224 "make ... subdir_do" command.
7226 2011-03-10 Michael Snyder <msnyder@vmware.com>
7228 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7230 * server.c (handle_v_run): Free alloced buffer on early return.
7232 2011-03-09 Yao Qi <yao@codesourcery.com>
7235 2011-03-04 Yao Qi <yao@codesourcery.com>
7237 * Makefile.in: Remove GNU make feature --directory.
7239 2011-03-05 Yao Qi <yao@codesourcery.com>
7241 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7242 (subdir_do): New make target. Copied from gdb/Makefile.
7243 (maintainer-clean, realclean, distclean, clean): Call corresponding
7244 make targets in common/Makefile.
7246 2011-02-11 Yao Qi <yao@codesourcery.com>
7248 * configure.ac: Call AC_PROG_RANLIB.
7249 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7250 * configure: Regenerate.
7252 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7254 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7256 2011-03-06 Yao Qi <yao@codesourcery.com>
7258 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7260 2011-03-05 Yao Qi <yao@codesourcery.com>
7262 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7263 (subdir_do): New make target. Copied from gdb/Makefile.
7264 (maintainer-clean, realclean, distclean, clean): Call corresponding
7265 make targets in common/Makefile.
7267 2011-03-04 Yao Qi <yao@codesourcery.com>
7269 * Makefile.in: Remove GNU make feature --directory.
7271 2011-03-04 Michael Snyder <msnyder@vmware.com>
7273 * server.c (queue_stop_reply): Call xmalloc not malloc.
7275 2011-03-02 Michael Snyder <msnyder@vmware.com>
7277 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7279 2011-02-28 Michael Snyder <msnyder@vmware.com>
7281 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7282 (cmd_qtframe): Ditto.
7283 (cmd_qtbuffer): Ditto.
7284 (cmd_bigqtbuffer): Ditto.
7286 * utils.c (decimal2str): Initialize 'width' to nine, then
7289 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7291 * hostio.c (require_data): Free *data, not data.
7293 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7295 * hostio.c (require_data): Use free, not xfree.
7297 2011-02-27 Michael Snyder <msnyder@vmware.com>
7299 * server.c (handle_query): Discard unused value.
7301 * hostio.c (require_data): Free malloc memory before returning
7304 2011-02-26 Michael Snyder <msnyder@vmware.com>
7306 * linux-low.c (list_threads): Call closedir for dirent.
7308 2011-02-27 Michael Snyder <msnyder@vmware.com>
7310 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7311 a case statement falls through.
7313 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7315 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7318 2011-02-26 Michael Snyder <msnyder@vmware.com>
7320 * utils.c (decimal2str): Eliminate dead code and dead param.
7321 (pulongest): Drop dead param from call to decimal2str.
7324 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7326 Revert the following patch (not approved yet):
7327 2011-02-21 Hui Zhu <teawater@gmail.com>
7328 * tracepoint.c (tp_printf): New function.
7329 (eval_agent_expr): Handle gdb_agent_op_printf.
7331 2011-02-21 Hui Zhu <teawater@gmail.com>
7333 * tracepoint.c (tp_printf): New function.
7334 (eval_agent_expr): Handle gdb_agent_op_printf.
7336 2011-02-18 Tom Tromey <tromey@redhat.com>
7338 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7339 (tracepoint.o): Likewise.
7340 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7341 (gdb_agent_op_names): Likewise.
7343 2011-02-18 Tom Tromey <tromey@redhat.com>
7345 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7346 gdb_agent_op_rot>: New constants.
7347 (gdb_agent_op_names): Add pick and roll.
7348 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7351 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7353 * aclocal.m4: Regenerated with aclocal-1.11.1.
7355 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7357 * server.c (handle_qxfer_traceframe_info): New.
7358 (qxfer_packets): Register "traceframe-info".
7359 (handle_query): Report support for qXfer:traceframe-info:read+.
7360 * tracepoint.c (match_blocktype): New.
7361 (traceframe_find_block_type): Rename to ...
7362 (traceframe_walk_blocks): ... this. Add callback filter argument,
7364 (traceframe_find_block_type): New, reimplemented on top of
7365 traceframe_walk_blocks.
7366 (build_traceframe_info_xml): New.
7367 (traceframe_read_info): New.
7368 * server.h (traceframe_read_info): Declare.
7370 2011-02-11 Yao Qi <yao@codesourcery.com>
7372 * configure.ac: Call AC_PROG_RANLIB.
7373 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7374 * configure: Regenerate.
7376 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7378 * server.c (gdb_read_memory): Change return semantics to allow
7380 (handle_search_memory_1): Adjust.
7381 (process_serial_event) <'m' packet>: Handle partial transfers.
7382 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7384 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7386 * regcache.c (init_register_cache): Initialize
7387 regcache->register_status.
7388 (free_register_cache): Release regcache->register_status.
7389 (regcache_cpy): Copy register_status.
7390 (registers_to_string): Print 'x's for unavailable registers.
7391 (supply_register): Mark the register's status valid or
7392 unavailable, depending on whether a buffer was passed in or not.
7393 (supply_register_zeroed): New.
7394 (supply_regblock): Mark the registers' status valid or
7395 unavailable, depending on whether a buffer was passed in or not.
7396 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7397 (struct regcache): New `register_status' field.
7398 (supply_register_zeroed): Declare.
7399 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7400 supply_register_zeroed, rather than passing a NULL buffer to
7402 * tracepoint.c (fetch_traceframe_registers): Update comment.
7404 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7406 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7409 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7411 * server.h (decode_xfer_write): Change prototype.
7412 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7413 and don't extract the annex here.
7414 * server.c (decode_xfer_read): Remove `annex' parameter,
7415 and don't extract the annex here.
7417 (struct qxfer): New.
7418 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7419 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7420 (handle_qxfer_statictrace): New functions, abstracted out from
7421 handle_query, and made to use the struct qxfer interface.
7422 (handle_threads_qxfer_proper): Rename to ...
7423 (handle_qxfer_threads_proper): ... this.
7424 (handle_threads_qxfer): Rename to ...
7425 (handle_qxfer_threads): ... this. Adjust.
7426 (qxfer_packets): New array.
7427 (handle_qxfer): New function.
7428 (handle_query): Use handle_qxfer.
7430 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7432 * gdbreplay.c: Shorten lines of >= 80 columns.
7433 * linux-low.c: Ditto.
7434 * linux-ppc-low.c: Ditto.
7435 * linux-s390-low.c: Ditto.
7436 * linux-sparc-low.c: Ditto.
7437 * linux-x86-low.c: Ditto.
7438 * linux-xtensa-low.c: Ditto.
7439 * mem-break.c: Ditto.
7441 * regcache.h: Ditto.
7442 * remote-utils.c: Ditto.
7445 * thread-db.c: Ditto.
7446 * tracepoint.c: Ditto.
7448 * win32-low.h: Ditto.
7450 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7452 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7455 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7457 * server.c (gdbserver_version): Update copyright year in version
7459 * gdbreplay.c (gdbreplay_version): Ditto.
7461 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7463 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7464 * linux-bfin-low.c: New file.
7465 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7466 PT_DATA_ADDR for BFIN targets.
7467 * Makefile.in (SFILES): Add linux-bfin-low.c.
7468 (clean): Remove reg-bfin.c.
7469 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7470 * README: Mention supported Blackfin targets.
7472 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7474 * .gitignore: New file.
7476 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7478 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7480 2010-10-22 Jie Zhang <jie@codesourcery.com>
7482 * Makefile.in: Add FLAGS_TO_PASS variable.
7483 (install): Remove dependency of install-only and recursively
7484 invoke make for install-only.
7486 2010-10-04 Doug Evans <dje@google.com>
7488 * Makefile.in (uninstall): Use $(DESTDIR).
7490 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7494 * linux-x86-low.c (compat_siginfo_from_siginfo)
7495 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7496 si_code is < 0. Check for si_code == SI_TIMER before checking for
7499 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7501 * lynx-i386-low.c: New file.
7502 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7504 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7506 * lynx-low.c (ptrace_request_to_str): Remove handling for
7507 request values that have been removed in LynxOS 5.x.
7509 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7511 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7514 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7516 * configure.ac: Add --enable-inprocess-agent option.
7517 * configure: Rebuilt.
7519 2010-09-06 Yao Qi <yao@codesourcery.com>
7521 * linux-low.c (linux_kill): Remove unused variable.
7522 (linux_stabilize_threads): Likewise.
7523 * server.c (start_inferior): Likewise.
7524 (queue_stop_reply_callback): Likewise.
7525 * tracepoint.c (do_action_at_tracepoint): Likewise.
7527 2010-09-06 Yao Qi <yao@codesourcery.com>
7529 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7532 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7534 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7536 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7538 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7541 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7543 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7544 gdbserver/lynx-ppc-low.c: New files.
7545 * Makefile.in (lynx_low_h): New variable.
7546 (lynx-low.o, lynx-ppc-low.o): New rules.
7547 * configure.ac: On LynxOS, link with -lnetinet.
7548 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7549 * configure: regenerate.
7551 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7553 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7554 * configure.ac: Add check for vasprintf and vsnprintf.
7555 * configure, config.in: Regenerate.
7556 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7558 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7560 * gdbreplay.c: Move include of alloca.h up, next to include of
7562 * server.h: Add include of malloc.h.
7563 * mem-break.c: Remove include of malloc.h.
7564 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7566 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7568 * Makefile.in (memmem.o): Build with -Wno-error.
7570 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7572 * utils.c (xsnprintf): Make non-static.
7573 * server.h: Add xsnprintf declaration.
7574 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7575 replace calls to snprintf by calls to xsnprintf throughout.
7577 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7579 * configure.ac: Add configure check for alloca.
7580 * configure, config.in: Regenerate.
7581 * server.h: Include alloca.h if it exists.
7582 * gdbreplay.c: Include alloca.h if it exists.
7584 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7586 * linux-low.c (__SIGRTMIN): Define if not already defined.
7587 (linux_create_inferior): Check for __ANDROID__ rather than
7589 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7590 are already deferred.
7591 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7592 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7593 stopped and already has a pending signal to report.
7594 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7595 a pending signal to report or is moving out of a jump pad.
7596 (linux_init_signals): Check for __ANDROID__ rather than
7599 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7601 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7602 debug_threads check. Avoid a linear search when not doing debug
7605 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7607 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7608 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7609 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7610 (process_event): Change local fd's type to gdb_fildes_t.
7611 (create_file_handler): Adjust prototype.
7612 (delete_file_handler): Adjust prototype.
7613 (handle_file_event): Adjust prototype. Use pfildes.
7614 (create_file_event): Adjsut prototype.
7615 * remote-utils.c (remote_desc, listen_desc): Change type to
7617 * server.h: New gdb_fildes_t typedef.
7618 [USE_WIN32API]: Include winsock2.h.
7619 (delete_file_handler, add_file_handler): Adjust prototypes.
7621 * utils.c (pfildes): New.
7623 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7625 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7626 * configure: Regenerate.
7628 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7630 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7631 (linux_done_accessing_memory): ... this.
7632 (linux_target_ops): Adjust.
7633 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7634 * nto-low.c (nto_target_ops): Adjust comment.
7635 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7636 * spu-low.c (spu_target_ops): Adjust comment.
7637 * target.h (target_ops): Rename unprepare_to_access_memory field
7638 to done_accessing_memory.
7639 (unprepare_to_access_memory): Rename to ...
7640 (done_accessing_memory): ... this.
7642 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7644 * linux-low.c (linux_prepare_to_access_memory): New.
7645 (linux_unprepare_to_access_memory): New.
7646 (linux_target_ops): Install them.
7647 * server.c (read_memory): Rename to ...
7648 (gdb_read_memory): ... this. Use
7649 prepare_to_access_memory/prepare_to_access_memory.
7650 (write_memory): Rename to ...
7651 (gdb_write_memory): ... this. Use
7652 prepare_to_access_memory/prepare_to_access_memory.
7653 (handle_search_memory_1): Adjust.
7654 (process_serial_event): Adjust.
7655 * target.h (struct target_ops): New fields
7656 prepare_to_access_memory and unprepare_to_access_memory.
7657 (prepare_to_access_memory, unprepare_to_access_memory): New.
7658 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7659 prepare_to_access_memory/prepare_to_access_memory.
7660 * nto-low.c (nto_target_ops): Adjust.
7661 * spu-low.c (spu_target_ops): Adjust.
7662 * win32-low.c (win32_target_ops): Adjust.
7664 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7666 * Makefile.in (WARN_CFLAGS): Get it from configure.
7667 (WERROR_CFLAGS): New.
7668 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7669 * configure.ac: Introduce --enable-werror, which adds -Werror to
7670 the compiler command line. Enabled by default. Disable with
7671 --disable-werror. Add -Wdeclaration-after-statement
7672 Wpointer-arith and -Wformat-nonliteral to warning flags.
7673 * configure: Regenerate.
7675 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7677 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7679 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7681 * gdbreplay.c (remote_error): New.
7683 (expect): Use gdbchar. Check for error reading from GDB.
7684 Clarify sync error output.
7685 (play): Check for errors writing to GDB.
7686 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7687 * remote-utils.c (getpkt): Check for errors writing to the remote
7690 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7692 * linux-low.c (linux_wait_1): Move non-debugging code out of
7693 `debug_threads' control.
7695 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7697 * linux-low.c (linux_wait_1): Don't set last_status here.
7698 * server.c (push_event, queue_stop_reply_callback): Assert we're
7699 not pushing a TARGET_WAITKIND_IGNORE event.
7700 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7701 (myresume, handle_target_event): Set the thread's last_resume_kind
7702 and last_status from the target returned status.
7704 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7708 * linux-x86-low.c (update_debug_registers_callback): New.
7709 (i386_dr_low_set_addr): Use it.
7710 (i386_dr_low_get_addr): New.
7711 (i386_dr_low_set_control): Use update_debug_registers_callback.
7712 (i386_dr_low_get_control): New.
7713 (i386_dr_low_get_status): Adjust.
7714 * linux-low.c (linux_stop_lwp): New.
7715 * linux-low.h (linux_stop_lwp): Declare.
7717 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7718 argument instead of a i386_debug_reg_state.
7719 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7720 a i386_debug_reg_state.
7721 (i386_insert_aligned_watchpoint): Adjust.
7722 (i386_remove_aligned_watchpoint): Adjust.
7723 (i386_low_stopped_data_address): Read the debug registers from the
7724 inferior instead of from the mirrors.
7725 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7726 (i386_dr_low_get_addr): Declare.
7727 (i386_dr_low_get_control): Declare.
7728 (i386_dr_low_get_status): Change prototype.
7730 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7731 (i386_dr_low_get_addr): New.
7732 (i386_dr_low_get_control): New.
7733 (i386_dr_low_get_status): Adjust prototype. Return
7735 (i386_initial_stuff): Clear dr_status_mirror and
7737 (i386_get_thread_context): Adjust.
7738 (i386_set_thread_context): Adjust.
7739 (i386_thread_added): Adjust.
7741 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7743 * linux-low.h (linux_thread_area): Delete declaration.
7745 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7747 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7748 after its termination.
7750 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7752 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7753 (gdb_wants_all_stopped): Delete.
7754 (linux_wait_1): Don't call them.
7755 * server.c (handle_v_cont): Tag all threads as want-stopped.
7756 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7757 stopped as "client-wants-stopped".
7759 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7761 * Makefile.in (signals_h): New.
7762 (server_h): Depend on it.
7763 (server.o): Don't depend on $(signals_def).
7764 (signals.o): Depend on $(signals_def).
7766 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7768 * Makefile.in (signals_def): New.
7769 (server_h): Append include/gdb/signals.h and signals_def.
7770 (server.o): Append signals_def.
7772 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7774 * server.c (handle_target_event): Use target_signal_to_host for
7775 resume_info.sig initialization.
7776 * target.h (struct thread_resume) <sig>: New comment.
7778 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7780 * server.c (handle_query): strcpy() the returned string from paddress()
7781 instead of sprintf().
7782 * utils.c (paddress): Return phex_nz().
7784 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7786 * server.c (handle_v_cont): Call mourn_inferior if process
7788 (myresume): Likewise.
7790 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7792 Static tracepoints, and integration with UST.
7794 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7795 * mem-break.c (uninsert_all_breakpoints)
7796 (reinsert_all_breakpoints): New.
7797 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7798 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7799 (gdb_agent_ust_loaded, helper_thread_id)
7800 (gdb_agent_helper_thread_id): New macros.
7801 (struct ipa_sym_addresses): Add addr_ust_loaded,
7802 addr_helper_thread_id, addr_cmd_buf.
7803 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7804 (in_process_agent_loaded_ust): New.
7805 (write_e_ust_not_loaded): New.
7806 (maybe_write_ipa_ust_not_loaded): New.
7807 (struct collect_static_trace_data_action): New.
7808 (enum tracepoint_type) <static_tracepoint>: New.
7809 (struct tracepoint) <handle>: Mention static tracepoints.
7810 (struct static_tracepoint_ctx): New.
7811 (CMD_BUF_SIZE): New.
7812 (add_tracepoint_action): Handle static tracepoint actions.
7813 (unprobe_marker_at): New.
7814 (clear_installed_tracepoints): Handle static tracepoints.
7815 (cmd_qtdp): Handle static tracepoints.
7816 (probe_marker_at): New.
7817 (cmd_qtstart): Handle static tracepoints.
7818 (response_tracepoint): Handle static tracepoints.
7819 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7820 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7821 (get_context_regcache): Handle static tracepoints.
7822 (do_action_at_tracepoint): Handle static tracepoint actions.
7823 (traceframe_find_block_type): Handle static trace data blocks.
7824 (traceframe_read_sdata): New.
7825 (download_tracepoints): Download static tracepoint actions.
7826 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7827 (GDB_PROBE_NAME): New.
7832 (ust_marker_to_static_tracepoint): New.
7834 (collect_ust_data_at_tracepoint): New.
7835 (gdb_ust_probe): New.
7836 (UNIX_PATH_MAX, SOCK_DIR): New.
7837 (gdb_ust_connect_sync_socket): New.
7838 (resume_thread, stop_thread): New.
7839 (run_inferior_command): New.
7840 (init_named_socket): New.
7841 (gdb_ust_socket_init): New.
7842 (cstr_to_hexstr): New.
7844 (first_marker, next_marker): New.
7845 (response_ust_marker): New.
7846 (cmd_qtfstm, cmd_qtsstm): New.
7847 (unprobe_marker_at, probe_marker_at): New.
7848 (cmd_qtstmat, gdb_ust_thread): New.
7849 (gdb_ust_init): New.
7850 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7851 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7853 (x86_64_st_collect_regmap): New.
7854 (X86_64_NUM_ST_COLLECT_GREGS): New.
7855 (AMD64_RIP_REGNUM): New.
7856 (supply_static_tracepoint_registers): New.
7857 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7859 (i386_st_collect_regmap): New.
7860 (i386_NUM_ST_COLLECT_GREGS): New.
7861 (supply_static_tracepoint_registers): New.
7862 * server.c (handle_query): Handle qXfer:statictrace:read.
7863 <qSupported>: Report support for StaticTracepoints, and
7864 qXfer:statictrace:read features.
7865 * server.h (traceframe_read_sdata)
7866 (supply_static_tracepoint_registers): Declare.
7867 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7868 (unpack_varlen_hex): Include in IPA build.
7869 * Makefile.in (ustlibs, ustinc): New.
7870 (IPA_OBJS): Add remote-utils-ipa.o.
7871 ($(IPA_LIB)): Link -ldl and -lpthread.
7873 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7874 * config.in, configure: Regenerate.
7876 2010-06-20 Ian Lance Taylor <iant@google.com>
7877 Pedro Alves <pedro@codesourcery.com>
7879 * linux-x86-low.c (always_true): Delete.
7880 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7881 trying to fool the compiler with always_true.
7883 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7885 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7886 conditions in gdbserver.
7888 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7890 * spu-low.c (spu_read_memory): Wrap around local store limit.
7891 (spu_write_memory): Likewise.
7893 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7895 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7896 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7898 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7900 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7901 uses with LONGEST uses.
7903 2010-06-14 Stan Shebs <stan@codesourcery.com>
7904 Pedro Alves <pedro@codesourcery.com>
7908 * linux-x86-low.c: Include limits.h.
7913 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7914 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7915 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7916 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7917 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7918 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7919 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7920 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7921 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7922 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7923 (amd64_emit_void_call_2): New.
7924 (amd64_emit_ops): New.
7925 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7926 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7927 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7928 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7929 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7930 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7931 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7932 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7933 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7934 (i386_emit_stack_adjust, i386_emit_int_call_1)
7935 (i386_emit_void_call_2): New.
7936 (i386_emit_ops): New.
7937 (x86_emit_ops): New.
7938 (the_low_target): Install x86_emit_ops.
7939 * server.h (struct emit_ops): New.
7940 (get_raw_reg_func_addr): Declare.
7941 (current_insn_ptr, emit_error): Declare.
7942 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7943 (set_trace_state_variable_value): New defines.
7944 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7945 addr_get_trace_state_variable_value and
7946 addr_set_trace_state_variable_value.
7947 (symbol_list): New fields for get_raw_reg,
7948 get_trace_state_variable_value and set_trace_state_variable_value.
7949 (condfn): New typedef.
7950 (struct tracepoint): New field `compiled_cond'.
7951 (do_action_at_tracepoint): Clear compiled_cond.
7952 (get_trace_state_variable_value, set_trace_state_variable_value):
7954 (condition_true_at_tracepoint): If there's a compiled condition,
7956 (current_insn_ptr, emit_error): New globals.
7957 (struct bytecode_address): New.
7958 (get_raw_reg_func_addr): New.
7959 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7960 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7961 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7962 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7963 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7964 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7965 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7966 (compile_tracepoint_condition, compile_bytecodes): New.
7967 * target.h (emit_ops): Forward declare.
7968 (struct target_ops): New field emit_ops.
7969 (target_emit_ops): New.
7970 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7971 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7972 * linux-low.c (linux_emit_ops): New.
7973 (linux_target_ops): Install it.
7974 * linux-low.h (struct linux_target_ops): New field emit_ops.
7976 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7978 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7979 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7981 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7982 Stan Shebs <stan@codesourcery.com>
7984 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7985 (all): Depend on $(extra_libraries).
7986 (install-only): Install the IPA.
7987 (IPA_OBJS, IPA_LIB): New.
7988 (clean): Remove the IPA lib.
7989 (IPAGENT_CFLAGS): New.
7990 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7991 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7992 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7993 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7994 * configure.ac: Check for atomic builtins support in the compiler.
7995 (IPA_DEPFILES, extra_libraries): Define.
7996 * configure.srv (ipa_obj): Add description.
7997 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7998 (i[34567]86-*-linux*): Set ipa_obj.
7999 (x86_64-*-linux*): Set ipa_obj.
8000 * linux-low.c (stabilizing_threads): New.
8001 (supports_fast_tracepoints): New.
8002 (linux_detach): Stabilize threads before detaching.
8003 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8004 the lwp is either not stabilizing, or is moving out of a jump pad.
8005 (linux_fast_tracepoint_collecting): New.
8006 (maybe_move_out_of_jump_pad): New.
8007 (enqueue_one_deferred_signal): New.
8008 (dequeue_one_deferred_signal): New.
8009 (linux_wait_for_event_1): If moving out of a jump pad, defer
8010 pending signals to later.
8011 (linux_stabilize_threads): New.
8012 (linux_wait_1): Check if threads need moving out of jump pads, and
8014 (stuck_in_jump_pad_callback): New.
8015 (move_out_of_jump_pad_callback): New.
8017 (linux_resume_one_lwp): Handle moving out of jump pads.
8018 (linux_set_resume_request): Dequeue deferred signals.
8019 (need_step_over_p): Also step over fast tracepoint jumps.
8020 (start_step_over): Also uninsert fast tracepoint jumps.
8021 (finish_step_over): Also reinsert fast tracepoint jumps.
8022 (linux_install_fast_tracepoint_jump): New.
8023 (linux_target_ops): Install linux_stabilize_threads and
8024 linux_install_fast_tracepoint_jump_pad.
8025 * linux-low.h (linux_target_ops) <get_thread_area,
8026 install_fast_tracepoint_jump_pad>: New fields.
8027 (struct lwp_info) <collecting_fast_tracepoint,
8028 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8029 (linux_get_thread_area): Declare.
8030 * linux-x86-low.c (jump_insn): New.
8031 (x86_get_thread_area): New.
8032 (append_insns): New.
8034 (amd64_install_fast_tracepoint_jump_pad): New.
8035 (i386_install_fast_tracepoint_jump_pad): New.
8036 (x86_install_fast_tracepoint_jump_pad): New.
8037 (the_low_target): Install x86_get_thread_area and
8038 x86_install_fast_tracepoint_jump_pad.
8039 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8040 (struct fast_tracepoint_jump): New.
8041 (fast_tracepoint_jump_insn): New.
8042 (fast_tracepoint_jump_shadow): New.
8043 (find_fast_tracepoint_jump_at): New.
8044 (fast_tracepoint_jump_here): New.
8045 (delete_fast_tracepoint_jump): New.
8046 (set_fast_tracepoint_jump): New.
8047 (uninsert_fast_tracepoint_jumps_at): New.
8048 (reinsert_fast_tracepoint_jumps_at): New.
8049 (set_breakpoint_at): Use write_inferior_memory.
8050 (uninsert_raw_breakpoint): Use write_inferior_memory.
8051 (check_mem_read): Mask out fast tracepoint jumps.
8052 (check_mem_write): Mask out fast tracepoint jumps.
8053 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8054 (set_fast_tracepoint_jump): Declare.
8055 (delete_fast_tracepoint_jump)
8056 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8057 (reinsert_fast_tracepoint_jumps_at): Declare.
8058 * regcache.c: Don't compile many functions when building the
8059 in-process agent library.
8060 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8061 the register buffer in the heap.
8062 (free_register_cache): If the register buffer isn't owned by the
8063 regcache, don't free it.
8064 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8065 pre-existing register caches.
8066 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8068 (convert_ascii_to_int): : Constify `from' parameter type.
8069 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8070 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8071 the needed buffer in-place.
8072 (relocate_instruction): New.
8073 * server.c (handle_query) <qSymbols>: If the target supports
8074 tracepoints, give it a chance of looking up symbols. Report
8075 support for fast tracepoints.
8076 (handle_status): Stabilize threads.
8077 (process_serial_event): Adjust.
8078 * server.h (struct fast_tracepoint_jump): Forward declare.
8079 (struct process_info) <fast_tracepoint_jumps>: New field.
8080 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8081 (decode_X_packet, decode_M_packet): Adjust.
8082 (relocate_instruction): Declare.
8083 (in_process_agent_loaded): Declare.
8084 (tracepoint_look_up_symbols): Declare.
8085 (struct fast_tpoint_collect_status): Declare.
8086 (fast_tracepoint_collecting): Declare.
8087 (force_unlock_trace_buffer): Declare.
8088 (handle_tracepoint_bkpts): Declare.
8089 (initialize_low_tracepoint)
8090 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8091 * target.h (struct target_ops) <stabilize_threads,
8092 install_fast_tracepoint_jump_pad>: New fields.
8093 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8094 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8095 [HAVE_STDINT_H]: Include stdint.h.
8096 (trace_debug_1): Rename to ...
8097 (trace_vdebug): ... this.
8098 (trace_debug): Rename to ...
8099 (trace_debug_1): ... this. Add `level' parameter.
8101 (ATTR_USED, ATTR_NOINLINE): New.
8102 (IP_AGENT_EXPORT): New.
8103 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8104 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8105 (about_to_request_buffer_space, trace_buffer_is_full)
8106 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8107 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8108 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8109 (traceframe_write_count, traceframes_created)
8110 (trace_state_variables)
8111 New renaming defines.
8112 (struct ipa_sym_addresses): New.
8113 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8115 (ipa_sym_addrs): New.
8116 (all_tracepoint_symbols_looked_up): New.
8117 (in_process_agent_loaded): New.
8118 (write_e_ipa_not_loaded): New.
8119 (maybe_write_ipa_not_loaded): New.
8120 (tracepoint_look_up_symbols): New.
8121 (debug_threads) [IN_PROCESS_AGENT]: New.
8122 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8123 (UNKNOWN_SIDE_EFFECTS): New.
8124 (stop_tracing): New.
8125 (flush_trace_buffer): New.
8126 (stop_tracing_bkpt): New.
8127 (flush_trace_buffer_bkpt): New.
8128 (read_inferior_integer): New.
8129 (read_inferior_uinteger): New.
8130 (read_inferior_data_pointer): New.
8131 (write_inferior_data_pointer): New.
8132 (write_inferior_integer): New.
8133 (write_inferior_uinteger): New.
8134 (struct collect_static_trace_data_action): Delete.
8135 (enum tracepoint_type): New.
8136 (struct tracepoint) <type>: New field `type'.
8137 <actions_str, step_actions, step_actions_str>: Only include in
8139 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8140 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8141 (tracepoints): Use IP_AGENT_EXPORT.
8142 (last_tracepoint): Don't include in the IPA.
8143 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8144 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8145 (alloced_trace_state_variables): New.
8146 (trace_state_variables): Use IP_AGENT_EXPORT.
8147 (traceframe_t): Delete unused variable.
8148 (circular_trace_buffer): Don't include in the IPA.
8149 (trace_buffer_start): Delete.
8150 (struct trace_buffer_control): New.
8151 (trace_buffer_free): Delete.
8152 (struct ipa_trace_buffer_control): New.
8153 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8154 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8156 (trace_buffer_ctrl): New.
8157 (TRACE_BUFFER_CTRL_CURR): New.
8158 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8159 Reimplement as macros.
8160 (trace_buffer_wrap): Delete.
8161 (traceframe_write_count, traceframe_read_count)
8162 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8163 (struct tracepoint_hit_ctx) <type>: New field.
8164 (struct fast_tracepoint_ctx): New.
8165 (memory_barrier): New.
8167 (record_tracepoint_error): Update atomically in the IPA.
8168 (clear_inferior_trace_buffer): New.
8169 (about_to_request_buffer_space): New.
8170 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8171 updating the same buffer.
8172 (add_tracepoint): Default the tracepoint's type to trap
8173 tracepoint, and orig_size to -1.
8174 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8176 (create_trace_state_variable): New parameter `gdb'. Handle it.
8177 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8178 (cmd_qtdp): Handle fast tracepoints.
8180 (max_jump_pad_size): New.
8181 (gdb_jump_pad_head): New.
8182 (get_jump_space_head): New.
8183 (claim_jump_space): New.
8184 (sort_tracepoints): New.
8185 (MAX_JUMP_SIZE): New.
8186 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8188 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8189 support. Upload fast traceframes, and delete internal IPA
8191 (stop_tracing_handler): New.
8192 (flush_trace_buffer_handler): New.
8193 (cmd_qtstop): Upload fast tracepoints.
8194 (response_tracepoint): Handle fast tracepoints.
8195 (tracepoint_finished_step): Upload fast traceframes. Set the
8196 tracepoint hit context's tracepoint type.
8197 (handle_tracepoint_bkpts): New.
8198 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8199 type. Add comment about fast tracepoints.
8200 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8201 non-existing action_str field.
8202 (get_context_regcache): Handle fast tracepoints.
8203 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8205 (fast_tracepoint_from_jump_pad_address): New.
8206 (fast_tracepoint_from_ipa_tpoint_address): New.
8207 (collecting_t): New.
8208 (force_unlock_trace_buffer): New.
8209 (fast_tracepoint_collecting): New.
8212 (write_inferior_data_ptr): New.
8213 (target_tp_heap): New.
8214 (target_malloc): New.
8215 (download_agent_expr): New.
8217 (download_tracepoints): New.
8218 (download_trace_state_variables): New.
8219 (upload_fast_traceframes): New.
8220 (IPA_FIRST_TRACEFRAME): New.
8221 (IPA_NEXT_TRACEFRAME_1): New.
8222 (IPA_NEXT_TRACEFRAME): New.
8223 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8224 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8225 (gdb_jump_pad_buffer_end): New.
8226 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8227 (initialize_tracepoint): Adjust.
8228 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8229 buffer. Initialize the low module.
8230 * utils.c (PREFIX, TOOLNAME): New.
8231 (malloc_failure): Use PREFIX.
8232 (error): In the IPA, an error causes an exit.
8233 (fatal, warning): Use PREFIX.
8234 (internal_error): Use TOOLNAME.
8235 (NUMCELLS): Increase to 10.
8236 * configure, config.in: Regenerate.
8238 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8240 * server.c (handle_query) <qSupported>: Do two passes over the
8241 qSupported string to avoid nesting strtok.
8243 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8245 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8247 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8249 * configure: Regenerate.
8250 * proc-service.list: New.
8252 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8254 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8257 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8259 * gdbreplay.c (remote_open): Check error return from socket() call by
8260 its equality to -1 not by it being negative.
8261 * remote-utils.c (remote_open): Likewise.
8263 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8265 * config.h: Regenerate.
8267 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8269 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8270 doesn't provide PTRACE_GET_THREAD_AREA.
8272 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8274 * linux-m68k-low.c: Include <asm/ptrace.h>
8275 (ps_get_thread_area): Implement.
8277 2010-05-03 Doug Evans <dje@google.com>
8279 * event-loop.c (struct callback_event): New struct.
8280 (callback_list): New global.
8281 (append_callback_event, delete_callback_event): New functions.
8282 (process_callback): New function.
8283 (start_event_loop): Call it.
8284 * remote-utils.c (NOT_SCHEDULED): Define.
8285 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8286 moved out of readchar.
8287 (readchar): Rewrite. Call reschedule before returning.
8288 (reset_readchar): New function.
8289 (remote_close): Call it.
8290 (process_remaining, reschedule): New functions.
8291 * server.h (callback_handler_func): New typedef.
8292 (append_callback_event, delete_callback_event): Declare.
8294 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8296 * proc-service.c (ps_pglobal_lookup): Use
8297 thread_db_look_up_one_symbol.
8298 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8299 parameter. Use it instead of all_symbols_looked_up.
8300 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8302 (all_symbols_looked_up): Don't declare.
8303 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8304 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8306 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8307 Set all_symbols_looked_up here.
8308 (thread_db_look_up_one_symbol): New.
8309 (thread_db_get_tls_address): Adjust.
8310 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8311 thread_db object on the heap, and tentatively set it in the
8313 (thread_db_init): Don't set all_symbols_looked_up here.
8314 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8316 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8318 * linux-low.c (linux_kill, linux_detach): Adjust.
8319 (status_pending_p_callback): Remove redundant statement. Check
8320 for !TARGET_WAITIKIND_IGNORE, instead of
8321 TARGET_WAITKIND_STOPPED.
8322 (handle_tracepoints): Make sure LWP is locked. Adjust.
8323 (linux_wait_for_event_1): Adjust.
8324 (linux_cancel_breakpoints): New.
8325 (unsuspend_one_lwp): New.
8326 (unsuspend_all_lwps): New.
8327 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8328 (send_sigstop_callback): Change return type to int, add new
8329 `except' parameter and handle it.
8330 (suspend_and_send_sigstop_callback): New.
8331 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8332 pass them down. If SUSPEND, also increment the lwp's suspend
8334 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8335 (need_step_over_p): Don't consider suspended LWPs.
8336 (start_step_over): Adjust.
8337 (proceed_one_lwp): Change return type to int, add new `except'
8338 parameter and handle it.
8339 (unsuspend_and_proceed_one_lwp): New.
8340 (proceed_all_lwps): Use find_inferior instead of
8342 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8343 also decrement the suspend count of LWPs. Pass `except' down,
8344 instead of hacking its suspend count.
8345 (linux_pause_all): Add `freeze' parameter. Adjust.
8346 (linux_unpause_all): New.
8347 (linux_target_ops): Install linux_unpause_all.
8348 * server.c (handle_status): Adjust.
8349 * target.h (struct target_ops): New fields `unpause_all' and
8350 `cancel_breakpoints'. Add new parameter to `pause_all'.
8351 (pause_all): Add new `freeze' parameter.
8353 (cancel_breakpoints): New.
8354 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8356 (cmd_qtstart): Pause threads.
8357 (stop_tracing): Pause threads, and cancel breakpoints.
8358 * win32-low.c (win32_target_ops): Adjust.
8360 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8362 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8363 the inferior right away from here...
8364 (linux_wait_1): ... to here, and adjust to check the thread's
8365 last_resume_kind instead of the lwp's step or stop_expected flags.
8367 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8369 * README: Use consistent `GDB' and `GDBserver' spellings.
8371 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8373 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8374 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8375 (linux_detach_one_lwp): Assume the lwp is stopped.
8376 (any_thread_of): Delete.
8377 (linux_detach): Stop all lwps here. Don't blindly delete all
8379 (delete_lwp_callback): New.
8380 (linux_mourn): Delete all lwps of the process that is gone.
8381 (linux_wait_1): Don't delete the last lwp of the process here.
8382 * mem-break.h (mark_breakpoints_out): Declare.
8383 * mem-break.c (mark_breakpoints_out): New.
8384 (free_all_breakpoints): Use it.
8385 * server.c (handle_target_event): If the process is gone, mark
8387 * thread-db.c (struct thread_db) <create_bp>: New field.
8388 (thread_db_enable_reporting): Fix prototype. Store a thread event
8389 breakpoint reference in the thread_db struct.
8390 (thread_db_load_search): Clear the thread_db object.
8391 (try_thread_db_load_1): Ditto.
8392 (switch_to_process): New.
8393 (disable_thread_event_reporting): Use it.
8394 (remove_thread_event_breakpoints): New.
8395 (thread_db_detach, thread_db_mourn): Use it.
8397 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8399 * linux-low.c (linux_enable_event_reporting): New.
8400 (linux_wait_for_event_1, handle_extended_wait): Use it.
8402 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8404 * linux-low.c (linux_kill_one_lwp, linux_kill)
8405 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8406 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8407 SIGSTOP even if the LWP is stopped.
8408 (send_sigstop_callback): New.
8409 (stop_all_lwps): Use send_sigstop_callback instead.
8410 (linux_resume_one_thread): Adjust.
8411 (proceed_one_lwp): Still proceed an LWP that the client has
8412 requested to stop, if we haven't reported it as stopped yet. Make
8413 sure that LWPs the client want stopped, have a pending SIGSTOP.
8415 2010-04-26 Doug Evans <dje@google.com>
8417 * server.c (handle_general_set): Make static.
8419 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8420 Print received char after testing for error/eof instead of before.
8421 (input_interrupt): Tweak comment.
8423 2010-04-23 Doug Evans <dje@google.com>
8425 * server.c (start_inferior): Print inferior argv if --debug.
8427 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8429 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8430 * nto-x86-low.c: Include server.h
8432 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8434 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8435 be consistent with other sources of this directory.
8436 (init_registers_amd64): Correct name of source file of this function
8439 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8441 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8444 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8446 * win32-i386-low.c: Add 64-bit support.
8447 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8448 (init_registers_amd64): Declare.
8449 (mappings): Add 64-bit version of array.
8450 (init_windows_x86): New function.
8451 (the_low_target): Change init_arch field to init_windows_x86.
8453 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8455 * win32-low.c: Adapt to support also 64-bit architecture.
8456 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8457 (get_image_name): Use SIZE_T type for local variable `done'.
8458 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8459 (toolhelp_get_dll_name): Idem.
8460 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8461 Use uintptr_t typecast to avoid warning.
8462 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8463 (handle_exception): Use phex_nz to avoid warning.
8464 (win32_wait): Remove unused local variable `process'.
8466 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8468 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8471 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8473 * configure.ac: Use `ws2_32' library for srv_mingw.
8474 * configure: Regenerate.
8475 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8476 * remote-utils.c: Likewise.
8478 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8480 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8481 if __x86_64__ is defined.
8483 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8485 * configure: Regenerate.
8487 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8489 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8490 * target.h (target_ops): New get_tib_address field.
8491 * win32-low.h (win32_thread_info): Add thread_local_base field.
8492 * win32-low.c (child_add_thread): Add tlb argument.
8493 Set thread_local_base field to TLB.
8494 (get_child_debug_event): Adapt to child_add_thread change.
8495 (win32_get_tib_address): New function.
8496 (win32_target_ops): Set get_tib_address field to
8497 win32_get_tib_address.
8498 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8500 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8502 * linux-low.c (linux_mourn): Also remove the process.
8503 * server.c (handle_target_event): Don't remove the process here.
8504 * nto-low.c (nto_mourn): New.
8505 (nto_target_ops): Install it.
8506 * spu-low.c (spu_mourn): New.
8507 (spu_target_ops): Install it.
8508 * win32-low.c (win32_mourn): New.
8509 (win32_target_ops): Install it.
8511 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8513 * server.h (buffer_xml_printf): Remove redundant `;'.
8515 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8517 * regcache.c (set_register_cache): Invalidate regcaches before
8518 changing the register cache layout.
8519 (regcache_invalidate_one): Allow a NULL regcache.
8520 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8521 regcaches before changing the register cache layout or the target
8524 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8526 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8527 variable warning on Linux/x86-64.
8529 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8531 GDBserver disconnected tracing support.
8533 * linux-low.c (linux_remove_process): Delete.
8534 (add_lwp): Don't set last_resume_kind here.
8535 (linux_kill): Use `mourn'.
8536 (linux_detach): Use `thread_db_detach', and `mourn'.
8538 (linux_attach_lwp_1): Adjust comment.
8539 (linux_attach): last_resume_kind moved the thread_info; adjust.
8540 (status_pending_p_callback): Adjust.
8541 (linux_wait_for_event_1): Adjust.
8542 (count_events_callback, select_singlestep_lwp_callback)
8543 (select_event_lwp_callback, cancel_breakpoints_callback)
8544 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8545 (proceed_one_lwp): Adjust.
8546 (linux_async): Add debug output.
8547 (linux_thread_stopped): New.
8548 (linux_pause_all): New.
8549 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8551 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8552 (thread_db_free): Delete declaration.
8553 (thread_db_detach, thread_db_mourn): Declare.
8554 * thread-db.c (thread_db_init): Use thread_db_mourn.
8555 (thread_db_free): Delete, split in two.
8556 (disable_thread_event_reporting): New.
8557 (thread_db_detach): New.
8558 (thread_db_mourn): New.
8560 * server.h (struct thread_info) <last_resume_kind>: New field.
8561 <attached>: Add comment.
8562 <gdb_detached>: New field.
8563 (handler_func): Change return type to int.
8564 (handle_serial_event, handle_target_event): Ditto.
8565 (gdb_connected): Declare.
8567 (disconnected_tracing): Declare.
8568 (stop_tracing): Declare.
8570 * server.c (handle_query) <qSupported>: Report support for
8571 disconnected tracing.
8572 (queue_stop_reply_callback): Account for running threads.
8573 (gdb_wants_thread_stopped): New.
8574 (gdb_wants_all_threads_stopped): New.
8575 (gdb_reattached_process): New.
8576 (handle_status): Clear the `gdb_detached' flag of all processes.
8577 In all-stop, stop all threads.
8578 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8579 (process_serial_event): If the remote connection breaks, or if an
8580 exit was forced with "monitor exit", force an event loop exit.
8581 Handle disconnected tracing on detach.
8582 (handle_serial_event): Adjust.
8583 (handle_target_event): If GDB isn't connected, forward events back
8584 to the inferior, unless the last process exited, in which case,
8585 exit gdbserver. Adjust interface.
8587 * remote-utils.c (remote_open): Don't block in accept. Instead
8588 register an event loop source on the listen socket file
8589 descriptor. Refactor bits into ...
8590 (listen_desc): ... this new global.
8591 (gdb_connected): ... this new function.
8592 (enable_async_notification): ... this new function.
8593 (handle_accept_event): ... this new function.
8594 (remote_close): Clear remote_desc.
8596 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8598 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8600 (mourn_inferior): Define.
8601 (target_process_qsupported): Avoid the dangling else problem.
8602 (thread_stopped): Define.
8603 (pause_all): Define.
8604 (target_waitstatus_to_string): Declare.
8605 * target.c (target_waitstatus_to_string): New.
8607 * tracepoint.c (tracing): Make extern.
8608 (disconnected_tracing): New.
8609 (stop_tracing): Make extern. Handle tracing stops due to GDB
8611 (cmd_qtdisconnected): New.
8612 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8613 (handle_tracepoint_general_set): Handle QTDisconnected.
8615 * event-loop.c (event_handler_func): Change return type to int.
8616 (process_event): Bail out if the event handler wants the event
8618 (handle_file_event): Ditto.
8619 (start_event_loop): Bail out if the event handler wants the event
8622 * nto-low.c (nto_target_ops): Adjust.
8623 * spu-low.c (spu_wait): Don't remove the process here.
8624 (spu_target_ops): Adjust.
8625 * win32-low.c (win32_wait): Don't remove the process here.
8626 (win32_target_ops): Adjust.
8628 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8630 * regcache.c (realloc_register_cache): Invalidate inferior's
8631 regcache before recreating it.
8633 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8635 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8637 2010-04-09 Stan Shebs <stan@codesourcery.com>
8638 Pedro Alves <pedro@codesourcery.com>
8640 * server.h (LONGEST): New.
8641 (struct thread_info) <while_stepping>: New field.
8642 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8644 (initialize_tracepoint, handle_tracepoint_general_set)
8645 (handle_tracepoint_query, tracepoint_finished_step)
8646 (tracepoint_was_hit, release_while_stepping_state_list):
8647 (current_traceframe): Declare.
8648 * server.c (handle_general_set): Handle tracepoint packets.
8650 (write_memory): New.
8651 (handle_search_memory_1): Use read_memory.
8652 (handle_query): Report support for conditional tracepoints, trace
8653 state variables, and tracepoint sources. Handle tracepoint
8655 (main): Initialize the tracepoints module.
8656 (process_serial_event): Handle traceframe reads/writes.
8658 * linux-low.c (handle_tracepoints): New.
8659 (linux_wait_1): Call it.
8660 (linux_resume_one_lwp): Handle while-stepping.
8661 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8662 (linux_target_ops): Install them.
8663 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8665 * linux-x86-low.c (x86_supports_tracepoints): New.
8666 (the_low_target). Install it.
8668 * mem-break.h (delete_breakpoint): Declare.
8669 * mem-break.c (delete_breakpoint): Make external.
8671 * target.h (struct target_ops): Add `supports_tracepoints',
8672 `read_pc', and `write_pc' fields.
8673 (target_supports_tracepoints): Define.
8674 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8677 * regcache.h (struct regcache) <registers_owned>: New field.
8678 (init_register_cache, regcache_cpy): Declare.
8679 (regcache_read_pc, regcache_write_pc): Declare.
8680 (register_cache_size): Declare.
8681 (supply_regblock): Declare.
8682 * regcache.c (init_register_cache): New.
8683 (new_register_cache): Use it.
8684 (regcache_cpy): New.
8685 (register_cache_size): New.
8686 (supply_regblock): New.
8687 (regcache_read_pc, regcache_write_pc): New.
8689 * tracepoint.c: New.
8691 * Makefile.in (OBS): Add tracepoint.o.
8692 (tracepoint.o): New rule.
8694 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8696 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8698 (i386-mmx.c): Likewise.
8699 (i386-mmx-linux.o): Likewise.
8700 (i386-mmx-linux.c): Likewise.
8702 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8703 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8704 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8705 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8707 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8708 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8709 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8711 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8713 * Makefile.in (clean): Updated.
8715 (i386-avx.c): Likewise.
8716 (i386-avx-linux.o): Likewise.
8717 (i386-avx-linux.c): Likewise.
8718 (amd64-avx.o): Likewise.
8719 (amd64-avx.c): Likewise.
8720 (amd64-avx-linux.o): Likewise.
8721 (amd64-avx-linux.c): Likewise.
8723 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8724 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8725 (srv_amd64_regobj): Add amd64-avx.o.
8726 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8727 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8728 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8729 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8730 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8731 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8732 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8734 * i387-fp.c: Include "i386-xstate.h".
8736 (i387_cache_to_xsave): Likewise.
8737 (i387_xsave_to_cache): Likewise.
8738 (x86_xcr0): Likewise.
8740 * i387-fp.h (i387_cache_to_xsave): Likewise.
8741 (i387_xsave_to_cache): Likewise.
8742 (x86_xcr0): Likewise.
8744 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8745 * linux-crisv32-low.c (target_regsets): Likewise.
8746 * linux-m68k-low.c (target_regsets): Likewise.
8747 * linux-mips-low.c (target_regsets): Likewise.
8748 * linux-ppc-low.c (target_regsets): Likewise.
8749 * linux-s390-low.c (target_regsets): Likewise.
8750 * linux-sh-low.c (target_regsets): Likewise.
8751 * linux-sparc-low.c (target_regsets): Likewise.
8752 * linux-xtensa-low.c (target_regsets): Likewise.
8754 * linux-low.c: Include <sys/uio.h>.
8755 (regsets_fetch_inferior_registers): Support nt_type.
8756 (regsets_store_inferior_registers): Likewise.
8757 (linux_process_qsupported): New.
8758 (linux_target_ops): Add linux_process_qsupported.
8760 * linux-low.h (regset_info): Add nt_type.
8761 (linux_target_ops): Add process_qsupported.
8763 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8765 (init_registers_i386_avx_linux): New.
8766 (init_registers_amd64_avx_linux): Likewise.
8767 (xmltarget_i386_linux_no_xml): Likewise.
8768 (xmltarget_amd64_linux_no_xml): Likewise.
8769 (PTRACE_GETREGSET): Likewise.
8770 (PTRACE_SETREGSET): Likewise.
8771 (x86_fill_xstateregset): Likewise.
8772 (x86_store_xstateregset): Likewise.
8773 (use_xml): Likewise.
8774 (x86_linux_update_xmltarget): Likewise.
8775 (x86_linux_process_qsupported): Likewise.
8776 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8777 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8778 init_registers_i386_linux here. Call
8779 x86_linux_update_xmltarget.
8780 (the_low_target): Add x86_linux_process_qsupported.
8782 * server.c (handle_query): Call target_process_qsupported.
8784 * target.h (target_ops): Add process_qsupported.
8785 (target_process_qsupported): New.
8787 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8789 * inferiors.c (add_thread): Set last_status kind to
8790 TARGET_WAITKIND_IGNORE.
8791 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8792 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8793 (linux_wait_1): Move `thread' local definition to block that uses
8794 it. Don't NULL initialize `event_child'.
8795 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8796 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8797 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8799 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8801 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8802 an extended waitstatus, or by a watchpoint.
8803 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8804 thread was stepping or has been stopped by a watchpoint.
8806 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8808 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8809 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8810 of another, then delete the previous, and validate all
8812 (validate_inserted_breakpoint): New.
8813 (delete_disabled_breakpoints): New.
8814 (validate_breakpoints): New.
8815 (check_mem_read): Validate breakpoints before trusting their
8816 shadow. Delete disabled breakpoints.
8817 (check_mem_write): Validate breakpoints before trusting they
8818 should be inserted. Delete disabled breakpoints.
8819 * mem-break.h (validate_breakpoints):
8820 * server.c (handle_query): Validate breakpoints when we see a
8823 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8825 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8826 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8827 if we could tell there's a GDB breakpoint at stop_pc.
8828 (need_step_over_p): Don't do a step over if we find a GDB
8829 breakpoint at the resume PC.
8831 * mem-break.c (struct raw_breakpoint): New.
8832 (enum bkpt_type): New type `gdb_breakpoint'.
8833 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8834 fields. New field `raw'.
8835 (find_raw_breakpoint_at): New.
8836 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8838 (set_breakpoint_at): Adjust.
8839 (delete_raw_breakpoint): New.
8840 (release_breakpoint): New.
8841 (delete_breakpoint): Rename to...
8842 (delete_breakpoint_1): ... this. Add proc parameter. Use
8843 release_breakpoint. Return ENOENT.
8844 (delete_breakpoint): Reimplement.
8845 (find_breakpoint_at): Delete.
8846 (find_gdb_breakpoint_at): New.
8847 (delete_breakpoint_at): Delete.
8848 (set_gdb_breakpoint_at): New.
8849 (delete_gdb_breakpoint_at): New.
8850 (gdb_breakpoint_here): New.
8851 (set_reinsert_breakpoint): Use release_breakpoint.
8852 (uninsert_breakpoint): Rename to ...
8853 (uninsert_raw_breakpoint): ... this.
8854 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8855 (reinsert_raw_breakpoint): Change parameter type to
8857 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8859 (check_breakpoints): Adjust. Use release_breakpoint.
8860 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8861 (breakpoint_inserted_here): Ditto.
8862 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8863 Don't trust the breakpoint's shadow if it is not inserted.
8864 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8865 (delete_all_breakpoints): Adjust.
8866 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8867 use delete_breakpoint_1.
8869 * mem-break.h (breakpoints_supported): Delete declaration.
8870 (set_gdb_breakpoint_at): Declare.
8871 (gdb_breakpoint_here): Declare.
8872 (delete_breakpoint_at): Delete.
8873 (delete_gdb_breakpoint_at): Declare.
8875 * server.h (struct raw_breakpoint): Forward declare.
8876 (struct process_info): New field `raw_breakpoints'.
8878 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8881 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8883 * linux-low.c (status_pending_p_callback): Fix comment.
8884 (linux_wait_for_event_1): Move most of the internal breakpoint
8885 handling from here...
8886 (linux_wait_1): ... to here.
8887 (count_events_callback): New.
8888 (select_singlestep_lwp_callback): New.
8889 (select_event_lwp_callback): New.
8890 (cancel_breakpoints_callback): New.
8891 (select_event_lwp): New.
8892 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8893 priority to all LWPs that have had events that should be reported
8894 to the client. Cancel breakpoints when about to reporting the
8895 event to the client, not while stopping lwps. No longer cancel
8896 finished single-steps here.
8897 (cancel_finished_single_step): Delete.
8898 (cancel_finished_single_steps): Delete.
8900 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8902 * mem-break.c (enum bkpt_type): New.
8903 (struct breakpoint): New field `type'.
8904 (set_breakpoint_at): Change return type to struct breakpoint
8905 pointer. Set type to `other_breakpoint' by default.
8906 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8907 in the breakpoint list.
8908 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8909 (reinsert_breakpoint): Rename to ...
8910 (reinsert_raw_breakpoint): ... this.
8911 (reinsert_breakpoints_at): Adjust.
8912 * mem-break.h (struct breakpoint): Declare.
8913 (set_breakpoint_at): Change return type to struct breakpoint
8916 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8918 * server.c (handle_query): Assign, not compare.
8920 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8922 Teach linux gdbserver to step-over-breakpoints.
8924 * linux-low.c (can_hardware_single_step): New.
8925 (supports_breakpoints): New.
8926 (handle_extended_wait): If stopping threads, read the stop pc of
8929 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8930 low target doesn't support retrieving the PC.
8931 (add_lwp): Set last_resume_kind to resume_continue.
8932 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8933 (linux_attach): Don't clear stop_expected. Set the lwp's
8934 last_resume_kind to resume_stop.
8935 (linux_detach_one_lwp): Don't check for removed breakpoints.
8936 (check_removed_breakpoint): Delete.
8937 (status_pending_p): Rename to ...
8938 (status_pending_p_callback): ... this. Don't check for removed
8939 breakpoints. Don't consider threads that are stopped from GDB's
8941 (linux_wait_for_lwp): Always read the stop_pc here.
8942 (cancel_breakpoint): New.
8943 (step_over_bkpt): New global.
8944 (linux_wait_for_event_1): Implement stepping over breakpoints.
8945 (gdb_wants_lwp_stopped): New.
8946 (gdb_wants_all_stopped): New.
8947 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8948 single-step traps here. Store the thread's last reported target
8950 (send_sigstop): Don't clear stop_expected. Always set it,
8952 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8953 (cancel_finished_single_step): New.
8954 (cancel_finished_single_steps): New.
8955 (wait_for_sigstop): Don't cancel finished single-step traps here.
8956 (linux_resume_one_lwp): Don't check for removed breakpoints.
8957 Don't set `step' on non-hardware step archs.
8958 (linux_set_resume_request): Ignore resume_stop requests if already
8959 stopping or stopped. Set the lwp's last_resume_kind.
8960 (resume_status_pending_p): Don't check for removed breakpoints.
8961 (need_step_over_p): New.
8962 (start_step_over): New.
8963 (finish_step_over): New.
8964 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8965 requests. Clear the thread's last reported target waitstatus.
8966 Don't use the `suspended' flag. Don't consider pending breakpoints.
8967 (linux_resume): Start a step-over if necessary.
8968 (proceed_one_lwp): New.
8969 (proceed_all_lwps): New.
8970 (unstop_all_lwps): New.
8971 * linux-low.h (struct lwp_info): Rewrite comment for the
8972 `suspended' flag. Add the `stop_pc' field. Delete the
8973 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8974 Add `'last_resume_kind' and `need_step_over' fields.
8975 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8976 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8977 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8978 (set_raw_breakpoint_at): New.
8979 (set_breakpoint_at): Rewrite to use it.
8980 (reinsert_breakpoint_handler): Delete.
8981 (set_reinsert_breakpoint): New.
8982 (reinsert_breakpoint_by_bp): Delete.
8983 (delete_reinsert_breakpoints): New.
8984 (uninsert_breakpoint): Rewrite.
8985 (uninsert_breakpoints_at): New.
8986 (reinsert_breakpoint): Rewrite.
8987 (reinsert_breakpoints_at): New.
8988 (check_breakpoints): Rewrite.
8989 (breakpoint_here): New.
8990 (breakpoint_inserted_here): New.
8991 (check_mem_read): Adjust.
8992 * mem-break.h (breakpoints_supported, breakpoint_here)
8993 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8994 (reinsert_breakpoint_by_bp): Delete declaration.
8995 (delete_reinsert_breakpoints): Declare.
8996 (reinsert_breakpoint): Delete declaration.
8997 (reinsert_breakpoints_at): Declare.
8998 (uninsert_breakpoint): Delete declaration.
8999 (uninsert_breakpoints_at): Declare.
9000 (check_breakpoints): Adjust prototype.
9001 * server.h: Adjust include order.
9002 (struct thread_info): Declare here. Add a `last_status' field.
9004 2010-03-23 Michael Snyder <msnyder@vmware.com>
9006 * server.c (crc32): New function.
9007 (handle_query): Add handling for 'qCRC:' request.
9009 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9011 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9012 lwp had been stopped by a watchpoint.
9014 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9016 * server.h (internal_error): Declare.
9017 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9018 * utils.c (internal_error): New function.
9020 2010-03-15 Andreas Schwab <schwab@redhat.com>
9022 * configure.srv: Fix typo setting srv_regobj.
9024 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9026 * linux-low.c (fetch_register): Avoid passing a non string literal
9028 (usr_store_inferior_registers): Ditto.
9030 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9032 * linux-low.c (linux_write_memory): Bail out early if peeking
9035 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9037 * linux-low.h (struct lwp_info): New fields
9038 `stopped_by_watchpoint' and `stopped_data_address'.
9039 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9040 here, and cache them in the lwp object.
9041 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9043 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9045 (linux_stopped_by_watchpoint): Rewrite.
9046 (linux_stopped_data_address): Rewrite.
9048 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9050 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9051 switching the current inferior, not before.
9053 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9055 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9056 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9057 i386-linux.c and amd64-linux.c.
9058 (reg-i386.o): Removed.
9059 (reg-i386.c): Likewise.
9060 (reg-i386-linux.o): Likewise.
9061 (reg-i386-linux.c): Likewise.
9062 (reg-x86-64.o): Likewise.
9063 (reg-x86-64.c): Likewise.
9064 (reg-x86-64-linux.o): Likewise.
9065 (reg-x86-64-linux.c): Likewise.
9068 (i386-linux.o): Likewise.
9069 (i386-linux.c): Likewise.
9070 (amd64.o): Likewise.
9071 (amd64.c): Likewise.
9072 (amd64-linux.o): Likewise.
9073 (amd64-linux.c): Likewise.
9075 * configure.srv (srv_i386_regobj): New.
9076 (srv_i386_linux_regobj): Likewise.
9077 (srv_amd64_regobj): Likewise.
9078 (srv_amd64_linux_regobj): Likewise.
9079 (srv_i386_32bit_xmlfiles): Likewise.
9080 (srv_i386_64bit_xmlfiles): Likewise.
9081 (srv_i386_xmlfiles): Likewise.
9082 (srv_amd64_xmlfiles): Likewise.
9083 (srv_i386_linux_xmlfiles): Likewise.
9084 (srv_amd64_linux_xmlfiles): Likewise.
9085 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9086 srv_xmlfiles to $srv_i386_xmlfiles.
9087 (i[34567]86-*-mingw32ce*): Likewise.
9088 (i[34567]86-*-mingw*): Likewise.
9089 (i[34567]86-*-nto*): Likewise.
9090 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9091 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9092 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9093 (x86_64-*-linux*): Likewise.
9095 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9096 (init_registers_amd64_linux): New.
9097 (x86_arch_setup): Replace init_registers_x86_64_linux with
9098 init_registers_amd64_linux.
9100 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9102 * configure.ac: Check for libdl. If it is not available link against
9103 static libthread_db.
9104 * configure: Regenerate.
9106 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9110 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9111 handing a read watchpoint.
9112 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9114 2010-02-12 Doug Evans <dje@google.com>
9116 * linux-low.c (linux_supports_tracefork_flag): Document.
9117 (linux_look_up_symbols): Add comment.
9119 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9121 * regcache.c (supply_register): Clear regcache if buf is NULL.
9123 2010-02-02 Nicolas Roche <roche@sourceware.org>
9124 Joel Brobecker <brobecker@adacore.com>
9126 * inferiors.c (find_inferior): Add function documentation.
9127 (unloaded_dll): Handle the case where the unloaded dll has not
9128 been previously registered in the dll list.
9130 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9132 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9133 (thumb2_breakpoint): New.
9134 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9136 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9138 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9139 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9142 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9144 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9146 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9148 * linux-s390-low.c (s390_collect_ptrace_register)
9149 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9151 2010-01-21 Doug Evans <dje@google.com>
9153 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9154 (PTRACE_ARG4_TYPE): New macro.
9155 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9156 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9157 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9158 (usr_store_inferior_registers): Ditto.
9159 (linux_read_memory, linux_write_memory): Ditto.
9160 (linux_test_for_tracefork): Ditto.
9162 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9163 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9165 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9167 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9170 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9172 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9173 prototype to take a regcache. Adjust.
9175 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9177 * regcache.h (struct thread_info): Forward declare.
9178 (struct regcache): New.
9179 (new_register_cache): Adjust prototype.
9180 (get_thread_regcache): Declare.
9181 (free_register_cache): Adjust prototype.
9182 (registers_to_string, registers_from_string): Ditto.
9183 (supply_register, supply_register_by_name, collect_register)
9184 (collect_register_as_string, collect_register_by_name): Ditto.
9185 * regcache.c (struct inferior_regcache_data): Delete.
9186 (get_regcache): Rename to ...
9187 (get_thread_regcache): ... this. Adjust. Switch inferior before
9189 (regcache_invalidate_one): Adjust.
9190 (regcache_invalidate): Fix prototype.
9191 (new_register_cache): Return the new register cache.
9192 (free_register_cache): Change prototype.
9193 (realloc_register_cache): Adjust.
9194 (registers_to_string): Change prototype to take a regcache. Adjust.
9195 (registers_from_string): Ditto.
9196 (register_data): Ditto.
9197 (supply_register): Ditto.
9198 (supply_register_by_name): Ditto.
9199 (collect_register): Ditto.
9200 (collect_register_as_string): Ditto.
9201 (collect_register_by_name): Ditto.
9202 * server.c (process_serial_event): Adjust.
9203 * linux-low.h (regset_fill_func, regset_store_func): Change
9205 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9207 * linux-low.c (get_stop_pc): Adjust.
9208 (check_removed_breakpoint): Adjust.
9209 (linux_wait_for_event): Adjust.
9210 (linux_resume_one_lwp): Adjust.
9211 (fetch_register): Add regcache parameter. Adjust.
9212 (usr_store_inferior_registers): Ditto.
9213 (regsets_fetch_inferior_registers): Ditto.
9214 (regsets_store_inferior_registers): Ditto.
9215 (linux_fetch_registers, linux_store_registers): Ditto.
9216 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9218 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9220 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9221 prototype to take a regcache.
9222 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9223 * remote-utils.c (convert_ascii_to_int, outreg)
9224 (prepare_resume_reply): Change prototype to take a regcache.
9226 * target.h (struct target_ops) <fetch_registers, store_registers>:
9227 Change prototype to take a regcache.
9228 (fetch_inferior_registers, store_inferior_registers): Change
9229 prototype to take a regcache. Adjust.
9230 * proc-service.c (ps_lgetregs): Adjust.
9231 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9232 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9233 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9234 take a regcache. Adjust.
9235 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9236 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9237 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9238 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9239 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9240 (cris_cannot_fetch_register):
9241 (cris_breakpoint_at): Change prototype to take a regcache.
9243 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9244 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9245 to take a regcache. Adjust.
9246 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9248 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9249 take a regcache. Adjust.
9250 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9251 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9252 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9253 * linux-mips-low.c (mips_get_pc):
9254 (mips_set_pc): Change prototype to take a regcache. Adjust.
9255 (mips_reinsert_addr): Adjust.
9256 (mips_collect_register): Change prototype to take a regcache.
9258 (mips_supply_register):
9259 (mips_collect_register_32bit, mips_supply_register_32bit)
9260 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9261 (mips_store_fpregset): Ditto.
9262 * linux-ppc-low.c (ppc_supply_ptrace_register)
9263 (ppc_supply_ptrace_register): Ditto.
9264 (parse_spufs_run): Adjust.
9265 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9266 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9267 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9268 take a regcache. Adjust.
9269 * linux-s390-low.c (s390_collect_ptrace_register)
9270 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9271 (s390_set_pc): Change prototype to take a regcache. Adjust.
9272 (s390_arch_setup): Adjust.
9273 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9274 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9275 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9276 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9277 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9279 (sparc_breakpoint_at): Adjust.
9280 * linux-xtensa-low.c (xtensa_fill_gregset):
9281 (xtensa_store_gregset):
9282 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9283 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9284 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9285 prototype to take a regcache. Adjust.
9286 * win32-arm-low.c (arm_fetch_inferior_register)
9287 (arm_store_inferior_register): Change prototype to take a
9289 * win32-i386-low.c (i386_fetch_inferior_register)
9290 (i386_store_inferior_register): Change prototype to take a
9292 * win32-low.c (child_fetch_inferior_registers)
9293 (child_store_inferior_registers): Change prototype to take a
9295 (win32_wait): Adjust.
9296 (win32_fetch_inferior_registers): Change prototype to take a
9298 (win32_store_inferior_registers): Adjust.
9299 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9300 store_inferior_register>: Change prototype to take a regcache.
9302 2010-01-20 Doug Evans <dje@google.com>
9304 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9306 (linux_wait_for_event1, linux_init_signals): Ditto.
9307 (W_STOPCODE): Provide definition if missing.
9309 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9311 * linux-low.c (linux_core_of_thread): New.
9312 (compare_ints, show_process, list_threads): New.
9313 (linux_qxfer_osdata): Report threads and cores.
9314 (linux_target_op): Register linux_core_of_thread.
9315 * remote-utils.c (prepare_resume_reply): Report the core.
9316 (buffer_xml_printf): Support %d specifier.
9317 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9319 (handle_query): Handle qXfer:threads. Announce availability
9321 * target.h (struct target_ops): New field core_of_thread.
9323 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9325 * Makefile.in (clean): Remove new generated files.
9326 (reg-s390.o, reg-s390.c): Remove rules.
9327 (reg-s390x.o, reg-s390x.c): Likewise.
9328 (s390-linux32.o, s390-linux32.c): Add rules.
9329 (s390-linux64.o, s390-linux64.c): Likewise.
9330 (s390x-linux64.o, s390x-linux64.c): Likewise.
9331 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9332 * linux-s390-low.c: Include <elf.h>.
9333 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9334 (init_registers_s390): Remove prototype.
9335 (init_registers_s390x): Likewise.
9336 (init_registers_s390_linux32): Add prototype.
9337 (init_registers_s390_linux64): Likewise.
9338 (init_registers_s390x_linux64): Likewise.
9339 (s390_num_regs_3264): New define.
9340 (s390_regmap_3264): New global variable.
9341 (s390_cannot_fetch_register): Remove obsolete check.
9342 (s390_cannot_store_register): Likewise.
9343 (s390_collect_ptrace_register): Handle upper/lower register halves.
9344 (s390_supply_ptrace_register): Likewise.
9345 (s390_fill_gregset): Update to register number changes.
9346 (s390_get_hwcap): New routine.
9347 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9348 Install appropriate regmap and register set.
9350 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9352 * server.c (gdbserver_version): Update copyright year to 2010.
9353 * gdbreplay.c (gdbreplay_version): Likewise.
9355 2009-12-28 Doug Evans <dje@google.com>
9357 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9358 elf/external.h. Include <elf.h> instead but only if necessary.
9360 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9362 * linux-low.c (linux_remove_process): Remove `detaching'
9363 parameter. Don't release/detach from thread_db here.
9364 (linux_kill): Release/detach from thread_db here, ...
9365 (linux_detach): ... and here, before actually detaching.
9366 (linux_wait_1): ... and here, when a process exits.
9367 * thread-db.c (any_thread_of): New.
9368 (thread_db_free): Switch the current inferior to a thread of the
9371 2009-12-21 Doug Evans <dje@google.com>
9373 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9375 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9376 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9377 warning ifndef __NR_tkill. Move setting of errno there too.
9378 Delete unnecessary resetting of errno after syscall.
9379 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9381 * configure.ac: Check for dladdr.
9382 * config.in: Regenerate.
9383 * configure: Regenerate.
9384 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9385 (try_thread_db_load): Update.
9387 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9389 2009-12-18 Doug Evans <dje@google.com>
9391 * event-loop.c: Include unistd.h if it exists.
9393 * linux-low.c (my_waitpid): Move definition away from being in
9394 between linux_tracefork_child/linux_test_for_tracefork.
9396 * gdb_proc_service.h (psaddr_t): Fix type.
9397 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9398 signature to match glibc.
9400 2009-12-16 Doug Evans <dje@google.com>
9402 * linux-low.c (linux_read_memory): Fix argument to read.
9404 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9406 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9407 events, don't leave current_inferior pointing at null.
9409 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9411 * win32-low.c (LOG): Delete.
9412 (OUTMSG): Output to stderr.
9413 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9414 on compile time LOG macro.
9415 (win32_wait): Fix debug output.
9417 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9419 * win32-low.c (win32_add_one_solib): If the dll name is
9420 "ntdll.dll", prepend the system directory to the dll path.
9422 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9424 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9426 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9427 Vladimir Prus <vladimir@codesourcery.com>
9429 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9430 * configure.ac: Check for __mcoldfire__ and set
9431 gdb_cv_m68k_is_coldfire.
9432 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9433 reg-cf.o and reg-m68k.o.
9434 * configure: Regenerated.
9436 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9438 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9439 Pass it to thread_db_free.
9440 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9441 proper `detaching' argument to linux_remove_process.
9442 * linux-low.h (thread_db_free): Add `detaching' parameter.
9443 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9445 (thread_db_free): Add `detaching' parameter. Only
9446 call td_ta_clear_event if detaching from process.
9448 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9450 * thread-db.c (thread_db_free): Fix typo.
9452 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9455 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9457 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9459 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9460 with an i686 compiler.
9461 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9463 * configure: Rebuilt.
9465 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9469 * server.c (handle_search_memory_1): Correct read_addr initialization
9470 in loop for searching subsequent chunks.
9472 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9474 * configure.ac: New --with-libthread-db option.
9475 * thread-db.c: Allow direct dependence on libthread_db.
9476 (thread_db_free): Adjust.
9477 * config.in: Regenerate.
9478 * configure: Likewise.
9480 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9483 * thread-db.c (attach_thread): New function.
9484 (maybe_attach_thread): Return success/failure.
9485 (find_new_threads_callback): Adjust.
9486 (thread_db_find_new_threads): Loop until no new threads.
9488 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9490 * proc-service.c (ps_lgetregs): Formatting.
9492 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9494 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9495 * configure.ac: Adjust.
9496 * linux-low.h (struct process_info_private): Move members to struct
9498 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9499 * linux-low.c (linux_remove_process): Adjust.
9500 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9501 * server.c (handle_query): Move code ...
9502 (handle_monitor_command): ... here. New function.
9503 * target.h (struct target_ops): New member.
9504 * thread-db.c (struct thread_db): New.
9505 (libthread_db_search_path): New variable.
9506 (thread_db_create_event, thread_db_enable_reporting)
9507 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9508 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9509 (try_thread_db_load_1, dladdr_to_soname): New functions.
9510 (try_thread_db_load, thread_db_load_search): New functions.
9511 (thread_db_init): Search for libthread_db.
9512 (thread_db_free): New function.
9513 (thread_db_handle_monitor_command): Likewise.
9514 * config.in: Regenerate.
9515 * configure: Regenerate.
9517 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9519 * spu-low.c (spu_kill): Wait for inferior to terminate.
9520 Call clear_inferiors.
9521 (spu_detach): Call clear_inferiors.
9523 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9525 * aclocal.m4: Regenerate.
9526 * config.in: Likewise.
9527 * configure: Likewise.
9529 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9531 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9532 (parse_spufs_run): New function.
9533 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9534 (ppc_breakpoint_at): Handle SPU breakpoints.
9536 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9538 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9539 (SPUFS_MAGIC): Define.
9540 (spu_enumerate_spu_ids): New function.
9541 (linux_qxfer_spu): New function.
9542 (linux_target_ops): Install linux_qxfer_spu.
9544 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9546 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9547 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9548 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9549 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9550 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9551 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9552 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9553 (init_registers_powerpc_cell32l): Add prototype.
9554 (init_registers_powerpc_cell64l): Likewise.
9555 (ppc_arch_setup): Detect Cell/B.E. architecture.
9557 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9559 * Makefile.in (datarootdir): New variable.
9561 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9563 * linux-low.c (linux_write_memory): Update debugging output.
9564 * Makefile.in (clean): Add new descriptions.
9565 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9566 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9567 * configure.srv: Add new files for arm*-*-linux*.
9568 * linux-arm-low.c: Add new declarations.
9569 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9570 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9571 (HWCAP_VFPv3D16): New.
9572 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9573 instead of __IWMMXT__.
9574 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9575 (arm_arch_setup): New.
9576 (target_regsets): Remove #ifdef. Add VFP regset.
9577 (the_low_target): Use arm_arch_setup.
9579 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9581 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9582 the main thread again.
9584 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9586 Adding Neutrino gdbserver.
9587 * configure: Regenerated.
9588 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9589 * configure.srv (i[34567]86-*-nto*): New target.
9590 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9591 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9592 (nto_comctrl) [__QNX__]: New function.
9593 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9595 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9597 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9600 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9601 Pedro Alves <pedro@codesourcery.com>
9603 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9604 don't support CONTEXT_EXTENDED_REGISTERS.
9605 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9606 (the_low_target): Install them.
9607 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9608 failing with ERROR_PIPE_NOT_CONNECTED.
9610 2009-06-30 Doug Evans <dje@google.com>
9611 Pierre Muller <muller@ics.u-strasbg.fr>
9613 Add h/w watchpoint support to x86-linux, win32-i386.
9614 * Makefile.in (SFILES): Add i386-low.c
9615 (i386_low_h): Define.
9616 (i386-low.o): Add dependencies.
9617 (linux-x86-low.o): Add i386-low.h dependency.
9618 (win32-i386-low.o): Ditto.
9619 * i386-low.c: New file.
9620 * i386-low.h: New file.
9621 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9622 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9623 * linux-low.c (linux_add_process): Initialize arch_private.
9624 (linux_remove_process): Free arch_private.
9625 (add_lwp): Initialize arch_private.
9626 (delete_lwp): Free arch_private.
9627 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9629 * linux-low.h (process_info_private): New member arch_private.
9630 (lwp_info): New member arch_private.
9631 (linux_target_ops): New members new_process, new_thread,
9633 (ptid_of): New macro.
9634 * linux-x86-low.c: Include stddef.h, i386-low.h.
9635 (arch_process_info): New struct.
9636 (arch_lwp_info): New struct.
9637 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9638 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9639 (i386_dr_low_get_status): New function.
9640 (x86_insert_point, x86_remove_point): New functions.
9641 (x86_stopped_by_watchpoint): New function.
9642 (x86_stopped_data_address): New function.
9643 (x86_linux_new_process, x86_linux_new_thread): New functions.
9644 (x86_linux_prepare_to_resume): New function.
9645 (the_low_target): Add entries for insert_point, remove_point,
9646 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9648 * server.c (debug_hw_points): New global.
9649 (monitor_show_help): Document set debug-hw-points.
9650 (handle_query): Process "set debug-hw-points".
9651 * server.h (debug_hw_points): Declare.
9652 (paddress): Declare.
9653 * utils.c (NUMCELLS, CELLSIZE): New macros.
9654 (get_sell, xsnprintf, paddress): New functions.
9655 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9656 remove_point, stopped_by_watchpoint, stopped_data_address.
9657 * win32-i386-low.c: Include i386-low.h.
9658 (debug_reg_state): Replaces dr.
9659 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9660 (i386_dr_low_get_status): New function.
9661 (i386_insert_point, i386_remove_point): New functions.
9662 (i386_stopped_by_watchpoint): New function.
9663 (i386_stopped_data_address): New function.
9664 (i386_initial_stuff): Update.
9665 (get_thread_context,set_thread_context,i386_thread_added): Update.
9666 (the_low_target): Add entries for insert_point,
9667 remove_point, stopped_by_watchpoint, stopped_data_address.
9668 * win32-low.c (win32_insert_watchpoint): New function.
9669 (win32_remove_watchpoint): New function.
9670 (win32_stopped_by_watchpoint): New function.
9671 (win32_stopped_data_address): New function.
9672 (win32_target_ops): Add entries for insert_watchpoint,
9673 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9674 * win32-low.h (win32_target_ops): New members insert_point,
9675 remove_point, stopped_by_watchpoint, stopped_data_address.
9677 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9679 * server.c (process_serial_event): Re-return unsupported, not
9680 error, if the type isn't recognized. Re-allow supporting only
9681 insert or remove packets. Also call require_running for
9682 breakpoints. Add missing break statement to default case. Tidy.
9683 * target.h (struct target_ops): Rename insert_watchpoint to
9684 insert_point, and remove_watchpoint to remove_point.
9686 * linux-low.h (struct linux_target_ops): Likewise.
9687 * linux-low.c (linux_insert_watchpoint): Rename to ...
9688 (linux_insert_point): ... this. Adjust.
9689 (linux_remove_watchpoint): Rename to ...
9690 (linux_remove_point): ... this. Adjust.
9691 (linux_target_ops): Adjust.
9692 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9693 (cris_insert_point): ... this.
9694 (cris_remove_watchpoint): Rename to ...
9695 (cris_remove_point): ... this.
9696 (the_low_target): Adjust.
9698 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9700 * server.c (handle_v_kill): Pass signal_pid to
9701 kill_inferior if multi_process is zero.
9703 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9705 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9706 * target.h (target_ops): Comment for *_watchpoint to make it clear
9707 the functions can get types '0' and '1'.
9709 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9711 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9712 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9713 * regcache.c (get_regcache): Likewise.
9714 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9715 * win32-low.c (child_fetch_inferior_registers): Remove check for
9718 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9719 Pedro Alves <pedro@codesourcery.com>
9721 * target.h (struct target_ops) <supports_multi_process>: New
9723 (target_supports_multi_process): New.
9724 * server.c (handle_query): Even if GDB reports support, only
9725 enable multi-process if the target also supports it. Report
9726 multi-process support only if the target backend supports it.
9727 * linux-low.c (linux_supports_multi_process): New function.
9728 (linux_target_ops): Install it as target_supports_multi_process
9731 2009-05-24 Doug Evans <dje@google.com>
9733 Global renaming of find_thread_pid to find_thread_ptid.
9734 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9735 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9736 All callers updated.
9738 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9739 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9742 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9743 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9744 (linux_resume_one_lwp): Ditto.
9746 2009-05-23 Doug Evans <dje@google.com>
9748 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9749 from struct inferior_list_entry * to struct lwp_info *.
9750 All callers updated.
9752 2009-05-13 Doug Evans <dje@google.com>
9754 * linux-x86-low.c: Don't include assert.h.
9755 (x86_siginfo_fixup): Use fatal, not assert.
9756 (x86_arch_setup): Fix comment.
9758 2009-05-12 Doug Evans <dje@google.com>
9760 Biarch support for i386/amd64 gdbserver.
9761 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9762 Add linux-x86-low.c.
9763 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9764 (linux-x86-low.o): Add.
9765 * linux-x86-64-low.c: Delete.
9766 * linux-i386-low.c: Delete.
9767 * linux-x86-low.c: New file.
9768 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9770 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9772 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9773 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9774 (linux_child_pid_to_exec_file): New function.
9775 (elf_64_header_p, elf_64_file_p): New functions.
9776 (siginfo_fixup): New function.
9777 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9778 give target a chance to convert layout.
9779 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9780 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9782 2009-05-07 Doug Evans <dje@google.com>
9784 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9785 (regsets_store_inferior_registers): Ditto.
9787 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9791 * linux-low.c (must_set_ptrace_flags): Delete.
9792 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9794 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9795 `lwp->must_set_ptrace_flags' instead.
9796 (linux_wait_for_event_1): Set ptrace options here.
9797 (linux_wait_1): ... not here.
9799 2009-04-30 Doug Evans <dje@google.com>
9801 * inferiors.c (started_inferior_callback): New function.
9802 (attached_inferior_callback): New function.
9803 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9804 * server.c (print_started_pid, print_attached_pid): New functions.
9805 (detach_or_kill_for_exit): New function.
9806 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9807 * server.h (have_started_inferiors_p): Declare.
9808 (have_attached_inferiors_p): Declare.
9810 * inferiors.c (remove_process): Fix memory leak, free process.
9811 * linux-low.c (linux_remove_process): New function.
9812 (linux_kill): Call it instead of remove_process.
9813 (linux_detach, linux_wait_1): Ditto.
9815 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9817 * configure.srv: Add x86 Windows CE target.
9819 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9821 * inferiors.c (get_thread_process): Make global.
9822 * server.h (get_thread_process): Add prototype.
9823 * thread-db.c (find_one_thread): Use get_thread_process
9824 instead of current_process.
9825 (thread_db_get_tls_address): Do not crash if called when
9826 thread layer is not yet initialized.
9828 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9830 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9831 * spu-low.c (current_tid): Rename to ...
9832 (current_ptid): ... this.
9833 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9834 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9835 ptid_get_lwp (current_ptid) instead of current_tid.
9836 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9837 instead of current_tid. Use find_process_pid to verify pid
9838 argument is valid. Pass proper argument to remove_process.
9839 (spu_thread_alive): Compare current_ptid instead of current_tid.
9840 (spu_resume): Likewise.
9842 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9844 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9847 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9849 Implement the multiprocess extensions, and add linux multiprocess
9852 * server.h (ULONGEST): Declare.
9853 (struct ptid, ptid_t): New.
9854 (minus_one_ptid, null_ptid): Declare.
9855 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9856 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9857 (struct inferior_list_entry): Change `id' type from unsigned from
9859 (struct sym_cache, struct breakpoint, struct
9860 process_info_private): Forward declare.
9861 (struct process_info): Declare.
9862 (current_process): Declare.
9863 (all_processes): Declare.
9864 (initialize_inferiors): Declare.
9865 (add_thread): Adjust to use ptid_t.
9866 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9867 (add_process, remove_process, find_thread_pid): Declare.
9868 (find_inferior_id): Adjust to use ptid_t.
9869 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9870 (multi_process): Declare.
9871 (push_event): Adjust to use ptid_t.
9872 (read_ptid, write_ptid): Declare.
9873 (prepare_resume_reply): Adjust to use ptid_t.
9874 (clear_symbol_cache): Declare.
9875 * inferiors.c (all_processes): New.
9876 (null_ptid, minus_one_ptid): New.
9877 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9878 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9879 (add_thread): Change unsigned long to ptid. Remove gdb_id
9881 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9882 (gdb_id_to_thread): Rename to ...
9883 (find_thread_pid): ... this. Change unsigned long to ptid.
9884 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9885 (loaded_dll, pull_pid_from_list): Adjust.
9886 (add_process, remove_process, find_process_pid)
9887 (get_thread_process, current_process, initialize_inferiors): New.
9888 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9889 (struct target_waitstatus) <related_pid>: Ditto.
9890 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9892 (struct target_ops) <join>: Add `pid' argument.
9893 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9894 (struct target_ops) <wait>: Add `ptid' field. Change return type
9896 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9897 (mywait): Add `ptid' argument. Change return type to ptid_t.
9898 (target_pid_to_str): Declare.
9899 * target.c (set_desired_inferior): Adjust to use ptids.
9900 (mywait): Add new `ptid' argument. Adjust.
9901 (target_pid_to_str): New.
9902 * mem-break.h (free_all_breakpoints): Declare.
9903 * mem-break.c (breakpoints): Delelete.
9904 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9905 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9906 to use per-process breakpoint list.
9907 (free_all_breakpoints): New.
9908 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9909 (symbol_cache, all_symbols_looked_up): Delete.
9911 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9913 (prepare_resume_reply): Change ptid argument's type from unsigned
9914 long to ptid_t. Adjust. Implement W;process and X;process.
9915 (free_sym_cache, clear_symbol_cache): New.
9916 (look_up_one_symbol): Adjust to per-process symbol cache. *
9917 * server.c (cont_thread, general_thread, step_thread): Change type
9920 (multi_process): New.
9921 (last_ptid): Change type to ptid_t.
9922 (struct vstop_notif) <ptid>: Change type to ptid_t.
9923 (queue_stop_reply, push_event): Change `ptid' argument's type to
9925 (discard_queued_stop_replies): Add `pid' argument.
9926 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9927 changes. Don't reference the `attached' global.
9928 (attach_inferior): Adjust to mywait interface changes.
9929 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9930 features. Handle and report "multiprocess+". Handle
9932 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9934 (handle_v_kill): New.
9935 (handle_v_stopped): Adjust to use target_pid_to_str.
9936 (handle_v_requests): Allow multiple attaches and runs when
9937 multiprocess extensions are in effect. Handle "vKill".
9938 (myresume): Adjust to use ptids.
9939 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9940 (handle_status): Adjust to discard_queued_stop_replies interface
9942 (first_thread_of, kill_inferior_callback)
9943 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9944 (main): Call initialize_inferiors. Adjust to use ptids, killing
9945 and detaching from all inferiors. Handle multiprocess packet
9947 * linux-low.h: Include gdb_proc_service.h.
9948 (struct process_info_private): New.
9949 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9950 <lwpid_of>: Use ptid_get_lwp.
9951 (get_lwp_thread): Adjust.
9952 (struct lwp_info): Add `dead' member.
9953 (find_lwp_pid): Declare.
9954 * linux-low.c (thread_db_active): Delete.
9955 (new_inferior): Adjust comment.
9956 (inferior_pid): Delete.
9957 (linux_add_process): New.
9958 (handle_extended_wait): Adjust.
9959 (add_lwp): Change unsigned long to ptid.
9960 (linux_create_inferior): Add process to processes table. Adjust
9961 to use ptids. Don't set new_inferior here.
9962 (linux_attach_lwp): Rename to ...
9963 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9964 it. Adjust to use ptids.
9965 (linux_attach_lwp): New.
9966 (linux_attach): Add process to processes table. Don't set
9968 (struct counter): New.
9969 (second_thread_of_pid_p, last_thread_of_process_p): New.
9970 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9972 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9973 processes. Remove process from process table.
9974 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9975 to multiple processes.
9976 (any_thread_of): New.
9977 (linux_detach): Add `pid' argument, and handle it. Remove process
9978 from processes table.
9979 (linux_join): Add `pid' argument. Handle it.
9980 (linux_thread_alive): Change unsighed long argument to ptid_t.
9981 Consider dead lwps as not being alive.
9982 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9983 threads we're not interested in.
9984 (same_lwp, find_lwp_pid): New.
9985 (linux_wait_for_lwp): Change `pid' argument's type from int to
9987 (linux_wait_for_event): Rename to ...
9988 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9989 from int to ptid_t. Adjust.
9990 (linux_wait_for_event): New.
9991 (linux_wait_1): Add `ptid' argument. Change return type to
9992 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9993 that exit from the process table.
9994 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9996 (mark_lwp_dead): New.
9997 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9998 stopping all threads, mark its main lwp as dead.
9999 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10001 (fetch_register, usr_store_inferior_registers)
10002 (regsets_fetch_inferior_registers)
10003 (regsets_store_inferior_registers, linux_read_memory)
10004 (linux_write_memory): Inline `inferior_pid'.
10005 (linux_look_up_symbols): Adjust to use per-process
10006 `thread_db_active'.
10007 (linux_request_interrupt): Adjust to use ptids.
10008 (linux_read_auxv): Inline `inferior_pid'.
10009 (initialize_low): Don't reference thread_db_active.
10010 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10011 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10012 (ps_getpid): Return the pid of the current inferior.
10013 * thread-db.c (proc_handle, thread_agent): Delete.
10014 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10016 (find_one_thread): Change argument type to ptid_t. Adjust to
10018 (maybe_attach_thread): Adjust to per-process data and ptids.
10019 (thread_db_find_new_threads): Ditto.
10020 (thread_db_init): Ditto.
10021 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10022 processes table. Adjust to use ptids.
10023 (spu_kill, spu_detach): Adjust interface. Remove process from
10025 (spu_join, spu_thread_alive): Adjust interface.
10026 (spu_wait): Adjust interface. Remove process from processes
10027 table. Adjust to use ptids.
10028 * win32-low.c (current_inferior_tid): Delete.
10029 (current_inferior_ptid): New.
10030 (debug_event_ptid): New.
10031 (thread_rec): Take a ptid. Adjust.
10032 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10033 (child_delete_thread): Ditto.
10034 (do_initial_child_stuff): Add `attached' argument. Add process to
10036 (child_fetch_inferior_registers, child_store_inferior_registers):
10038 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10039 (win32_attach): Pass 1 to do_initial_child_stuff.
10040 (win32_kill): Adjust interface. Remove process from processes
10042 (win32_detach): Ditto.
10043 (win32_join): Adjust interface.
10044 (win32_thread_alive): Take a ptid.
10045 (win32_resume): Adjust to use ptids.
10046 (get_child_debug_event): Ditto.
10047 (win32_wait): Adjust interface. Remove exiting process from
10050 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10052 Non-stop mode support.
10054 * server.h (non_stop): Declare.
10055 (gdb_client_data, handler_func): Declare.
10056 (delete_file_handler, add_file_handler, start_event_loop):
10058 (handle_serial_event, handle_target_event, push_event)
10059 (putpkt_notif): Declare.
10060 * target.h (enum resume_kind): New.
10061 (struct thread_resume): Replace `step' field by `kind' field.
10062 (TARGET_WNOHANG): Define.
10063 (struct target_ops) <wait>: Add `options' argument.
10064 <supports_non_stop, async, start_non_stop>: New fields.
10065 (target_supports_non_stop, target_async): New.
10066 (start_non_stop): Declare.
10067 (mywait): Add `options' argument.
10068 * target.c (mywait): Add `options' argument. Print child exit
10069 notifications here.
10070 (start_non_stop): New.
10071 * server.c (non_stop, own_buf, mem_buf): New globals.
10072 (struct vstop_notif): New.
10073 (notif_queue): New global.
10074 (queue_stop_reply, push_event, discard_queued_stop_replies)
10075 (send_next_stop_reply): New.
10076 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10078 (attach_inferior): In non-stop mode, don't wait for the target
10080 (handle_general_set): Handle QNonStop.
10081 (handle_query): When handling qC, return the current general
10082 thread, instead of the first thread of the list.
10083 (handle_query): If the backend supports non-stop mode, include
10084 QNonStop+ in the qSupported query response.
10085 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10087 (handle_v_attach, handle_v_run): Handle non-stop mode.
10088 (handle_v_stopped): New.
10089 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10090 (myresume): Adjust to use resume_kind. Handle non-stop.
10091 (queue_stop_reply_callback): New.
10092 (handle_status): Handle non-stop mode.
10093 (main): Clear non_stop flag on reconnection. Use the event-loop.
10094 Refactor serial protocol handling from here ...
10095 (process_serial_event): ... to this new function. When GDB
10096 selects any thread, select one here. In non-stop mode, wait until
10097 GDB acks all pending events before exiting.
10098 (handle_serial_event, handle_target_event): New.
10099 * remote-utils.c (remote_open): Install remote_desc in the event
10101 (remote_close): Remove remote_desc from the event loop.
10102 (putpkt_binary): Rename to...
10103 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10104 (putpkt_binary): New as wrapper around putpkt_binary_1.
10105 (putpkt_notif): New.
10106 (prepare_resume_reply): In non-stop mode, don't change the
10108 * event-loop.c: New.
10109 * Makefile.in (OBJ): Add event-loop.o.
10110 (event-loop.o): New rule.
10112 * linux-low.h (pid_of): Moved here.
10114 (get_lwp_thread): Use lwpid_of.
10115 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10116 * linux-low.c (pid_of): Delete.
10117 (inferior_pid): Use lwpid_of.
10118 (linux_event_pipe): New.
10119 (target_is_async_p): New.
10121 (handle_extended_wait): Use lwpid_of.
10122 (add_lwp): Don't set lwpid field.
10123 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10124 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10125 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10126 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10127 first. Adjust to linux_wait_for_event interface changes. Use
10129 (linux_detach): Don't delete the main lwp here.
10130 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10131 (status_pending_p): Don't consider explicitly suspended lwps.
10132 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10133 pointer. Add OPTIONS argument. Change return type to int. Use
10134 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10135 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10136 pointer. Add status pointer argument. Return a pid instead of a
10137 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10138 changes. In non-stop mode, don't switch to a random thread.
10139 (linux_wait): Rename to...
10140 (linux_wait_1): ... this. Add target_options argument, and handle
10141 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10142 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10143 clean exit and signal exit code. Don't stop all threads in
10144 non-stop mode. In all-stop mode, only stop all threads when
10145 reporting a stop to GDB. Handle explicit thread stop requests.
10146 (async_file_flush, async_file_mark): New.
10148 (send_sigstop): Use lwpid_of.
10149 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10150 interface changes. In non-stop mode, don't switch to a random
10152 (linux_resume_one_lwp): Use lwpid_of.
10153 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10154 (linux_resume_one_thread): ... this. Handle resume_stop. In
10155 non-stop mode, don't look for pending flag in all threads.
10156 (resume_status_pending_p): Don't consider explicitly suspended
10158 (my_waitpid): Reimplement. Emulate __WALL.
10159 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10161 (sigchld_handler, linux_supports_non_stop, linux_async)
10162 (linux_start_non_stop): New.
10163 (linux_target_ops): Register linux_supports_non_stop, linux_async
10164 and linux_start_non_stop.
10165 (initialize_low): Install SIGCHLD handler.
10166 * thread-db.c (thread_db_create_event, find_one_thread)
10167 (thread_db_get_tls_address): Use lwpid_of.
10168 * win32-low.c (win32_detach): Adjust to use resume_kind.
10169 (win32_wait): Add `options' argument.
10170 * spu-low.c (spu_resume): Adjust to use resume_kind.
10171 (spu_wait): Add `options' argument.
10173 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10175 Decouple target code from remote protocol.
10177 * target.h (enum target_waitkind): New.
10178 (struct target_waitstatus): New.
10179 (struct target_ops) <wait>: Return an unsigned long. Take a
10180 target_waitstatus pointer instead of a char pointer.
10181 (mywait): Likewise.
10182 * target.c (mywait): Change prototype to return an unsigned long.
10183 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10184 * server.h (thread_from_wait, old_thread_from_wait): Delete
10186 (prepare_resume_reply): Change prototype to take a
10188 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10189 (last_status, last_ptid): New.
10190 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10191 pid instead of a signal.
10192 (attach_inferior): Remove "status" and "signal" parameters.
10194 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10196 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10197 (handle_v_requests, myresume): Remove "status" and "signal"
10198 parameters. Adjust.
10199 (handle_status): New.
10200 (main): Delete local `status'. Adjust.
10201 * remote-utils.c: Include target.h.
10202 (prepare_resume_reply): Change prototype to take a
10203 target_waitstatus. Adjust.
10205 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10207 * spu-low.c (spu_wait): Adjust.
10208 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10210 (win32_wait): Adjust.
10212 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10214 * target.h (struct thread_resume): Delete leave_stopped member.
10215 (struct target_ops): Add a `n' argument to the `resume' callback.
10216 * server.c (start_inferior): Adjust.
10217 (handle_v_cont, myresume): Adjust.
10218 * linux-low.c (check_removed_breakpoint): Adjust to resume
10219 interface change, and to removed leave_stopped field.
10220 (resume_ptr): Delete.
10221 (struct thread_resume_array): New.
10222 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10223 resume interface change.
10224 (linux_continue_one_thread, linux_queue_one_thread)
10225 (resume_status_pending_p): Check if the resume field is NULL
10226 instead of checking the leave_stopped member.
10227 (linux_resume): Adjust to the target resume interface change.
10228 * spu-low.c (spu_resume): Adjust to the target resume interface
10230 * win32-low.c (win32_detach, win32_resume): Ditto.
10232 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10234 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10236 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10238 (linux_continue_one_thread): Only preserve the stepping flag if
10239 there's a pending breakpoint.
10241 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10243 * server.c (main): After the inferior having exited, call
10244 remote_close before exiting gdbserver.
10246 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10248 Fix size of FPSCR in Power 7 processors.
10249 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10250 (PPC_FEATURE_HAS_DFP): New #define.
10251 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10254 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10256 * server.c (handle_query) Whitespace and formatting.
10258 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10260 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10261 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10262 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10263 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10264 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10265 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10266 Makefile.in, configure.ac: Fix whitespace throughout.
10267 * configure: Regenerate.
10269 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10271 * inferiors.c (find_inferior): Make it safe for the callback
10272 function to delete the currently iterated inferior.
10274 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10276 * Makefile.in (linuw_low_h): Move higher.
10277 (thread-db.o): Depend on $(linux_low_h).
10279 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10281 Rename "process" to "lwp" throughout.
10283 * linux-low.c (all_processes): Rename to...
10284 (all_lwps): ... this.
10285 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10286 (add_process): Rename to ...
10287 (add_lwp): ... this. Adjust.
10288 (linux_create_inferior): Adjust.
10289 (linux_attach_lwp): Adjust.
10290 (linux_attach): Adjust.
10291 (linux_kill_one_process): Rename to ...
10292 (linux_kill_one_lwp): ... this. Adjust.
10293 (linux_kill): Adjust.
10294 (linux_detach_one_process): Rename to ...
10295 (linux_detach_one_lwp): ... this. Adjust.
10296 (linux_detach): Adjust.
10297 (check_removed_breakpoint): Adjust.
10298 (status_pending_p): Adjust.
10299 (linux_wait_for_process): Rename to ...
10300 (linux_wait_for_lwp): ... this. Adjust.
10301 (linux_wait_for_event): Adjust.
10302 (send_sigstop): Adjust.
10303 (wait_for_sigstop): Adjust.
10304 (stop_all_processes): Rename to ...
10305 (stop_all_lwps): ... this.
10306 (linux_resume_one_process): Rename to ...
10307 (linux_resume_one_lwp): ... this. Adjust.
10308 (linux_set_resume_request, linux_continue_one_thread)
10309 (linux_queue_one_thread, resume_status_pending_p)
10310 (usr_store_inferior_registers, regsets_store_inferior_registers)
10311 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10313 * linux-low.h (get_process): Rename to ...
10314 (get_lwp): ... this. Adjust.
10315 (get_thread_process): Rename to ...
10316 (get_thread_lwp): ... this. Adjust.
10317 (get_process_thread): Rename to ...
10318 (get_lwp_thread): ... this. Adjust.
10319 (struct process_info): Rename to ...
10320 (struct lwp_info): ... this.
10321 (all_processes): Rename to ...
10322 (all_lwps): ... this.
10323 * proc-service.c (ps_lgetregs): Adjust.
10324 * thread-db.c (thread_db_create_event, find_one_thread)
10325 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10327 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10329 * server.c (handle_query): Handle "qAttached".
10331 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10333 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10334 GPLv3, update license URL.
10336 2009-03-01 Doug Evans <dje@google.com>
10338 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10339 (server_h): Add gdb_signals.h.
10340 (signals.o): Update.
10341 * server.h (target_signal_from_host,target_signal_to_host_p)
10342 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10344 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10346 * remote-utils.c (getpkt): Also generate remote-debug
10347 information if noack_mode is set.
10349 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10351 * server.c (handle_query): Report qXfer:siginfo:read and
10352 qXfer:siginfo:write as supported and handle them.
10353 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10354 * linux-low.c (linux_xfer_siginfo): New.
10355 (linux_target_ops): Set it.
10357 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10359 * server.c (gdbserver_usage): Mention --remote-debug.
10360 (main): Accept '--remote-debug' switch.
10362 2009-01-18 Doug Evans <dje@google.com>
10364 * regcache.c (new_register_cache): No need to check result of xcalloc.
10365 * server.c (handle_search_memory): Back out calls to xmalloc,
10366 result is checked and error is returned to user upon failure.
10367 (handle_query): Ditto. Add more checks for result of malloc.
10368 (handle_v_cont): Check result of malloc, report error back to
10370 (handle_v_run): Ditto. Call freeargv.
10371 * server.h (freeargv): Declare.
10372 * utils.c (freeargv): New fn.
10374 2009-01-15 Doug Evans <dje@google.com>
10376 * gdbreplay.c (perror_with_name): Make arg const char *.
10377 * server.h (target_signal_to_name): Make return type const char *.
10378 * thread-db.c (thread_db_err_str): Make return type const char *.
10379 * utils.c (perror_with_name): Make arg const char *.
10381 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10383 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10384 when handling a EXIT_PROCESS_DEBUG_EVENT.
10386 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10388 * gdbreplay.c (gdbreplay_version): Update copyright year.
10389 * server.c (gdbserver_version): Likewise.
10391 2009-01-05 Doug Evans <dje@google.com>
10393 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10394 (handle_extended_wait): Improve comment.
10396 2008-12-13 Doug Evans <dje@google.com>
10398 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10399 * server.h (ATTR_MALLOC): New macro.
10400 (xmalloc,xcalloc,xstrdup): Declare.
10401 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10402 * inferiors.c: Ditto.
10403 * linux-low.c: Ditto.
10404 * mem-break.c: Ditto.
10405 * regcache.c: Ditto.
10406 * remote-utils.c: Ditto.
10409 * win32-low.c: Ditto.
10411 2008-12-12 Doug Evans <dje@google.com>
10413 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10414 in debugging printf.
10416 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10418 2008-12-09 Doug Evans <dje@google.com>
10420 * linux-low.h (struct process_info): Delete member tid, unused.
10421 * thread-db.c (find_one_thread): Update.
10422 (maybe_attach_thread): Update.
10424 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10426 * target.h (struct target_ops): Add qxfer_osdata member.
10427 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10429 (linux_qxfer_osdata): New functions.
10430 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10432 * server.c (handle_query): Handle "qXfer:osdata:read:".
10433 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10434 (buffer_xml_printf): New functions.
10435 * server.h (struct buffer): New.
10436 (buffer_grow_str, buffer_grow_str0): New macros.
10437 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10438 (buffer_xml_printf): Declare.
10440 2008-11-24 Doug Evans <dje@google.com>
10442 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10444 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10446 * server.c (handle_v_run): Always use the supplied argument list.
10448 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10450 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10451 (xtensa_regmap_table): Add entry for scompare1.
10453 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10455 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10456 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10457 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10458 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10459 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10460 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10461 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10462 XML target descriptions.
10463 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10464 when inferior is running on an ISA 2.05 or later processor. Add
10465 special case to return offset for full 64-bit slot of FPSCR when
10468 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10470 * Makefile.in (SFILES, clean): Added sparc64 files.
10471 (reg-sparc64.o, reg-sparc64.c): New.
10472 * configure.srv (sparc*-*-linux*): New configuration.
10473 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10474 syscall arguments for SPARC.
10475 (regsets_store_inferior_registers): Likewise.
10476 * linux-sparc-low.c: New file.
10478 2008-10-21 Doug Evans <dje@google.com>
10480 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10481 (READLINE_DIR,READLINE_DEP): Delete.
10482 (INTERNAL_CFLAGS): Update.
10483 (LINTFLAGS): Update.
10485 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10487 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10488 whole argv from the last run, not just argv[0].
10490 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10492 * regcache.c (new_register_cache): Return NULL if the register
10493 cache size isn't known yet.
10494 (free_register_cache): Avoid dereferencing a NULL regcache.
10496 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10498 * configure.srv: Merge MIPS and MIPS64.
10500 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10502 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10504 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10506 * Makefile.in: Add required vsx dependencies.
10508 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10509 Declare init_registers_powerpc_vsx32l.
10510 Declare init_registers_powerpc_vsx64l.
10511 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10512 (ppc_arch_setup): Check for VSX in hwcap.
10513 (ppc_fill_vsxregset): New function.
10514 (ppc_store_vsxregset): New function.
10515 Add new VSX entry in regset_info target_regsets.
10517 * configure.srv: Add new VSX dependencies.
10519 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10521 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10522 (remote_open): Set or clear transport_is_reliable.
10523 (putpkt_binary): Don't expect acks in noack mode.
10524 (getpkt): Don't send ack/nac in noack mode.
10525 * server.c (handle_general_set): Handle QStartNoAckMode.
10526 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10528 (main): Reset noack_mode on every connection.
10529 * server.h (noack_mode): Declare.
10531 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10533 * Makefile.in (GDBREPLAY_OBS): New variable.
10534 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10536 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10537 Daniel Jacobowitz <dan@codesourcery.com>
10539 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10540 (usr_store_inferior_registers): Likewise.
10541 (regsets_store_inferior_registers): Likewise.
10543 2008-07-31 Rolf Jansen <rj@surtec.com>
10544 Pedro Alves <pedro@codesourcery.com>
10546 * configure.ac: Check for memmem declaration.
10547 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10548 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10549 (disable_packet_qfThreadInfo): Unconditionally compile.
10550 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10551 * configure, config.in: Regenerate.
10553 2008-07-28 Doug Kwan <dougkwan@google.com>
10555 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10556 (linux_write_memory): Remove declaration of errno.
10558 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10560 * linux-low.c (handle_extended_wait): Do not use "status"
10561 variable uninitialized.
10563 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10565 * server.c (handle_v_attach): Inhibit reporting dll changes.
10567 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10569 * remote-utils.c (prepare_resume_reply): If requested, don't
10570 output "thread:TID" in the T stop reply.
10572 * server.c (disable_packet_vCont, disable_packet_Tthread)
10573 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10574 (handle_query): If requested, disable support for qC, qfThreadInfo
10576 (handle_v_requests): If requested, disable support for vCont.
10577 (gdbserver_show_disableable): New.
10578 (main): Handle --disable-packet and --disable-packet=LIST.
10580 * server.h (disable_packet_vCont, disable_packet_Tthread)
10581 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10583 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10585 * server.c (gdbserver_usage): Mention --version.
10587 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10589 * Makefile.in (gdbreplay.o): New rule.
10591 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10593 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10594 message, not gdbserver.
10596 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10597 Nathan Sidwell <nathan@codesourcery.com>
10598 Joseph Myers <joseph@codesourcery.com>
10600 * acinclude.m4: Include ../../config/acx.m4.
10601 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10602 * configure, config.in: Regenerate.
10603 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10604 * server.c (gdbserver_version): Print PKGVERSION.
10605 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10606 (main): Adjust gdbserver_usage calls.
10607 * gdbreplay.c (version, host_name): Add declarations.
10608 (gdbreplay_version, gdbreplay_usage): New.
10609 (main): Accept --version and --help options.
10611 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10613 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10614 (arm_breakpoint_at): Handle Thumb.
10615 (the_low_target): Add comment.
10617 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10619 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10621 2008-05-09 Doug Evans <dje@google.com>
10623 * server.h (decode_search_memory_packet): Declare.
10624 * remote-utils.c (decode_search_memory_packet): New fn.
10625 * server.c (handle_search_memory_1): New fn.
10626 (handle_search_memory): New fn.
10627 (handle_query): Process qSearch:memory packets.
10629 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10631 * regcache.c (registers_length): Remove.
10632 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10633 full register packet.
10634 * regcache.h (registers_length): Remove prototype.
10635 * server.h (PBUFSIZ): Define to 16384.
10637 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10639 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10640 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10641 powerpc-64l.o, and powerpc-altivec64l.o.
10642 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10643 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10644 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10645 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10646 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10649 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10650 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10651 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10652 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10653 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10654 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10655 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10656 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10657 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10658 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10661 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10662 (init_registers_powerpc_32l): ... this new prototype.
10663 (init_registers_powerpc_32): Remove, replace by ...
10664 (init_registers_powerpc_altivec32l): ... this new prototype.
10665 (init_registers_powerpc_e500): Remove, replace by ...
10666 (init_registers_powerpc_e500l): ... this new prototype.
10667 (init_registers_ppc64): Remove, replace by ...
10668 (init_registers_powerpc_64l): ... this new prototype.
10669 (init_registers_powerpc_64): Remove, replace by ...
10670 (init_registers_powerpc_altivec64l): ... this new prototype.
10671 (ppc_num_regs): Set to 73.
10672 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10673 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10674 (ppc_cannot_store_register): Handle orig_r3 and trap.
10675 (ppc_arch_setup): Update init_registers_... calls.
10676 (ppc_fill_gregset): Handle orig_r3 and trap.
10678 * inferiors.c (clear_inferiors): Reset current_inferior.
10680 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10682 * acinclude.m4: Add override.m4.
10683 * configure: Regenerate.
10685 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10687 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10688 initial call to init_register_ppc64.
10690 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10692 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10693 single powerpc*-*-linux* case.
10694 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10696 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10698 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10699 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10701 * linux-ppc-low.c: Include <elf.h>.
10702 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10703 (ppc_hwcap): New global variable.
10704 (ppc_regmap): Remove __SPE__ #ifdef sections.
10705 (ppc_regmap_e500): New global variable.
10706 (ppc_cannot_store_register): Update __SPE__ special case.
10707 (ppc_get_hwcap): New function.
10708 (ppc_arch_setup): Use it to determine whether inferior supports
10709 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10710 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10711 Do not access registers if target does not support AltiVec.
10712 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10713 Do not access registers if target does not support SPE.
10714 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10716 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10718 * linux-low.c (disabled_regsets, num_regsets): New.
10719 (use_regsets_p): Delete.
10720 (linux_wait_for_process): Clear disabled_regsets.
10721 (regsets_fetch_inferior_registers): Check and set it.
10722 (regsets_store_inferior_registers): Likewise.
10723 (linux_fetch_registers, linux_store_registers): Do not use
10725 (initialize_low): Allocate disabled_regsets.
10727 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10729 * Makefile.in (LIBOBJS): New.
10730 (OBS): Use LIBOBJS.
10731 (memmem.o): New rule.
10732 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10733 * configure: Regenerated.
10735 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10737 * server.c (handle_query): Never return "unsupported" for
10738 qXfer:features:read queries.
10740 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10742 * server.c (get_features_xml): Fix inverted condition.
10743 (handle_query): Always support qXfer:feature:read.
10745 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10747 * server.c (wrapper_argv): New.
10748 (start_inferior): Handle wrapper_argv. If set, expect an extra
10750 (gdbserver_usage): Document --wrapper.
10751 (main): Parse --wrapper.
10753 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10755 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10756 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10757 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10758 (ppc_set_pc): Likewise.
10759 (ppc_arch_setup): New function.
10760 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10761 of collect_register.
10762 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10764 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10766 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10767 instead of linux-ppc64-low.o.
10768 * linux-ppc64-low.c: Remove file.
10769 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10770 (linux-ppc64-low.o): Remove rule.
10772 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10773 (init_registers_powerpc_64): Likewise.
10774 (ppc_regmap): Conditionally define depending on __powerpc64__.
10775 (ppc_cannot_store_register): Do not special-case "fpscr" when
10776 compiled on __powerpc64__.
10777 (ppc_collect_ptrace_register): New function.
10778 (ppc_supply_ptrace_register): New function.
10779 (ppc_breakpoint): Change type to "unsigned int".
10780 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10781 (the_low_target): Conditionally provide initializers for the
10782 arch_setup member depending on __powerpc64__. Install
10783 collect_ptrace_register and supply_ptrace_register members.
10785 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10787 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10788 * server.c (gdbserver_xmltarget): Define.
10789 (get_features_xml): Use it to replace "target.xml" and arch_string.
10791 * configure.srv: Remove srv_xmltarget. Add XML files that were
10792 mentioned there to srv_xmlfiles instead. Remove conditional tests
10793 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10794 srv_xmlfiles and srv_regobj to include all possible choices.
10795 * configure.ac (srv_xmltarget): Remove.
10796 (srv_xmlfiles): Do not add "target.xml".
10797 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10798 checks for supplementary target information.
10799 * configure: Regenerate.
10800 * Makefile.in (XML_TARGET): Remove.
10801 (target.xml): Remove rule.
10802 (clean): Do not clean up target.xml.
10803 (.PRECIOUS): Do not mention target.xml.
10805 * target.h (struct target_ops): Remove arch_string member.
10806 * linux-low.c (linux_arch_string): Remove.
10807 (linux_target_ops): Remove arch_string initializer.
10808 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10809 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10810 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10811 * spu-low.c (spu_arch_string): Remove.
10812 (spu_target_ops): Remove arch_string initializer.
10813 * win32-low.c (win32_arch_string): Remove.
10814 (win32_target_ops): Remove arch_string initializer.
10815 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10816 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10817 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10819 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10821 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10822 by collect_ptrace_register and supply_ptrace_register hooks.
10823 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10824 instead of checking for the_low_target.left_pad_xfer.
10825 (usr_store_inferior_registers): Use collect_ptrace_register callback
10826 instead of checking for the_low_target.left_pad_xfer.
10828 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10829 (s390_supply_ptrace_register): Likewise.
10830 (s390_fill_gregset): Call s390_collect_ptrace_register.
10831 (the_low_target): Update.
10833 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10834 (ppc_supply_ptrace_register): Likewise.
10835 (the_low_target): Update.
10837 * linux-i386-low.c (the_low_target): Update.
10838 * linux-x86-64-low.c (the_low_target): Update.
10840 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10842 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10843 reg-s390.o and reg-s390x.o.
10845 * linux-low.c (new_inferior): New global variable.
10846 (linux_create_inferior, linux_attach): Set it.
10847 (linux_wait_for_process): Call the_low_target.arch_setup after the
10848 target has stopped for the first time.
10849 (initialize_low): Do not call the_low_target.arch_setup.
10851 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10852 (s390_set_pc): Likewise.
10853 (s390_arch_setup): New function.
10854 (the_low_target): Use s390_arch_setup as arch_setup routine.
10856 * regcache.c (realloc_register_cache): New function.
10857 (set_register_cache): Call it for each existing regcache.
10859 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10861 * server.h (init_registers): Remove prototype.
10863 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10864 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10865 instead of init_registers ().
10866 * linux-arm-low.c (init_registers_arm): Add prototype.
10867 (init_registers_arm_with_iwmmxt): Likewise.
10868 (the_low_target): Add initializer for arch_setup field.
10869 * linux-cris-low.c (init_registers_cris): Add prototype.
10870 (the_low_target): Add initializer for arch_setup field.
10871 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10872 (the_low_target): Add initializer for arch_setup field.
10873 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10874 (the_low_target): Add initializer for arch_setup field.
10875 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10876 (the_low_target): Add initializer for arch_setup field.
10877 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10878 (the_low_target): Add initializer for arch_setup field.
10879 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10880 (the_low_target): Add initializer for arch_setup field.
10881 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10882 (init_registers_mips64_linux): Likewise.
10883 (the_low_target): Add initializer for arch_setup field.
10884 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10885 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10886 (the_low_target): Add initializer for arch_setup field.
10887 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10888 (init_registers_powerpc_64): Likewise.
10889 (the_low_target): Add initializer for arch_setup field.
10890 * linux-s390-low.c (init_registers_s390): Add prototype.
10891 (init_registers_s390x): Likewise.
10892 (the_low_target): Add initializer for arch_setup field.
10893 * linux-sh-low.c (init_registers_sh): Add prototype.
10894 (the_low_target): Add initializer for arch_setup field.
10895 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10896 (the_low_target): Add initializer for arch_setup field.
10897 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10898 (the_low_target): Add initializer for arch_setup field.
10900 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10901 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10902 instead of init_registers ().
10903 * win32-arm-low.c (init_registers_arm): Add prototype.
10904 (the_low_target): Add initializer for arch_setup field.
10905 * win32-i386-low.c (init_registers_i386): Add prototype.
10906 (the_low_target): Add initializer for arch_setup field.
10908 * spu-low.c (init_registers_spu): Add prototype.
10909 (initialize_low): Call initialie_registers_spu () instead of
10910 initialize_registers ().
10912 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10914 * server.c (handle_v_requests): When handling the vRun and vAttach
10915 packets, if already debugging a process, don't kill it. Return an
10918 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10920 * server.c (handle_query): Correct length check.
10922 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10924 * win32-low.c (do_initial_child_stuff): Add process handle
10925 parameter. Set current_process_handle and current_process_id from the
10926 parameters. Clear globals.
10927 (win32_create_inferior): Don't set current_process_handle and
10928 current_process_id here. Instead pass them on the call to
10929 do_initial_child_stuff.
10930 (win32_attach): Likewise.
10931 (win32_clear_inferiors): New.
10932 (win32_kill): Don't close the current process handle or the
10933 current thread handle here. Instead call win32_clear_inferiors.
10934 (win32_detach): Don't open a new handle to the process. Call
10935 win32_clear_inferiors.
10936 (win32_join): Don't rely on current_process_handle; open a new
10937 handle using the process id.
10938 (win32_wait): Call win32_clear_inferiors when the inferior process
10941 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10943 * server.c (monitor_show_help): Add "exit".
10945 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10947 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10948 (clean): Add reg-xtensa.c.
10949 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10950 * configure.srv (xtensa*-*-linux*) New target.
10951 * linux-xtensa-low.c: New.
10952 * xtensa-xtregs.c: New.
10954 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10956 * hostio.c: Don't include errno.h.
10957 (errno_to_fileio_errno): Move to hostio-errno.
10958 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10959 error number outputting to the target->hostio_last_error callback.
10960 (hostio_packet_error): Use FILEIO_EINVAL directly.
10961 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10962 calls to hostio_error.
10963 * hostio-errno.c: New.
10964 * server.h (hostio_last_error_from_errno): Declare.
10965 * target.h (target_ops): Add hostio_last_error member.
10966 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10967 as hostio_last_error handler.
10968 * spu-low.c (spu_target_ops): Likewise.
10969 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10970 (wince_hostio_last_error): New functions.
10971 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10972 as hostio_last_error handler.
10973 (win32_target_ops) [!_WIN32_WCE]: Register
10974 hostio_last_error_from_errno as hostio_last_error handler.
10975 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10976 (hostio-errno.o): New rule.
10977 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10978 * configure.srv (srv_hostio_err_objs): New variable. Default to
10980 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10981 * configure: Regenerate.
10983 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10985 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10986 (linux_kill, linux_detach): Clean up the process list.
10987 * remote-utils.c (remote_open): Improve port number parsing.
10988 (putpkt_binary, input_interrupt): Only send interrupts if the target
10990 * server.c (extended_protocol): Make static.
10991 (attached): Define earlier.
10992 (exit_requested, response_needed, program_argv): New variables.
10993 (target_running): New.
10994 (start_inferior): Clear attached here.
10995 (attach_inferior): Set attached here.
10996 (require_running): Define.
10997 (handle_query): Use require_running and target_running. Implement
10999 (handle_v_attach, handle_v_run): New.
11000 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11001 (gdbserver_usage): Update.
11002 (main): Redo argument parsing. Handle --debug and --multi. Handle
11003 --attach along with other options or after the port. Save
11004 program_argv. Support no initial program. Resynchronize
11005 communication with GDB after an error. Handle "monitor exit".
11006 Use require_running and target_running. Always allow the extended
11007 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11008 restart in extended mode.
11009 * README: Refer to the GDB manual. Update --attach usage.
11011 2007-12-20 Andreas Schwab <schwab@suse.de>
11013 * linux-low.c (STACK_SIZE): Define.
11014 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11015 (linux_test_for_tracefork): Likewise.
11017 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11019 * linux-low.c (linux_wait_for_event): Update messages. Do not
11020 reinsert auto-delete breakpoints.
11021 * mem-break.c (struct breakpoint): Change return type of handler to
11023 (set_breakpoint_at): Update handler type.
11024 (reinsert_breakpoint_handler): Return 1 instead of calling
11026 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11028 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11029 * mem-break.h (set_breakpoint_at): Update handler type.
11030 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11031 * win32-low.c (auto_delete_breakpoint): New.
11032 (get_child_debug_event): Use it.
11034 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11036 * configure.ac: Check for pread and pwrite.
11037 * hostio.c (handle_pread): Fall back to lseek and read.
11038 (handle_pwrite): Fall back to lseek and write.
11039 * config.in, configure: Regenerated.
11041 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11043 * server.c (myresume): Add own_buf argument.
11044 (main): Update calls.
11046 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11048 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11049 * remote-utils.c (remote_open): Do not call disable_async_io.
11050 (block_async_io): Delete.
11051 (unblock_async_io): Make static.
11052 (initialize_async_io): New.
11053 * server.c (handle_v_cont): Handle async I/O here.
11054 (myresume): Likewise. Move other common resume tasks here...
11055 (main): ... from here. Call initialize_async_io. Disable async
11056 I/O before the main loop.
11057 * server.h (initialize_async_io): Declare.
11058 (block_async_io, unblock_async_io): Delete prototypes.
11059 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11061 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11063 * remote-utils.c (readchar): Allow binary data in received messages.
11065 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11067 * win32-low.c (attaching): New global.
11068 (win32_create_inferior): Clear the `attaching' global.
11069 (win32_attach): Set the `attaching' global.
11070 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11071 attaching. Only set a breakpoint at the entry point if not
11074 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11076 * server.c (main): Don't report dll events on the initial
11077 connection on attaches.
11079 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11081 * server.c (main): Relax numerical bases supported for the pid of
11082 the --attach command line argument.
11084 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11086 * win32-low.c (win32_attach): Call OpenProcess before
11087 DebugActiveProcess, not after. Add last error output to error
11090 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11092 * win32-low.c (win32_get_thread_context)
11093 (win32_set_thread_context): New functions.
11094 (thread_rec): Use win32_get_thread_context.
11095 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11096 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11099 2007-12-03 Leo Zayas
11100 Pedro Alves <pedro_alves@portugalmail.pt>
11102 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11104 (child_add_thread): Minor cleanup.
11105 (child_continue): Resume artificially suspended threads before
11106 calling ContinueDebugEvent.
11107 (suspend_one_thread): New.
11108 (fake_breakpoint_event): New.
11109 (get_child_debug_event): Change return type to int. Check here if
11110 gdb sent an interrupt request. If a soft interrupt was requested,
11111 fake a breakpoint event. Return 0 if there is no event to handle,
11113 (win32_wait): Don't check here if gdb sent an interrupt request.
11114 Ensure there is a valid event to handle.
11115 (win32_request_interrupt): Add soft interruption method as last
11118 2007-12-03 Leo Zayas
11119 Pedro Alves <pedro_alves@portugalmail.pt>
11121 * win32-low.h (win32_thread_info): Add descriptions to the
11122 structure members. Replace `suspend_count' counter by a
11124 * win32-low.c (thread_rec): Update condition of when to get the
11125 context from the inferior. Rely on ContextFlags being set if it
11126 has already been retrieved. Only suspend the inferior thread if
11127 we haven't already. Warn if that fails.
11128 (continue_one_thread): s/suspend_count/suspended/. Only call
11129 ResumeThread once. Warn if that fails.
11131 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11133 * win32-low.c (win32_wait): Don't read from the inferior when it
11134 has already exited.
11136 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11138 * Makefile.in (win32_low_h): New variable.
11139 (win32-low.o): Add dependency on $(win32_low_h).
11140 (win32-arm-low.o, win32-i386-low.o): New rules.
11142 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11144 * hostio.c: Correct copyright year.
11146 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11148 * Makefile.in (OBS): Add hostio.o.
11149 (hostio.o): New rule.
11150 * server.h (handle_vFile): Declare.
11151 * hostio.c: New file.
11152 * server.c (handle_v_requests): Take packet_len and new_packet_len
11153 for binary packets. Call handle_vFile.
11154 (main): Update call to handle_v_requests.
11156 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11158 * linux-low.c: Include <sched.h>.
11160 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11162 * linux-low.c (linux_tracefork_grandchild): New.
11163 (linux_tracefork_child): Use clone.
11164 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11166 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11168 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11170 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11172 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11174 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11176 * inferiors.c (change_inferior_id): Delete.
11177 (add_pid_to_list, pull_pid_from_list): New.
11178 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11179 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11180 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11181 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11182 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11183 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11184 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11185 (using_threads): Always set to 1.
11186 (handle_extended_wait): New.
11187 (add_process): Do not set TID.
11188 (linux_create_inferior): Set must_set_ptrace_flags.
11189 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11190 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11191 (linux_thread_alive): Rename TID argument to LWPID.
11192 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11193 (linux_wait_for_event): Do not use TID or check using_threads. Update
11194 call to dead_thread_notify. Call handle_extended_wait.
11195 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11196 (send_sigstop): Delete sigstop_sent.
11197 (wait_for_sigstop): Avoid TID.
11198 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11199 (linux_test_for_tracefork): New.
11200 (linux_lookup_signals): Use thread_db_active and
11201 linux_supports_tracefork_flag.
11202 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11203 * linux-low.h (get_process_thread): Avoid TID.
11204 (struct process_ifo): Move thread_known and tid to the end. Remove
11206 (linux_attach_lwp, thread_db_init): Update prototypes.
11207 * server.h (change_inferior_id): Delete prototype.
11208 (add_pid_to_list, pull_pid_from_list): New prototypes.
11209 * thread-db.c (thread_db_use_events): New.
11210 (find_first_thread): Rename to...
11211 (find_one_thread): ...this. Update callers and messages. Do not
11212 call fatal. Check thread_db_use_events. Do not call
11213 change_inferior_id or new_thread_notify.
11214 (maybe_attach_thread): Update. Do not call new_thread_notify.
11215 (thread_db_init): Set thread_db_use_events. Check use_events.
11216 * utils.c (fatal, warning): Correct message prefix.
11218 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11220 * Makefile.in (clean): Remove new files.
11221 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11222 (powerpc-64.o, powerpc-64.c): New rules.
11223 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11224 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11226 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11228 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11229 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11230 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11231 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11232 (target_regsets): Add AltiVec and SPE register sets.
11233 * configure.ac: Check for AltiVec and SPE.
11234 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11235 (ppc_fill_vrregset, ppc_store_vrregset): New.
11236 (target_regsets): Add AltiVec register set.
11237 * configure: Regenerated.
11239 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11241 * linux-low.c (O_LARGEFILE): Define.
11242 (linux_read_memory): Use /proc/PID/mem.
11243 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11244 * configure, config.in: Regenerated.
11246 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11248 * linux-low.c (linux_wait_for_event): Do not pass signals while
11251 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11253 * win32-low.c (create_process): New.
11254 (win32_create_inferior): Use create_process instead of
11255 CreateProcess. If create_process failed retry appending an ".exe"
11256 suffix. Store the GetLastError result immediatelly after
11257 create_process calls and use it on the call to error.
11259 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11261 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11263 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11265 * configure.ac: Switch license to GPLv3.
11267 2007-08-01 Michael Snyder <msnyder@access-company.com>
11269 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11271 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11273 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11275 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11276 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11277 CloseToolhelp32Snapshot.
11278 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11279 CloseToolhelp32Snapshot.
11281 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11283 * server.c (main): Check for inferior exit before main loop.
11285 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11287 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11288 instead of on tmp_desc.
11290 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11291 Daniel Jacobowitz <dan@codesourcery.com>
11293 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11294 (add_thread): Minor cleanups.
11295 (clear_inferiors): Move lower in the file. Clear the DLL
11297 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11298 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11299 (xml_escape_text): New.
11300 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11302 (handle_v_cont): Report errors.
11303 (gdbserver_version): Update.
11304 (main): Correct size of own_buf. Do not report initial DLL events.
11305 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11306 (unloaded_dll, xml_escape_text): New.
11307 * win32-low.c (enum target_waitkind): Update comments.
11308 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11309 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11310 (win32_EnumProcessModules, win32_GetModuleInformation)
11311 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11312 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11313 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11314 (win32_Module32First, win32_Module32Next, load_toolhelp)
11315 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11316 (get_child_debug_event): Handle DLL events.
11317 (win32_wait): Likewise.
11319 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11321 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11322 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11324 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11326 * win32-low.c (handle_output_debug_string): Ignore event if not
11329 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11331 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11333 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11335 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11337 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11339 * inferiors.c (change_inferior_id): Add comment.
11340 * linux-low.c (check_removed_breakpoint): Add an early
11341 prototype. Improve debug output.
11342 (linux_attach): Doc update.
11343 (linux_detach_one_process, linux_detach): Clean up before releasing
11345 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11346 * linux-low.h (struct process_info): Doc improvement.
11347 * mem-break.c (delete_all_breakpoints): New.
11348 * mem-break.h (delete_all_breakpoints): New prototype.
11349 * thread-db.c (find_first_thread): New.
11350 (thread_db_create_event): Call it instead of
11351 thread_db_find_new_threads. Clean up unused variables.
11352 (maybe_attach_thread): Remove first thread handling.
11353 (thread_db_find_new_threads): Use find_first_thread.
11354 (thread_db_get_tls_address): Likewise.
11356 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11358 * thread-db.c (thread_db_find_new_threads): Add prototype.
11359 (thread_db_create_event): Check for the main thread before adding
11361 (maybe_attach_thread): Only enable event reporting if TID == 0.
11362 (thread_db_get_tls_address): Check for new threads.
11364 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11366 * linux-low.c (linux_create_inferior): Try execv before execvp.
11367 * spu-low.c (spu_create_inferior): Likewise.
11369 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11371 * linux-low.c (linux_create_inferior): Change execv to execvp.
11372 * spu-low.c (spu_create_inferior): Likewies.
11374 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11376 * Makefile.in (clean): Clean new files instead of deleted ones.
11377 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11378 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11380 * configure.srv: Specify XML files and new regformats for MIPS and
11382 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11383 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11384 an entry for the restart register.
11385 (mips_cannot_fetch_register, mips_cannot_store_register)
11386 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11387 register names to match the XML descriptions.
11388 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11389 restart register instead of $0.
11391 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11392 Markus Deuling <deuling@de.ibm.com>
11394 * remote-utils.c (decode_xfer_write): New function.
11395 * server.h (decode_xfer_write): Add prototype.
11396 * server.c (handle_query): Add PACKET_LEN argument. Support
11397 qXfer:spu:read and qXfer:spu:write packets.
11398 (main): Pass packet_len to handle_query.
11399 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11400 * target.h (target_ops): Add qxfer_spu.
11402 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11404 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11405 accessing non-seekable spufs files.
11407 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11409 * server.c (handle_query): Add reply for qC packet.
11411 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11412 Leo Zayas <lerele@champenstudios@com>
11414 * server.h (check_remote_input_interrupt_request): New function.
11415 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11416 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11417 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11418 (check_remote_input_interrupt_request): New function.
11419 * server.h (check_remote_input_interrupt_request): Declare.
11420 * win32-low.c (winapi_DebugBreakProcess,
11421 winapi_GenerateConsoleCtrlEvent): New typedefs.
11422 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11424 (win32_wait): Check for remote interrupt request
11425 with check_remote_input_interrupt_request.
11426 (win32_request_interrupt): New function.
11427 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11429 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11431 * win32-low.c (debug_registers_changed,
11432 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11433 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11434 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11435 (thread_rec): Get context using the low target.
11436 (child_add_thread): Call thread_added on the low target,
11437 which does the same thing.
11439 (do_initial_child_stuff): Remove debug registers references.
11440 Set context using the low target. Resume threads after
11441 setting the contexts.
11442 (child_continue): Remove dead variable. Remove debug
11443 registers references.
11444 (child_fetch_inferior_registers): Go through the low target.
11445 (do_child_store_inferior_registers): Remove.
11446 (child_store_inferior_registers): Go through the low target.
11447 (win32_resume): Remove debug registers references.
11448 Set context using the low target.
11449 (handle_exception): Change return type to void. Don't record
11450 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11451 first chance exception.
11452 (get_child_debug_event): Change return type to void. Remove
11453 goto loop. Always return after waiting for debug event.
11454 (win32_wait): Convert to switch statement. Handle spurious
11457 * win32-i386-low.c (debug_registers_changed,
11458 debug_registers_used): New.
11459 (initial_stuff): Rename to ...
11460 (i386_initial_stuff): ... this. Clear debug registers
11462 (store_debug_registers): Delete.
11463 (i386_get_thread_context): New.
11464 (load_debug_registers): Delete.
11465 (i386_set_thread_context): New.
11466 (i386_thread_added): New.
11467 (single_step): Rename to ...
11468 (i386_single_step): ... this.
11469 (do_fetch_inferior_registers): Rename to ...
11470 (i386_fetch_inferior_register): ... this.
11471 (i386_store_inferior_register): New.
11472 (the_low_target): Adapt to new interface.
11474 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11475 (arm_get_thread_context): New.
11476 (arm_set_thread_context): New.
11478 (do_fetch_inferior_registers): Rename to ...
11479 (arm_fetch_inferior_register): ... this.
11480 (arm_store_inferior_register): New.
11481 (arm_wince_breakpoint): Reimplement as unsigned long.
11482 (arm_wince_breakpoint_len): Define.
11483 (the_low_target): Adapt to new interface.
11485 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11486 load_debug_registers. Add get_thread_context, set_thread_context,
11487 thread_added and store_inferior_register. Rename
11488 fetch_inferior_registers to fetch_inferior_register.
11489 (regptr): Remove declaration.
11491 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11493 * linux-low.c (linux_detach): Change return type to int. Return 0.
11494 * spu-low.c (spu_detach): Likewise.
11496 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11498 * target.h (target_ops): Change return type of detach to int.
11500 (join_inferior): New.
11501 * server.c (main): Don't skip detach support on mingw32.
11502 If the inferior doesn't support detaching return error.
11503 Call join_inferior instead of using waitpid.
11504 * linux-low.c (linux_join): New.
11505 (linux_target_op): Add linux_join.
11506 * spu-low.c (spu_join): New.
11507 (spu_target_ops): Add spu_join.
11508 * win32-low.c (win32_detach): Adapt to new interface.
11509 Reopen current_process_handle before detaching. Issue a child
11510 resume before detaching.
11512 (win32_target_op): Add win32_join.
11514 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11516 * win32-low.c (win32-attach): Fix return value.
11517 * target.h (target_ops): Describe ATTACH return values.
11519 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11521 * win32-low.c (GETPROCADDRESS): Define.
11522 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11523 (winapi_DebugSetProcessKillOnExit): Likewise.
11524 (win32_create_inferior): Force usage of ansi CreateProcessA.
11525 (win32_attach): Use GETPROCADDRESS.
11526 (win32_detach): Likewise.
11528 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11530 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11532 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11534 * win32-low.c: Commit leftover changes from 2007-03-29.
11536 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11538 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11539 fields short instead of int. Add explicit padding.
11540 (i387_cache_to_fsave): Remove unnecessary casts.
11541 (i387_fsave_to_cache): Doc fix.
11542 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11544 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11546 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11547 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11549 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11551 * configure.srv (arm*-*-mingw32ce*): Move near the other
11554 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11556 * configure.ac: Add errno checking.
11557 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11558 sys/file.h and malloc.h.
11559 (AC_CHECK_DECLS): Add perror.
11560 (srv_mingwce): Handle.
11561 * configure.srv (i[34567]86-*-cygwin*): Add
11562 win32-i386-low.o to srv_tgtobj.
11563 (i[34567]86-*-mingw*): Likewise.
11564 (arm*-*-mingw32ce*): Add case.
11565 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11566 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11567 [__MINGW32CE__] (strerror): New function.
11568 [__MINGW32CE__] (errno): Define to GetLastError.
11569 [__MINGW32CE__] (COUNTOF): New macro.
11570 (remote_open): Remove extra close call.
11571 * mem-break.c (delete_breakpoint_at): New function.
11572 * mem-break.h (delete_breakpoint_at): Declare.
11573 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11574 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11575 [USE_WIN32API] (read, write): Add char* casts.
11576 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11577 * server.h: Include wincecompat.h on Windows CE.
11578 [HAVE_ERRNO_H]: Check.
11579 (perror): Declare if not declared.
11580 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11581 (perror_with_name): Remove errno declaration.
11582 * wincecompat.h: New.
11583 * wincecompat.c: New.
11584 * win32-low.h: New.
11585 * win32-arm-low.c: New.
11586 * win32-i386-low.c: New.
11587 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11588 (OUTMSG2): Make it safe.
11590 (COUNTOF): New macro.
11591 (NUM_REGS): Get it from the low target.
11592 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11593 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11594 (thread_rec): Let low target handle debug registers.
11595 (child_add_thread): Likewise.
11596 (child_init_thread_list): Likewise.
11597 (continue_one_thread): Likewise.
11599 (do_child_fetch_inferior_registers): Move to ...
11600 * win32-i386-low.c: ... here, and rename to ...
11601 (do_fetch_inferior_registers): ... this.
11602 * win32-low.c (child_fetch_inferior_registers):
11603 Go through the low target.
11604 (do_child_store_inferior_registers): Use regptr.
11605 (strwinerror): New function.
11606 (win32_create_inferior): Handle Windows CE.
11607 Use strwinerror instead of strerror on Windows error
11608 codes. Add program to the error output.
11609 Don't close the main thread handle on Windows CE.
11610 (win32_attach): Use coredll.dll on Windows CE.
11611 (win32_kill): Close current process and current
11613 (win32_detach): Use coredll.dll on Windows CE.
11614 (win32_resume): Let low target handle debug registers, and
11616 (handle_exception): Add/Remove initial breakpoint. Avoid
11617 non-existant WSTOPSIG on Windows CE.
11618 (win32_read_inferior_memory): Cast to remove warning.
11619 (win32_arch_string): Go through the low target.
11620 (initialize_low): Call set_breakpoint_data with the low
11621 target's breakpoint.
11622 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11623 FOP_REGNUM, mappings): Move to ...
11624 * win32-i386-low.c: ... here.
11625 * win32-low.c (win32_thread_info): Move to ...
11626 * win32-low.h: ... here.
11627 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11628 win32-arm-low.c and wincecompat.c.
11629 (all:): Add $EXEEXT.
11630 (install-only:): Likewise.
11631 (gdbserver:): Likewise.
11632 (gdbreplay:): Likewise.
11633 * config.in: Regenerate.
11634 * configure: Regenerate.
11636 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11638 * win32-low.c: Rename typedef thread_info to
11639 win32_thread_info throughout.
11641 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11643 * win32-i386-low.c: Rename to ...
11644 * win32-low.c: ... this.
11645 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11646 * Makefile.in: Likewise.
11648 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11650 * remote-utils.c (monitor_output): Constify msg parameter.
11651 * server.h (monitor_output): Likewise.
11652 * win32-i386-low.c (handle_output_debug_string): New.
11653 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11654 handle_output_debug_string.
11655 (get_child_debug_event): Likewise.
11657 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11659 * server.c (main): Correct strtoul check.
11661 2007-03-27 Jon Ringle <jon@ringle.org>
11663 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11665 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11667 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11669 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11671 * terminal.h: Check HAVE_SGTTY_H.
11673 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11675 * remote-utils.c (remote_open): Print out the assigned port number.
11677 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11679 * remote-utils.c (monitor_output): New function.
11680 * server.c (debug_threads): Define here.
11681 (monitor_show_help): New function.
11682 (handle_query): Handle qRcmd.
11683 (main): Do not handle 'd' packet.
11684 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11685 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11688 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11690 * Makefile.in (EXEEXT): New.
11691 (clean): Use $(EXEEXT).
11693 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11695 * target.h (target_ops): Rename send_signal to request_interrupt,
11696 and remove enum target_signal parameter.
11697 * linux-low.c (linux_request_interrupt): Rename from
11698 linux_send_signal, and always send SIGINT.
11699 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11700 and always send SIGINT.
11701 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11703 (input_interrupt): Likewise.
11705 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11707 * server.c (get_features_xml): Check if target implemented
11709 * win32-i386-low.c (win32_arch_string): New.
11710 (win32_target_ops): Add win32_arch_string as arch_string member.
11712 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11714 * spu-low.c (spu_arch_string): New.
11715 (spu_target_ops): Add spu_arch_string.
11717 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11719 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11720 * configure.ac: Do not check for terminal.h.
11721 * configure, config.in: Regenerated.
11723 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11725 * Makefile.in (OBS): Add $(XML_BUILTIN).
11726 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11728 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11729 (arm-with-iwmmxt.c): New.
11730 * config.in, configure: Regenerate.
11731 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11732 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11733 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11734 (arm*-*-linux*): Add iWMMXt and regset support.
11735 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11736 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11737 (arm_store_wmmxregset, target_regsets): New.
11738 * server.c (get_features_xml): Take annex argument. Check builtin
11740 (handle_query): Handle multiple annexes.
11742 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11744 * remote-utils.c [USE_WIN32API] (read, write): Define.
11745 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11748 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11750 * linux-i386-low.c (the_low_target): Set arch_string.
11751 * linux-x86-64-low.c (the_low_target): Likewise.
11752 * linux-low.c (linux_arch_string): New.
11753 (linux_target_ops): Add it.
11754 * linux-low.h (struct linux_target_ops): Add arch_string.
11755 * server.c (write_qxfer_response): Use const void * for DATA.
11756 (get_features_xml): New.
11757 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11758 * target.h (struct target_ops): Add arch_string method.
11760 2007-01-03 Denis Pilat <denis.pilat@st.com>
11761 Daniel Jacobowitz <dan@codesourcery.com>
11763 * linux-low.c (linux_kill): Handle being called with no threads.
11764 * win32-i386-low.c (win32_kill): Likewise.
11765 (get_child_debug_event): Clear current_process_handle.
11767 2006-12-30 Denis PILAT <denis.pilat@st.com>
11768 Daniel Jacobowitz <dan@codesourcery.com>
11770 * remote-utils.c (remote_open): Check the type of specified
11771 serial port devices before opening them.
11772 * server.c (main): Kill the inferior if an error occurs during
11773 the first remote_open.
11775 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11777 * README: Update supported targets.
11779 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11781 * Makefile.in (clean): Remove reg-mips64.c.
11782 (reg-mips64.c, reg-mips64.o): New rules.
11783 * configure.srv: Handle mips64. Include regset support for mips.
11784 * linux-mips-low.c (union mips_register): New.
11785 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11786 (mips_breakpoint, mips_breakpoint_at): Use int.
11787 (mips_collect_register, mips_supply_register)
11788 (mips_collect_register_32bit, mips_supply_register_32bit)
11789 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11790 (mips_store_fpregset, target_regsets): New.
11791 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11793 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11795 * configure.srv: Add target "spu*-*-*".
11796 * Makefile.in (clean): Remove reg-spu.c.
11797 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11798 * spu-low.c: New file.
11800 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11802 * configure.ac: Correct td_thr_tls_get_addr test.
11803 * configure: Regenerated.
11805 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11807 * linux-low.c (linux_wait_for_event): Reformat. Use the
11808 pass_signals array.
11809 * remote-utils.c (decode_address_to_semicolon): New.
11810 * server.c (pass_signals, handle_general_set): New.
11811 (handle_query): Mention QPassSignals for qSupported.
11812 (main): Call handle_general_set.
11813 * server.h (pass_signals, decode_address_to_semicolon): New.
11815 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11817 * server.c (handle_query): Correct error handling for read_auxv.
11819 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11821 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11822 and srv_linux_thread_db to yes.
11823 * linux-s390-low.c (s390_fill_gregset): New function.
11824 (target_regsets): Define data structure.
11826 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11828 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11829 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11830 * config.in, configure: Regenerated.
11831 * inferiors.c (gdb_id_to_thread): New function.
11832 (gdb_id_to_thread_id): Use it.
11833 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11834 * linux-low.h (struct process_info): Add th member.
11835 (thread_db_get_tls_address): New prototype.
11836 * remote-utils.c (decode_address): Make non-static.
11837 * server.c (handle_query): Handle qGetTLSAddr.
11838 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11839 * target.h (struct target_ops): Add get_tls_address.
11840 * thread-db.c (maybe_attach_thread): Save the thread handle.
11841 (thread_db_get_tls_address): New.
11843 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11845 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11846 (linux_resume_one_process): Take a siginfo_t *. Update all
11847 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11848 (struct pending_signals): Add a siginfo_t.
11849 (linux_wait_for_process): Always set last_status.
11850 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11851 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11852 * linux-low.h (struct process_info): Add last_status.
11854 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11856 * remote-utils.c (try_rle): New function.
11857 (putpkt_binary): Use it.
11859 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11861 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11862 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11863 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11864 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11865 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11868 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11870 * server.c (terminal_fd): New variable.
11871 (old_foreground_pgrp): Likewise.
11872 (restore_old_foreground_pgrp): New function.
11873 (start_inferior): Record the terminal file descriptor in terminal_fd
11874 and its original foreground group in old_foreground_pgrp. Register
11875 restore_old_foreground_pgrp with atexit().
11877 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11879 * server.c (handle_query): Correct qPart to qXfer.
11881 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11883 * configure.ac: Check for more headers which are missing on
11884 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11885 * configure.srv: Add Cygwin and mingw32.
11886 * remote-utils.c: Don't include headers unconditionally which
11887 are missing on mingw32. Include <winsock.h> for mingw32.
11888 (remote_open): Adjust for mingw32 support. Flush
11889 standard error after writing to it.
11890 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11891 (unblock_async_io, enable_async_io, disable_async_io)
11892 (readchar, getpkt): Update for Winsock support.
11893 (prepare_resume_reply): Expect a protocol signal number.
11894 * server.c: Disable <sys/wait.h> on mingw32.
11895 (start_inferior): Adjust for mingw32 support. Flush
11896 standard error after writing to it.
11897 (attach_inferior): Likewise. Use protocol signal
11899 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11901 * win32-i386-low.c: New file.
11902 * Makefile.in (XM_CLIBS): Set.
11903 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11904 (win32-i386-low.o): New dependency rule.
11905 * linux-low.c (linux_wait): Use target signal numbers.
11906 * target.h (struct target_ops): Doc fix.
11907 * server.h (target_signal_to_name): New prototype.
11908 * gdbreplay.c: Don't include headers unconditionally which
11909 are missing on mingw32. Include <winsock.h> for mingw32.
11910 (remote_close, remote_open): Adjust for Winsock support.
11911 * configure, config.in: Regenerated.
11913 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11915 * server.c (decode_xfer_read, write_qxfer_response): New.
11916 (handle_query): Take a packet length argument. Handle
11917 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11918 the qSupported response.
11919 (main): Update call to handle_query.
11921 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11923 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11924 (putpkt_binary): Renamed from putpkt and adjusted for binary
11926 (putpkt): New wrapper for putpkt_binary.
11927 (readchar): Don't mask off the high bit.
11928 (decode_X_packet): New function.
11929 * server.c (main): Call putpkt_binary if a handler sets the packet
11930 length. Save the length of the incoming packet. Handle 'X'.
11931 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11933 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11935 * server.c (handle_query): Handle qSupported.
11937 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11939 * remote-utils.c (all_symbols_looked_up): New variable.
11940 (look_up_one_symbol): Check it.
11941 * server.h (look_up_one_symbol): New declaration.
11942 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11944 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11946 * Makefile.in (linux-arm-low.o): Update dependencies.
11947 * linux-arm-low.c: Include "gdb_proc_service.h".
11948 (PTRACE_GET_THREAD_AREA): Define.
11949 (ps_get_thread_area): New function.
11951 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11953 * configure.srv (m68k*-*-uclinux*): New target.
11954 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11955 (linux_resume_one_process): Remove extraneous cast.
11956 (linux_read_offsets): New.
11957 (linux_target_op): Add linux_read_offsets on mmuless systems.
11958 * server.c (handle_query): Add qOffsets logic.
11959 * target.h (struct target_ops): Add read_offsets.
11961 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11963 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11964 (PTRACE_GET_THREAD_AREA): Define.
11965 (ps_get_thread_area): New function.
11966 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11967 (linux-x86-64-low.o): Update.
11969 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11971 * configure.ac: Remove checks for prfpregset_t.
11972 * gdb_proc_service.h: New file.
11973 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11974 new "gdb_proc_service.h".
11975 * proc-service.c: Likewise.
11976 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11977 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11978 * Makefile.in (gdb_proc_service_h): Updated.
11979 * configure, config.in: Regenerated.
11981 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11983 * remote-utils.c (prepare_resume_reply): Move declaration
11984 of gdb_id_from_wait to the top of the block.
11986 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11988 * linux-low.c (regsets_store_inferior_registers): Read the regset
11989 from the target before filling it.
11991 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11993 * server.c (attach_inferior): Return SIGTRAP for a successful
11996 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11998 * Makefile.in (OBS): Add version.o.
11999 (STAGESTUFF): Delete.
12000 (version.o): Add dependencies.
12001 (version.c): Replace rule.
12002 (clean): Remove version.c.
12003 * server.c (gdbserver_version): New.
12004 (gdbserver_usage): Use printf.
12005 (main): Handle --version and --help.
12006 * server.h (version, host_name): Add declarations.
12008 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12020 * linux-x86-64-low.c:
12022 * linux-s390-low.c:
12023 * linux-ppc64-low.c:
12025 * linux-mips-low.c:
12026 * linux-m68k-low.c:
12027 * linux-m32r-low.c:
12030 * linux-ia64-low.c:
12031 * linux-i386-low.c:
12032 * linux-crisv32-low.c:
12044 * gdbserver.1: Add (C) after Copyright. Update the FSF
12047 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12049 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12050 (arm_breakpoint_at): Recognize both breakpoints.
12051 (the_low_target): Use the correct breakpoint instruction.
12053 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12055 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12056 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12057 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12058 (the_low_target): Update.
12060 2005-10-25 Andreas Schwab <schwab@suse.de>
12062 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12064 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12065 (ia64_num_regs): Reduce to 462.
12067 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12069 * acinclude.m4: Correct quoting.
12070 * aclocal.m4: Regenerated.
12072 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12073 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12074 (thread_db_init): Call thread_db_err_str.
12075 * configure.ac: Check for TD_VERSION.
12076 * config.in, configure: Regenerated.
12078 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12080 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12082 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12084 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12085 is not available. Define HAVE_PTRACE_GETREGS if it is.
12086 * config.in, configure: Regenerated.
12087 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12088 * linux-i386-low.c, linux-m68k-low.c: Update to use
12089 HAVE_PTRACE_GETREGS.
12090 * linux-low.c (regsets_fetch_inferior_registers)
12091 (regsets_store_inferior_registers): Only return 0 if we processed
12093 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12094 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12096 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12098 * inferiors.c (struct thread_info): Add gdb_id.
12099 (add_thread): Add gdb_id argument.
12100 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12101 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12102 calls to add_thread.
12103 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12104 * server.c (handle_query): Use thread_to_gdb_id.
12105 (handle_v_cont, main): Use gdb_id_to_thread_id.
12106 * server.h (add_thread): Update prototype.
12107 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12110 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12112 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12113 left-padded registers.
12114 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12115 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12117 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12119 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12120 * configure: Regenerate.
12121 * config.in: Regenerate.
12122 * server.h (NEED_DECLARATION_STRERROR):
12123 Replace with !HAVE_DECL_STRERROR.
12125 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12127 * linux-low.c (linux_wait, linux_send_signal): Don't test
12128 an unsigned long variable for > 0 if it could be MAX_ULONG.
12129 * server.c (myresume): Likewise.
12130 * target.c (set_desired_inferior): Likewise.
12132 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12134 * configure.ac: Simplify and improve check for socklen_t.
12135 * configure, config.in: Regenerate.
12137 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12139 * acconfig.h: Remove.
12140 * configure.ac: Add a test for socklen_t. Use three-argument
12141 AC_DEFINE throughout.
12142 * config.in: Regenerated using autoheader 2.59.
12143 * configure: Regenerated.
12145 * gdbreplay.c (socklen_t): Provide a default.
12146 (remote_open): Use socklen_t.
12147 * remote-utils.c (socklen_t): Provide a default.
12148 (remote_open): Use socklen_t.
12149 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12152 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12154 * linux-low.c (linux_read_memory, linux_write_memory)
12155 (linux_read_auxv): Likewise.
12156 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12157 (check_mem_write): Likewise.
12158 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12160 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12161 (registers_from_string, register_data): Likewise.
12162 * server.c (handle_query, main): Likewise.
12163 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12164 (decode_M_packet): Likewise.
12165 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12166 * target.h (struct target_ops): Update read_memory, write_memory,
12168 (read_inferior_memory, write_inferior_memory): Update.
12169 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12170 to unsigned char *.
12171 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12172 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12173 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12174 linux-s390-low.c, linux-sh-low.c: Update for changes in
12175 read_inferior_memory and the_low_target->breakpoint.
12177 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12179 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12180 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12181 * configure.srv: Add powerpc64-*-linux*.
12182 * linux-ppc64-low.c: New file.
12184 2005-05-23 Orjan Friberg <orjanf@axis.com>
12186 * linux-cris-low.c: New file with support for CRIS.
12187 * linux-crisv32-low.c: Ditto for CRISv32.
12188 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12189 (clean): Add reg-cris.c and reg-crisv32.c.
12190 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12191 reg-crisv32.o, and reg-crisv32.c to make rules.
12192 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12193 recognized targets.
12195 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12197 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12198 of sizeof (PTRACE_XFER_TYPE).
12199 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12201 2005-05-12 Orjan Friberg <orjanf@axis.com>
12203 * target.h (struct target_ops): Add insert_watchpoint,
12204 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12205 pointers for hardware watchpoint support.
12206 * linux-low.h (struct linux_target_ops): Ditto.
12207 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12208 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12209 to linux_target_ops.
12210 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12212 * server.c (main): Recognize 'Z' and 'z' packets.
12214 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12216 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12217 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12218 (the_low_target): Add new members.
12220 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12222 * proc-service.c (ps_lgetregs): Search all_processes instead of
12225 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12227 * server.c (start_inferior): Change return type to int.
12228 (attach_inferior): Change sigptr to int *.
12229 (handle_v_cont, handle_v_requests): Change signal to int *.
12230 (main): Change signal to int.
12232 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12234 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12235 * configure.srv: Add m32r*-*-linux*.
12236 * linux-m32r-low.c: New file.
12238 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12240 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12242 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12244 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12245 Take unsigned long arguments for PIDs.
12246 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12247 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12248 (wait_for_sigstop, linux_resume_one_process)
12249 (regsets_fetch_inferior_registers, linux_send_signal)
12250 (linux_read_auxv): Likewise. Update the types of variables holding
12251 PIDs. Update format string specifiers.
12252 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12253 * remote-utils.c (prepare_resume_reply): Likewise.
12254 * server.c (cont_thread, general_thread, step_thread)
12255 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12257 (handle_query): Update format specifiers.
12258 (handle_v_cont, main): Use strtoul for thread IDs.
12259 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12260 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12261 (general_thread, step_thread, thread_from_wait)
12262 (old_thread_from_wait): Update.
12263 * target.h (struct thread_resume): Use unsigned long for THREAD.
12264 (struct target_ops): Use unsigned long for arguments to attach and
12267 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12269 * acinclude.m4: Include bfd/bfd.m4 directly.
12270 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12271 <agriffis@toolchain.org>.
12272 * aclocal.m4, configure: Regenerated.
12274 2005-01-07 Andrew Cagney <cagney@gnu.org>
12276 * configure.ac: Rename configure.in, require autoconf 2.59.
12277 * configure: Re-generate.
12279 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12281 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12282 LIBS when finished.
12283 * aclocal.m4: Regenerated.
12284 * configure: Regenerated.
12286 2004-11-21 Andreas Schwab <schwab@suse.de>
12288 * linux-m68k-low.c (m68k_num_gregs): Define.
12289 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12290 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12291 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12292 (m68k_breakpoint_at): New. Add to the_low_target.
12294 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12295 srv_linux_thread_db to yes.
12297 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12299 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12300 (ARCH_SET_FS): Likewise.
12301 (ARCH_GET_FS): Likewise.
12302 (ARCH_GET_GS): Likewise.
12304 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12306 * linux-i386-low.c (ps_get_thread_area): New.
12307 * linux-x86-64-low.c (ps_get_thread_area): New.
12308 * linux-low.c: Include <sys/syscall.h>.
12309 (linux_kill_one_process): Don't kill the first thread here.
12310 (linux_kill): Kill the first thread here.
12311 (kill_lwp): New function.
12312 (send_sigstop, linux_send_signal): Use it.
12313 * proc-service.c: Clean up #ifdefs.
12314 (fpregset_info): Delete.
12315 (ps_lgetregs): Update and enable implementation.
12316 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12318 * remote-utils.c (struct sym_cache, symbol_cache): New.
12319 (input_interrupt): Print a clearer message.
12320 (async_io_enabled): New variable.
12321 (enable_async_io, disable_async_io): Use it. Update comments.
12322 (look_up_one_symbol): Use the symbol cache.
12323 * thread-db.c (thread_db_look_up_symbols): New function.
12324 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12326 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12328 * configure.in: Test for -rdynamic.
12329 * configure: Regenerated.
12330 * Makefile (INTERNAL_LDFLAGS): New.
12331 (gdbserver, gdbreplay): Use it.
12333 2004-09-02 Andrew Cagney <cagney@gnu.org>
12335 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12337 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12339 * linux-low.c (linux_wait): Clear all_processes list also.
12341 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12343 * linux-low.c: Include <errno.h>. Remove extern declaration of
12346 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12348 * gdbreplay.c, server.h, utils.c: Update copyright years.
12350 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12352 * server.c (main): Print child status or termination signal from
12353 variable 'signal', not 'sig'.
12355 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12357 * linux-low.c (linux_read_memory): Change return type to
12358 int. Check for and return error from ptrace().
12359 * target.c (read_inferior_memory): Change return type to int. Pass
12360 back return status from the_target->read_memory().
12361 * target.h (struct target_ops): Adapt *read_memory() prototype.
12363 (read_inferior_memory): Adapt prototype.
12364 * server.c (main): Return an error packet if
12365 read_inferior_memory() returns an error.
12367 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12369 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12370 Unify with other clean targets.
12372 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12374 * server.c (handle_v_cont): Call set_desired_inferior.
12376 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12378 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12380 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12382 * linux-low.c (linux_wait): Unblock async I/O.
12383 (linux_resume): Block and enable async I/O.
12384 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12385 * server.h (block_async_io, unblock_async_io): Add prototypes.
12387 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12389 * remote-utils.c (remote_open): Print a status notice after
12390 opening a TCP port.
12391 * server.c (attach_inferior): Print a status notice after
12394 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12396 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12398 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12400 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12402 * server.c, target.h: Update copyright years.
12404 2004-02-25 Roland McGrath <roland@redhat.com>
12406 * target.h (struct target_ops): New member `read_auxv'.
12407 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12408 * linux-low.c (linux_read_auxv): New function.
12409 (linux_target_ops): Initialize `read_auxv' member to that.
12411 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12413 Committed by Jim Blandy <jimb@redhat.com>.
12415 * linux-s390-low.c (s390_num_regs): Update.
12416 (s390_regmap): Remove control registers. Use __s390x__ predefine
12417 instead of GPR_SIZE to distiguish s390 and s390x targets.
12419 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12421 * linux-low.c: Update copyright year.
12422 (check_removed_breakpoint): Clear pending_is_breakpoint.
12423 (linux_set_resume_request, linux_queue_one_thread)
12424 (resume_status_pending_p): New functions.
12425 (linux_continue_one_thread): Use process->resume.
12426 (linux_resume): Only resume threads if there are no pending events.
12427 * linux-low.h (struct process_info): Add resume request
12430 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12432 * regcache.c (new_register_cache): Clear the allocated register
12433 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12435 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12437 * linux-low.c (linux_resume): Take a struct thread_resume *
12439 (linux_wait): Update call.
12440 (resume_ptr): New static variable.
12441 (linux_continue_one_thread): Renamed from
12442 linux_continue_one_process. Use resume_ptr.
12443 (linux_resume): Use linux_continue_one_thread.
12444 * server.c (handle_v_cont, handle_v_requests): New functions.
12445 (myresume): New function.
12446 (main): Handle 'v' case.
12447 * target.h (struct thread_resume): New type.
12448 (struct target_ops): Change argument of "resume" to struct
12450 (myresume): Delete macro.
12452 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12454 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12455 (uninstall): Support DESTDIR.
12457 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12459 * configure.srv: Add xscale*linux copy of arm*linux entry.
12461 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12463 * linux-arm-low.c (arm_reinsert_addr): New function.
12464 (the_low_target): Add arm_reinsert_addr.
12466 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12468 * mem-break.c: Remove whitespace at end of file.
12470 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12472 * configure.in: Check whether we need to prototype strerror.
12473 * server.h: Optionally prototype strerror.
12474 * gdbreplay.c (perror_with_name): Use strerror.
12475 * linux-low.c (linux_attach_lwp): Use strerror.
12476 * utils.c (perror_with_name): Use strerror.
12477 * config.in, configure: Regenerated.
12479 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12481 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12482 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12484 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12486 * Makefile.in (SFILES): Update.
12487 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12488 low-sun3.c: Remove files.
12490 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12492 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12493 (linux_detach_one_process, linux_detach): New functions.
12494 (linux_target_ops): Add linux_detach.
12495 * server.c (main): Handle 'D' packet.
12496 * target.h (struct target_ops): Add "detach" member.
12497 (detach_inferior): Define.
12499 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12501 From Kelley Cook <kelleycook@wideopenwest.com>:
12502 * configure.srv: Accept i[34567]86 variants.
12504 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12506 * linux-low.c (linux_wait_for_event): Correct comment typos.
12507 (linux_resume_one_process): Call check_removed_breakpoint.
12508 (linux_send_signal): New function.
12509 (linux_target_ops): Add linux_send_signal.
12510 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12512 * target.h (struct target_ops): Add send_signal.
12514 2003-05-29 Jim Blandy <jimb@redhat.com>
12516 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12517 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12518 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12519 away part of the register's value.
12521 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12523 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12524 (linux_wait_for_event, linux_init_signals): Likewise.
12526 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12528 * configure.in: Check for stdlib.h.
12529 * configure: Regenerated.
12530 * config.in: Regenerated.
12532 2003-01-04 Andreas Schwab <schwab@suse.de>
12534 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12536 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12538 * Makefile.in: Remove obsolete code.
12540 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12542 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12543 defined(PT_FPR0_HI).
12545 2002-11-17 Stuart Hughes <seh@zee2.com>
12547 * linux-arm-low.c (arm_num_regs): Increase.
12548 (arm_regmap): Include status register.
12550 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12552 * linux-low.c (register_addr): Remove incorrect -1 check.
12554 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12556 * linux-low.c (linux_create_inferior): Call setpgid. Return
12558 (unstopped_p, linux_signal_pid): Remove.
12559 (linux_target_ops): Remove linux_signal_pid.
12560 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12561 global instead of target method.
12562 * target.h (struct target_ops): Remove signal_pid. Update comment
12563 for create_inferior.
12564 * server.c (signal_pid): New variable.
12565 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12566 gdbserver. Set the child to be the foreground process group.
12567 (attach_inferior): Set signal_pid.
12569 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12571 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12573 2002-08-20 Jim Blandy <jimb@redhat.com>
12575 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12578 2002-08-01 Andrew Cagney <cagney@redhat.com>
12580 * Makefile.in: Make chill references obsolete.
12582 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12584 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12585 * configure: Regenerate.
12586 * config.in: Regenerate.
12588 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12590 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12591 (perror_with_name, remote_close, remote_open, expect, play): Static.
12593 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12595 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12596 byte offsets instead of an array of indexes.
12597 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12599 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12601 * regcache.c: Add comment.
12603 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12605 * thread-db.c: New file.
12606 * proc-service.c: New file.
12607 * acinclude.m4: New file.
12608 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12609 proc-service.o, and thread-db.o.
12610 (linux-low.o): Add USE_THREAD_DB.
12611 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12612 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12613 * aclocal.m4: Regenerated.
12614 * config.in: Regenerated.
12615 * configure: Regenerated.
12616 * configure.in: Check for proc_service.h, sys/procfs.h,
12617 thread_db.h, and linux/elf.h headrs.
12618 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12619 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12620 Check for -lthread_db and thread support.
12621 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12622 PowerPC, and SuperH.
12623 * i387-fp.c: Constify arguments.
12624 * i387-fp.h: Likewise.
12625 * inferiors.c: (struct thread_info): Renamed from
12626 `struct inferior_info'. Remove PID member. Use generic inferior
12627 list header. All uses updated.
12628 (inferiors, signal_pid): Removed.
12629 (all_threads): New variable.
12630 (get_thread): Define.
12631 (add_inferior_to_list): New function.
12632 (for_each_inferior): New function.
12633 (change_inferior_id): New function.
12634 (add_inferior): Removed.
12635 (remove_inferior): New function.
12636 (add_thread): New function.
12637 (free_one_thread): New function.
12638 (remove_thread): New function.
12639 (clear_inferiors): Use for_each_inferior and free_one_thread.
12640 (find_inferior): New function.
12641 (find_inferior_id): New function.
12642 (inferior_target_data): Update argument type.
12643 (set_inferior_target_data): Likewise.
12644 (inferior_regcache_data): Likewise.
12645 (set_inferior_regcache_data): Likewise.
12646 * linux-low.c (linux_bp_reinsert): Remove.
12647 (all_processes, stopping_threads, using_thrads)
12648 (struct pending_signals, debug_threads, pid_of): New.
12649 (inferior_pid): Replace with macro.
12650 (struct inferior_linux_data): Remove.
12651 (get_stop_pc, add_process): New functions.
12652 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12653 Use add_process and add_thread.
12654 (linux_attach_lwp): New function, based on old linux_attach. Use
12655 add_process and add_thread. Set stop_expected for new threads.
12656 (linux_attach): New function.
12657 (linux_kill_one_process): New function.
12658 (linux_kill): Kill all LWPs.
12659 (linux_thread_alive): Use find_inferior_id.
12660 (check_removed_breakpoints, status_pending_p): New functions.
12661 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12662 Update. Use WNOHANG. Wait for cloned processes also. Update process
12663 struct for the found process.
12664 (linux_wait_for_event): New function.
12665 (linux_wait): Use it. Support LWPs.
12666 (send_sigstop, wait_for_sigstop, stop_all_processes)
12667 (linux_resume_one_process, linux_continue_one_process): New functions.
12668 (linux_resume): Support LWPs.
12669 (REGISTER_RAW_SIZE): Remove.
12670 (fetch_register): Use register_size instead. Call supply_register.
12671 (usr_store_inferior_registers): Likewise. Call collect_register.
12672 Fix recursive case.
12673 (regsets_fetch_inferior_registers): Improve error message.
12674 (regsets_store_inferior_registers): Add debugging.
12675 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12676 (unstopped_p, linux_signal_pid): New functions.
12677 (linux_target_ops): Add linux_signal_pid.
12678 (linux_init_signals): New function.
12679 (initialize_low): Call it. Initialize using_threads.
12680 * regcache.c (inferior_regcache_data): Add valid
12682 (get_regcache): Fetch registers lazily. Add fetch argument
12683 and update all callers.
12684 (regcache_invalidate_one, regcache_invalidate): New
12686 (new_register_cache): Renamed from create_register_cache.
12687 Return the new regcache.
12688 (free_register_cache): Change argument to a void *.
12689 (registers_to_string, registers_from_string): Call get_regcache
12690 with fetch flag set.
12691 (register_data): Make static. Pass fetch flag to get_regcache.
12692 (supply_register): Call get_regcache with fetch flag clear.
12693 (collect_register): Call get_regcache with fetch flag set.
12694 (collect_register_as_string): New function.
12695 * regcache.h: Update.
12696 * remote-utils.c (putpkt): Flush after debug output and use
12698 Handle input interrupts while waiting for an ACK.
12699 (input_interrupt): Use signal_pid method.
12700 (getpkt): Flush after debug output and use stderr.
12701 (outreg): Use collect_register_as_string.
12702 (new_thread_notify, dead_thread_notify): New functions.
12703 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12704 and general_thread.
12705 (look_up_one_symbol): Flush after debug output.
12706 * server.c (step_thread, server_waiting): New variables.
12707 (start_inferior): Don't use signal_pid. Update call to mywait.
12708 (attach_inferior): Update call to mywait.
12709 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12710 (main): Don't fetch/store registers explicitly. Use
12711 set_desired_inferior. Support proposed ``Hs'' packet. Update
12713 * server.h: Update.
12714 (struct inferior_list, struct_inferior_list_entry): New.
12715 * target.c (set_desired_inferior): New.
12716 (write_inferior_memory): Constify.
12717 (mywait): New function.
12718 * target.h: Update.
12719 (struct target_ops): New signal_pid method.
12720 (mywait): Removed macro, added prototype.
12722 * linux-low.h (regset_func): Removed.
12723 (regset_fill_func, regset_store_func): New.
12724 (enum regset_type): New.
12725 (struct regset_info): Add type field. Use new operation types.
12726 (struct linux_target_ops): stop_pc renamed to get_pc.
12727 Add decr_pc_after_break and breakpoint_at.
12728 (get_process, get_thread_proess, get_process_thread)
12729 (strut process_info, all_processes, linux_attach_lwp)
12730 (thread_db_init): New.
12732 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12733 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12734 (the_low_target): Add new members.
12735 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12736 (i386_store_fpxregset): Constify.
12737 (target_regsets): Add new kind identifier.
12738 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12739 (i386_set_pc): Add debugging.
12740 (i386_breakpoint_at): New function.
12741 (the_low_target): Add new members.
12742 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12743 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12744 (mips_breakpoint_at): New.
12745 (the_low_target): Add new members.
12746 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12747 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12748 (the_low_target): Add new members.
12749 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12750 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12751 (the_low_target): Add new members.
12752 * linux-x86-64-low.c (target_regsets): Add new kind
12755 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12757 From Martin Pool <mbp@samba.org>:
12758 * server.c (gdbserver_usage): New function.
12761 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12763 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12764 stop_at -> stop_pc.
12766 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12768 * Makefile.in: Remove obsolete code.
12770 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12772 * linux-low.c (regsets_fetch_inferior_registers),
12773 (regsets_store_inferior_registers): Removed cast to int from
12775 * regcache.h: Added declaration of struct inferior_info.
12777 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12779 * inferiors.c (struct inferior_info): Add regcache_data.
12780 (add_inferior): Call create_register_cache.
12781 (clear_inferiors): Call free_register_cache.
12782 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12783 * regcache.c (struct inferior_regcache_data): New.
12784 (registers): Remove.
12785 (get_regcache): New function.
12786 (create_register_cache, free_register_cache): New functions.
12787 (set_register_cache): Don't initialize the register cache here.
12788 (registers_to_string, registers_from_string, register_data): Call
12790 * regcache.h: Add prototypes.
12791 * server.h: Likewise.
12793 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12795 * mem-break.c: New file.
12796 * mem-break.h: New file.
12797 * Makefile.in: Add mem-break.o rule; update server.h
12799 * inferiors.c (struct inferior_info): Add target_data
12801 (clear_inferiors): Free target_data member if set.
12802 (inferior_target_data, set_inferior_target_data): New functions.
12803 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12804 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12805 * linux-low.c (linux_bp_reinsert): New variable.
12806 (struct inferior_linux_data): New.
12807 (linux_create_inferior): Use set_inferior_target_data.
12808 (linux_attach): Likewise. Call add_inferior.
12809 (linux_wait_for_one_inferior): New function.
12810 (linux_wait): Call it.
12811 (linux_write_memory): Add const.
12812 (initialize_low): Call set_breakpoint_data.
12813 * linux-low.h (struct linux_target_ops): Add breakpoint
12815 * server.c (attach_inferior): Remove extra add_inferior
12817 * server.h: Include mem-break.h. Update inferior.c
12819 * target.c (read_inferior_memory)
12820 (write_inferior_memory): New functions.
12821 * target.h (read_inferior_memory)
12822 (write_inferior_memory): Change macros to prototypes.
12823 (struct target_ops): Update comments. Add const to write_memory
12826 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12828 * linux-low.c (usr_store_inferior_registers): Support
12829 registers which are allowed to fail to store.
12830 * linux-low.h (linux_target_ops): Likewise.
12831 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12832 (ppc_cannot_store_register): FPSCR may not be storable.
12834 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12836 * server.h: Include <string.h> if HAVE_STRING_H.
12837 * ChangeLog: Correct paths in last ChangeLog entry.
12839 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12841 * linux-low.h: Remove obsolete prototypes.
12842 (struct linux_target_ops): New.
12843 (extern the_low_target): New.
12844 * linux-low.c (num_regs, regmap): Remove declarations.
12845 (register_addr): Use the_low_target explicitly.
12846 (fetch_register): Likewise.
12847 (usr_fetch_inferior_registers): Likewise.
12848 (usr_store_inferior_registers): Likewise.
12849 * linux-arm-low.c (num_regs): Remove.
12850 (arm_num_regs): Define.
12851 (arm_regmap): Renamed from regmap, made static.
12852 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12854 (arm_cannot_store_register): Renamed from cannot_store_register,
12856 (the_low_target): New.
12857 * linux-i386-low.c (num_regs): Remove.
12858 (i386_num_regs): Define.
12859 (i386_regmap): Renamed from regmap, made static.
12860 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12862 (i386_cannot_store_register): Renamed from cannot_store_register,
12864 (the_low_target): New.
12865 * linux-ia64-low.c (num_regs): Remove.
12866 (ia64_num_regs): Define.
12867 (ia64_regmap): Renamed from regmap, made static.
12868 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12870 (ia64_cannot_store_register): Renamed from cannot_store_register,
12872 (the_low_target): New.
12873 * linux-m68k-low.c (num_regs): Remove.
12874 (m68k_num_regs): Define.
12875 (m68k_regmap): Renamed from regmap, made static.
12876 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12878 (m68k_cannot_store_register): Renamed from cannot_store_register,
12880 (the_low_target): New.
12881 * linux-mips-low.c (num_regs): Remove.
12882 (mips_num_regs): Define.
12883 (mips_regmap): Renamed from regmap, made static.
12884 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12886 (mips_cannot_store_register): Renamed from cannot_store_register,
12888 (the_low_target): New.
12889 * linux-ppc-low.c (num_regs): Remove.
12890 (ppc_num_regs): Define.
12891 (ppc_regmap): Renamed from regmap, made static.
12892 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12894 (ppc_cannot_store_register): Renamed from cannot_store_register,
12896 (the_low_target): New.
12897 * linux-s390-low.c (num_regs): Remove.
12898 (s390_num_regs): Define.
12899 (s390_regmap): Renamed from regmap, made static.
12900 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12902 (s390_cannot_store_register): Renamed from cannot_store_register,
12904 (the_low_target): New.
12905 * linux-sh-low.c (num_regs): Remove.
12906 (sh_num_regs): Define.
12907 (sh_regmap): Renamed from regmap, made static.
12908 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12910 (sh_cannot_store_register): Renamed from cannot_store_register,
12912 (the_low_target): New.
12913 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12914 (the_low_target): New.
12916 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12918 * Makefile.in: Add stamp-h target.
12919 * configure.in: Create stamp-h.
12920 * configure: Regenerated.
12922 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12924 * inferiors.c: New file.
12925 * target.c: New file.
12926 * target.h: New file.
12927 * Makefile.in: Add target.o and inferiors.o. Update
12929 * linux-low.c (inferior_pid): New static variable,
12930 moved from server.c.
12931 (linux_create_inferior): Renamed from create_inferior.
12932 Call add_inferior. Return 0 on success instead of a PID.
12933 (linux_attach): Renamed from myattach.
12934 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12935 (linux_thread_alive): Renamed from mythread_alive.
12936 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12938 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12939 (regsets_store_inferior_registers): Correct error message.
12940 Add missing ``return 0''.
12941 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12942 (linux_store_registers): Renamed from store_inferior_registers.
12943 (linux_read_memory): Renamed from read_inferior_memory.
12944 (linux_write_memory): Renamed from write_inferior_memory.
12945 (linux_target_ops): New structure.
12946 (initialize_low): Call set_target_ops ().
12947 * remote-utils.c (unhexify): New function.
12948 (hexify): New function.
12949 (input_interrupt): Send signals to ``signal_pid''.
12950 * server.c (inferior_pid): Remove.
12951 (start_inferior): Update create_inferior call.
12952 (attach_inferior): Call add_inferior.
12953 (handle_query): New function.
12954 (main): Call handle_query for `q' packets.
12955 * server.h: Include "target.h". Remove obsolete prototypes.
12956 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12958 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12960 * Makefile.in: Add WARN_CFLAGS. Update configury
12962 * configure.in: Check for <string.h>
12963 * configure: Regenerate.
12964 * config.in: Regenerate.
12965 * gdbreplay.c: Include needed system headers.
12966 (remote_open): Remove strchr prototype.
12967 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12968 * regcache.c (supply_register): Change buf argument to const void *.
12969 (supply_register_by_name): Likewise.
12970 (collect_register): Change buf argument to void *.
12971 (collect_register_by_name): Likewise.
12972 * regcache.h: Add missing prototypes.
12973 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12974 * server.c (handle_query): New function.
12975 (attached): New static variable, moved out of main.
12976 (main): Quiet longjmp clobber warnings.
12977 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12978 * utils.c (error): Remove NORETURN.