1 2016-01-21 Pedro Alves <palves@redhat.com>
3 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5 * configure: Regenerate.
7 2016-01-21 Yao Qi <yao.qi@linaro.org>
9 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
10 is_thumb and set it according to CPSR saved on the stack.
11 (get_next_pcs_syscall_next_pc): Pass is_thumb to
12 arm_sigreturn_next_pc.
14 2016-01-18 Yao Qi <yao.qi@linaro.org>
16 * linux-low.c (linux_set_pc_64bit): New function.
17 (linux_get_pc_64bit): New function.
18 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
20 * linux-sparc-low.c (debug_threads): Remove declaration.
21 (sparc_get_pc): Remove.
22 (the_low_target): Use linux_get_pc_64bit instead of
24 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
25 (the_low_target): Use linux_get_pc_64bit and
28 2016-01-18 Yao Qi <yao.qi@linaro.org>
30 * linux-arm-low.c (debug_threads): Remove declaration.
31 (arm_get_pc, arm_set_pc): Remove.
32 (the_low_target): Use linux_get_pc_32bit and
34 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
35 (the_low_target): Use linux_get_pc_32bit and
37 * linux-cris-low.c (debug_threads): Remove declaration.
38 (cris_get_pc, cris_set_pc,): Remove.
39 (the_low_target): Use linux_get_pc_32bit and
41 * linux-crisv32-low.c (debug_threads): Remove declaration.
42 (cris_get_pc, cris_set_pc): Remove.
43 (the_low_target): Use linux_get_pc_32bit and
45 * linux-low.c: Include inttypes.h.
46 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
47 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
48 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
49 (the_low_target): Use linux_get_pc_32bit and
51 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
52 (the_low_target): Use linux_get_pc_32bit and
54 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
55 (the_low_target): Use linux_get_pc_32bit and
57 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
58 (the_low_target): Use linux_get_pc_32bit and
60 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
61 (the_low_target): Use linux_get_pc_32bit and
64 2016-01-18 Gary Benson <gbenson@redhat.com>
66 * configure.ac (AC_FUNC_FORK): New check.
67 * config.in: Regenerate.
68 * configure: Likewise.
70 2016-01-14 Yao Qi <yao.qi@linaro.org>
72 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
73 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
74 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
75 arm_get_next_pcs_ctor.
77 2016-01-12 Josh Stone <jistone@redhat.com>
78 Philippe Waroquiers <philippe.waroquiers@skynet.be>
80 * inferiors.h: Include "gdb_vecs.h".
81 (struct process_info): Add syscalls_to_catch.
82 * inferiors.c (remove_process): Free syscalls_to_catch.
83 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
85 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
86 * server.c (handle_general_set): Handle QCatchSyscalls.
87 (handle_query): Report support for QCatchSyscalls.
88 * target.h (struct target_ops): Add supports_catch_syscall.
89 (target_supports_catch_syscall): New macro.
90 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
91 (struct lwp_info): Add syscall_state.
92 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
93 Maintain syscall_state and syscalls_to_catch across exec.
94 (get_syscall_trapinfo): New function, proxy to the_low_target.
95 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
96 (linux_low_filter_event): Toggle syscall_state entry/return for
97 syscall traps, and set it ignored for all others.
98 (gdb_catching_syscalls_p): New function.
99 (gdb_catch_this_syscall_p): New function.
100 (linux_wait_1): Handle SYSCALL_SIGTRAP.
101 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
102 (linux_supports_catch_syscall): New function.
103 (linux_target_ops): Install it.
104 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
105 (the_low_target): Install it.
107 2016-01-12 Mike Frysinger <vapier@gentoo.org>
109 * acinclude.m4: Include new ../warning.m4 file.
110 * configure: Regenerated.
111 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
113 2016-01-12 Mike Frysinger <vapier@gentoo.org>
115 * ax.c (is_goto_target): Mark static.
116 * linux-low.c (register_addr): Likewise.
117 (linux_fetch_registers, linux_store_registers): Likewise.
118 * mem-break.c (any_persistent_commands): Fix old prototype.
119 (add_commands_to_breakpoint): Mark static.
120 * regcache.c (find_register_by_name): Delete unused func.
121 * remote-utils.c (hex_or_minus_one): Mark static.
122 * server.c (monitor_show_help): Mark static.
123 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
124 handle_v_requests): Likewise.
126 2016-01-12 Pedro Alves <palves@redhat.com>
128 Remove use of the registered trademark symbol throughout.
130 2016-01-08 Yao Qi <yao.qi@linaro.org>
132 * remote-utils.c (getpkt): If c is '\003', call target hook
135 2016-01-06 Yao Qi <yao.qi@linaro.org>
137 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
139 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
140 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
141 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
142 (thumb2_breakpoint): Declare.
143 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
145 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
146 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
147 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
149 2016-01-01 Joel Brobecker <brobecker@adacore.com>
151 * gdbreplay.c (gdbreplay_version): Change copyright year in
153 * server.c (gdbserver_version): Likewise.
155 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
157 * server.c (crc32_table): Delete.
158 (crc32): Use libiberty's xcrc32 function.
160 2015-12-22 Joel Brobecker <brobecker@adacore.com>
162 * lynx-low.c (lynx_delete_thread_callback): New function.
163 (lynx_mourn): Properly delete our process and all of its
164 threads. Remove call to clear_inferiors.
166 2015-12-22 Joel Brobecker <brobecker@adacore.com>
168 * target.c (thread_search_callback): Add check that
169 the thread_stopped target callback is not NULL before
172 2015-12-21 Yao Qi <yao.qi@linaro.org>
174 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
177 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
179 * server.c (handle_query): Call target_supports_software_single_step.
181 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
183 * linux-low.c (single_step): New function.
184 (linux_resume_one_lwp_throw): Call single_step.
185 (start_step_over): Likewise.
187 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
189 * Makefile.in (SFILES): Append arch/arm-linux.c,
190 arch/arm-get-next-pcs.c.
191 (arm-linux.o): New rule.
192 (arm-get-next-pcs.o): New rule.
193 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
195 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
196 to linux-aarch32-low.c.
197 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
198 (arm_breakpoint_len, thumb_breakpoint): Likewise.
199 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
200 (thumb2_breakpoint_len): Likewise.
201 (arm_is_thumb_mode): Make non-static.
202 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
203 from linux-aarch32-low.c.
204 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
205 (arm_breakpoint_len, thumb_breakpoint): Likewise.
206 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
207 (thumb2_breakpoint_len): Likewise.
208 (arm_is_thumb_mode): New declaration.
209 * linux-arm-low.c: Include arch/arm-linux.h
210 aarch/arm-get-next-pcs.h, sys/syscall.h.
211 (get_next_pcs_ops): New struct.
212 (get_next_pcs_addr_bits_remove): New function.
213 (get_next_pcs_is_thumb): New function.
214 (get_next_pcs_read_memory_unsigned_integer): Likewise.
215 (arm_sigreturn_next_pc): Likewise.
216 (get_next_pcs_syscall_next_pc): Likewise.
217 (arm_gdbserver_get_next_pcs): Likewise.
218 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
220 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
221 * server.h: Include gdb_vecs.h.
223 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
225 * Makefile.in (SFILES): Append common/common-regcache.c.
226 (OBS): Append common-regcache.o.
227 (common-regcache.o): New rule.
228 * regcache.c (init_register_cache): Initialize cache to
230 (regcache_raw_read_unsigned): New function.
231 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
232 register_status enum.
234 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
236 * linux-aarch64-low.c (the_low_targets): Rename
237 breakpoint_reinsert_addr to get_next_pcs.
238 * linux-arm-low.c (the_low_targets): Likewise.
239 * linux-bfin-low.c (the_low_targets): Likewise.
240 * linux-cris-low.c (the_low_targets): Likewise.
241 * linux-crisv32-low.c (the_low_targets): Likewise.
242 * linux-low.c (can_software_single_step): Likewise.
243 (install_software_single_step_breakpoints): New function.
244 (start_step_over): Use install_software_single_step_breakpoints.
245 * linux-low.h: New CORE_ADDR vector.
246 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
248 * linux-mips-low.c (the_low_targets): Likewise.
249 * linux-nios2-low.c (the_low_targets): Likewise.
250 * linux-sparc-low.c (the_low_targets): Likewise.
252 2015-12-17 Pedro Alves <palves@redhat.com>
254 * linux-low.c (linux_kill_one_lwp): Remove references to
256 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
258 (linux_init_signals): Delete.
259 (initialize_low): Adjust.
260 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
262 2015-12-16 Pedro Alves <palves@redhat.com>
264 * configure.ac (compiler warning flags): When testing a
265 -Wno-foo option, check whether -Wfoo works instead.
266 * configure: Regenerate.
268 2015-12-11 Don Breazeal <donb@codesourcery.com>
270 * server.c (process_serial_event): Don't exit from gdbserver
271 in remote mode if there are still active inferiors.
273 2015-12-11 Yao Qi <yao.qi@linaro.org>
275 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
276 arm_breakpoint_at if the process is 32-bit.
278 2015-12-11 Yao Qi <yao.qi@linaro.org>
280 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
283 2015-12-07 Yao Qi <yao.qi@linaro.org>
285 * configure.srv: Append arm.o to srv_tgtobj for
286 aarch64*-*-linux* target.
287 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
288 from linux-arm-low.c.
289 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
290 (arm_breakpoint_len, thumb_breakpoint): Likewise.
291 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
292 (thumb2_breakpoint_len): Likewise.
293 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
294 (arm_breakpoint_kinds): Likewise.
295 (arm_breakpoint_kind_from_pc): Likewise.
296 (arm_sw_breakpoint_from_kind): Likewise.
297 (arm_breakpoint_kind_from_current_state): Likewise.
298 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
299 (arm_sw_breakpoint_from_kind): Declare.
300 (arm_breakpoint_kind_from_current_state): Declare.
301 (arm_breakpoint_at): Declare.
302 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
303 arm_sw_breakpoint_from_kind if process is 32-bit.
304 (aarch64_breakpoint_kind_from_pc): New function.
305 (aarch64_breakpoint_kind_from_current_state): New function.
306 (the_low_target): Initialize fields breakpoint_kind_from_pc
307 and breakpoint_kind_from_current_state.
308 * linux-arm-low.c (arm_breakpoint_kinds): Move to
310 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
311 (arm_breakpoint, arm_breakpoint_len): Likewise.
312 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
313 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
314 (arm_is_thumb_mode): Likewise.
315 (arm_breakpoint_at): Likewise.
316 (arm_breakpoint_kind_from_pc): Likewise.
317 (arm_sw_breakpoint_from_kind): Likewise.
318 (arm_breakpoint_kind_from_current_state): Likewise.
321 2015-08-04 Yao Qi <yao.qi@linaro.org>
323 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
324 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
325 * server.c (extended_protocol): Remove "static".
326 * server.h (extended_protocol): Declare it.
328 2015-12-04 Josh Stone <jistone@redhat.com>
330 * target.h (struct target_ops) <arch_setup>: Rename to ...
331 (struct target_ops) <post_create_inferior>: ... this.
332 (target_arch_setup): Rename to ...
333 (target_post_create_inferior): ... this, calling post_create_inferior.
334 * server.c (start_inferior): Update target_arch_setup calls to
335 target_post_create_inferior.
336 * linux-low.c (linux_low_ptrace_options): Forward declare.
337 (linux_arch_setup): Update its comment for general use.
338 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
339 (struct linux_target_ops): Use linux_post_create_inferior.
340 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
341 to post_create_inferior.
342 * nto-low.c (struct nto_target_ops): Likewise.
343 * spu-low.c (struct spu_target_ops): Likewise.
344 * win32-low.c (struct win32_target_ops): Likewise.
346 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
348 * linux-arm-low.c: Remove duplicate arch/arm.h include.
350 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
352 * linux-arm-low.c (arm_reinsert_addr): Remove function.
353 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
354 * linux-cris-low.c (cris_reinsert_addr> Remove function.
355 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
356 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
357 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
358 * linux-mips-low.c (mips_reinsert_addr): Remove function.
359 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
360 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
361 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
362 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
363 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
365 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
367 * linux-low.c (linux_look_up_symbols): Don't call
368 linux_supports_traceclone.
369 * linux-low.h (thread_db_init): Remove use_events argument.
370 * thread-db.c (thread_db_use_event): Remove global variable.
371 (struct thread_db) <td_thr_event_enable_p>: Remove field.
372 (struct thread_db) <td_create_bp>: Remove field.
373 (thread_db_create_event): Remove function.
374 (thread_db_enable_reporting): Likewise.
375 (find_one_thread): Don't check for thread_db_use_events.
376 (attach_thread): Likewise.
377 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
378 (try_thread_db_load_1): Don't check for thread_db_use_events.
379 (thread_db_init): Remove use_events argument and thread events
381 (remove_thread_event_breakpoints): Remove function.
382 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
384 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
386 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
388 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
389 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
390 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
391 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
392 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
394 * linux-crisv32-low.c (cris_supports_hardware_single_step):
396 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
397 * linux-low.c (can_hardware_single_step): Use
398 supports_hardware_single_step.
399 (can_software_single_step): New function.
400 (start_step_over): Call can_software_single_step.
401 (linux_supports_hardware_single_step): New function.
402 (struct target_ops) <supports_software_single_step>: Initialize.
403 * linux-low.h (struct linux_target_ops)
404 <supports_hardware_single_step>: Initialize.
405 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
406 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
407 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
408 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
409 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
410 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
411 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
412 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
413 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
414 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
416 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
417 (struct linux_target_ops) <tile_supports_hardware_single_step>:
419 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
420 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
421 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
423 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
424 * target.h (struct target_ops): <supports_software_single_step>:
426 (target_supports_software_single_step): New macro.
428 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
430 * linux-low.c (linux_wait_1): Fix pc advance condition.
431 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
432 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
434 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
436 * linux-arm-low.c (arm_is_thumb_mode): New function.
437 (arm_breakpoint_at): Use arm_is_thumb_mode.
438 (arm_breakpoint_kind_from_current_state): New function.
439 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
441 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
442 (linux_breakpoint_kind_from_current_state): New function.
443 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
444 * linux-low.h (struct linux_target_ops)
445 <breakpoint_kind_from_current_state>: New field.
446 * target.h (struct target_ops): Likewise.
447 (target_breakpoint_kind_from_current_state): New macro.
449 2015-11-30 Pedro Alves <palves@redhat.com>
451 * linux-low.c (linux_resume): Wake up the event loop before
454 2015-11-30 Pedro Alves <palves@redhat.com>
456 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
458 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
460 * target.c (struct thread_search): New structure.
461 (thread_search_callback): New function.
462 (prev_general_thread): New global.
463 (prepare_to_access_memory, done_accessing_memory): New functions.
464 * target.h (prepare_to_access_memory, done_accessing_memory):
465 Replace macros with function declarations.
467 2015-11-30 Pedro Alves <palves@redhat.com>
470 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
471 report TARGET_WAITKIND_NO_RESUMED.
472 * remote-utils.c (prepare_resume_reply): Handle
473 TARGET_WAITKIND_NO_RESUMED.
474 * server.c (report_no_resumed): New global.
475 (handle_query) <qSupported>: Handle "no-resumed+". Report
476 "no-resumed+" support.
477 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
478 return error if the client doesn't support no-resumed events.
479 (push_stop_notification): New function.
480 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
481 events if the client supports them.
483 2015-11-30 Pedro Alves <palves@redhat.com>
485 * linux-low.c (thread_still_has_status_pending_p): Don't check
487 (lwp_resumed): New function.
488 (status_pending_p_callback): Return early if the LWP is not
489 supposed to be resumed.
491 2015-11-30 Pedro Alves <palves@redhat.com>
493 * linux-low.c (handle_extended_wait): Assert that the LWP's
494 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
495 thread create events, leave the new child's status pending.
496 (linux_low_filter_event): If GDB wants to hear about thread exit
497 events, leave the LWP marked dead and don't delete it.
498 (linux_wait_for_event_filtered): Don't check for thread exit.
499 (filter_exit_event): New function.
500 (linux_wait_1): Use it, when returning an exit event.
501 (linux_resume_one_lwp_throw): Assert that the LWP's
502 waitstatus is TARGET_WAITKIND_IGNORE.
503 * remote-utils.c (prepare_resume_reply): Handle
504 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
505 * server.c (report_thread_events): New global.
506 (handle_general_set): Handle QThreadEvents.
507 (handle_query) <qSupported>: Handle and report QThreadEvents+;
508 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
509 TARGET_WAITKIND_THREAD_EXITED.
510 * server.h (report_thread_events): Declare.
512 2015-11-30 Pedro Alves <palves@redhat.com>
514 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
515 the thread's last_resume_kind was resume_stop.
517 2015-11-30 Pedro Alves <palves@redhat.com>
519 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
522 2015-11-30 Pedro Alves <palves@redhat.com>
524 * server.c (handle_v_requests): Handle vCtrlC.
526 2015-11-30 Pedro Alves <palves@redhat.com>
528 * gdbthread.h (find_any_thread_of_pid): Declare.
529 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
531 * server.c (handle_query): If current_thread is NULL, look for
532 another thread of the selected process.
534 2015-11-26 Daniel Colascione <dancol@dancol.org>
535 Simon Marchi <simon.marchi@ericsson.com>
537 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
538 * server.c (handle_qxfer_threads_worker): Refactor to include thread
540 * target.h (struct target_ops) <thread_name>: New field.
541 (target_thread_name): New macro.
543 2015-11-23 Joel Brobecker <brobecker@adacore.com>
545 * regcache.h (regcache_invalidate_pid): Add declaration.
546 * regcache.c (regcache_invalidate_pid): New function, extracted
547 from regcache_invalidate.
548 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
549 Add trivial documentation comment.
550 * lynx-low.c: Use regcache_invalidate_pid instead of
553 2015-11-23 Joel Brobecker <brobecker@adacore.com>
555 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
556 and Elf64_auxv_t if the target is Android.
558 2015-11-22 Doug Evans <xdje42@gmail.com>
560 * target.h: #include <sys/types.h>.
562 2015-11-19 Pedro Alves <palves@redhat.com>
564 * linux-low.c (linux_process_qsupported): Change prototype.
566 * linux-low.h (struct linux_target_ops) <process_qsupported>:
568 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
569 and adjust to loop over all features.
570 * server.c (handle_query) <qSupported>: Adjust to call
571 target_process_qsupported once, passing it a vector of unprocessed
573 * target.h (struct target_ops) <process_qsupported>: Change
575 (target_process_qsupported): Adjust.
577 2015-11-19 Pedro Alves <palves@redhat.com>
579 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
581 * configure: Regenerate.
583 2015-11-19 Pedro Alves <palves@redhat.com>
585 * configure: Regenerate.
587 2015-11-19 Yao Qi <yao.qi@linaro.org>
589 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
592 2015-11-19 Yao Qi <yao.qi@linaro.org>
594 * linux-aarch64-low.c (enum aarch64_operand_type): New.
595 (struct aarch64_operand): Move enum out.
597 2015-11-19 Yao Qi <yao.qi@linaro.org>
599 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
600 struct user_fpsimd_state *.
601 (aarch64_store_fpregset): Likewise.
603 2015-11-19 Yao Qi <yao.qi@linaro.org>
605 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
606 struct user_pt_regs *.
607 (aarch64_store_gregset): Likewise.
609 2015-11-18 Pedro Alves <palves@redhat.com>
611 * Makefile.in (all_object_files): Add $IPA_OBJS.
613 2015-11-17 Pedro Alves <palves@redhat.com>
615 * win32-low.c (win32_resume): Use gdb_signal_from_host,
616 GDB_SIGNAL_0 and gdb_signal_to_string.
618 2015-11-17 Pedro Alves <palves@redhat.com>
620 * win32-low.c (handle_output_debug_string): Remove parameter.
621 (win32_kill): Remove our_status local and adjust call to
622 handle_output_debug_string.
623 (get_child_debug_event): Adjust call to
624 handle_output_debug_string.
626 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
628 * linux-mips-low.c (mips_fill_gregset): Add cast.
629 (mips_store_gregset): Likewise.
630 (mips_fill_fpregset): Likewise.
631 (mips_store_fpregset): Likewise.
633 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
635 * linux-mips-low.c (mips_add_watchpoint): Rename private to
638 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
640 * linux-mips-low.c (mips_linux_new_thread): Change type of
641 watch_type to enum target_hw_bp_type.
643 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
645 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
646 Change return type to arm_hwbp_type.
648 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
650 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
651 (arm_store_gregset): Likewise.
652 * linux-arm-low.c (arm_get_hwcap): Likewise.
653 (arm_read_description): Likewise.
655 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
657 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
659 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
661 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
662 (ppc_fill_vsxregset): Likewise.
663 (ppc_store_vsxregset): Likewise.
664 (ppc_fill_vrregset): Likewise.
665 (ppc_store_vrregset): Likewise.
666 (ppc_fill_evrregset): Likewise.
667 (ppc_store_evrregset): Likewise.
669 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
671 * linux-ppc-low.c (ppc_usrregs_info): Remove
673 (ppc_arch_setup): Move lower in file.
675 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
677 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
678 (ps_pdwrite): Likewise.
680 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
682 * linux-arm-low.c (arm_new_thread): Move pointer dereference
683 to after assert checks.
685 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
687 * proc-service.c (ps_pdread): Add/adjust casts.
688 (ps_pdwrite): Add/adjust casts.
690 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
692 * server.c (handle_search_memory_1): Cast return value of
695 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
697 * server.c (write_qxfer_response): Change type of data to
700 2015-10-29 Pedro Alves <palves@redhat.com>
702 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
704 2015-10-29 Pedro Alves <palves@redhat.com>
706 * tracepoint.c (clear_installed_tracepoints): Add casts.
708 2015-10-29 Pedro Alves <palves@redhat.com>
710 * server.c (handle_v_cont, process_serial_event): Add enum
711 gdb_signal casts to signal parsing code.
713 2015-10-29 Pedro Alves <palves@redhat.com>
715 * linux-low.h (NULL_REGSET): Define.
716 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
717 * linux-arm-low.c (arm_regsets): Likewise.
718 * linux-crisv32-low.c (cris_regsets): Likewise.
719 * linux-m68k-low.c (m68k_regsets): Likewise.
720 * linux-mips-low.c (mips_regsets): Likewise.
721 * linux-nios2-low.c (nios2_regsets): Likewise.
722 * linux-ppc-low.c (ppc_regsets): Likewise.
723 * linux-s390-low.c (s390_regsets): Likewise.
724 * linux-sh-low.c (sh_regsets): Likewise.
725 * linux-sparc-low.c (sparc_regsets): Likewise.
726 * linux-tic6x-low.c (tic6x_regsets): Likewise.
727 * linux-tile-low.c (tile_regsets): Likewise.
728 * linux-x86-low.c (x86_regsets): Likewise.
729 * linux-xtensa-low.c (xtensa_regsets): Likewise.
731 2015-10-29 Pedro Alves <palves@redhat.com>
733 * linux-low.h (NULL_REGSET): Define.
734 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
735 * linux-arm-low.c (arm_regsets): Likewise.
736 * linux-crisv32-low.c (cris_regsets): Likewise.
737 * linux-m68k-low.c (m68k_regsets): Likewise.
738 * linux-mips-low.c (mips_regsets): Likewise.
739 * linux-nios2-low.c (nios2_regsets): Likewise.
740 * linux-ppc-low.c (ppc_regsets): Likewise.
741 * linux-s390-low.c (s390_regsets): Likewise.
742 * linux-sh-low.c (sh_regsets): Likewise.
743 * linux-sparc-low.c (sparc_regsets): Likewise.
744 * linux-tic6x-low.c (tic6x_regsets): Likewise.
745 * linux-tile-low.c (tile_regsets): Likewise.
746 * linux-x86-low.c (x86_regsets): Likewise.
747 * linux-xtensa-low.c (xtensa_regsets): Likewise.
749 2015-10-26 Doug Evans <dje@google.com>
751 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
753 2015-10-26 Doug Evans <dje@google.com>
755 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
757 2015-10-26 Doug Evans <dje@google.com>
759 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
761 (attach_thread, find_new_threads_callback): Ditto.
763 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
765 * mem-break.h (set_breakpoint_data): Remove.
767 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
769 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
770 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
771 (initialize_low): Remove set_breakpoint_data call.
772 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
773 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
774 (initialize_low): Remove set_breakpoint_data call.
775 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
776 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
777 (initialize_low): Remove set_breakpoint_data call.
779 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
781 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
782 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
783 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
784 * target.h (target_breakpoint_kind_from_pc): New macro.
786 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
788 * linux-low.c (default_breakpoint_kind_from_pc): New function.
789 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
790 the default breakpoint kind.
792 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
794 * linux-arm-low.c (arm_supports_z_point_type): Add software
797 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
799 * linux-arm-low.c: Refactor breakpoint definitions.
800 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
801 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
803 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
805 * Makefile.in: Add arm.c/o.
806 * configure.srv: Likewise.
807 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
808 (arm_breakpoint_kind_from_pc): New function.
809 (arm_sw_breakpoint_from_kind): Return proper kind.
810 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
812 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
814 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
816 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
817 (struct raw_breakpoint) <size>: Remove.
818 (struct raw_breakpoint) <kind>: Add.
819 (bp_size): New function.
820 (bp_opcode): Likewise.
821 (find_raw_breakpoint_at): Adjust for kind.
822 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
823 (remove_memory_breakpoint): Adjust for kind call bp_size.
824 (set_raw_breakpoint_at): Adjust for kind.
825 (set_breakpoint): Likewise.
826 (set_breakpoint_at): Call breakpoint_kind_from_pc.
827 (delete_raw_breakpoint): Adjust for kind.
828 (delete_breakpoint): Likewise.
829 (find_gdb_breakpoint): Likewise.
830 (set_gdb_breakpoint_1): Likewise.
831 (set_gdb_breakpoint): Likewise.
832 (delete_gdb_breakpoint_1): Likewise.
833 (delete_gdb_breakpoint): Likewise.
834 (uninsert_raw_breakpoint): Likewise.
835 (reinsert_raw_breakpoint): Likewise.
836 (set_breakpoint_data): Remove.
837 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
838 (check_mem_read): Adjust for kind call bp_size.
839 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
840 (clone_one_breakpoint): Adjust for kind.
841 * mem-break.h (set_gdb_breakpoint): Likewise.
842 (delete_gdb_breakpoint): Likewise.
843 * server.c (process_serial_event): Likewise.
845 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
847 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
848 (struct linux_target_ops) <breakpoint>: Remove.
849 (struct linux_target_ops) <breakpoint_len>: Remove.
850 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
851 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
852 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
853 (arm_sw_breakpoint_from_kind): New function.
854 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
855 (struct linux_target_ops) <breakpoint>: Remove.
856 (struct linux_target_ops) <breakpoint_len>: Remove.
857 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
858 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
859 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
860 (struct linux_target_ops) <breakpoint>: Remove.
861 (struct linux_target_ops) <breakpoint_len>: Remove.
862 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
863 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
864 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
865 (struct linux_target_ops) <breakpoint>: Remove.
866 (struct linux_target_ops) <breakpoint_len>: Remove.
867 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
868 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
869 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
870 and sw_breakpoint_from_kind to increment the pc.
871 (linux_breakpoint_kind_from_pc): New function.
872 (linux_sw_breakpoint_from_kind): New function.
873 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
874 (initialize_low): Call breakpoint_kind_from_pc and
875 sw_breakpoint_from_kind to replace breakpoint_data/len.
876 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
878 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
879 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
880 (struct linux_target_ops) <breakpoint>: Remove.
881 (struct linux_target_ops) <breakpoint_len>: Remove.
882 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
883 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
884 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
885 (struct linux_target_ops) <breakpoint>: Remove.
886 (struct linux_target_ops) <breakpoint_len>: Remove.
887 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
888 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
889 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
890 (struct linux_target_ops) <breakpoint>: Remove.
891 (struct linux_target_ops) <breakpoint_len>: Remove.
892 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
893 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
894 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
895 (struct linux_target_ops) <breakpoint>: Remove.
896 (struct linux_target_ops) <breakpoint_len>: Remove.
897 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
898 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
899 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
900 (struct linux_target_ops) <breakpoint>: Remove.
901 (struct linux_target_ops) <breakpoint_len>: Remove.
902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
904 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
905 (struct linux_target_ops) <breakpoint>: Remove.
906 (struct linux_target_ops) <breakpoint_len>: Remove.
907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
909 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
910 (struct linux_target_ops) <breakpoint>: Remove.
911 (struct linux_target_ops) <breakpoint_len>: Remove.
912 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
913 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
914 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
915 (struct linux_target_ops) <breakpoint>: Remove.
916 (struct linux_target_ops) <breakpoint_len>: Remove.
917 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
918 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
919 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
920 (struct linux_target_ops) <breakpoint>: Remove.
921 (struct linux_target_ops) <breakpoint_len>: Remove.
922 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
924 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
925 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
926 (struct linux_target_ops) <breakpoint>: Remove.
927 (struct linux_target_ops) <breakpoint_len>: Remove.
928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
930 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
931 (struct linux_target_ops) <breakpoint>: Remove.
932 (struct linux_target_ops) <breakpoint_len>: Remove.
933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
936 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
938 * linux-cris-low.c (cris_get_pc): Remove void arg.
940 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
942 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
945 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
947 * inferiors.c (thread_pid_matches_callback): New function.
948 (find_thread_process): New function.
949 (remove_thread): Reset current_thread.
950 (remove_process): Assert threads have been removed first.
952 2015-10-15 Yao Qi <yao.qi@linaro.org>
954 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
956 (aarch64_remove_point): Likewise.
957 * regcache.c (regcache_register_size): New function.
959 2015-10-12 Yao Qi <yao.qi@linaro.org>
961 * linux-aarch64-low.c: Update all callers as emit_load_store
962 is renamed to aarch64_emit_load_store.
964 2015-10-12 Yao Qi <yao.qi@linaro.org>
966 * linux-aarch64-low.c: Update all callers of function renaming
967 from emit_insn to aarch64_emit_insn.
969 2015-10-12 Yao Qi <yao.qi@linaro.org>
971 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
973 (struct aarch64_memory_operand): Likewise.
975 (emit_insn): Move to arch/aarch64-insn.c.
976 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
977 (emit_load_store): Move to arch/aarch64-insn.c.
978 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
979 (can_encode_int32): Remove.
981 2015-10-12 Yao Qi <yao.qi@linaro.org>
983 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
984 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
985 (aarch64_relocate_instruction): Likewise.
986 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
987 (struct aarch64_insn_visitor): Likewise.
989 2015-10-12 Yao Qi <yao.qi@linaro.org>
991 * linux-aarch64-low.c (struct aarch64_insn_data): New.
992 (struct aarch64_insn_visitor): New.
993 (struct aarch64_insn_relocation_data): New.
994 (aarch64_ftrace_insn_reloc_b): New function.
995 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
996 (aarch64_ftrace_insn_reloc_cb): Likewise.
997 (aarch64_ftrace_insn_reloc_tb): Likewise.
998 (aarch64_ftrace_insn_reloc_adr): Likewise.
999 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1000 (aarch64_ftrace_insn_reloc_others): Likewise.
1002 (aarch64_relocate_instruction): Use visitor.
1004 2015-10-12 Yao Qi <yao.qi@linaro.org>
1006 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1007 int. Add argument buf.
1008 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1009 aarch64_relocate_instruction.
1011 2015-10-12 Yao Qi <yao.qi@linaro.org>
1013 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1014 argument insn. Remove local variable insn. Don't call
1016 (aarch64_install_fast_tracepoint_jump_pad): Call
1019 2015-09-30 Yao Qi <yao.qi@linaro.org>
1021 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1022 (emit_load_store_pair): Likewise.
1024 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1026 * dll.c (match_dll): Add cast(s).
1027 (unloaded_dll): Likewise.
1028 * linux-low.c (second_thread_of_pid_p): Likewise.
1029 (delete_lwp_callback): Likewise.
1030 (count_events_callback): Likewise.
1031 (select_event_lwp_callback): Likewise.
1032 (linux_set_resume_request): Likewise.
1033 * server.c (accumulate_file_name_length): Likewise.
1034 (emit_dll_description): Likewise.
1035 (handle_qxfer_threads_worker): Likewise.
1036 (visit_actioned_threads): Likewise.
1037 * thread-db.c (any_thread_of): Likewise.
1038 * tracepoint.c (same_process_p): Likewise.
1039 (match_blocktype): Likewise.
1040 (build_traceframe_info_xml): Likewise.
1042 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1044 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1046 (gdb_unparse_agent_expr): Likewise.
1047 * hostio.c (require_data): Likewise.
1048 (handle_pread): Likewise.
1049 * linux-low.c (disable_regset): Likewise.
1050 (fetch_register): Likewise.
1051 (store_register): Likewise.
1052 (get_dynamic): Likewise.
1053 (linux_qxfer_libraries_svr4): Likewise.
1054 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1055 (set_fast_tracepoint_jump): Likewise.
1056 (uninsert_fast_tracepoint_jumps_at): Likewise.
1057 (reinsert_fast_tracepoint_jumps_at): Likewise.
1058 (validate_inserted_breakpoint): Likewise.
1059 (clone_agent_expr): Likewise.
1060 * regcache.c (init_register_cache): Likewise.
1061 * remote-utils.c (putpkt_binary_1): Likewise.
1062 (decode_M_packet): Likewise.
1063 (decode_X_packet): Likewise.
1064 (look_up_one_symbol): Likewise.
1065 (relocate_instruction): Likewise.
1066 (monitor_output): Likewise.
1067 * server.c (handle_search_memory): Likewise.
1068 (handle_qxfer_exec_file): Likewise.
1069 (handle_qxfer_libraries): Likewise.
1070 (handle_qxfer): Likewise.
1071 (handle_query): Likewise.
1072 (handle_v_cont): Likewise.
1073 (handle_v_run): Likewise.
1074 (captured_main): Likewise.
1075 * target.c (write_inferior_memory): Likewise.
1076 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1077 * tracepoint.c (init_trace_buffer): Likewise.
1078 (add_tracepoint_action): Likewise.
1079 (add_traceframe): Likewise.
1080 (add_traceframe_block): Likewise.
1081 (cmd_qtdpsrc): Likewise.
1082 (cmd_qtdv): Likewise.
1083 (cmd_qtstatus): Likewise.
1084 (response_source): Likewise.
1085 (response_tsv): Likewise.
1086 (cmd_qtnotes): Likewise.
1087 (gdb_collect): Likewise.
1088 (initialize_tracepoint): Likewise.
1090 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1092 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1093 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1094 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1096 (enum aarch64_condition_codes): New enum.
1097 (w0): New static global.
1100 (struct aarch64_memory_operand) <type>: New
1101 MEMORY_OPERAND_POSTINDEX type.
1102 (postindex_memory_operand): New helper function.
1103 (emit_ret): New function.
1104 (emit_load_store_pair): New function, factored out of emit_stp
1105 with support for MEMORY_OPERAND_POSTINDEX.
1106 (emit_stp): Rewrite using emit_load_store_pair.
1107 (emit_ldp): New function.
1108 (emit_load_store): Likewise.
1109 (emit_ldr): Mention post-index instruction in comment.
1110 (emit_ldrh): New function.
1111 (emit_ldrb): New function.
1112 (emit_ldrsw): Mention post-index instruction in comment.
1113 (emit_str): Likewise.
1114 (emit_subs): New function.
1115 (emit_cmp): Likewise.
1116 (emit_and): Likewise.
1117 (emit_orr): Likewise.
1118 (emit_orn): Likewise.
1119 (emit_eor): Likewise.
1120 (emit_mvn): Likewise.
1121 (emit_lslv): Likewise.
1122 (emit_lsrv): Likewise.
1123 (emit_asrv): Likewise.
1124 (emit_mul): Likewise.
1125 (emit_sbfm): Likewise.
1126 (emit_sbfx): Likewise.
1127 (emit_ubfm): Likewise.
1128 (emit_ubfx): Likewise.
1129 (emit_csinc): Likewise.
1130 (emit_cset): Likewise.
1131 (emit_nop): Likewise.
1132 (emit_ops_insns): New helper function.
1133 (emit_pop): Likewise.
1134 (emit_push): Likewise.
1135 (aarch64_emit_prologue): New function.
1136 (aarch64_emit_epilogue): Likewise.
1137 (aarch64_emit_add): Likewise.
1138 (aarch64_emit_sub): Likewise.
1139 (aarch64_emit_mul): Likewise.
1140 (aarch64_emit_lsh): Likewise.
1141 (aarch64_emit_rsh_signed): Likewise.
1142 (aarch64_emit_rsh_unsigned): Likewise.
1143 (aarch64_emit_ext): Likewise.
1144 (aarch64_emit_log_not): Likewise.
1145 (aarch64_emit_bit_and): Likewise.
1146 (aarch64_emit_bit_or): Likewise.
1147 (aarch64_emit_bit_xor): Likewise.
1148 (aarch64_emit_bit_not): Likewise.
1149 (aarch64_emit_equal): Likewise.
1150 (aarch64_emit_less_signed): Likewise.
1151 (aarch64_emit_less_unsigned): Likewise.
1152 (aarch64_emit_ref): Likewise.
1153 (aarch64_emit_if_goto): Likewise.
1154 (aarch64_emit_goto): Likewise.
1155 (aarch64_write_goto_address): Likewise.
1156 (aarch64_emit_const): Likewise.
1157 (aarch64_emit_call): Likewise.
1158 (aarch64_emit_reg): Likewise.
1159 (aarch64_emit_pop): Likewise.
1160 (aarch64_emit_stack_flush): Likewise.
1161 (aarch64_emit_zero_ext): Likewise.
1162 (aarch64_emit_swap): Likewise.
1163 (aarch64_emit_stack_adjust): Likewise.
1164 (aarch64_emit_int_call_1): Likewise.
1165 (aarch64_emit_void_call_2): Likewise.
1166 (aarch64_emit_eq_goto): Likewise.
1167 (aarch64_emit_ne_goto): Likewise.
1168 (aarch64_emit_lt_goto): Likewise.
1169 (aarch64_emit_le_goto): Likewise.
1170 (aarch64_emit_gt_goto): Likewise.
1171 (aarch64_emit_ge_got): Likewise.
1172 (aarch64_emit_ops_impl): New static global variable.
1173 (aarch64_emit_ops): New target function, return
1174 &aarch64_emit_ops_impl.
1175 (struct linux_target_ops): Install it.
1177 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1179 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1180 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1182 * linux-aarch64-ipa.c: New file.
1183 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1185 (aarch64_get_thread_area): New target method.
1186 (extract_signed_bitfield): New helper function.
1187 (aarch64_decode_ldr_literal): New function.
1188 (enum aarch64_opcodes): New enum.
1189 (struct aarch64_register): New struct.
1190 (struct aarch64_operand): New struct.
1191 (x0): New static global.
1200 (aarch64_register): New helper function.
1201 (register_operand): Likewise.
1202 (immediate_operand): Likewise.
1203 (struct aarch64_memory_operand): New struct.
1204 (offset_memory_operand): New helper function.
1205 (preindex_memory_operand): Likewise.
1206 (enum aarch64_system_control_registers): New enum.
1207 (ENCODE): New macro.
1208 (emit_insn): New helper function.
1209 (emit_b): New function.
1210 (emit_bcond): Likewise.
1211 (emit_cb): Likewise.
1212 (emit_tb): Likewise.
1213 (emit_blr): Likewise.
1214 (emit_stp): Likewise.
1215 (emit_ldp_q_offset): Likewise.
1216 (emit_stp_q_offset): Likewise.
1217 (emit_load_store): Likewise.
1218 (emit_ldr): Likewise.
1219 (emit_ldrsw): Likewise.
1220 (emit_str): Likewise.
1221 (emit_ldaxr): Likewise.
1222 (emit_stxr): Likewise.
1223 (emit_stlr): Likewise.
1224 (emit_data_processing_reg): Likewise.
1225 (emit_data_processing): Likewise.
1226 (emit_add): Likewise.
1227 (emit_sub): Likewise.
1228 (emit_mov): Likewise.
1229 (emit_movk): Likewise.
1230 (emit_mov_addr): Likewise.
1231 (emit_mrs): Likewise.
1232 (emit_msr): Likewise.
1233 (emit_sevl): Likewise.
1234 (emit_wfe): Likewise.
1235 (append_insns): Likewise.
1236 (can_encode_int32_in): New helper function.
1237 (aarch64_relocate_instruction): New function.
1238 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1239 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1240 (struct linux_target_ops): Install aarch64_get_thread_area,
1241 aarch64_install_fast_tracepoint_jump_pad and
1242 aarch64_get_min_fast_tracepoint_insn_len.
1244 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1246 * Makefile.in (aarch64-insn.o): New rule.
1247 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1249 2015-09-21 Yao Qi <yao.qi@linaro.org>
1251 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1253 2015-09-21 Yao Qi <yao.qi@linaro.org>
1255 * tracepoint.c (max_jump_pad_size): Remove.
1257 2015-09-18 Yao Qi <yao.qi@linaro.org>
1259 * linux-aarch64-low.c: Don't include sys/uio.h.
1260 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1262 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1264 * tracepoint.c (eval_result_type): Change prototype.
1265 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1267 2015-09-15 Pedro Alves <palves@redhat.com>
1269 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1270 Check whether to report exec events instead of checking whether
1271 multiprocess is enabled.
1273 2015-09-15 Pedro Alves <palves@redhat.com>
1276 * remote-utils.c (prepare_resume_reply): Merge
1277 TARGET_WAITKIND_VFORK_DONE switch case with the
1278 TARGET_WAITKIND_FORKED case.
1280 2015-09-15 Yao Qi <yao.qi@linaro.org>
1282 * server.c (handle_query): Check string comparison using
1283 "else if" instead of "if".
1285 2015-09-15 Yao Qi <yao.qi@linaro.org>
1287 * server.c (vCont_supported): New global variable.
1288 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1289 matches. Append ";vContSupported+" to own_buf.
1290 (handle_v_requests): Append ";s;S" to own_buf if target supports
1291 hardware single step or vCont_supported is false.
1292 (capture_main): Set vCont_supported to zero.
1294 2015-09-15 Yao Qi <yao.qi@linaro.org>
1296 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1298 (linux_supports_hardware_single_step): ... New function.
1299 (linux_target_ops): Update.
1300 * lynx-low.c (lynx_target_ops): Set field
1301 supports_hardware_single_step to target_can_do_hardware_single_step.
1302 * nto-low.c (nto_target_ops): Likewise.
1303 * spu-low.c (spu_target_ops): Likewise.
1304 * win32-low.c (win32_target_ops): Likewise.
1305 * target.c (target_can_do_hardware_single_step): New function.
1306 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1307 Remove. <supports_hardware_single_step>: New field.
1308 (target_supports_conditional_breakpoints): Remove.
1309 (target_supports_hardware_single_step): New macro.
1310 (target_can_do_hardware_single_step): Declare.
1311 * server.c (handle_query): Use target_supports_hardware_single_step
1312 instead of target_supports_conditional_breakpoints.
1314 2015-09-15 Yao Qi <yao.qi@linaro.org>
1316 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1318 (struct linux_target_ops the_low_target): Install
1319 aarch64_linux_siginfo_fixup.
1321 2015-09-11 Don Breazeal <donb@codesourcery.com>
1322 Luis Machado <lgustavo@codesourcery.com>
1324 * linux-low.c (linux_mourn): Static declaration.
1325 (linux_arch_setup): Move in front of
1326 handle_extended_wait.
1327 (linux_arch_setup_thread): New function.
1328 (handle_extended_wait): Handle exec events. Call
1329 linux_arch_setup_thread. Make event_lwp argument a
1330 pointer-to-a-pointer.
1331 (check_zombie_leaders): Do not check stopped threads.
1332 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1333 (linux_low_filter_event): Add lwp and thread for exec'ing
1334 non-leader thread if leader thread has been deleted.
1335 Refactor code into linux_arch_setup_thread and call it.
1336 Pass child lwp pointer by reference to handle_extended_wait.
1337 (linux_wait_for_event_filtered): Update comment.
1338 (linux_wait_1): Prevent clobbering exec event status.
1339 (linux_supports_exec_events): New function.
1340 (linux_target_ops) <supports_exec_events>: Initialize new member.
1341 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1343 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1344 * server.c (report_exec_events): New global variable.
1345 (handle_query): Handle qSupported query for exec-events feature.
1346 (captured_main): Initialize report_exec_events.
1347 * server.h (report_exec_events): Declare new global variable.
1348 * target.h (struct target_ops) <supports_exec_events>: New
1350 (target_supports_exec_events): New macro.
1351 * win32-low.c (win32_target_ops) <supports_exec_events>:
1352 Initialize new member.
1354 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1356 * linux-low.c (linux_low_enable_btrace): Remove.
1357 (linux_target_ops): Replace linux_low_enable_btrace with
1358 linux_enable_btrace.
1360 2015-09-03 Yao Qi <yao.qi@linaro.org>
1362 * linux-aarch64-low.c (aarch64_insert_point): Call
1363 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1366 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1368 * linux-low.c (check_stopped_by_breakpoint): Use
1369 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1371 2015-08-27 Pedro Alves <palves@redhat.com>
1373 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1375 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1377 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1378 the XNEW-family equivalent.
1379 (compile_bytecodes): Likewise.
1380 * dll.c (loaded_dll): Likewise.
1381 * event-loop.c (append_callback_event): Likewise.
1382 (create_file_handler): Likewise.
1383 (create_file_event): Likewise.
1384 * hostio.c (handle_open): Likewise.
1385 * inferiors.c (add_thread): Likewise.
1386 (add_process): Likewise.
1387 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1388 * linux-arm-low.c (arm_new_process): Likewise.
1389 (arm_new_thread): Likewise.
1390 * linux-low.c (add_to_pid_list): Likewise.
1391 (linux_add_process): Likewise.
1392 (handle_extended_wait): Likewise.
1393 (add_lwp): Likewise.
1394 (enqueue_one_deferred_signal): Likewise.
1395 (enqueue_pending_signal): Likewise.
1396 (linux_resume_one_lwp_throw): Likewise.
1397 (linux_resume_one_thread): Likewise.
1398 (linux_read_memory): Likewise.
1399 (linux_write_memory): Likewise.
1400 * linux-mips-low.c (mips_linux_new_process): Likewise.
1401 (mips_linux_new_thread): Likewise.
1402 (mips_add_watchpoint): Likewise.
1403 * linux-x86-low.c (initialize_low_arch): Likewise.
1404 * lynx-low.c (lynx_add_process): Likewise.
1405 * mem-break.c (set_raw_breakpoint_at): Likewise.
1406 (set_breakpoint): Likewise.
1407 (add_condition_to_breakpoint): Likewise.
1408 (add_commands_to_breakpoint): Likewise.
1409 (clone_agent_expr): Likewise.
1410 (clone_one_breakpoint): Likewise.
1411 * regcache.c (new_register_cache): Likewise.
1412 * remote-utils.c (look_up_one_symbol): Likewise.
1413 * server.c (queue_stop_reply): Likewise.
1414 (start_inferior): Likewise.
1415 (queue_stop_reply_callback): Likewise.
1416 (handle_target_event): Likewise.
1417 * spu-low.c (fetch_ppc_memory): Likewise.
1418 (store_ppc_memory): Likewise.
1419 * target.c (set_target_ops): Likewise.
1420 * thread-db.c (thread_db_load_search): Likewise.
1421 (try_thread_db_load_1): Likewise.
1422 * tracepoint.c (add_tracepoint): Likewise.
1423 (add_tracepoint_action): Likewise.
1424 (create_trace_state_variable): Likewise.
1425 (cmd_qtdpsrc): Likewise.
1426 (cmd_qtro): Likewise.
1427 (add_while_stepping_state): Likewise.
1428 * win32-low.c (child_add_thread): Likewise.
1429 (get_image_name): Likewise.
1431 2015-08-25 Yao Qi <yao.qi@linaro.org>
1433 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1435 2015-08-25 Yao Qi <yao.qi@linaro.org>
1437 * Makefile.in (aarch64-linux.o): New rule.
1438 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1440 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1441 (aarch64_init_debug_reg_state): Make it extern.
1442 (aarch64_linux_prepare_to_resume): Remove.
1444 2015-08-25 Yao Qi <yao.qi@linaro.org>
1446 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1447 lwp_arch_private_info and ptid_of_lwp.
1449 2015-08-25 Yao Qi <yao.qi@linaro.org>
1451 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1452 Find proc_info by find_process_pid. All callers updated.
1454 2015-08-25 Yao Qi <yao.qi@linaro.org>
1456 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1458 (debug_reg_change_callback): Remove.
1459 (aarch64_notify_debug_reg_change): Remove.
1461 2015-08-25 Yao Qi <yao.qi@linaro.org>
1463 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1464 Call current_lwp_ptid.
1466 2015-08-25 Yao Qi <yao.qi@linaro.org>
1468 * linux-aarch64-low.c (debug_reg_change_callback): Use
1471 2015-08-25 Yao Qi <yao.qi@linaro.org>
1473 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1475 2015-08-25 Yao Qi <yao.qi@linaro.org>
1477 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1479 2015-08-25 Yao Qi <yao.qi@linaro.org>
1481 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1484 2015-08-25 Yao Qi <yao.qi@linaro.org>
1486 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1488 (debug_reg_change_callback): Remove argument entry and add argument
1489 lwp. Remove local variable thread. Don't print thread id in the
1490 debugging output. Don't check whether pid of thread equals to pid.
1491 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1492 iterate_over_lwps instead find_inferior.
1494 2015-08-24 Pedro Alves <palves@redhat.com>
1496 * inferiors.c (get_first_process): New function.
1497 * inferiors.h (get_first_process): New declaration.
1498 * remote-utils.c (read_ptid): Default to the first process in the
1499 list, instead of to the current thread's process.
1501 2015-08-24 Pedro Alves <palves@redhat.com>
1503 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1504 * event-loop.c: Likewise.
1505 * remote-utils.c: Likewise.
1506 * tracepoint.c: Likewise.
1508 2015-08-24 Pedro Alves <palves@redhat.com>
1510 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1513 2015-08-21 Pedro Alves <palves@redhat.com>
1515 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1516 instead of literal 1.
1518 2015-08-21 Pedro Alves <palves@redhat.com>
1520 * tdesc.c (default_description): Explicitly zero-initialize.
1522 2015-08-21 Pedro Alves <palves@redhat.com>
1525 * inferiors.c (remove_thread): Discard any pending stop reply for
1527 * server.c (remove_all_on_match_pid): Rename to ...
1528 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1530 (discard_queued_stop_replies): Change parameter to a ptid. Now
1532 (handle_v_kill, kill_inferior_callback, captured_main)
1533 (process_serial_event): Adjust.
1534 * server.h (discard_queued_stop_replies): Declare.
1536 2015-08-21 Pedro Alves <palves@redhat.com>
1538 * linux-low.c (wait_for_sigstop): Always switch to no thread
1539 selected if the previously current thread dies.
1540 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1541 process instead of the current thread's.
1542 * remote-utils.c (input_interrupt): Don't check if there's no
1544 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1545 current thread to the general thread fails, error out.
1546 (handle_qxfer_auxv, handle_qxfer_libraries)
1547 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1548 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1549 (handle_query): Check if there's a thread selected instead of
1550 checking whether there's any thread in the thread list.
1551 (handle_qxfer_threads, handle_qxfer_btrace)
1552 (handle_qxfer_btrace_conf): Don't error out early if there's no
1553 thread in the thread list.
1554 (handle_v_cont, myresume): Don't set the current thread to the
1556 (process_serial_event) <Hg handling>: Also set thread_id if the
1557 previous general thread is still alive.
1558 (process_serial_event) <g/G handling>: If setting the current
1559 thread to the general thread fails, error out.
1560 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1561 thread's lwp instead of the current thread's.
1562 * target.c (set_desired_thread): If the desired thread was not
1563 found, leave the current thread pointing to NULL. Return an int
1564 (boolean) indicating success.
1565 * target.h (set_desired_thread): Change return type to int.
1567 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1569 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1570 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1572 (ps_get_thread_area): New function.
1574 2015-08-19 Gary Benson <gbenson@redhat.com>
1576 * hostio.c (handle_pread): Do not attempt to read more data
1577 than hostio_reply_with_data can fit in a packet.
1579 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1581 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1583 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1585 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1587 2015-08-06 Pedro Alves <palves@redhat.com>
1589 * tracepoint.c (expr_eval_result): Now an int.
1591 2015-08-06 Pedro Alves <palves@redhat.com>
1593 * gdbthread.h (struct regcache): Forward declare.
1594 (struct thread_info) <regcache_data>: Now a struct regcache
1596 * inferiors.c (inferior_regcache_data)
1597 (set_inferior_regcache_data): Now work with struct regcache
1599 * inferiors.h (struct regcache): Forward declare.
1600 (inferior_regcache_data, set_inferior_regcache_data): Now work
1601 with struct regcache pointers.
1602 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1603 (free_register_cache_thread): Remove struct regcache pointer
1606 2015-08-06 Pedro Alves <palves@redhat.com>
1608 * server.c (captured_main): On error, print the exception message
1609 to stderr, and if run_once is set, throw a quit.
1611 2015-08-06 Pedro Alves <palves@redhat.com>
1613 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1616 2015-08-06 Pedro Alves <palves@redhat.com>
1618 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1619 reading beyond the passed in buffer length.
1621 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1623 * tracepoint.c (symbol_list) <required>: Remove.
1625 2015-08-06 Pedro Alves <palves@redhat.com>
1627 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1628 count if stopping and suspending threads.
1629 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1630 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1631 (linux_detach): Complete an ongoing step-over.
1632 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1634 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1635 (linux_wait_1): If passing a signal to the inferior after
1636 finishing a step-over, unsuspend and re-resume all lwps. If we
1637 see a single-step event but the thread should be continuing, don't
1638 pass the trap to gdb.
1639 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1640 internal_error instead of gdb_assert.
1641 (enqueue_pending_signal): New function.
1642 (check_ptrace_stopped_lwp_gone): Add debug output.
1643 (start_step_over): Use internal_error instead of gdb_assert.
1644 (complete_ongoing_step_over): New function.
1645 (linux_resume_one_thread): Don't resume a suspended thread.
1646 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1649 2015-08-06 Pedro Alves <palves@redhat.com>
1651 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1652 (linux_thread_alive): Use lwp_is_marked_dead.
1653 (extended_event_reported): Delete.
1654 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1655 instead of extended_event_reported.
1656 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1658 (lwp_is_marked_dead): New function.
1659 (lwp_running): Use lwp_is_marked_dead.
1660 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1663 2015-08-06 Pedro Alves <palves@redhat.com>
1665 * linux-low.c (linux_wait_1): Move fork event output out of the
1666 !report_to_gdb check. Pass event_child->waitstatus to
1667 target_waitstatus_to_string instead of ourstatus.
1669 2015-08-04 Yao Qi <yao.qi@linaro.org>
1671 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1672 if current_thread is 32 bit.
1674 2015-08-04 Yao Qi <yao.qi@linaro.org>
1676 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1677 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1678 * server.c (extended_protocol): Remove "static".
1679 * server.h (extended_protocol): Declare it.
1681 2015-08-04 Yao Qi <yao.qi@linaro.org>
1683 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1684 both aarch64 and aarch32.
1685 (aarch64_set_pc): Likewise.
1687 2015-08-04 Yao Qi <yao.qi@linaro.org>
1689 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1690 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1691 arm-with-neon.xml to srv_xmlfiles.
1692 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1693 (is_64bit_tdesc): New function.
1694 (aarch64_linux_read_description): New function.
1695 (aarch64_arch_setup): Call aarch64_linux_read_description.
1696 (regs_info): Rename to regs_info_aarch64.
1697 (aarch64_regs_info): Return right regs_info.
1698 (initialize_low_arch): Call initialize_low_arch_aarch32.
1700 2015-08-04 Yao Qi <yao.qi@linaro.org>
1702 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1703 * linux-aarch32-low.c: New file.
1704 * linux-aarch32-low.h: New file.
1705 * linux-arm-low.c (arm_fill_gregset): Move it to
1706 linux-aarch32-low.c.
1707 (arm_store_gregset): Likewise.
1708 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1709 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1710 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1711 (regs_info): Rename to regs_info_arm.
1712 (arm_regs_info): Return regs_info_aarch32 if
1713 have_ptrace_getregset is 1 and target description is
1714 arm_with_neon or arm_with_vfpv3.
1715 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1716 Call initialize_low_arch_aarch32 instead.
1718 2015-08-04 Yao Qi <yao.qi@linaro.org>
1720 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1721 * linux-low.c: ... here.
1722 * linux-low.h (have_ptrace_getregset): Declare it.
1724 2015-08-04 Pedro Alves <palves@redhat.com>
1726 * thread-db.c (struct thread_db): Use new typedefs.
1727 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1729 (disable_thread_event_reporting): Cast result of dlsym to
1730 destination function pointer type.
1731 (thread_db_mourn): Use td_ta_delete_ftype.
1733 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1735 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1737 (CDX_BREAKPOINT): Define for R2.
1738 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1739 (the_low_target): Add comments.
1741 2015-07-30 Yao Qi <yao.qi@linaro.org>
1743 * linux-arm-low.c (arm_hwcap): Remove it.
1744 (arm_read_description): New local variable arm_hwcap. Don't
1745 set arm_hwcap to zero.
1747 2015-07-30 Yao Qi <yao.qi@linaro.org>
1749 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1750 Use regcache->tdesc instead.
1751 (arm_store_wmmxregset): Likewise.
1752 (arm_fill_vfpregset): Likewise.
1753 (arm_store_vfpregset): Likewise.
1755 2015-07-30 Yao Qi <yao.qi@linaro.org>
1757 * linux-arm-low.c: Include arch/arm.h.
1758 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1759 (arm_store_gregset): Likewise.
1761 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1763 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1764 ptrace's 4th parameter.
1766 2015-07-27 Yao Qi <yao.qi@linaro.org>
1768 * configure.srv (case aarch64*-*-linux*): Don't set
1771 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1773 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1775 * linux-arm-low.c: Likewise.
1776 * linux-cris-low.c: Likewise.
1777 * linux-crisv32-low.c: Likewise.
1778 * linux-low.c: Likewise.
1779 * linux-m68k-low.c: Likewise.
1780 * linux-mips-low.c: Likewise.
1781 * linux-nios2-low.c: Likewise.
1782 * linux-s390-low.c: Likewise.
1783 * linux-sparc-low.c: Likewise.
1784 * linux-tic6x-low.c: Likewise.
1785 * linux-tile-low.c: Likewise.
1786 * linux-x86-low.c: Likewise.
1788 2015-07-24 Pedro Alves <palves@redhat.com>
1790 * config.in: Regenerate.
1791 * configure: Regenerate.
1793 2015-07-24 Pedro Alves <palves@redhat.com>
1795 * acinclude.m4: Include ../ptrace.m4.
1796 * configure.ac: Call GDB_AC_PTRACE.
1797 * config.in, configure: Regenerate.
1799 2015-07-24 Yao Qi <yao.qi@linaro.org>
1801 * linux-low.c (linux_create_inferior): Remove setting to
1802 proc->priv->new_inferior.
1803 (linux_attach): Likewise.
1804 (linux_low_filter_event): Likewise.
1805 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1807 2015-07-24 Yao Qi <yao.qi@linaro.org>
1809 * linux-low.c (linux_arch_setup): New function.
1810 (linux_low_filter_event): If proc->tdesc is NULL and
1811 proc->attached is true, call the_low_target.arch_setup.
1812 Otherwise, keep status pending, and return.
1813 (linux_resume_one_lwp_throw): Don't call get_pc if
1814 thread->while_stepping isn't NULL. Don't call
1815 get_thread_regcache if proc->tdesc is NULL.
1816 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1817 (linux_target_ops): Install arch_setup.
1818 * server.c (start_inferior): Call the_target->arch_setup.
1819 * target.h (struct target_ops) <arch_setup>: New field.
1820 (target_arch_setup): New marco.
1821 * lynx-low.c (lynx_target_ops): Update.
1822 * nto-low.c (nto_target_ops): Update.
1823 * spu-low.c (spu_target_ops): Update.
1824 * win32-low.c (win32_target_ops): Update.
1826 2015-07-24 Yao Qi <yao.qi@linaro.org>
1828 * linux-low.c (linux_add_process): Don't set
1829 proc->priv->new_inferior.
1830 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1831 (linux_attach): Likewise.
1833 2015-07-24 Yao Qi <yao.qi@linaro.org>
1835 * server.c (start_inferior): Code refactor.
1837 2015-07-24 Yao Qi <yao.qi@linaro.org>
1839 * server.c (process_serial_event): Set general_thread.
1841 2015-07-21 Yao Qi <yao.qi@linaro.org>
1843 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1844 aarch64_linux_get_debug_reg_capacity.
1846 2015-07-17 Yao Qi <yao.qi@linaro.org>
1848 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1849 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1850 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1851 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1852 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1853 (AARCH64_HWP_ALIGNMENT): Likewise.
1854 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1855 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1856 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1857 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1858 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1859 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1860 (struct aarch64_debug_reg_state): Likewise.
1861 (struct arch_lwp_info): Likewise.
1862 (aarch64_align_watchpoint): Likewise.
1863 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1864 (aarch64_watchpoint_length): Likewise.
1865 (aarch64_point_encode_ctrl_reg): Likewise
1866 (aarch64_point_is_aligned): Likewise.
1867 (aarch64_align_watchpoint): Likewise.
1868 (aarch64_linux_set_debug_regs):
1869 (aarch64_dr_state_insert_one_point): Likewise.
1870 (aarch64_dr_state_remove_one_point): Likewise.
1871 (aarch64_handle_breakpoint): Likewise.
1872 (aarch64_handle_aligned_watchpoint): Likewise.
1873 (aarch64_handle_unaligned_watchpoint): Likewise.
1874 (aarch64_handle_watchpoint): Likewise.
1876 2015-07-17 Yao Qi <yao.qi@linaro.org>
1878 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1879 and don't aarch64_get_debug_reg_state. All callers update.
1880 (aarch64_handle_aligned_watchpoint): Likewise.
1881 (aarch64_handle_unaligned_watchpoint): Likewise.
1882 (aarch64_handle_watchpoint): Likewise.
1883 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1884 (aarch64_remove_point): Likewise.
1886 2015-07-17 Yao Qi <yao.qi@linaro.org>
1888 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1890 (aarch64_handle_unaligned_watchpoint): Likewise.
1892 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1894 Revert the previous 3 commits:
1895 Move gdb_regex* to common/
1896 Move linux_find_memory_regions_full & co.
1897 gdbserver build-id attribute generator
1899 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1900 Jan Kratochvil <jan.kratochvil@redhat.com>
1902 gdbserver build-id attribute generator.
1903 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1904 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1905 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1907 (get_dynamic): Use find_pdhr to traverse program headers.
1908 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1909 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1910 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1911 (get_hex_build_id): New.
1912 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1913 to reply XML document.
1915 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1916 Jan Kratochvil <jan.kratochvil@redhat.com>
1918 * target.c: Include target/target-utils.h and fcntl.h.
1919 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1920 (target_fileio_read_stralloc): New functions.
1922 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1924 * Makefile.in (OBS): Add gdb_regex.o.
1926 * config.in: Rebuilt.
1927 * configure: Rebuilt.
1929 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1930 Jan Kratochvil <jan.kratochvil@redhat.com>
1932 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1933 * Makefile.in (OBS): Add target-utils.o.
1934 (linux-maps.o, target-utils.o): New.
1935 * configure.srv (srv_linux_obj): Add linux-maps.o.
1937 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1939 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1941 (the_low_target): Install it.
1943 2015-07-14 Pedro Alves <palves@redhat.com>
1945 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1946 Instead, ignore ECHILD, and throw an error for other errnos.
1948 2015-07-10 Pedro Alves <palves@redhat.com>
1950 * event-loop.c (struct callback_event) <data>: Change type to
1951 gdb_client_data instance instead of gdb_client_data pointer.
1952 (append_callback_event): Adjust.
1954 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1956 * linux-aarch64-low.c: Add comments for each linux_target_ops
1957 method. Remove comments already covered in target_ops and
1958 linux_target_ops definitions.
1959 (the_low_target): Add comments for each unimplemented method.
1961 2015-07-09 Yao Qi <yao.qi@linaro.org>
1963 * linux-aarch64-low.c (aarch64_regmap): Remove.
1964 (aarch64_usrregs_info): Remove.
1965 (regs_info): Set field usrregs to NULL.
1967 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1969 * linux-low.c: Include "rsp-low.h"
1970 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1971 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1972 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1973 (handle_btrace_enable_pt): New.
1974 (handle_btrace_general_set): Support "pt".
1975 (handle_btrace_conf_general_set): Support "pt:size".
1977 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1979 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1982 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1984 * linux-aarch64-low.c: Remove comment about endianness.
1985 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1986 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1989 2015-06-24 Gary Benson <gbenson@redhat.com>
1991 * linux-i386-ipa.c (stdint.h): Do not include.
1992 * lynx-i386-low.c (stdint.h): Likewise.
1993 * lynx-ppc-low.c (stdint.h): Likewise.
1994 * mem-break.c (stdint.h): Likewise.
1995 * thread-db.c (stdint.h): Likewise.
1996 * tracepoint.c (stdint.h): Likewise.
1997 * win32-low.c (stdint.h): Likewise.
1999 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2001 * server.c (write_qxfer_response): Update call to
2002 remote_escape_output.
2004 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2005 Jan Kratochvil <jan.kratochvil@redhat.com>
2007 Merge multiple hex conversions.
2008 * gdbreplay.c (tohex): Rename to 'fromhex'.
2009 (logchar): Use fromhex.
2011 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2013 * server.c (handle_qxfer_libraries): Set `version' attribute for
2016 2015-06-10 Gary Benson <gbenson@redhat.com>
2018 * target.h (struct target_ops) <multifs_open>: New field.
2019 <multifs_unlink>: Likewise.
2020 <multifs_readlink>: Likewise.
2021 * linux-low.c (nat/linux-namespaces.h): New include.
2022 (linux_target_ops): Initialize the_target->multifs_open,
2023 the_target->multifs_unlink and the_target->multifs_readlink.
2024 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2025 * hostio.c (hostio_fs_pid): New static variable.
2026 (hostio_handle_new_gdb_connection): New function.
2027 (handle_setfs): Likewise.
2028 (handle_open): Use the_target->multifs_open as appropriate.
2029 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2030 (handle_readlink): Use the_target->multifs_readlink as
2032 (handle_vFile): Handle vFile:setfs packets.
2033 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2034 after target_handle_new_gdb_connection.
2036 2015-06-10 Gary Benson <gbenson@redhat.com>
2038 * configure.ac (AC_CHECK_FUNCS): Add setns.
2039 * config.in: Regenerate.
2040 * configure: Likewise.
2041 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2042 (linux-namespaces.o): New rule.
2043 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2045 2015-06-09 Gary Benson <gbenson@redhat.com>
2047 * hostio.c (handle_open): Process mode argument with
2048 fileio_to_host_mode.
2050 2015-06-01 Yao Qi <yao.qi@linaro.org>
2052 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2053 * linux-x86-low.c: Likewise.
2055 2015-05-28 Don Breazeal <donb@codesourcery.com>
2057 * linux-low.c (handle_extended_wait): Initialize
2058 thread_info.last_resume_kind for new fork children.
2060 2015-05-15 Pedro Alves <palves@redhat.com>
2062 * target.h (target_handle_new_gdb_connection): Rewrite using if
2063 wrapped in do/while.
2065 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2067 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2068 * configure, config.in: Regenerate.
2069 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2072 2015-05-12 Don Breazeal <donb@codesourcery.com>
2074 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2075 PTRACE_EVENT_VFORK_DONE.
2076 (linux_low_ptrace_options, extended_event_reported): Add vfork
2078 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2079 and "vforkdone" for RSP 'T' Stop Reply Packet.
2080 * server.h (report_vfork_events): Declare
2083 2015-05-12 Don Breazeal <donb@codesourcery.com>
2085 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2086 (the_low_target) <new_fork>: Initialize new member.
2087 * linux-arm-low.c (arm_new_fork): New function.
2088 (the_low_target) <new_fork>: Initialize new member.
2089 * linux-low.c (handle_extended_wait): Call new target function
2091 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2092 * linux-mips-low.c (mips_add_watchpoint): New function
2093 extracted from mips_insert_point.
2094 (the_low_target) <new_fork>: Initialize new member.
2095 (mips_linux_new_fork): New function.
2096 (mips_insert_point): Call mips_add_watchpoint.
2097 * linux-x86-low.c (x86_linux_new_fork): New function.
2098 (the_low_target) <new_fork>: Initialize new member.
2100 2015-05-12 Don Breazeal <donb@codesourcery.com>
2102 * linux-low.c (handle_extended_wait): Implement return value,
2103 rename argument 'event_child' to 'event_lwp', handle
2104 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2105 (linux_low_ptrace_options): New function.
2106 (linux_low_filter_event): Call linux_low_ptrace_options,
2107 use different argument fo linux_enable_event_reporting,
2108 use return value from handle_extended_wait.
2109 (extended_event_reported): New function.
2110 (linux_wait_1): Call extended_event_reported and set
2111 status to report fork events.
2112 (linux_write_memory): Add pid to debug message.
2113 (reset_lwp_ptrace_options_callback): New function.
2114 (linux_handle_new_gdb_connection): New function.
2115 (linux_target_ops): Initialize new structure member.
2116 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2117 * lynx-low.c: Initialize new structure member.
2118 * remote-utils.c (prepare_resume_reply): Implement stop reason
2119 "fork" for "T" stop message.
2120 * server.c (handle_query): Call handle_new_gdb_connection.
2121 * server.h (report_fork_events): Declare global flag.
2122 * target.h (struct target_ops) <handle_new_gdb_connection>:
2124 (target_handle_new_gdb_connection): New macro.
2125 * win32-low.c: Initialize new structure member.
2127 2015-05-12 Don Breazeal <donb@codesourcery.com>
2129 * mem-break.c (APPEND_TO_LIST): Define macro.
2130 (clone_agent_expr): New function.
2131 (clone_one_breakpoint): New function.
2132 (clone_all_breakpoints): New function.
2133 * mem-break.h: Declare new functions.
2135 2015-05-12 Don Breazeal <donb@codesourcery.com>
2137 * linux-low.c (linux_supports_fork_events): New function.
2138 (linux_supports_vfork_events): New function.
2139 (linux_target_ops): Initialize new structure members.
2140 (initialize_low): Call linux_check_ptrace_features.
2141 * lynx-low.c (lynx_target_ops): Initialize new structure
2143 * server.c (report_fork_events, report_vfork_events):
2145 (handle_query): Add new features to qSupported packet and
2147 (captured_main): Initialize new global variables.
2148 * target.h (struct target_ops) <supports_fork_events>:
2150 <supports_vfork_events>: New member.
2151 (target_supports_fork_events): New macro.
2152 (target_supports_vfork_events): New macro.
2153 * win32-low.c (win32_target_ops): Initialize new structure
2156 2015-05-12 Gary Benson <gbenson@redhat.com>
2158 * server.c (handle_qxfer_exec_file): Use current process
2161 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2163 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2164 Remove HAVE_PTRACE_GETREGS conditionals.
2165 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2166 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2168 2015-05-08 Yao Qi <yao.qi@linaro.org>
2170 * linux-low.c (linux_supports_conditional_breakpoints): New
2172 (linux_target_ops): Install new target method.
2173 * lynx-low.c (lynx_target_ops): Install NULL hook for
2174 supports_conditional_breakpoints.
2175 * nto-low.c (nto_target_ops): Likewise.
2176 * spu-low.c (spu_target_ops): Likewise.
2177 * win32-low.c (win32_target_ops): Likewise.
2178 * server.c (handle_query): Check
2179 target_supports_conditional_breakpoints.
2180 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2182 (target_supports_conditional_breakpoints): New macro.
2184 2015-05-06 Pedro Alves <palves@redhat.com>
2187 * server.c (start_inferior): If the process exits, mourn it.
2189 2015-04-21 Gary Benson <gbenson@redhat.com>
2191 * hostio.c (fileio_open_flags_to_host): Factored out to
2192 fileio_to_host_openflags in common/fileio.c. Single use
2195 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2197 * linux-xtensa-low.c (xtensa_fill_gregset)
2198 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2201 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2203 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2204 (regs_info): Replace usrregs pointer with NULL.
2206 2015-04-17 Gary Benson <gbenson@redhat.com>
2208 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2209 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2210 * server.c (handle_qxfer_exec_file): New function.
2211 (qxfer_packets): Add exec-file entry.
2212 (handle_query): Report qXfer:exec-file:read as supported packet.
2214 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2216 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2218 2015-04-09 Gary Benson <gbenson@redhat.com>
2220 * hostio-errno.c (errno_to_fileio_error): Remove function.
2221 Update caller to use remote_fileio_to_fio_error.
2223 2015-04-09 Yao Qi <yao.qi@linaro.org>
2225 * linux-low.c (linux_insert_point): Call
2226 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2227 (linux_remove_point): Call remove_memory_breakpoint if type is
2229 * linux-x86-low.c (x86_insert_point): Don't call
2230 insert_memory_breakpoint.
2231 (x86_remove_point): Don't call remove_memory_breakpoint.
2233 2015-04-01 Pedro Alves <palves@redhat.com>
2234 Cleber Rosa <crosa@redhat.com>
2236 * server.c (gdbserver_usage): Reorganize and extend the usage
2239 2015-03-24 Pedro Alves <palves@redhat.com>
2241 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2242 output. Also dump TRAP_TRACE.
2243 (linux_low_filter_event): In debug output, distinguish a
2244 resume_stop SIGSTOP from a delayed SIGSTOP.
2246 2015-03-24 Gary Benson <gbenson@redhat.com>
2248 * linux-x86-low.c (x86_linux_new_thread): Moved to
2250 (x86_linux_prepare_to_resume): Likewise.
2252 2015-03-24 Gary Benson <gbenson@redhat.com>
2254 * Makefile.in (x86-linux-dregs.o): New rule.
2255 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2256 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2257 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2258 (x86_linux_dr_get): Likewise.
2259 (x86_linux_dr_set): Likewise.
2260 (update_debug_registers_callback): Likewise.
2261 (x86_linux_dr_set_addr): Likewise.
2262 (x86_linux_dr_get_addr): Likewise.
2263 (x86_linux_dr_set_control): Likewise.
2264 (x86_linux_dr_get_control): Likewise.
2265 (x86_linux_dr_get_status): Likewise.
2266 (x86_linux_update_debug_registers): Likewise.
2268 2015-03-24 Gary Benson <gbenson@redhat.com>
2270 * linux-x86-low.c (x86_linux_update_debug_registers):
2271 New function, factored out from...
2272 (x86_linux_prepare_to_resume): ...this.
2274 2015-03-24 Gary Benson <gbenson@redhat.com>
2276 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2277 (x86_linux_dr_set): Likewise.
2278 (update_debug_registers_callback): Likewise.
2279 (x86_linux_dr_set_addr): Likewise.
2280 (x86_linux_dr_get_addr): Likewise.
2281 (x86_linux_dr_set_control): Likewise.
2282 (x86_linux_dr_get_control): Likewise.
2283 (x86_linux_dr_get_status): Likewise.
2284 (x86_linux_prepare_to_resume): Likewise.
2286 2015-03-24 Gary Benson <gbenson@redhat.com>
2288 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2289 Use perror_with_name. Pass string through gettext.
2290 (x86_linux_dr_set): Likewise.
2292 2015-03-24 Gary Benson <gbenson@redhat.com>
2294 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2295 (x86_linux_dr_set_addr): ...this.
2296 (x86_dr_low_get_addr): Rename to...
2297 (x86_linux_dr_get_addr): ...this.
2298 (x86_dr_low_set_control): Rename to...
2299 (x86_linux_dr_set_control): ...this.
2300 (x86_dr_low_get_control): Rename to...
2301 (x86_linux_dr_get_control): ...this.
2302 (x86_dr_low_get_status): Rename to...
2303 (x86_linux_dr_get_status): ...this.
2304 (x86_dr_low): Update with new function names.
2306 2015-03-24 Gary Benson <gbenson@redhat.com>
2308 * Makefile.in (x86-linux.o): New rule.
2309 * configure.srv: Add x86-linux.o to relevant targets.
2310 * linux-low.c (lwp_set_arch_private_info): New function.
2311 (lwp_arch_private_info): Likewise.
2312 * linux-x86-low.c: Include nat/x86-linux.h.
2313 (arch_lwp_info): Removed structure.
2314 (update_debug_registers_callback):
2315 Use lwp_set_debug_registers_changed.
2316 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2317 and lwp_set_debug_registers_changed.
2318 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2320 2015-03-24 Gary Benson <gbenson@redhat.com>
2322 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2323 * linux-arm-low.c (arm_new_thread): Likewise.
2324 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2325 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2326 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2327 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2329 2015-03-24 Gary Benson <gbenson@redhat.com>
2331 * linux-low.c (ptid_of_lwp): New function.
2332 (lwp_is_stopped): Likewise.
2333 (lwp_stop_reason): Likewise.
2334 * linux-x86-low.c (update_debug_registers_callback):
2336 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2339 2015-03-24 Gary Benson <gbenson@redhat.com>
2341 * linux-low.h (linux_stop_lwp): Remove declaration.
2343 2015-03-24 Gary Benson <gbenson@redhat.com>
2345 * linux-low.h: Include nat/linux-nat.h.
2346 * linux-low.c (iterate_over_lwps_args): New structure.
2347 (iterate_over_lwps_filter): New function.
2348 (iterate_over_lwps): Likewise.
2349 * linux-x86-low.c (update_debug_registers_callback):
2350 Update signature to what iterate_over_lwps expects.
2351 Remove PID check that iterate_over_lwps now performs.
2352 (x86_dr_low_set_addr): Use iterate_over_lwps.
2353 (x86_dr_low_set_control): Likewise.
2355 2015-03-24 Gary Benson <gbenson@redhat.com>
2357 * linux-x86-low.c (x86_debug_reg_state): New function.
2358 (x86_linux_prepare_to_resume): Use the above.
2360 2015-03-24 Gary Benson <gbenson@redhat.com>
2362 * linux-low.c (current_lwp_ptid): New function.
2363 * linux-x86-low.c: Include nat/linux-nat.h.
2364 (x86_dr_low_get_addr): Use current_lwp_ptid.
2365 (x86_dr_low_get_control): Likewise.
2366 (x86_dr_low_get_status): Likewise.
2368 2015-03-20 Pedro Alves <palves@redhat.com>
2370 * tracepoint.c (cmd_qtstatus): Make "str" const.
2372 2015-03-20 Pedro Alves <palves@redhat.com>
2374 * server.c (handle_general_set): Make "req_str" const.
2376 2015-03-19 Pedro Alves <palves@redhat.com>
2378 * linux-low.c (linux_resume_one_lwp): Rename to ...
2379 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2380 instead call perror_with_name.
2381 (check_ptrace_stopped_lwp_gone): New function.
2382 (linux_resume_one_lwp): Reimplement as wrapper around
2383 linux_resume_one_lwp_throw that swallows errors if the LWP is
2386 2015-03-19 Pedro Alves <palves@redhat.com>
2388 * linux-low.c (count_events_callback, select_event_lwp_callback):
2389 No longer check whether the thread has resume_stop as last resume
2392 2015-03-19 Pedro Alves <palves@redhat.com>
2394 * linux-low.c (count_events_callback, select_event_lwp_callback):
2395 Use the lwp's status_pending_p field, not the thread's.
2397 2015-03-19 Pedro Alves <palves@redhat.com>
2399 * linux-low.c (select_event_lwp_callback): Update comments to
2400 no longer mention SIGTRAP.
2402 2015-03-18 Gary Benson <gbenson@redhat.com>
2404 * server.c (handle_query): Do not report vFile:fstat as supported.
2406 2015-03-11 Gary Benson <gbenson@redhat.com>
2408 * hostio.c (sys/types.h): New include.
2409 (sys/stat.h): Likewise.
2410 (common-remote-fileio.h): Likewise.
2411 (handle_fstat): New function.
2412 (handle_vFile): Handle vFile:fstat packets.
2414 2015-03-11 Gary Benson <gbenson@redhat.com>
2416 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2417 struct stat.st_blocks and struct stat.st_blksize.
2418 * configure: Regenerate.
2419 * config.in: Likewise.
2420 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2421 (OBS): Add common-remote-fileio.o.
2422 (common-remote-fileio.o): New rule.
2424 2015-03-09 Pedro Alves <palves@redhat.com>
2426 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2427 'struct sockaddr' pointer in 'accept' call.
2429 2015-03-09 Pedro Alves <palves@redhat.com>
2432 2015-03-07 Pedro Alves <palves@redhat.com>
2433 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2434 or <winsock2.h> here. Instead include "gdb_socket.h".
2435 (remote_open): Use union gdb_sockaddr_u.
2436 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2437 or <winsock2.h> here. Instead include "gdb_socket.h".
2438 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2439 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2441 (init_named_socket, gdb_agent_helper_thread): Use union
2444 2015-03-07 Pedro Alves <palves@redhat.com>
2446 * configure.ac (build_warnings): Move
2447 -Wdeclaration-after-statement to the C-specific set.
2448 * configure: Regenerate.
2450 2015-03-07 Pedro Alves <palves@redhat.com>
2452 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2453 or <winsock2.h> here. Instead include "gdb_socket.h".
2454 (remote_open): Use union gdb_sockaddr_u.
2455 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2456 or <winsock2.h> here. Instead include "gdb_socket.h".
2457 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2458 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2460 (init_named_socket, gdb_agent_helper_thread): Use union
2463 2015-03-07 Pedro Alves <palves@redhat.com>
2465 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2468 2015-03-06 Yao Qi <yao.qi@linaro.org>
2470 * linux-aarch64-low.c (aarch64_insert_point): Use
2471 show_debug_regs as a boolean.
2472 (aarch64_remove_point): Likewise.
2474 2015-03-05 Pedro Alves <palves@redhat.com>
2476 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2477 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2478 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2479 * nto-low.c (nto_target_ops): Likewise.
2480 * spu-low.c (spu_target_ops): Likewise.
2481 * win32-low.c (win32_target_ops): Likewise.
2483 2015-03-04 Pedro Alves <palves@redhat.com>
2485 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2486 Decide whether a breakpoint triggered based on the SIGTRAP's
2488 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2489 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2490 (linux_low_filter_event): Check for breakpoints before checking
2492 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2494 (linux_stopped_by_sw_breakpoint)
2495 (linux_supports_stopped_by_sw_breakpoint)
2496 (linux_stopped_by_hw_breakpoint)
2497 (linux_supports_stopped_by_hw_breakpoint): New functions.
2498 (linux_target_ops): Install new target methods.
2500 2015-03-04 Pedro Alves <palves@redhat.com>
2502 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2503 * server.c (swbreak_feature, hwbreak_feature): New globals.
2504 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2505 (captured_main): Clear swbreak_feature and hwbreak_feature.
2506 * server.h (swbreak_feature, hwbreak_feature): Declare.
2507 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2508 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2509 supports_stopped_by_hw_breakpoint>: New fields.
2510 (target_supports_stopped_by_sw_breakpoint)
2511 (target_stopped_by_sw_breakpoint)
2512 (target_supports_stopped_by_hw_breakpoint)
2513 (target_stopped_by_hw_breakpoint): Declare.
2515 2015-03-04 Pedro Alves <palves@redhat.com>
2517 enum lwp_stop_reason -> enum target_stop_reason
2518 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2519 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2520 (linux_wait_1, stuck_in_jump_pad_callback)
2521 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2522 (linux_stopped_by_watchpoint):
2523 * linux-low.h (enum lwp_stop_reason): Delete.
2524 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2525 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2527 2015-03-04 Yao Qi <yao.qi@linaro.org>
2529 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2531 2015-03-03 Gary Benson <gbenson@redhat.com>
2533 * hostio.c (handle_vFile): Fix prefix lengths.
2535 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2537 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2540 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2542 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2543 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2544 (clean): Add "rm -f" for above C files.
2545 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2546 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2547 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2548 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2549 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2550 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2551 (init_registers_s390x_vx_linux64)
2552 (init_registers_s390x_tevx_linux64)
2553 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2554 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2556 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2557 (s390_store_vxrs_high): New functions.
2558 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2560 (s390_arch_setup): Add logic for selecting one of the new target
2561 descriptions. Activate the new vector regsets if applicable.
2562 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2563 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2564 and init_registers_s390x_tevx_linux64.
2566 2015-03-01 Pedro Alves <palves@redhat.com>
2568 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2571 2015-02-27 Pedro Alves <palves@redhat.com>
2573 * linux-x86-low.c (u_debugreg_offset): New function.
2574 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2576 2015-02-27 Pedro Alves <palves@redhat.com>
2578 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2579 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2580 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2581 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2582 (ps_lsetfpregs, ps_getpid)
2583 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2584 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2585 (ps_lsetxregs, ps_plog): Declare.
2587 2015-02-27 Pedro Alves <palves@redhat.com>
2589 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2590 IP_AGENT_EXPORT_FUNC.
2591 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2592 IP_AGENT_EXPORT_FUNC.
2593 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2594 (IP_AGENT_EXPORT): Delete.
2595 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2596 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2597 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2598 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2599 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2600 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2601 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2602 (traceframe_read_count, traceframe_write_count)
2603 (traceframes_created, trace_state_variables, get_raw_reg)
2604 (get_trace_state_variable_value, set_trace_state_variable_value)
2605 (ust_loaded, helper_thread_id, cmd_buf): Use
2606 IPA_SYM_EXPORTED_NAME.
2607 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2608 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2609 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2610 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2611 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2612 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2613 EXTERN_C_PUSH/EXTERN_C_POP.
2614 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2615 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2616 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2617 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2618 (traceframe_write_count, traceframe_read_count)
2619 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2620 (about_to_request_buffer_space, get_trace_state_variable_value)
2621 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2622 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2623 EXTERN_C_PUSH/EXTERN_C_POP.
2624 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2625 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2626 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2627 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2628 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2629 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2630 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2631 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2633 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2634 (IP_AGENT_EXPORT_VAR_DECL): Define.
2636 (gdb_agent_get_raw_reg): Declare.
2638 2015-02-27 Tom Tromey <tromey@redhat.com>
2639 Pedro Alves <palves@redhat.com>
2641 Rename symbols whose names are reserved C++ keywords throughout.
2643 2015-02-27 Pedro Alves <palves@redhat.com>
2645 * Makefile.in (COMPILER): New, get it from autoconf.
2646 (CXX): Get from autoconf instead.
2647 (COMPILE.pre): Use COMPILER.
2648 (CC-LD): Rename to ...
2649 (CC_LD): ... this. Use COMPILER.
2650 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2651 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2652 * acinclude.m4: Include build-with-cxx.m4.
2653 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2654 Disable -Werror by default if building in C++ mode.
2655 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2656 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2657 the C++ compiler. Save/restore CXXFLAGS too.
2658 * configure: Regenerate.
2660 2015-02-27 Pedro Alves <palves@redhat.com>
2662 * acinclude.m4: Include libiberty.m4.
2663 * configure.ac: Call libiberty_INIT.
2664 * config.in, configure: Regenerate.
2666 2015-02-26 Pedro Alves <palves@redhat.com>
2668 * linux-low.c (linux_wait_1): When incrementing the PC past a
2669 program breakpoint always use the_low_target.breakpoint_len as
2670 increment, rather than the maximum between that and
2671 the_low_target.decr_pc_after_break.
2673 2015-02-23 Pedro Alves <palves@redhat.com>
2675 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2676 thread was doing a step-over; always adjust the PC if
2677 we stepped over a permanent breakpoint.
2678 (linux_wait_1): If we stepped over breakpoint that was on top of a
2679 permanent breakpoint, manually advance the PC past it.
2681 2015-02-23 Pedro Alves <palves@redhat.com>
2683 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2685 (x86_fill_gregset, x86_store_gregset): Use it when handling
2688 2015-02-20 Pedro Alves <palves@redhat.com>
2690 * thread-db.c: Include "nat/linux-procfs.h".
2691 (thread_db_init): Skip listing new threads if the kernel supports
2692 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2694 2015-02-20 Pedro Alves <palves@redhat.com>
2696 * linux-low.c (status_pending_p_callback): Use ptid_match.
2698 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2700 PR breakpoints/16812
2701 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2702 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2703 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2705 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2707 PR breakpoints/15956
2708 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2710 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2712 * linux-low.c (linux_low_btrace_conf): Print size.
2713 * server.c (handle_btrace_conf_general_set): New.
2714 (hanle_general_set): Call handle_btrace_conf_general_set.
2715 (handle_query): Report Qbtrace-conf:bts:size as supported.
2717 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2719 * linux-low.c (linux_low_enable_btrace): Update parameters.
2720 (linux_low_btrace_conf): New.
2721 (linux_target_ops)<to_btrace_conf>: Initialize.
2722 * server.c (current_btrace_conf): New.
2723 (handle_btrace_enable): Rename to ...
2724 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2725 to target_enable_btrace. Update comment. Update users.
2726 (handle_qxfer_btrace_conf): New.
2727 (qxfer_packets): Add btrace-conf entry.
2728 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2729 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2730 (target_ops)<read_btrace_conf>: New.
2731 (target_enable_btrace): Update parameters.
2732 (target_read_btrace_conf): New.
2734 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2736 * server.c (handle_btrace_general_set): Remove call to
2737 target_supports_btrace.
2738 (supported_btrace_packets): New.
2739 (handle_query): Call supported_btrace_packets.
2740 * target.h: include btrace-common.h.
2741 (btrace_target_info): Removed.
2742 (supports_btrace, target_supports_btrace): Update parameters.
2744 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2746 * Makefile.in (SFILES): Add common/btrace-common.c.
2747 (OBS): Add common/btrace-common.o.
2748 (btrace-common.o): Add build rules.
2749 * linux-low: Include btrace-common.h.
2750 (linux_low_read_btrace): Use struct btrace_data. Call
2751 btrace_data_init and btrace_data_fini.
2753 2015-02-06 Pedro Alves <palves@redhat.com>
2755 * thread-db.c (find_new_threads_callback): Add debug output.
2757 2015-02-04 Pedro Alves <palves@redhat.com>
2759 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2760 (resume_stopped_resumed_lwps): New function.
2761 (linux_wait_for_event_filtered): Use it.
2763 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2765 * Makefile.in (SFILES): Add linux-personality.c.
2766 (linux-personality.o): New rule.
2767 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2768 list of objects to be built.
2769 * linux-low.c: Include nat/linux-personality.h.
2770 (linux_create_inferior): Remove code to disable address space
2771 randomization (moved to ../nat/linux-personality.c). Create
2772 cleanup to disable address space randomization.
2774 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2776 * Makefile.in (posix-strerror.o): New rule.
2777 (mingw-strerror.o): Likewise.
2778 * configure: Regenerated.
2779 * configure.ac: Source file ../common/common.host. Initialize new
2780 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2782 2015-01-14 Yao Qi <yao@codesourcery.com>
2784 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2785 (ppc-linux.o): New rule.
2786 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2787 * configure.ac: AC_CHECK_FUNCS(getauxval).
2788 * config.in: Re-generated.
2789 * configure: Re-generated.
2790 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2791 ppc64_64bit_inferior_p
2793 2015-01-14 Yao Qi <yao@codesourcery.com>
2795 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2796 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2797 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2798 (PT_ORIG_R3, PT_TRAP): Likewise.
2799 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2800 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2801 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2803 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2805 * i387-fp.c (i387_cache_to_xsave): In look over
2806 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2807 zmmh_low_space field by use of zmmh_high_space.
2809 2015-01-09 Pedro Alves <palves@redhat.com>
2811 * linux-low.c (step_over_bkpt): Move higher up in the file.
2812 (handle_extended_wait): Don't store the stop_pc here.
2813 (get_stop_pc): Adjust comments and rename to ...
2814 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2815 stopped for a software breakpoint or hardware breakpoint.
2816 (thread_still_has_status_pending_p): New function.
2817 (status_pending_p_callback): Use
2818 thread_still_has_status_pending_p. If the event is no longer
2819 interesting, resume the LWP.
2820 (handle_tracepoints): Add assert.
2821 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2822 (wstatus_maybe_breakpoint): New function.
2823 (cancel_breakpoint): Delete function.
2824 (check_stopped_by_watchpoint): New function, factored out from
2825 linux_low_filter_event.
2826 (lp_status_maybe_breakpoint): Delete function.
2827 (linux_low_filter_event): Remove filter_ptid argument.
2828 Leave thread group exits pending here. Store the LWP's stop PC.
2829 Always leave events pending.
2830 (linux_wait_for_event_filtered): Pull all events out of the
2831 kernel, and leave them all pending.
2832 (count_events_callback, select_event_lwp_callback): Consider all
2834 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2835 (select_event_lwp): Only give preference to the stepping LWP in
2836 all-stop mode. Adjust comments.
2837 (ignore_event): New function.
2838 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2839 references to cancel_breakpoints. Adjust to renames. Also give
2840 equal priority to all LWPs that have had events in non-stop mode.
2841 If reporting a software breakpoint event, unadjust the LWP's PC.
2842 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2843 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2845 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2846 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2847 (linux_stopped_by_watchpoint): Adjust.
2848 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2849 * linux-low.h (enum lwp_stop_reason): New.
2850 (struct lwp_info) <stop_pc>: Adjust comment.
2851 <stopped_by_watchpoint>: Delete field.
2852 <stop_reason>: New field.
2853 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2854 * mem-break.c (software_breakpoint_inserted_here)
2855 (hardware_breakpoint_inserted_here): New function.
2856 * mem-break.h (software_breakpoint_inserted_here)
2857 (hardware_breakpoint_inserted_here): Declare.
2858 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2859 (cancel_breakpoints): Delete.
2860 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2861 (upload_fast_traceframes): Remove references to
2864 2015-01-09 Pedro Alves <palves@redhat.com>
2866 * thread-db.c (find_new_threads_callback): Ignore thread if the
2867 kernel thread ID is -1.
2869 2015-01-09 Pedro Alves <palves@redhat.com>
2871 * linux-low.c (linux_attach_fail_reason_string): Move to
2872 nat/linux-ptrace.c, and rename.
2873 (linux_attach_lwp): Update comment.
2874 (attach_proc_task_lwp_callback): New function.
2875 (linux_attach): Adjust to rename and use
2876 linux_proc_attach_tgid_threads.
2877 (linux_attach_fail_reason_string): Delete declaration.
2879 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2881 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2882 * server.c (gdbserver_version): Likewise.
2884 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2886 * remote-utils.c: Include ctype.h.
2887 (input_interrupt): Explicitly handle the case when the char
2888 received is the NUL byte. Improve the printing of non-ASCII
2891 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2893 * linux-low.c (linux_low_filter_event): Update call to
2894 linux_enable_event_reporting following the addition of
2895 a new parameter to that function.
2897 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2900 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2901 (AARCH64_FPCR_REGNO): Likewise.
2902 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2903 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2904 (aarch64_store_fpregset): Likewise.
2906 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2908 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2909 Remove FIXME comment about assumption about N.
2911 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2913 * configure.ac: If large-file support is disabled in GDBserver,
2914 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2915 * configure: Regenerate.
2917 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2919 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2920 warning upon ENODATA from ptrace.
2921 * linux-s390-low.c (s390_store_tdb): New.
2922 (s390_regsets): Add regset for NT_S390_TDB.
2924 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2926 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2927 without a fill_function.
2928 * linux-s390-low.c (s390_fill_last_break): Remove.
2929 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2930 (s390_arch_setup): Use regset's size instead of fill_function for
2933 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2935 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2936 the regset's store function when ptrace returned an error.
2937 * regcache.c (get_thread_regcache): Invalidate register cache
2938 before fetching inferior's registers.
2940 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2942 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2943 while-loop as for-loop.
2944 (regsets_store_inferior_registers): Likewise.
2946 2014-11-28 Yao Qi <yao@codesourcery.com>
2948 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2949 * config.in, configure: Re-generate.
2950 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2953 2014-11-21 Yao Qi <yao@codesourcery.com>
2955 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2956 (AC_CHECK_HEADERS): Remove malloc.h.
2957 * configure: Re-generated.
2958 * config.in: Re-generated.
2959 * server.h: Don't include alloca.h and malloc.h.
2960 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2961 Don't include malloc.h.
2963 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2965 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2966 corresponding ERRNO check in same block.
2968 2014-11-12 Pedro Alves <palves@redhat.com>
2970 * server.c (cont_thread): Update comment.
2971 (start_inferior, attach_inferior): No longer clear cont_thread.
2972 (handle_v_cont): No longer set cont_thread.
2973 (captured_main): Clear cont_thread each time a GDB connects.
2975 2014-11-12 Pedro Alves <palves@redhat.com>
2977 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2978 thread, and don't resume all threads if the Hc thread has exited.
2980 2014-11-12 Pedro Alves <palves@redhat.com>
2982 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2983 the process group instead of to a specific LWP.
2985 2014-10-15 Pedro Alves <palves@redhat.com>
2988 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2990 (arm_set_thread_context): Delete.
2991 (the_low_target): Adjust.
2992 * win32-i386-low.c (debug_registers_changed)
2993 (debug_registers_used): Delete.
2994 (update_debug_registers_callback): New function.
2995 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2996 needing to update their debug registers.
2997 (win32_get_current_dr): New function.
2998 (x86_dr_low_get_addr, x86_dr_low_get_control)
2999 (x86_dr_low_get_status): Fetch the debug register from the thread
3001 (i386_initial_stuff): Adjust.
3002 (i386_get_thread_context): Remove current_event parameter. Don't
3003 clear debug_registers_changed nor copy DR values to
3005 (i386_set_thread_context): Delete.
3006 (i386_prepare_to_resume): New function.
3007 (i386_thread_added): Mark the thread as needing to update irs
3009 (the_low_target): Remove i386_set_thread_context and install
3010 i386_prepare_to_resume.
3011 * win32-low.c (win32_get_thread_context): Adjust.
3012 (win32_set_thread_context): Use SetThreadContext
3014 (win32_prepare_to_resume): New function.
3015 (win32_require_context): New function, factored out from ...
3016 (thread_rec): ... this.
3017 (continue_one_thread): Call win32_prepare_to_resume on each thread
3018 we're about to continue.
3019 (win32_resume): Call win32_prepare_to_resume on the event thread.
3020 * win32-low.h (struct win32_thread_info)
3021 <debug_registers_changed>: New field.
3022 (struct win32_target_ops): Change prototype of set_thread_context,
3023 delete set_thread_context and add prepare_to_resume.
3024 (win32_require_context): New declaration.
3026 2014-10-08 Gary Benson <gbenson@redhat.com>
3028 * server.h: Do not include common-exceptions.h.
3030 2014-10-08 Gary Benson <gbenson@redhat.com>
3032 * server.h: Do not include cleanups.h.
3034 2014-09-30 James Hogan <james.hogan@imgtec.com>
3036 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3039 2014-09-23 Yao Qi <yao@codesourcery.com>
3041 * linux-low.c (lp_status_maybe_breakpoint): New function.
3042 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3043 (count_events_callback): Likewise.
3044 (select_event_lwp_callback): Likewise.
3045 (cancel_breakpoints_callback): Likewise.
3047 2014-09-19 Don Breazeal <donb@codesourcery.com>
3049 * linux-low.c (handle_extended_wait): Call
3050 linux_ptrace_get_extended_event.
3051 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3052 linux_is_extended_waitstatus.
3054 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3056 * Makefile.in (CPPFLAGS): Define.
3057 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3058 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3060 2014-09-16 Gary Benson <gbenson@redhat.com>
3062 * inferiors.h (current_inferior): Renamed as...
3063 (current_thread): New variable. All uses updated.
3064 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3065 (maybe_move_out_of_jump_pad): Likewise.
3066 (cancel_breakpoint): Likewise.
3067 (linux_low_filter_event): Likewise.
3068 (wait_for_sigstop): Likewise.
3069 (linux_resume_one_lwp): Likewise.
3070 (need_step_over_p): Likewise.
3071 (start_step_over): Likewise.
3072 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3073 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3074 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3075 and save_inferior as saved_thread.
3076 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3078 (regcache_invalidate_thread): Likewise.
3079 * remote-utils.c (prepare_resume_reply): Likewise.
3080 * thread-db.c (thread_db_get_tls_address): Likewise.
3081 (disable_thread_event_reporting): Likewise.
3082 (remove_thread_event_breakpoints): Likewise.
3083 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3085 * target.h (set_desired_inferior): Renamed as...
3086 (set_desired_thread): New declaration. All uses updated.
3087 * server.c (myresume): Updated comment to reference thread instead
3089 (handle_serial_event): Likewise.
3090 (handle_target_event): Likewise.
3092 2014-09-12 Tom Tromey <tromey@redhat.com>
3093 Gary Benson <gbenson@redhat.com>
3095 * regcache.h: Include common-regcache.h.
3096 (regcache_read_pc): Don't declare.
3097 * regcache.c (get_thread_regcache_for_ptid): New function.
3099 2014-09-11 Tom Tromey <tromey@redhat.com>
3100 Gary Benson <gbenson@redhat.com>
3102 * symbol.c: New file.
3103 * Makefile.in (SFILES): Add symbol.c.
3104 (OBS): Add symbol.o.
3106 2014-09-11 Gary Benson <gbenson@redhat.com>
3108 * target.c (target_stop_ptid, target_continue_ptid): New
3111 2014-09-11 Tom Tromey <tromey@redhat.com>
3112 Gary Benson <gbenson@redhat.com>
3114 * target.h: Include target/target.h.
3115 * target.c (target_read_memory, target_read_uint32)
3116 (target_write_memory): New functions.
3118 2014-09-11 Gary Benson <gbenson@redhat.com>
3120 * server.h (debug_hw_points): Don't declare.
3121 * server.c (debug_hw_points): Don't define. Replace all uses
3122 with show_debug_regs.
3123 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3124 all uses with show_debug_regs.
3126 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3128 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3129 endianness into account.
3130 (ppc_supply_ptrace_register): Likewise.
3132 2014-09-03 James Hogan <james.hogan@imgtec.com>
3134 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3135 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3137 2014-09-03 Gary Benson <gbenson@redhat.com>
3139 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3140 ALL_DEBUG_ADDRESS_REGISTERS.
3142 2014-09-02 Gary Benson <gbenson@redhat.com>
3144 * i386-low.h: Renamed as...
3145 * x86-low.h: New file. All type, function and variable name
3146 prefixes changed from "i386_" to "x86_". All references updated.
3147 * i386-low.c: Renamed as...
3148 * x86-low.c: New file. All type, function and variable name
3149 prefixes changed from "i386_" to "x86_". All references updated.
3151 2014-09-02 Gary Benson <gbenson@redhat.com>
3153 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3154 (x86_linux_new_thread): Likewise.
3156 2014-08-29 Gary Benson <gbenson@redhat.com>
3158 * server.h (setjmp.h): Do not include.
3159 (toplevel): Do not declare.
3160 (common-exceptions.h): Include.
3161 (cleanups.h): Likewise.
3162 * server.c (toplevel): Do not define.
3163 (exit_code): New static global.
3164 (detach_or_kill_for_exit_cleanup): New function.
3165 (main): New function. Original main renamed to...
3166 (captured_main): New function.
3167 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3169 2014-08-29 Gary Benson <gbenson@redhat.com>
3171 * Makefile.in (SFILES): Add common/common-exceptions.c.
3172 (OBS): Add common-exceptions.o.
3173 (common-exceptions.o): New rule.
3174 * utils.c (prepare_to_throw_exception): New function.
3176 2014-08-29 Gary Benson <gbenson@redhat.com>
3178 * config.in: Regenerate.
3179 * configure: Likewise.
3181 2014-08-29 Gary Benson <gbenson@redhat.com>
3183 * Makefile.in (SFILES): Add common/cleanups.c.
3185 (cleanups.o): New rule.
3187 2014-08-29 Gary Benson <gbenson@redhat.com>
3189 * utils.c (internal_vwarning): New function.
3191 2014-08-28 Gary Benson <gbenson@redhat.com>
3193 * utils.h (fatal): Remove declaration.
3194 * utils.c (fatal): Remove function.
3196 2014-08-28 Gary Benson <gbenson@redhat.com>
3198 * tracepoint.c (gdb_agent_init): Replace fatal with
3200 (initialize_tracepoint): Likewise.
3202 2014-08-28 Gary Benson <gbenson@redhat.com>
3204 * remote-utils.c (remote_prepare): Replace fatal with error.
3206 2014-08-28 Gary Benson <gbenson@redhat.com>
3208 * linux-low.c (linux_async): Replace fatal with warning.
3210 (linux_start_non_stop): Return -1 if linux_async failed.
3212 2014-08-28 Gary Benson <gbenson@redhat.com>
3214 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3216 (i386_dr_low_get_addr): Remove vague comment.
3217 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3220 2014-08-28 Gary Benson <gbenson@redhat.com>
3222 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3223 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3225 (linux_resume_one_lwp): Likewise.
3226 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3228 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3229 with internal_error.
3230 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3231 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3232 (find_register_by_name): Replace fatal with internal_error.
3233 (find_regno): Likewise.
3234 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3235 * thread-db.c (thread_db_create_event): Likewise.
3236 (thread_db_load_search): Likewise.
3237 (try_thread_db_load_1): Likewise.
3238 * tracepoint.c (get_jump_space_head): Replace fatal with
3240 (claim_trampoline_space): Likewise.
3241 (have_fast_tracepoint_trampoline_buffer): Likewise.
3242 (cmd_qtstart): Likewise.
3243 (stop_tracing): Likewise.
3244 (fast_tracepoint_collecting): Likewise.
3245 (target_malloc): Likewise.
3246 (download_tracepoint): Likewise.
3247 (download_trace_state_variables): Replace check with gdb_assert.
3248 (upload_fast_traceframes): Replace fatal with internal_error.
3250 2014-08-19 Tom Tromey <tromey@redhat.com>
3251 Gary Benson <gbenson@redhat.com>
3253 * Makefile.in (SFILES): Add common/common-debug.c.
3254 (OBS): Add common-debug.o.
3255 (common-debug.o): New rule.
3256 * debug.h (debug_printf): Don't declare.
3257 * debug.c (debug_printf): Renamed and rewritten as...
3258 (debug_vprintf): New function.
3260 2014-08-19 Gary Benson <gbenson@redhat.com>
3262 * utils.h: Do not include print-utils.h.
3264 2014-08-19 Tom Tromey <tromey@redhat.com>
3265 Gary Benson <gbenson@redhat.com>
3267 * server.h: Add static assertion.
3268 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3270 2014-08-19 Tom Tromey <tromey@redhat.com>
3271 Gary Benson <gbenson@redhat.com>
3273 * Makefile.in (SFILES): Add common/errors.c.
3274 (OBS): Add errors.o.
3275 (IPA_OBS): Add errors-ipa.o.
3276 (errors.o): New rule.
3277 (errors-ipa.o): Likewise.
3278 * utils.h (perror_with_name, error, warning): Don't declare.
3279 * utils.c (warning): Renamed and rewritten as...
3280 (vwarning): New function.
3281 (error): Renamed and rewritten as...
3282 (verror): New function.
3283 (internal_error): Renamed and rewritten as...
3284 (internal_verror): New function.
3286 2014-08-07 Gary Benson <gbenson@redhat.com>
3288 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3289 * configure: Regenerate.
3290 * config.in: Likewise.
3291 * server.h: Do not include errno.h.
3292 * event-loop.c: Likewise.
3293 * hostio-errno.c: Likewise.
3294 * linux-low.c: Likewise.
3295 * remote-utils.c: Likewise.
3296 * spu-low.c: Likewise.
3297 * utils.c: Likewise.
3298 * gdbreplay.c: Unconditionally include errno.h.
3300 2014-08-07 Gary Benson <gbenson@redhat.com>
3302 * server.h: Do not include string.h.
3303 * event-loop.c: Likewise.
3304 * linux-low.c: Likewise.
3305 * regcache.c: Likewise.
3306 * remote-utils.c: Likewise.
3307 * spu-low.c: Likewise.
3308 * utils.c: Likewise.
3310 2014-08-07 Gary Benson <gbenson@redhat.com>
3312 * server.h: Do not include gdb_assert.h.
3314 2014-08-07 Gary Benson <gbenson@redhat.com>
3316 * server.h: Do not include common-utils.h.
3318 2014-08-07 Gary Benson <gbenson@redhat.com>
3320 * server.h: Do not include ptid.h.
3321 * notif.h: Likewise.
3323 2014-08-07 Gary Benson <gbenson@redhat.com>
3325 * server.h: Do not include gdb_locale.h.
3327 2014-08-07 Gary Benson <gbenson@redhat.com>
3329 * server.h: Do not include gdb/signals.h.
3330 * win32-low.c: Likewise.
3332 2014-08-07 Gary Benson <gbenson@redhat.com>
3334 * server.h: Do not include pathmax.h.
3336 2014-08-07 Gary Benson <gbenson@redhat.com>
3338 * server.h: Do not include libiberty.h.
3339 * linux-bfin-low.c: Likewise.
3341 2014-08-07 Gary Benson <gbenson@redhat.com>
3343 * server.h: Do not include ansidecl.h.
3345 2014-08-07 Gary Benson <gbenson@redhat.com>
3347 * linux-x86-low.c: Do not include stddef.h.
3348 * lynx-ppc-low.c: Likewise.
3349 * tracepoint.c: Likewise.
3351 2014-08-07 Gary Benson <gbenson@redhat.com>
3353 * server.h: Do not include stdarg.h.
3354 * nto-low.c: Likewise.
3356 2014-08-07 Gary Benson <gbenson@redhat.com>
3358 * server.h: Do not include stdlib.h.
3359 * inferiors.c: Likewise.
3360 * linux-low.c: Likewise.
3361 * regcache.c: Likewise.
3362 * spu-low.c: Likewise.
3363 * tracepoint.c: Likewise.
3364 * utils.c: Likewise.
3366 2014-08-07 Gary Benson <gbenson@redhat.com>
3368 * server.h: Do not include stdio.h.
3369 * linux-low.c: Likewise.
3370 * remote-utils.c: Likewise.
3371 * spu-low.c: Likewise.
3372 * utils.c: Likewise.
3373 * wincecompat.c: Likewise.
3375 2014-08-06 Gary Benson <gbenson@redhat.com>
3377 * regcache.c (init_register_cache): Move conditionals inside if.
3379 2014-08-06 Gary Benson <gbenson@redhat.com>
3381 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3383 2014-07-31 Gary Benson <gbenson@redhat.com>
3385 * ax.h: Do not include server.h.
3386 * gdbthread.h: Likewise.
3387 * lynx-low.h: Likewise.
3388 * notif.h: Likewise.
3390 2014-07-30 Gary Benson <gbenson@redhat.com>
3392 * server.h: Include common-defs.h.
3393 Do not include config.h or build-gnulib-gdbserver/config.h.
3395 2014-07-30 Gary Benson <gbenson@redhat.com>
3397 * hostio-errno.c: Move server.h to top of includes list.
3398 * inferiors.c: Likewise.
3399 * linux-x86-low.c: Likewise.
3400 * notif.c: Include server.h.
3402 2014-07-24 Tom Tromey <tromey@redhat.com>
3403 Gary Benson <gbenson@redhat.com>
3405 * server.h (CORE_ADDR): Now unsigned.
3407 2014-07-16 Pedro Alves <palves@redhat.com>
3409 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3411 2014-07-15 Pedro Alves <palves@redhat.com>
3413 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3416 2014-07-11 Pedro Alves <palves@redhat.com>
3418 * linux-low.c (kill_wait_lwp): New function, based on
3419 kill_one_lwp_callback, but use my_waitpid directly.
3420 (kill_one_lwp_callback, linux_kill): Use it.
3422 2014-06-23 Pedro Alves <palves@redhat.com>
3424 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3425 before setting DR0..DR3.
3427 2014-06-20 Gary Benson <gbenson@redhat.com>
3429 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3430 * configure: Regenerated.
3431 * config.in: Likewise.
3433 2014-06-20 Gary Benson <gbenson@redhat.com>
3435 * Makefile.in (SFILES): Update locations for files moved
3437 (object file files): Reordered.
3439 2014-06-20 Gary Benson <gbenson@redhat.com>
3441 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3442 (i386_dr_low_set_addr): Likewise.
3443 (i386_dr_low_get_addr): Likewise.
3444 (i386_dr_low_can_set_control): Likewise.
3445 (i386_dr_low_set_control): Likewise.
3446 (i386_dr_low_get_control): Likewise.
3447 (i386_dr_low_get_status): Likewise.
3448 (i386_get_debug_register_length): Likewise.
3449 * linux-x86-low.c (i386_dr_low_set_addr):
3450 Changed signature. Made static.
3451 (i386_dr_low_get_addr): Likewise.
3452 (i386_dr_low_set_control): Likewise.
3453 (i386_dr_low_get_control): Likewise.
3454 (i386_dr_low_get_status): Likewise.
3455 (i386_dr_low): New global variable.
3456 * win32-i386-low.c (i386_dr_low_set_addr):
3457 Changed signature. Made static.
3458 (i386_dr_low_get_addr): Likewise.
3459 (i386_dr_low_set_control): Likewise.
3460 (i386_dr_low_get_control): Likewise.
3461 (i386_dr_low_get_status): Likewise.
3462 (i386_dr_low): New global variable.
3464 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3466 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3467 * Makefile.in (AR, AR_FLAGS): Define.
3468 * configure: Regenerate.
3470 2014-06-19 Gary Benson <gbenson@redhat.com>
3472 * Makefile.in (i386-dregs.o): New rule.
3473 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3474 * i386-low.c (target.h): Remove include.
3475 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3476 (DR_CONTROL_SHIFT): Likewise.
3477 (DR_CONTROL_SIZE): Likewise.
3478 (DR_RW_EXECUTE): Likewise.
3479 (DR_RW_WRITE): Likewise.
3480 (DR_RW_READ): Likewise.
3481 (DR_RW_IORW): Likewise.
3482 (DR_LEN_1): Likewise.
3483 (DR_LEN_2): Likewise.
3484 (DR_LEN_4): Likewise.
3485 (DR_LEN_8): Likewise.
3486 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3487 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3488 (DR_ENABLE_SIZE): Likewise.
3489 (DR_LOCAL_SLOWDOWN): Likewise.
3490 (DR_GLOBAL_SLOWDOWN): Likewise.
3491 (DR_CONTROL_RESERVED): Likewise.
3492 (I386_DR_CONTROL_MASK): Likewise.
3493 (I386_DR_VACANT): Likewise.
3494 (I386_DR_LOCAL_ENABLE): Likewise.
3495 (I386_DR_GLOBAL_ENABLE): Likewise.
3496 (I386_DR_DISABLE): Likewise.
3497 (I386_DR_SET_RW_LEN): Likewise.
3498 (I386_DR_GET_RW_LEN): Likewise.
3499 (I386_DR_WATCH_HIT): Likewise.
3500 (i386_wp_op_t): Likewise.
3501 (i386_show_dr): Likewise.
3502 (i386_length_and_rw_bits): Likewise.
3503 (i386_insert_aligned_watchpoint): Likewise.
3504 (i386_remove_aligned_watchpoint): Likewise.
3505 (i386_handle_nonaligned_watchpoint): Likewise.
3506 i386_update_inferior_debug_regs(): Likewise.
3507 (i386_dr_insert_watchpoint): Likewise.
3508 (i386_dr_remove_watchpoint): Likewise.
3509 (i386_dr_region_ok_for_watchpoint): Likewise.
3510 (i386_dr_stopped_data_address): Likewise.
3511 (i386_dr_stopped_by_watchpoint): Likewise.
3513 2014-06-19 Gary Benson <gbenson@redhat.com>
3515 * i386-low.c (i386_dr_show): Renamed to
3516 i386_show_dr and made static. All uses updated.
3517 (i386_dr_length_and_rw_bits): Renamed to
3518 i386_length_and_rw_bits and made static.
3520 (i386_dr_insert_aligned_watchpoint): Renamed to
3521 i386_insert_aligned_watchpoint and made static.
3523 (i386_dr_remove_aligned_watchpoint): Renamed to
3524 i386_remove_aligned_watchpoint and made static.
3526 (i386_dr_update_inferior_debug_regs): Renamed to
3527 i386_update_inferior_debug_regs and made static.
3530 2014-06-18 Gary Benson <gbenson@redhat.com>
3532 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3533 (i386_dr_low_can_set_control): Likewise.
3534 (i386_get_debug_register_length): Likewise.
3535 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3536 (i386_dr_low_can_set_control): Likewise.
3537 (i386_get_debug_register_length): Likewise.
3539 2014-06-17 Gary Benson <gbenson@redhat.com>
3541 * i386-low.h (i386-dregs.h): New include.
3542 (DR_FIRSTADDR): Now in i386-dregs.h.
3543 (DR_LASTADDR): Likewise.
3544 (DR_NADDR): Likewise.
3545 (DR_STATUS): Likewise.
3546 (DR_CONTROL): Likewise.
3547 (i386_debug_reg_state): Likewise.
3548 (i386_dr_insert_watchpoint): Likewise.
3549 (i386_dr_remove_watchpoint): Likewise.
3550 (i386_dr_region_ok_for_watchpoint): Likewise.
3551 (i386_dr_stopped_data_address): Likewise.
3552 (i386_dr_stopped_by_watchpoint): Likewise.
3553 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3555 2014-06-18 Gary Benson <gbenson@redhat.com>
3557 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3558 i386_dr_insert_watchpoint.
3559 (i386_low_remove_watchpoint): Renamed to
3560 i386_dr_remove_watchpoint.
3561 (i386_low_region_ok_for_watchpoint): Renamed to
3562 i386_dr_region_ok_for_watchpoint.
3563 (i386_low_stopped_data_address): Renamed to
3564 i386_dr_stopped_data_address.
3565 (i386_low_stopped_by_watchpoint): Renamed to
3566 i386_dr_stopped_by_watchpoint.
3567 * i386-low.c (i386_show_dr): Renamed to
3568 i386_dr_show and made nonstatic. All uses updated.
3569 (i386_length_and_rw_bits): Renamed to
3570 i386_dr_length_and_rw_bits and made nonstatic.
3572 (i386_insert_aligned_watchpoint): Renamed to
3573 i386_dr_insert_aligned_watchpoint and made nonstatic.
3575 (i386_remove_aligned_watchpoint): Renamed to
3576 i386_dr_remove_aligned_watchpoint and made nonstatic.
3578 (i386_update_inferior_debug_regs): Renamed to
3579 i386_dr_update_inferior_debug_regs and made nonstatic.
3581 (i386_low_insert_watchpoint): Renamed to
3582 i386_dr_insert_watchpoint. All uses updated.
3583 (i386_low_remove_watchpoint): Renamed to
3584 i386_dr_remove_watchpoint. All uses updated.
3585 (i386_low_region_ok_for_watchpoint): Renamed to
3586 i386_dr_region_ok_for_watchpoint. All uses updated.
3587 (i386_low_stopped_data_address): Renamed to
3588 i386_dr_stopped_data_address. All uses updated.
3589 (i386_low_stopped_by_watchpoint): Renamed to
3590 i386_dr_stopped_by_watchpoint. All uses updated.
3592 2014-06-18 Gary Benson <gbenson@redhat.com>
3594 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3595 (i386_dr_low_can_set_control): Likewise.
3596 (i386_insert_aligned_watchpoint): New check.
3598 2014-06-18 Gary Benson <gbenson@redhat.com>
3600 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3603 2014-06-18 Gary Benson <gbenson@redhat.com>
3605 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3606 instead of fatal and error.
3607 (i386_handle_nonaligned_watchpoint): Likewise.
3609 2014-06-18 Gary Benson <gbenson@redhat.com>
3611 * i386-low.c (i386_get_debug_register_length): New macro.
3612 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3613 (i386_show_dr): Use debug_printf instead of fprintf. Use
3614 phex to format values.
3616 2014-06-18 Gary Benson <gbenson@redhat.com>
3618 * i386-low.h: Comment changes.
3619 * i386-low.c: Likewise.
3621 2014-06-18 Gary Benson <gbenson@redhat.com>
3623 * i386-low.c: Whitespace changes.
3625 2014-06-12 Tom Tromey <tromey@redhat.com>
3627 * utils.c (freeargv): Remove.
3629 2014-06-12 Tom Tromey <tromey@redhat.com>
3631 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3632 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3633 (parse_debug_format_options): Likewise.
3634 (gdbserver_usage): Likewise.
3635 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3636 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3637 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3639 ($(LIBGNU)): Depend on libiberty.
3640 (all-lib): Recurse into all subdirs.
3641 (install-only): Invoke "install" target in subdirs.
3642 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3644 * configure: Rebuild.
3645 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3646 for vasprintf, vsnprintf, or gettimeofday.
3647 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3650 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3652 * development.sh: Delete.
3653 * Makefile.in (config.status): Adjust dependency on development.sh.
3654 * configure.ac: Adjust development.sh source call.
3655 * configure: Regenerate.
3657 2014-06-02 Pedro Alves <palves@redhat.com>
3659 * ax.c (gdb_free_agent_expr): New function.
3660 * ax.h (gdb_free_agent_expr): New declaration.
3661 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3663 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3665 (clear_breakpoint_conditions_and_commands): New function.
3666 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3667 (clear_breakpoint_conditions_and_commands): New declaration.
3669 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3671 * linux-aarch64-low.c (asm/ptrace.h): Include.
3673 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3675 Fix TLS access for -static -pthread.
3676 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3677 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3678 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3680 2014-05-20 Pedro Alves <palves@redhat.com>
3682 * linux-aarch64-low.c (aarch64_insert_point)
3683 (aarch64_remove_point): No longer check whether the type is
3684 supported here. Adjust to new interface.
3685 (the_low_target): Install aarch64_supports_z_point_type as
3686 supports_z_point_type method.
3687 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3688 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3689 instead of a Z packet char. Adjust.
3690 (arm_supports_z_point_type): New function.
3691 (arm_insert_point, arm_remove_point): Adjust to new interface.
3692 (the_low_target): Install arm_supports_z_point_type.
3693 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3694 (cris_insert_point, cris_remove_point): Adjust to new interface.
3695 Don't check whether the type is supported here.
3696 (the_low_target): Install cris_supports_z_point_type.
3697 * linux-low.c (linux_supports_z_point_type): New function.
3698 (linux_insert_point, linux_remove_point): Adjust to new interface.
3699 * linux-low.h (struct linux_target_ops) <insert_point,
3700 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3701 raw_breakpoint pointer parameter.
3702 <supports_z_point_type>: New method.
3703 * linux-mips-low.c (mips_supports_z_point_type): New function.
3704 (mips_insert_point, mips_remove_point): Adjust to new interface.
3705 Use mips_supports_z_point_type.
3706 (the_low_target): Install mips_supports_z_point_type.
3707 * linux-ppc-low.c (the_low_target): Install NULL as
3708 supports_z_point_type method.
3709 * linux-s390-low.c (the_low_target): Install NULL as
3710 supports_z_point_type method.
3711 * linux-sparc-low.c (the_low_target): Install NULL as
3712 supports_z_point_type method.
3713 * linux-x86-low.c (x86_supports_z_point_type): New function.
3714 (x86_insert_point): Adjust to new insert_point interface. Use
3715 insert_memory_breakpoint. Adjust to new
3716 i386_low_insert_watchpoint interface.
3717 (x86_remove_point): Adjust to remove_point interface. Use
3718 remove_memory_breakpoint. Adjust to new
3719 i386_low_remove_watchpoint interface.
3720 (the_low_target): Install x86_supports_z_point_type.
3721 * lynx-low.c (lynx_target_ops): Install NULL as
3722 supports_z_point_type callback.
3723 * nto-low.c (nto_supports_z_point_type): New.
3724 (nto_insert_point, nto_remove_point): Adjust to new interface.
3725 (nto_target_ops): Install nto_supports_z_point_type.
3726 * mem-break.c: Adjust intro comment.
3727 (struct raw_breakpoint) <raw_type, size>: New fields.
3728 <inserted>: Update comment.
3729 <shlib_disabled>: Delete field.
3730 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3731 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3732 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3733 (raw_bkpt_type_to_target_hw_bp_type): New function.
3734 (find_enabled_raw_code_breakpoint_at): New function.
3735 (find_raw_breakpoint_at): New type and size parameters. Use them.
3736 (insert_memory_breakpoint): New function, based off
3737 set_raw_breakpoint_at.
3738 (remove_memory_breakpoint): New function.
3739 (set_raw_breakpoint_at): Reimplement.
3740 (set_breakpoint): New, based on set_breakpoint_at.
3741 (set_breakpoint_at): Reimplement.
3742 (delete_raw_breakpoint): Go through the_target->remove_point
3743 instead of assuming memory breakpoints.
3744 (find_gdb_breakpoint_at): Delete.
3745 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3746 (find_gdb_breakpoint): New function.
3747 (set_gdb_breakpoint_at): Delete.
3748 (z_type_supported): New function.
3749 (set_gdb_breakpoint_1): New function, loosely based off
3750 set_gdb_breakpoint_at.
3751 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3752 (delete_gdb_breakpoint_at): Delete.
3753 (delete_gdb_breakpoint_1): New function, loosely based off
3754 delete_gdb_breakpoint_at.
3755 (delete_gdb_breakpoint): New function.
3756 (clear_gdb_breakpoint_conditions): Rename to ...
3757 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3759 (add_condition_to_breakpoint): Make static.
3760 (add_breakpoint_condition): Take a struct breakpoint pointer
3761 instead of an address. Adjust.
3762 (gdb_condition_true_at_breakpoint): Rename to ...
3763 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3765 (gdb_condition_true_at_breakpoint): Reimplement.
3766 (add_breakpoint_commands): Take a struct breakpoint pointer
3767 instead of an address. Adjust.
3768 (gdb_no_commands_at_breakpoint): Rename to ...
3769 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3770 parameter. Return true if no breakpoint was found. Change debug
3772 (gdb_no_commands_at_breakpoint): Reimplement.
3773 (run_breakpoint_commands): Rename to ...
3774 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3775 and change return type to boolean.
3776 (run_breakpoint_commands): New function.
3777 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3778 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3779 breakpoint. Go through the_target->remove_point instead of
3780 assuming memory breakpoint.
3781 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3782 software and hardware breakpoints.
3783 (reinsert_raw_breakpoint): Go through the_target->insert_point
3784 instead of assuming memory breakpoint.
3785 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3786 software and hardware breakpoints.
3787 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3788 Check both software and hardware breakpoints.
3789 (validate_inserted_breakpoint): Assert the breakpoint is a
3790 software breakpoint. Set the inserted flag to -1 instead of
3791 setting shlib_disabled.
3792 (delete_disabled_breakpoints): Adjust.
3793 (validate_breakpoints): Only validate software breakpoints.
3794 Adjust to inserted flag change.
3795 (check_mem_read, check_mem_write): Skip breakpoint types other
3796 than software breakpoints. Adjust to inserted flag change.
3797 * mem-break.h (enum raw_bkpt_type): New enum.
3798 (raw_breakpoint, struct process_info): Forward declare.
3799 (Z_packet_to_target_hw_bp_type): Delete declaration.
3800 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3801 (set_gdb_breakpoint, delete_gdb_breakpoint)
3802 (clear_breakpoint_conditions): New declarations.
3803 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3804 (breakpoint_inserted_here): Update comment.
3805 (add_breakpoint_condition, add_breakpoint_commands): Replace
3806 address parameter with a breakpoint pointer parameter.
3807 (gdb_breakpoint_here): Update comment.
3808 (delete_gdb_breakpoint_at): Delete.
3809 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3810 * server.c (process_point_options): Take a struct breakpoint
3811 pointer instead of an address. Adjust.
3812 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3813 delete_gdb_breakpoint.
3814 * spu-low.c (spu_target_ops): Install NULL as
3815 supports_z_point_type method.
3816 * target.h: Include mem-break.h.
3817 (struct target_ops) <prepare_to_access_memory>: Update comment.
3818 <supports_z_point_type>: New field.
3819 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3820 instead of a char. Also take a raw breakpoint pointer.
3821 * win32-arm-low.c (the_low_target): Install NULL as
3822 supports_z_point_type.
3823 * win32-i386-low.c (i386_supports_z_point_type): New function.
3824 (i386_insert_point, i386_remove_point): Adjust to new interface.
3825 (the_low_target): Install i386_supports_z_point_type.
3826 * win32-low.c (win32_supports_z_point_type): New function.
3827 (win32_insert_point, win32_remove_point): Adjust to new interface.
3828 (win32_target_ops): Install win32_supports_z_point_type.
3829 * win32-low.h (struct win32_target_ops):
3830 <supports_z_point_type>: New method.
3831 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3832 instead of a char. Also take a raw breakpoint pointer.
3834 2014-05-20 Pedro Alves <palves@redhat.com>
3836 * mem-break.h: Include break-common.h.
3837 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3838 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3839 (Z_packet_to_target_hw_bp_type): New declaration.
3840 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3841 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3842 (Z_PACKET_ACCESS_WP): Delete macros.
3843 (Z_packet_to_hw_type): Delete function.
3844 * i386-low.h: Don't include break-common.h here.
3845 (Z_packet_to_hw_type): Delete declaration.
3846 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3847 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3848 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3849 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3850 * linux-aarch64-low.c: Don't include break-common.h here.
3851 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3852 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3853 (Z_packet_to_target_hw_bp_type): Delete function.
3854 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3856 (mips_insert_point, mips_remove_point): Use
3857 Z_packet_to_target_hw_bp_type.
3859 2014-05-20 Pedro Alves <palves@redhat.com>
3861 * linux-aarch64-low.c: Include break-common.h.
3862 (enum target_point_type): Delete.
3863 (Z_packet_to_point_type): Rename to ...
3864 (Z_packet_to_target_hw_bp_type): ... this, and return a
3865 target_hw_bp_type instead.
3866 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3867 instead of an enum target_point_type.
3868 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3870 (aarch64_dr_state_insert_one_point)
3871 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3872 (aarch64_handle_aligned_watchpoint)
3873 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3874 Take an enum target_hw_bp_type instead of an enum
3876 (aarch64_supports_z_point_type): New function.
3877 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3878 use Z_packet_to_target_hw_bp_type.
3880 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3882 * configure.ac: Only use -Werror by default when DEVELOPMENT
3884 * configure: Regenerate.
3886 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3888 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3889 * linux-x86-low.c (X86_64_USER_REGS): New.
3890 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3892 2014-04-28 Yao Qi <yao@codesourcery.com>
3894 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3897 2014-04-25 Pedro Alves <palves@redhat.com>
3900 * linux-low.c (linux_attach_fail_reason_string): New function.
3901 (linux_attach_lwp): Delete.
3902 (linux_attach_lwp_1): Rename to ...
3903 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3904 argument. Remove "initial" parameter. Return int instead of
3905 void. Don't error or warn here.
3906 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3907 failure to attach to the tgid. Call warning when failing to
3909 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3910 argument. Remove "initial" parameter. Return int instead of
3911 void. Don't error or warn here.
3912 (linux_attach_fail_reason_string): New declaration.
3913 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3914 interface change. Use linux_attach_fail_reason_string.
3916 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3917 Walfred Tedeschi <walfred.tedeschi@intel.com>
3919 * Makefile.in: Added rules to handle new files
3920 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3921 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3922 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3923 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3924 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3925 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3927 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3928 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3929 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3930 i386/x32-avx512.xml.
3931 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3932 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3933 i386/x32-avx512-linux.xml.
3934 * i387-fp.c (num_avx512_k_registers): New constant for number
3936 (num_avx512_zmmh_low_registers): New constant for number of
3937 lower ZMM registers (0-15).
3938 (num_avx512_zmmh_high_registers): New constant for number of
3939 higher ZMM registers (16-31).
3940 (num_avx512_ymmh_registers): New contant for number of higher
3941 YMM registers (ymm16-31 added by avx521 on x86_64).
3942 (num_avx512_xmm_registers): New constant for number of higher
3943 XMM registers (xmm16-31 added by AVX512 on x86_64).
3944 (struct i387_xsave): Add space for AVX512 registers.
3945 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3946 Add code to handle AVX512 registers.
3947 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3948 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3949 prototypei from generated file.
3950 (tdesc_amd64_avx512_linux): Likewise.
3951 (init_registers_x32_avx512_linux): Likewise.
3952 (tdesc_x32_avx512_linux): Likewise.
3953 (init_registers_i386_avx512_linux): Likewise.
3954 (tdesc_i386_avx512_linux): Likewise.
3955 (x86_64_regmap): Add AVX512 registers.
3956 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3958 (initialize_low_arch): Add code to initialize AVX512 registers.
3960 2014-04-23 Pedro Alves <palves@redhat.com>
3962 * mem-break.c (find_gdb_breakpoint_at): Make static.
3963 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3965 2014-04-23 Pedro Alves <palves@redhat.com>
3967 * i386-low.c: Don't include break-common.h here.
3968 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3969 prototype to take target_hw_bp_type as argument instead of a Z
3971 * i386-low.h: Include break-common.h here.
3972 (Z_packet_to_hw_type): Declare.
3973 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3975 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3976 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3977 (x86_remove_point): Convert the packet number to a
3978 target_hw_bp_type before calling i386_low_remove_watchpoint.
3979 * win32-i386-low.c (i386_insert_point): Convert the packet number
3980 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3981 (i386_remove_point): Convert the packet number to a
3982 target_hw_bp_type before calling i386_low_remove_watchpoint.
3984 2014-04-23 Pedro Alves <palves@redhat.com>
3986 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3988 2014-04-10 Pedro Alves <palves@redhat.com>
3990 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3991 Check if the condition or command is NULL before checking if the
3992 breakpoint is known. On success, return true.
3993 * mem-break.h (add_breakpoint_condition): Document return.
3994 (add_breakpoint_commands): Add describing comment.
3995 * server.c (skip_to_semicolon): New function.
3996 (process_point_options): Use it.
3998 2014-04-09 Pedro Alves <palves@redhat.com>
4000 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4003 2014-02-27 Pedro Alves <palves@redhat.com>
4006 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4008 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4010 (last_thread_of_process_p): Take a PID argument instead of a
4012 (linux_wait_for_lwp): Delete.
4013 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4015 (linux_low_filter_event): New function, party factored out from
4016 linux_wait_for_event.
4017 (linux_wait_for_event): Rename to ...
4018 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4019 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4020 sigsuspend. Check for zombie leaders.
4021 (linux_wait_for_event): Reimplement as wrapper around
4022 linux_wait_for_event_filtered.
4023 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4024 a normal or signal exit is seen, it's the whole process exiting.
4025 (wait_for_sigstop): No longer a for_each_inferior callback.
4026 Rewrite on top of linux_wait_for_event_filtered.
4027 (stop_all_lwps): Call wait_for_sigstop directly.
4028 * server.c (resume, handle_target_event): Handle
4029 TARGET_WAITKIND_NO_RESUMED.
4031 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4033 * win32-low.c (psapi_get_dll_name,
4034 * win32_CreateToolhelp32Snapshot): Delete.
4035 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4036 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4038 (handle_load_dll): Add function description.
4039 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4041 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4043 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4045 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4046 base address when calling win32_add_one_solib.
4047 (handle_load_dll): Delete local variable load_addr.
4048 Remove 0x1000 offset applied to DLL base address when calling
4049 win32_add_one_solib.
4050 (handle_unload_dll): Add comment.
4052 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4054 * win32-low.c (win32_add_all_dlls): Renames
4055 win32_ensure_ntdll_loaded. Rewrite function documentation.
4056 Adjust implementation to always load all DLLs.
4057 Add 0x1000 offset to DLL base address when calling
4058 win32_add_one_solib.
4059 (child_initialization_done): New static global.
4060 (do_initial_child_stuff): Set child_initialization_done to
4061 zero during child initialization, and 1 after. Replace call
4062 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4064 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4065 (handle_unload_dll): Add function documentation.
4066 (get_child_debug_event): Ignore load and unload DLL events
4067 during child initialization.
4069 2014-02-20 Doug Evans <dje@google.com>
4071 Remove global all_lwps.
4072 * inferiors.h (ptid_of): Move here from linux-low.h.
4073 (pid_of, lwpid_of): Ditto.
4074 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4075 parameter is a struct thread_info * now.
4076 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4077 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4078 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4080 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4081 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4082 * linux-arm-low.c (update_registers_callback): Update, "entry"
4083 parameter is a struct thread_info * now.
4084 Fetch lwpid from current_inferior directly.
4085 (arm_insert_point): Pass &all_threads to find_inferior instead of
4087 (arm_remove_point): Ditto.
4088 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4089 (arm_prepare_to_resume): Fetch pid from thread.
4090 (arm_read_description): Fetch lwpid from current_inferior directly.
4091 * linux-low.c (all_lwps): Delete.
4092 (delete_lwp): Delete call to remove_inferior.
4093 (handle_extended_wait): Fetch lwpid from thread.
4094 (add_lwp): Don't set lwp->entry.id. Remove call to
4095 add_inferior_to_list.
4096 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4097 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4098 (kill_one_lwp_callback): Ditto.
4099 (linux_kill): Don't dereference NULL pointer.
4100 Fetch ptid,lwpid from thread.
4101 (get_detach_signal): Fetch ptid from thread.
4102 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4103 Simplify call to regcache_invalidate_thread.
4104 (delete_lwp_callback): Update, "entry" parameter is a
4105 struct thread_info * now. Fetch pid from thread.
4106 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4107 (status_pending_p_callback): Update, "entry" parameter is a
4108 struct thread_info * now. Fetch ptid from thread.
4109 (find_lwp_pid): Update, "entry" parameter is a
4110 struct thread_info * now.
4111 (linux_wait_for_lwp): Fetch pid from thread.
4112 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4113 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4114 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4115 (dequeue_one_deferred_signal): Ditto.
4116 (cancel_breakpoint): Fetch ptid from current_inferior.
4117 (linux_wait_for_event): Pass &all_threads to find_inferior,
4118 not &all_lwps. Fetch ptid, lwpid from thread.
4119 (count_events_callback): Update, "entry" parameter is a
4120 struct thread_info * now.
4121 (select_singlestep_lwp_callback): Ditto.
4122 (select_event_lwp_callback): Ditto.
4123 (cancel_breakpoints_callback): Ditto.
4124 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4126 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4127 (unsuspend_one_lwp): Update, "entry" parameter is a
4128 struct thread_info * now.
4129 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4131 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4132 Fetch lwpid from thread, not lwp.
4133 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4134 Pass &all_threads to find_inferior, not &all_lwps.
4135 (send_sigstop): Fetch lwpid from thread, not lwp.
4136 (send_sigstop_callback): Update, "entry" parameter is a
4137 struct thread_info * now.
4138 (suspend_and_send_sigstop_callback): Ditto.
4139 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4140 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4141 struct thread_info * now.
4142 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4144 (lwp_running): Update, "entry" parameter is a
4145 struct thread_info * now.
4146 (stop_all_lwps): Fetch ptid from thread.
4147 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4148 (linux_resume_one_lwp): Fetch lwpid from thread.
4149 (linux_set_resume_request): Update, "entry" parameter is a
4150 struct thread_info * now. Fetch pid, lwpid from thread.
4151 (resume_status_pending_p): Update, "entry" parameter is a
4152 struct thread_info * now.
4153 (need_step_over_p): Ditto. Fetch lwpid from thread.
4154 (start_step_over): Fetch lwpid from thread.
4155 (linux_resume_one_thread): Update, "entry" parameter is a
4156 struct thread_info * now. Fetch lwpid from thread.
4157 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4158 (proceed_one_lwp): Update, "entry" parameter is a
4159 struct thread_info * now. Fetch lwpid from thread.
4160 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4161 struct thread_info * now.
4162 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4163 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4164 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4166 (regsets_store_inferior_registers): Ditto.
4167 (fetch_register, store_register): Ditto.
4168 (linux_read_memory, linux_write_memory): Ditto.
4169 (linux_request_interrupt): Ditto.
4170 (linux_read_auxv): Ditto.
4171 (linux_xfer_siginfo): Ditto.
4172 (linux_qxfer_spu): Ditto.
4173 (linux_qxfer_libraries_svr4): Ditto.
4174 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4175 moved to inferiors.h.
4177 (get_thread_lwp): Update.
4178 (struct lwp_info): Delete member "entry". Simplify comment for
4181 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4182 current_inferior directly.
4183 (update_watch_registers_callback): Update, "entry" parameter is a
4184 struct thread_info * now. Fetch pid from thread.
4185 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4186 (mips_insert_point): Fetch lwpid from current_inferior.
4187 Pass &all_threads to find_inferior, not &all_lwps.
4188 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4189 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4191 (mips_stopped_data_address): Ditto.
4192 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4194 * linux-tile-low.c (tile_arch_setup): Ditto.
4195 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4196 (update_debug_registers_callback): Update, "entry" parameter is a
4197 struct thread_info * now. Fetch pid from thread.
4198 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4199 Pass &all_threads to find_inferior, not &all_lwps.
4200 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4201 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4202 Pass &all_threads to find_inferior, not &all_lwps.
4203 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4204 (i386_dr_low_get_status): Ditto.
4205 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4206 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4207 (x86_linux_read_description): Ditto.
4208 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4210 2014-02-20 Doug Evans <dje@google.com>
4212 * inferiors.c (get_first_inferior): Fix buglet.
4214 2014-02-19 Doug Evans <dje@google.com>
4216 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4217 * inferiors.c (add_thread): Change result type to struct thread_info *.
4218 All callers updated.
4219 (add_lwp): Call add_thread here instead of in callers.
4220 All callers updated.
4221 * linux-low.h (get_lwp_thread): Rewrite.
4222 (struct lwp_info): New member "thread".
4224 2014-02-19 Doug Evans <dje@google.com>
4226 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4227 All callers updated.
4229 2014-02-19 Doug Evans <dje@google.com>
4231 * inferiors.c (add_thread): Fix whitespace.
4233 2014-02-19 Doug Evans <dje@google.com>
4235 * dll.c (clear_dlls): Replace accessing list implemention details
4237 * gdbthread.h (get_first_thread): Declare.
4238 * inferiors.c (for_each_inferior_with_data): New function.
4239 (get_first_thread): New function.
4240 (find_thread_ptid): Simplify.
4241 (get_first_inferior): New function.
4242 (clear_list): Delete.
4243 (one_inferior_p): New function.
4244 (clear_inferior_list): New function.
4245 (clear_inferiors): Update.
4246 * inferiors.h (for_each_inferior_with_data): Declare.
4247 (clear_inferior_list): Declare.
4248 (one_inferior_p): Declare.
4249 (get_first_inferior): Declare.
4250 * linux-low.c (linux_wait_for_event): Replace accessing list
4251 implemention details with API function.
4252 * server.c (target_running): Ditto.
4253 (accumulate_file_name_length): New function.
4254 (emit_dll_description): New function.
4255 (handle_qxfer_libraries): Replace accessing list implemention
4256 details with API function.
4257 (handle_qxfer_threads_worker): New function.
4258 (handle_qxfer_threads_proper): Replace accessing list implemention
4259 details with API function.
4260 (handle_query): Ditto.
4261 (visit_actioned_threads_callback_ftype): New typedef.
4262 (visit_actioned_threads_data): New struct.
4263 (visit_actioned_threads): Rewrite to be find_inferior callback.
4264 (resume): Call find_inferior.
4265 (handle_status): Replace accessing list implemention
4266 details with API function.
4267 (process_serial_event): Replace accessing list implemention details
4269 * target.c (set_desired_inferior): Replace accessing list implemention
4270 details with API function.
4271 * tracepoint.c (same_process_p): New function.
4272 (gdb_agent_about_to_close): Replace accessing list implemention
4273 details with API function.
4274 * win32-low.c (child_delete_thread): Replace accessing list
4275 implemention details with API function.
4276 (match_dll_by_basename): New function.
4277 (dll_is_loaded_by_basename): New function.
4278 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4279 details call to dll_is_loaded_by_basename.
4281 2014-02-19 Doug Evans <dje@google.com>
4283 * dll.h (struct dll_info): Add comment.
4284 * gdbthread.h (struct thread_info): Add comment.
4285 (current_ptid): Simplify.
4286 * inferiors.c (add_process): Update.
4287 (remove_process): Update.
4288 * inferiors.h (struct process_info): Rename member "head" to "entry".
4289 * linux-low.c (delete_lwp): Update.
4291 (last_thread_of_process_p): Update.
4292 (kill_one_lwp_callback, linux_kill): Update.
4293 (status_pending_p_callback): Update.
4294 (wait_for_sigstop): Update. Simplify read of ptid.
4295 (start_step_over): Update.
4296 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4297 (get_lwp_thread): Update.
4298 (struct lwp_info): Rename member "head" to "entry".
4299 * regcache.h (inferior_list_entry): Delete.
4300 * server.c (kill_inferior_callback): Update.
4301 (detach_or_kill_inferior_callback): Update.
4302 (print_started_pid): Update.
4303 (print_attached_pid): Update.
4304 (process_serial_event): Simplify read of ptid.
4305 * thread-db.c (thread_db_create_event): Update.
4306 (thread_db_get_tls_address): Update.
4307 * win32-low.c (current_inferior_ptid): Simplify.
4309 2014-02-19 Tom Tromey <tromey@redhat.com>
4311 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4313 (target_supports_btrace): Update.
4315 2014-02-14 Yao Qi <yao@codesourcery.com>
4317 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4318 (rsp-low-ipa.o): New target.
4320 2014-02-12 Tom Tromey <tromey@redhat.com>
4322 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4323 convert_ascii_to_int.
4324 * regcache.c (registers_to_string): Likewise.
4325 * remote-utils.c (decode_M_packet): Likewise.
4326 * server.c (process_serial_event): Likewise.
4328 2014-02-12 Tom Tromey <tromey@redhat.com>
4330 * server.c (handle_query, handle_v_run): Use hex2bin, not
4332 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4334 2014-02-12 Tom Tromey <tromey@redhat.com>
4336 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4337 convert_int_to_ascii.
4338 * regcache.c (registers_to_string, collect_register_as_string):
4340 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4342 * server.c (process_serial_event): Likewise.
4343 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4344 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4346 2014-02-12 Tom Tromey <tromey@redhat.com>
4348 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4349 bin2hex, not hexify.
4350 * tracepoint.c (cmd_qtstatus): Likewise.
4352 2014-02-12 Tom Tromey <tromey@redhat.com>
4354 * remote-utils.c (monitor_output): Pass explicit length to
4357 2014-02-12 Tom Tromey <tromey@redhat.com>
4359 * tracepoint.c: Include rsp-low.h.
4360 * server.c: Include rsp-low.h.
4361 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4362 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4364 * remote-utils.c: Include rsp-low.h.
4365 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4366 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4367 (convert_int_to_ascii, convert_ascii_to_int): Move to
4369 * regcache.c: Include rsp-low.h.
4370 * ax.c: Include rsp-low.h.
4371 * Makefile.in (SFILES): Add common/rsp-low.c.
4372 (OBS): Add rsp-low.o.
4373 (rsp-low.o): New target.
4375 2014-02-12 Tom Tromey <tromey@redhat.com>
4377 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4378 Include print-utils.h.
4379 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4380 (plongest, thirty_two, phex_nz): Remove.
4381 * Makefile.in (SFILES): Add common/print-utils.c.
4382 (OBS): Add print-utils.o.
4383 (print-utils-ipa.o): New target.
4384 (print-utils.o): New target.
4385 (IPA_OBJS): Add print-utils-ipa.o.
4387 2014-02-06 Tom Tromey <tromey@redhat.com>
4389 * Makefile.in (SFILES): Fix indentation.
4391 2014-02-05 Doug Evans <dje@google.com>
4393 * linux-low.c (linux_wait_for_event): Improve comment.
4394 (linux_wait_1): Keep current_inferior in sync with event_child.
4396 2014-01-22 Doug Evans <dje@google.com>
4398 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4400 2014-01-22 Doug Evans <dje@google.com>
4402 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4403 * configure: Regenerate.
4404 * config.in: Regenerate.
4405 * Makefile.in (SFILES): Add debug.c.
4407 * debug.c: New file.
4408 * debug.h: New file.
4409 * linux-aarch64-low.c (*): Update all debugging printfs to use
4410 debug_printf instead of fprintf.
4411 * linux-arm-low.c (*): Ditto.
4412 * linux-cris-low.c (*): Ditto.
4413 * linux-crisv32-low.c (*): Ditto.
4414 * linux-m32r-low.c (*): Ditto.
4415 * linux-sparc-low.c (*): Ditto.
4416 * linux-x86.c (*): Ditto.
4417 * linux-low.c (*): Ditto.
4418 (linux_wait_1): Add calls to debug_enter, debug_exit.
4419 (linux_wait): Remove redundant debugging printf.
4420 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4421 (linux_resume, unstop_all_lwps): Ditto.
4422 * mem-break.c (*): Update all debugging printfs to use
4423 debug_printf instead of fprintf.
4424 * remote-utils.c (*): Ditto.
4425 * thread-db.c (*): Ditto.
4426 * server.c #include <ctype.h>, "gdb_vecs.h".
4427 (debug_threads): Moved to debug.c.
4428 (*): Update all debugging printfs to use debug_printf instead of
4430 (start_inferior): Replace call to fflush with call to debug_flush.
4431 (monitor_show_help): Mention set debug-format.
4432 (parse_debug_format_options): New function.
4433 (handle_monitor_command): Handle "monitor set debug-format".
4434 (gdbserver_usage): Mention --debug-format.
4435 (main): Parse --debug-format.
4436 * server.h (debug_threads): Declaration moved to debug.h.
4438 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4439 trace_debug_1 that uses debug_printf.
4440 (tracepoint_look_up_symbols): Update all debugging printfs to use
4441 debug_printf instead of fprintf.
4443 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4445 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4448 2014-01-17 Pedro Alves <palves@redhat.com>
4451 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4452 defined after including gdb_proc_service.h.
4454 2014-01-16 Doug Evans <dje@google.com>
4456 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4457 (match_dll): Use it.
4459 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4461 * target.h (target_ops) <read_btrace>: Change parameters and
4462 return type to allow error reporting.
4463 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4464 trace reading errors on.
4465 * linux-low.c (linux_low_read_btrace): Pass trace reading
4467 (linux_low_disable_btrace): New.
4469 2014-01-15 Doug Evans <dje@google.com>
4471 * inferiors.c (thread_id_to_gdb_id): Delete.
4472 * inferiors.h (thread_id_to_gdb_id): Delete.
4474 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4476 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4477 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4480 2014-01-08 Pedro Alves <palves@redhat.com>
4482 * server.c (handle_status): Don't discard previous queued stop
4483 replies or thread's pending status here.
4484 (main) <disconnection>: Do it here instead.
4486 2014-01-08 Pedro Alves <palves@redhat.com>
4488 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4489 * server.c (visit_actioned_threads, handle_pending_status): New
4491 (handle_v_cont): Factor out parts to ...
4492 (resume): ... this new function. If in all-stop, and a thread
4493 being resumed has a pending status, report it without actually
4495 (myresume): Adjust to use the new 'resume' function.
4496 (clear_pending_status_callback, set_pending_status_callback)
4497 (find_status_pending_thread_callback): New functions.
4498 (handle_status): Handle the case of multiple threads having
4499 interesting statuses to report. Report threads' real last signal
4500 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4501 with an interesting thread to report the status for, instead of
4502 always reporting the status of the first thread.
4504 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4506 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4507 * gdbreplay.c (gdbreplay_version): Likewise.
4509 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4511 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4512 iov.iov_len with the real length in use.
4514 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4516 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4517 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4518 for all targets that use win32-low.c.
4519 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4520 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4522 2013-12-13 Pedro Alves <palves@redhat.com>
4524 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4525 if equal to TARGET_WAITKIND_LOADED.
4526 * win32-low.c (cached_status): New static global.
4527 (win32_wait): Add declaration.
4528 (do_initial_child_stuff): Flush all initial pending debug events
4529 up to the initial breakpoint.
4530 (win32_wait): If CACHED_STATUS was set, return that instead
4531 of doing a real wait. Remove the code resuming the execution
4532 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4533 during the initial phase. Also remove the code changing
4534 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4535 TARGET_WAITKIND_STOPPED.
4537 2013-12-11 Yao Qi <yao@codesourcery.com>
4539 * notif.c (handle_notif_ack): Return 0 if no notification
4542 2013-11-20 Doug Evans <dje@google.com>
4544 * linux-low.c (linux_set_resume_request): Fix comment.
4546 2013-11-20 Doug Evans <dje@google.com>
4548 * linux-low.c (resume_status_pending_p): Tweak comment.
4550 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4552 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4553 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4554 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4555 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4556 (srv_amd64_regobj): Add amd64-mpx.o.
4557 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4558 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4559 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4560 * i387-fp.c (num_pl_bnd_register) Added constant.
4561 (num_pl_bnd_cfg_registers) Added constant.
4562 (struct i387_xsave) Added reserved area and MPX fields.
4563 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4564 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4566 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4567 (init_registers_amd64_mpx_linux): Declare new function.
4568 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4569 (x86_64_regmap): Add MPX registers.
4570 (x86_linux_read_description): Add MPX case.
4571 (initialize_low_arch): Initialize MPX targets.
4573 2013-11-18 Tom Tromey <tromey@redhat.com>
4575 * configure: Rebuild.
4576 * configure.ac: Don't check for stdlib.h.
4577 * gdbreplay.c: Unconditionally include stdlib.h.
4579 2013-11-18 Tom Tromey <tromey@redhat.com>
4581 * config.in: Rebuild.
4582 * configure: Rebuild.
4583 * configure.ac: Don't use AC_HEADER_DIRENT.
4585 2013-11-18 Tom Tromey <tromey@redhat.com>
4587 * server.h: Don't check HAVE_STRING_H.
4588 * gdbreplay.c: Don't check HAVE_STRING_H.
4589 * configure: Rebuild.
4591 2013-11-18 Tom Tromey <tromey@redhat.com>
4593 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4596 2013-11-08 Tom Tromey <tromey@redhat.com>
4598 * configure, config.in: Rebuild.
4599 * configure.ac: Remove unused configury.
4601 2013-11-08 Tom Tromey <tromey@redhat.com>
4603 * acinclude.m4: Include common.m4, codeset.m4.
4604 * configure, config.in: Rebuild.
4605 * configure.ac: Use GDB_AC_COMMON.
4607 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4609 * linux-s390-low.c (HWCAP_S390_TE): New define.
4610 (s390_arch_setup): Consider the TE field in the HWCAP for
4611 determining 'have_regset_tdb'.
4613 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4616 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4619 2013-10-02 Pedro Alves <palves@redhat.com>
4621 * server.c (process_serial_event): Don't output "GDBserver
4622 exiting" if GDB is connected through stdio.
4623 * target.c (mywait): Likewise, be silent if GDB is connected
4626 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4628 * lynx-low.c (lynx_add_threads_after_attach): New function.
4629 (lynx_attach): Remove call to add_thread. Add call to
4630 lynx_add_threads_after_attach instead.
4632 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4634 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4635 * config.in, configure: Regenerated.
4637 2013-09-18 Yao Qi <yao@codesourcery.com>
4640 * server.c (start_inferior): Clear 'resume_info'.
4642 2013-09-16 Jiong Wang <jiwang@tilera.com>
4644 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4647 2013-09-16 Jiong Wang <jiwang@tilera.com>
4649 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4650 linux-tile-low.o to srv_tgtobj.
4652 2013-09-16 Will Newton <will.newton@linaro.org>
4654 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4657 2013-09-06 Pedro Alves <palves@redhat.com>
4659 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4660 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4661 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4662 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4663 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4664 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4666 2013-09-06 Pedro Alves <palves@redhat.com>
4668 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4669 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4671 2013-09-06 Pedro Alves <palves@redhat.com>
4673 * linux-amd64-ipa.c: Include tracepoint.h.
4674 * linux-i386-ipa.c: Include tracepoint.h.
4676 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4678 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4679 (ps_get_thread_area): New function.
4681 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4683 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4684 (initialize_low_arch): Call init_registers_crisv32 rather than
4685 init_register_crisv32.
4687 2013-09-05 Pedro Alves <palves@redhat.com>
4689 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4691 * hostio.h: ... this new file.
4692 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4693 win32-low.c: Include hostio.h.
4695 2013-09-05 Pedro Alves <palves@redhat.com>
4697 * server.h (gdb_client_data, handler_func, callback_handler_func)
4698 (delete_file_handler, add_file_handler, append_callback_event)
4699 (delete_callback_event, start_event_loop, initialize_event_loop):
4700 Move to event-loop.h and include it.
4701 * event-loop.h: New file.
4703 2013-09-05 Pedro Alves <palves@redhat.com>
4705 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4706 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4707 (loaded_dll, unloaded_dll): Move to ...
4708 * dll.h: ... this new file.
4709 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4711 2013-09-05 Pedro Alves <palves@redhat.com>
4713 * server.h (current_process, get_thread_process, all_processes)
4714 (add_inferior_to_list, for_each_inferior, current_inferior)
4715 (remove_inferior, add_process, remove_process, find_process_pid)
4716 (have_started_inferiors_p, have_attached_inferiors_p)
4717 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4718 (clear_inferiors, find_inferior, find_inferior_id)
4719 (inferior_target_data, set_inferior_target_data)
4720 (inferior_regcache_data, set_inferior_regcache_data): Move to
4721 inferiors.h, and include it.
4722 * inferiors.h: New file.
4724 2013-09-05 Pedro Alves <palves@redhat.com>
4726 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4730 2013-09-05 Pedro Alves <palves@redhat.com>
4732 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4734 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4735 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4736 (handle_tracepoint_general_set, handle_tracepoint_query)
4737 (tracepoint_finished_step, tracepoint_was_hit)
4738 (release_while_stepping_state_list, current_traceframe)
4739 (in_readonly_region, traceframe_read_mem)
4740 (fetch_traceframe_registers, traceframe_read_sdata)
4741 (traceframe_read_info, struct fast_tpoint_collect_status)
4742 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4743 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4744 (supply_fast_tracepoint_registers)
4745 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4746 (ipa_tdesc, claim_trampoline_space)
4747 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4748 (agent_mem_read, agent_get_trace_state_variable_value)
4749 (agent_set_trace_state_variable_value, agent_tsv_read)
4750 (agent_mem_read_string, get_raw_reg_func_addr)
4751 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4752 * tracepoint.h: ... this new file.
4754 2013-09-05 Pedro Alves <palves@redhat.com>
4756 * server.h (perror_with_name, error, fatal, warning, paddress)
4757 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4759 * utils.h: New file.
4761 2013-09-05 Pedro Alves <palves@redhat.com>
4763 * server.h (remote_debug, noack_mode, transport_is_reliable)
4764 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4765 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4766 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4767 (write_enn, initialize_async_io, enable_async_io)
4768 (disable_async_io, check_remote_input_interrupt_request)
4769 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4770 (dead_thread_notify, prepare_resume_reply)
4771 (decode_address_to_semicolon, decode_address, decode_m_packet)
4772 (decode_M_packet, decode_X_packet, decode_xfer_write)
4773 (decode_search_memory_packet, unhexify, hexify)
4774 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4775 (look_up_one_symbol, relocate_instruction)
4776 (monitor_output): Move to remote-utils.h, and include it.
4777 * remote-utils.h: New file.
4779 2013-09-05 Pedro Alves <palves@redhat.com>
4781 * server.h (_): Delete.
4783 2013-09-02 Pedro Alves <palves@redhat.com>
4785 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4786 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4788 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4790 2013-09-02 Pierre Muller <muller@sourceware.org>
4792 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4793 or WriteProcessMemory complete successfully and handle
4794 ERROR_PARTIAL_COPY error.
4796 2013-09-02 Pedro Alves <palves@redhat.com>
4798 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4799 error instead of EIO.
4801 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4804 * linux-low.c: Include filestuff.h.
4805 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4806 * lynx-low.c: Include filestuff.h.
4807 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4808 * server.c: Include filestuff.h.
4809 (main): Call notice_open_fds.
4810 * spu-low.c: Include filestuff.h.
4811 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4813 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4815 * Makefile.in: Explain why ../target and ../nat are not
4816 listed as include file search paths.
4817 (linux-waitpid.o): New object file rule.
4818 * configure.srv (srv_native_linux_obj): New variable.
4819 Replace all occurrences of linux native object files with
4820 $srv_native_linux_obj.
4821 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4822 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4823 (linux_enable_event_reporting): Remove declaration.
4824 (my_waitpid): Moved to common/linux-waitpid.c.
4825 (linux_wait_for_event): Pass ptid when calling
4826 linux_enable_event_reporting.
4827 (linux_supports_tracefork_flag): Remove.
4828 (linux_enable_event_reporting): Likewise.
4829 (linux_tracefork_grandchild): Remove.
4830 (STACK_SIZE): Moved to common/linux-ptrace.c.
4831 (linux_tracefork_child): Remove.
4832 (linux_test_for_tracefork): Remove.
4833 (linux_look_up_symbols): Call linux_supports_traceclone.
4834 (initialize_low): Remove call to linux_test_for_tracefork.
4835 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4836 common/linux-ptrace.h.
4837 (PTRACE_TYPE_ARG4): Likewise.
4838 Include linux-ptrace.h.
4840 2013-08-21 Pedro Alves <palves@redhat.com>
4842 * config.in: Renegerate.
4844 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4846 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4847 (SFILES): Remove $(srcdir)/common/target-common.c and
4848 add $(srcdir)/target/waitstatus.c.
4849 (OBS): Remove target-common.o and add waitstatus.o.
4850 (server_h): Remove $(srcdir)/../common/target-common.h and
4851 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4852 and $(srcdir)/../target/waitstatus.h.
4853 (target-common.o): Remove.
4854 (waitstatus.o): New target object file.
4855 * target.h: Do not include target-common.h and
4856 include target/resume.h, target/wait.h and
4857 target/waitstatus.h.
4859 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4861 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4862 to PTRACE_TYPE_ARG3.
4863 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4864 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4866 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4867 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4869 2013-07-27 Jie Zhang <jie@codesourcery.com>
4870 Daniel Jacobowitz <dan@codesourcery.com>
4871 Yao Qi <yao@codesourcery.com>
4873 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4874 (mips-linux-watch.o): New rule.
4875 (mips_linux_watch_h): New variable.
4876 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4878 * linux-mips-low.c: Include mips-linux-watch.h.
4879 (struct arch_process_info, struct arch_lwp_info): New.
4880 (update_watch_registers_callback): New function.
4881 (mips_linux_new_process, mips_linux_new_thread) New functions.
4882 (mips_linux_prepare_to_resume, mips_insert_point): New
4884 (mips_remove_point, mips_stopped_by_watchpoint): New
4886 (rsp_bp_type_to_target_hw_bp_type): New function.
4887 (mips_stopped_data_address): New function.
4888 (the_low_target): Add watchpoint support functions.
4890 2013-07-27 Yao Qi <yao@codesourcery.com>
4892 * i386-low.c: Include break-common.h.
4893 (enum target_hw_bp_type): Remove.
4895 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4897 * Makefile.in (SFILES): /common/target-common.c.
4898 (OBS): Add target-common.o.
4899 (server_h): Add $(srcdir)/../common/target-common.h.
4900 (target-common.o): New target.
4901 * server.c (queue_stop_reply_callback): Free
4902 status string after use.
4903 * target.c (target_waitstatus_to_string): Remove.
4904 * target.h: Include target-common.h.
4905 (resume_kind): Likewise.
4906 (target_waitkind): Likewise.
4907 (target_waitstatus): Likewise.
4908 (TARGET_WNOHANG): Likewise.
4910 2013-07-04 Yao Qi <yao@codesourcery.com>
4912 * Makefile.in (host_alias): Use @host_noncanonical@.
4913 (target_alias): Use @target_noncanonical@.
4914 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4915 ACX_NONCANONICAL_HOST.
4916 * configure: Regenerated.
4919 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4921 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4922 * configure: Rebuild.
4923 * Makefile.in (version_host, version_target): Get from configure.
4924 (version.c): Use $(version_host) and $(version_target).
4926 2013-07-03 Pedro Alves <palves@redhat.com>
4928 * Makefile.in (config.status): Depend on development.sh.
4929 * acinclude.m4: Include libmcheck.m4.
4930 * configure: Regenerate.
4932 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4934 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4935 attribute inside the parentheses.
4936 (winapi_DebugSetProcessKillOnExit): Ditto.
4937 (winapi_DebugBreakProcess): Ditto.
4938 (winapi_GenerateConsoleCtrlEvent): Ditto.
4940 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4942 * notif.h (notif_event): Add a dummy member to avoid compiler
4945 2013-07-01 Pedro Alves <palves@redhat.com>
4947 * hostio.c (HOSTIO_PATH_MAX): Define.
4948 (require_filename, handle_open, handle_unlink, handle_readlink):
4951 2013-07-01 Pedro Alves <palves@redhat.com>
4953 * server.h: Include "pathmax.h".
4954 * linux-low.c: Don't include sys/param.h.
4955 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4957 * win32-low.c: Don't include sys/param.h.
4958 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4960 2013-07-01 Pedro Alves <palves@redhat.com>
4962 * event-loop.c: Don't check HAVE_UNISTD_H before including
4964 * gdbreplay.c: Likewise.
4965 * remote-utils.c: Likewise.
4966 * server.c: Likewise.
4967 * configure.ac: Don't check for unistd.h.
4968 * configure: Regenerate.
4970 2013-06-28 Tom Tromey <tromey@redhat.com>
4972 * Makefile.in (version.c): Use version.in, not
4975 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4977 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4978 * configure: Rebuild.
4979 * Makefile.in (version_host, version_target): Get from configure.
4980 (version.c): Use $(version_host) and $(version_target).
4982 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4984 Fix trace-status to output user name without trailing colon.
4985 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4987 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4989 Fix trace-status to output proper start-time and stop-time.
4990 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4991 output start time and stop time in hex as gdb expects.
4993 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4995 * tracepoint.c (build_traceframe_info_xml): Output trace state
4996 variables present in the trace buffer.
4998 2013-06-24 Tom Tromey <tromey@redhat.com>
5000 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5002 (version.o): Remove.
5003 * gdbreplay.c: Include version.h.
5004 (version, host_name): Don't declare.
5005 * server.h: Include version.h.
5006 (version, host_name): Don't declare.
5008 2013-06-12 Pedro Alves <palves@redhat.com>
5010 * linux-x86-low.c (linux_is_elf64): Delete global.
5011 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5012 with local linux_pid_exe_is_elf_64_file use.
5014 2013-06-11 Pedro Alves <palves@redhat.com>
5016 * linux-low.c (regset_disabled, disable_regset): New functions.
5017 (regsets_fetch_inferior_registers)
5018 (regsets_store_inferior_registers): Use them.
5019 (initialize_regsets_info); Don't allocate the disabled_regsets
5021 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5024 2013-06-11 Pedro Alves <palves@redhat.com>
5026 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5029 2013-06-11 Pedro Alves <palves@redhat.com>
5031 * linux-x86-low.c (initialize_low_arch): Call
5032 init_registers_x32_avx_linux.
5034 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5036 Fix compatibility with Android Bionic.
5037 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5040 2013-06-07 Pedro Alves <palves@redhat.com>
5043 * Makefile.in (OBS): Add tdesc.o.
5044 (IPA_OBJS): Add tdesc-ipa.o.
5045 (tdesc-ipa.o): New rule.
5046 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5048 * linux-low.c (new_inferior): Delete.
5049 (disabled_regsets, num_regsets): Delete.
5050 (linux_add_process): Adjust to set the new per-process
5052 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5053 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5054 was a stop. When calling arch_setup, switch the current inferior
5055 to the thread that got an event.
5056 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5057 (regsets_fetch_inferior_registers)
5058 (regsets_store_inferior_registers): New regsets_info parameter.
5060 (linux_register_in_regsets): New regs_info parameter. Adjust to
5062 (register_addr, fetch_register, store_register): New usrregs_info
5063 parameter. Adjust to use it.
5064 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5065 parameter regs_info. Adjust to use it.
5066 (linux_fetch_registers): Get the current inferior's regs_info, and
5068 (linux_store_registers): Ditto.
5069 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5070 (initialize_low): Don't initialize the target_regsets here. Call
5071 initialize_low_arch.
5072 * linux-low.h (target_regsets): Delete declaration.
5073 (struct regsets_info): New.
5074 (struct usrregs_info): New.
5075 (struct regs_info): New.
5076 (struct process_info_private) <new_inferior>: New field.
5077 (struct linux_target_ops): Delete the num_regs, regmap, and
5078 regset_bitmap fields. New field regs_info.
5079 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5080 * i387-fp.c (num_xmm_registers): Delete.
5081 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5082 calls to new interface.
5083 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5084 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5085 Infer the number of xmm registers from the regcache's target
5087 * i387-fp.h (num_xmm_registers): Delete.
5088 * inferiors.c (add_thread): Don't install the thread's regcache
5090 * proc-service.c (gregset_info): Fetch the current inferior's
5091 regs_info. Adjust to use it.
5092 * regcache.c: Include tdesc.h.
5093 (register_bytes, reg_defs, num_registers)
5094 (gdbserver_expedite_regs): Delete.
5095 (get_thread_regcache): If the thread doesn't have a regcache yet,
5096 create one, instead of aborting gdbserver.
5097 (regcache_invalidate_one): Rename to ...
5098 (regcache_invalidate_thread): ... this.
5099 (regcache_invalidate_one): New.
5100 (regcache_invalidate): Only invalidate registers of the current
5102 (init_register_cache): Add target_desc parameter, and use it.
5103 (new_register_cache): Ditto. Assert the target description has a
5104 non zero registers_size.
5105 (regcache_cpy): Add assertions. Adjust.
5106 (realloc_register_cache, set_register_cache): Delete.
5107 (registers_to_string, registers_from_string): Adjust.
5108 (find_register_by_name, find_regno, find_register_by_number)
5109 (register_cache_size): Add target_desc parameter, and use it.
5110 (free_register_cache_thread, free_register_cache_thread_one)
5111 (regcache_release, register_cache_size): New.
5112 (register_size): Add target_desc parameter, and use it.
5113 (register_data, supply_register, supply_register_zeroed)
5114 (supply_regblock, supply_register_by_name, collect_register)
5115 (collect_register_as_string, collect_register_by_name): Adjust.
5116 * regcache.h (struct target_desc): Forward declare.
5117 (struct regcache) <tdesc>: New field.
5118 (init_register_cache, new_register_cache): Add target_desc
5120 (regcache_invalidate_thread): Declare.
5121 (regcache_invalidate_one): Delete declaration.
5122 (regcache_release): Declare.
5123 (find_register_by_number, register_cache_size, register_size)
5124 (find_regno): Add target_desc parameter.
5125 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5127 * remote-utils.c: Include tdesc.h.
5128 (outreg, prepare_resume_reply): Adjust.
5129 * server.c: Include tdesc.h.
5130 (gdbserver_xmltarget): Delete declaration.
5131 (get_features_xml, process_serial_event): Adjust.
5132 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5134 (struct process_info) <tdesc>: New field.
5135 (ipa_tdesc): Declare.
5136 * tdesc.c: New file.
5137 * tdesc.h: New file.
5138 * tracepoint.c: Include tdesc.h.
5139 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5140 (get_context_regcache): Adjust to pass ipa_tdesc down.
5141 (do_action_at_tracepoint): Adjust to get the register cache size
5142 from the context regcache's description.
5143 (traceframe_walk_blocks): Adjust to get the register cache size
5144 from the current trace frame's description.
5145 (traceframe_get_pc): Adjust to get current trace frame's
5146 description and pass it down.
5147 (gdb_collect): Adjust to get the register cache size from the
5149 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5150 (gdbserver_xmltarget): Delete.
5151 (initialize_low_tracepoint): Set the ipa's target description.
5152 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5153 (initialize_low_tracepoint): Set the ipa's target description.
5154 * linux-x86-low.c: Include tdesc.h.
5155 [__x86_64__] (is_64bit_tdesc): New.
5156 (ps_get_thread_area, x86_get_thread_area): Use it.
5157 (i386_cannot_store_register): Rename to ...
5158 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5159 (i386_cannot_fetch_register): Rename to ...
5160 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5161 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5163 (target_regsets): Rename to ...
5164 (x86_regsets): ... this.
5165 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5167 (x86_siginfo_fixup): Use is_64bit_tdesc.
5168 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5169 (tdesc_x32_avx_linux, tdesc_x32_linux)
5170 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5172 (x86_linux_update_xmltarget): Delete.
5173 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5174 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5175 (AMD64_LINUX_USER64_CS): New.
5176 (x86_linux_read_description): New, based on
5177 x86_linux_update_xmltarget.
5178 (same_process_callback): New.
5179 (x86_arch_setup_process_callback): New.
5180 (x86_linux_update_xmltarget): New.
5181 (x86_regsets_info): New.
5182 (amd64_linux_regs_info): New.
5183 (i386_linux_usrregs_info): New.
5184 (i386_linux_regs_info): New.
5185 (x86_linux_regs_info): New.
5186 (x86_arch_setup): Reimplement.
5187 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5188 (x86_emit_ops): Ditto.
5189 (the_low_target): Adjust. Install x86_linux_regs_info,
5190 x86_cannot_fetch_register, and x86_cannot_store_register.
5191 (initialize_low_arch): New.
5192 * linux-ia64-low.c (tdesc_ia64): Declare.
5193 (ia64_fetch_register): Adjust.
5194 (ia64_usrregs_info, regs_info): New globals.
5195 (ia64_regs_info): New function.
5196 (the_low_target): Adjust.
5197 (initialize_low_arch): New function.
5198 * linux-sparc-low.c (tdesc_sparc64): Declare.
5199 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5201 (sparc_arch_setup): New function.
5202 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5203 (the_low_target): Adjust.
5204 (initialize_low_arch): New function.
5205 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5206 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5207 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5208 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5209 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5210 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5211 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5212 (tdesc_powerpc_isa205_vsx64l): Declare.
5213 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5214 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5215 (ppc_set_pc, ppc_get_hwcap): Adjust.
5216 (ppc_usrregs_info): Forward declare.
5217 (!__powerpc64__) ppc_regmap_adjusted: New global.
5218 (ppc_arch_setup): Adjust to the current process'es target
5220 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5221 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5222 (ppc_store_evrregset): Adjust.
5223 (target_regsets): Rename to ...
5224 (ppc_regsets): ... this, and make static.
5225 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5226 (ppc_regs_info): New function.
5227 (the_low_target): Adjust.
5228 (initialize_low_arch): New function.
5229 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5230 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5231 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5232 (tdesc_s390x_linux64v2): Declare.
5233 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5234 (s390_fill_gregset, s390_store_last_break): Adjust.
5235 (target_regsets): Rename to ...
5236 (s390_regsets): ... this, and make static.
5237 (s390_get_pc, s390_set_pc): Adjust.
5238 (s390_get_hwcap): New target_desc parameter, and use it.
5239 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5240 (s390_arch_setup): Adjust to set the current process'es target
5241 description. Don't adjust the regmap.
5242 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5243 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5244 (regs_info_3264): New globals.
5245 (s390_regs_info): New function.
5246 (the_low_target): Adjust.
5247 (initialize_low_arch): New function.
5248 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5249 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5250 [__mips64] (init_registers_mips_linux)
5251 (init_registers_mips_dsp_linux): Delete defines.
5252 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5253 (have_dsp): New global.
5254 (mips_read_description): New, based on mips_arch_setup.
5255 (mips_arch_setup): Reimplement.
5256 (get_usrregs_info): New function.
5257 (mips_cannot_fetch_register, mips_cannot_store_register)
5258 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5259 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5260 (target_regsets): Rename to ...
5261 (mips_regsets): ... this, and make static.
5262 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5263 (dsp_regs_info, regs_info): New globals.
5264 (mips_regs_info): New function.
5265 (the_low_target): Adjust.
5266 (initialize_low_arch): New function.
5267 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5268 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5270 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5271 (arm_read_description): New, with bits factored from
5273 (arm_arch_setup): Reimplement.
5274 (target_regsets): Rename to ...
5275 (arm_regsets): ... this, and make static.
5276 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5277 (arm_regs_info): New function.
5278 (the_low_target): Adjust.
5279 (initialize_low_arch): New function.
5280 * linux-m68k-low.c (tdesc_m68k): Declare.
5281 (target_regsets): Rename to ...
5282 (m68k_regsets): ... this, and make static.
5283 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5284 (m68k_regs_info): New function.
5285 (m68k_arch_setup): New function.
5286 (the_low_target): Adjust.
5287 (initialize_low_arch): New function.
5288 * linux-sh-low.c (tdesc_sharch): Declare.
5289 (target_regsets): Rename to ...
5290 (sh_regsets): ... this, and make static.
5291 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5292 (sh_regs_info, sh_arch_setup): New functions.
5293 (the_low_target): Adjust.
5294 (initialize_low_arch): New function.
5295 * linux-bfin-low.c (tdesc_bfin): Declare.
5296 (bfin_arch_setup): New function.
5297 (bfin_usrregs_info, regs_info): New globals.
5298 (bfin_regs_info): New function.
5299 (the_low_target): Adjust.
5300 (initialize_low_arch): New function.
5301 * linux-cris-low.c (tdesc_cris): Declare.
5302 (cris_arch_setup): New function.
5303 (cris_usrregs_info, regs_info): New globals.
5304 (cris_regs_info): New function.
5305 (the_low_target): Adjust.
5306 (initialize_low_arch): New function.
5307 * linux-cris-low.c (tdesc_crisv32): Declare.
5308 (cris_arch_setup): New function.
5309 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5310 (cris_regs_info): New function.
5311 (the_low_target): Adjust.
5312 (initialize_low_arch): New function.
5313 * linux-m32r-low.c (tdesc_m32r): Declare.
5314 (m32r_arch_setup): New function.
5315 (m32r_usrregs_info, regs_info): New globals.
5316 (m32r_regs_info): Adjust.
5317 (initialize_low_arch): New function.
5318 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5319 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5320 (tic6x_usrregs_info): Forward declare.
5321 (tic6x_read_description): New function, based on ...
5322 (tic6x_arch_setup): ... this. Reimplement.
5323 (target_regsets): Rename to ...
5324 (tic6x_regsets): ... this, and make static.
5325 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5326 (tic6x_regs_info): New function.
5327 (the_low_target): Adjust.
5328 (initialize_low_arch): New function.
5329 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5330 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5331 (target_regsets): Rename to ...
5332 (xtensa_regsets): ... this, and make static.
5333 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5335 (xtensa_arch_setup, xtensa_regs_info): New functions.
5336 (the_low_target): Adjust.
5337 (initialize_low_arch): New function.
5338 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5339 (nios2_arch_setup): Set the current process'es tdesc.
5340 (target_regsets): Rename to ...
5341 (nios2_regsets): ... this.
5342 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5343 (nios2_regs_info): New function.
5344 (the_low_target): Adjust.
5345 (initialize_low_arch): New function.
5346 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5347 (aarch64_arch_setup): Set the current process'es tdesc.
5348 (target_regsets): Rename to ...
5349 (aarch64_regsets): ... this.
5350 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5351 (aarch64_regs_info): New function.
5352 (the_low_target): Adjust.
5353 (initialize_low_arch): New function.
5354 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5356 (target_regsets): Rename to ...
5357 (tile_regsets): ... this.
5358 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5359 (tile_regs_info): New function.
5360 (tile_arch_setup): Set the current process'es tdesc.
5361 (the_low_target): Adjust.
5362 (initialize_low_arch): New function.
5363 * spu-low.c (tdesc_spu): Declare.
5364 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5365 * win32-arm-low.c (tdesc_arm): Declare.
5366 (arm_arch_setup): New function.
5367 (the_low_target): Install arm_arch_setup instead of
5369 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5370 (init_windows_x86): Rename to ...
5371 (i386_arch_setup): ... this. Set `win32_tdesc'.
5372 (the_low_target): Adjust.
5373 * win32-low.c (win32_tdesc): New global.
5374 (child_add_thread): Don't create the thread cache here.
5375 (do_initial_child_stuff): Set the new process'es tdesc.
5376 * win32-low.h (struct target_desc): Forward declare.
5377 (win32_tdesc): Declare.
5378 * lynx-i386-low.c (tdesc_i386): Declare global.
5379 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5380 * lynx-low.c (lynx_tdesc): New global.
5381 (lynx_add_process): Set the new process'es tdesc.
5382 * lynx-low.h (struct target_desc): Forward declare.
5383 (lynx_tdesc): Declare global.
5384 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5385 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5386 * nto-low.c (nto_tdesc): New global.
5387 (do_attach): Set the new process'es tdesc.
5388 * nto-low.h (struct target_desc): Forward declare.
5389 (nto_tdesc): Declare.
5390 * nto-x86-low.c (tdesc_i386): Declare.
5391 (nto_x86_arch_setup): Set `nto_tdesc'.
5393 2013-06-04 Gary Benson <gbenson@redhat.com>
5395 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5396 to qSupported response when appropriate.
5397 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5398 with nonzero-length annex.
5399 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5400 arguments supplied in annex.
5402 2013-05-31 Doug Evans <dje@google.com>
5405 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5406 64 bits in 64-cross-32 environment.
5408 2013-05-28 Pedro Alves <palves@redhat.com>
5410 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5411 (aarch64-without-fpu.c): Delete rule.
5412 * configure.srv (aarch64*-*-linux*): Remove references to
5413 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5414 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5417 2013-05-24 Pedro Alves <palves@redhat.com>
5419 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5420 instead of strchr/decode_address. Error if the range isn't split
5421 with a ','. Don't assume there's be a ':' in the action.
5423 2013-05-23 Yao Qi <yao@codesourcery.com>
5424 Pedro Alves <palves@redhat.com>
5426 * linux-low.c (lwp_in_step_range): New function.
5427 (linux_wait_1): If the thread was range stepping and stopped
5428 outside the stepping range, report the stop to GDB. Otherwise,
5429 continue stepping. Add range stepping debug output.
5430 (linux_set_resume_request): Copy the step range from the resume
5432 (linux_supports_range_stepping): New.
5433 (linux_target_ops) <supports_range_stepping>: Set to
5434 linux_supports_range_stepping.
5435 * linux-low.h (struct linux_target_ops)
5436 <supports_range_stepping>: New field.
5437 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5438 * linux-x86-low.c (x86_supports_range_stepping): New.
5439 (the_low_target) <supports_range_stepping>: Set to
5440 x86_supports_range_stepping.
5441 * server.c (handle_v_cont): Handle 'r' action.
5442 (handle_v_requests): Append ";r" if the target supports range
5444 * target.h (struct thread_resume) <step_range_start,
5445 step_range_end>: New fields.
5446 (struct target_ops) <supports_range_stepping>:
5448 (target_supports_range_stepping): New macro.
5450 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5452 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5453 confusion in comment.
5455 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5457 * lynx-low.c (struct process_info_private): New type.
5458 (lynx_add_process): New function.
5459 (lynx_create_inferior, lynx_attach): Replace calls to
5460 add_process by calls to lynx_add_process.
5461 (lynx_resume): If PTID is null, then try using
5462 current_process()->private->last_wait_event_ptid.
5464 (lynx_clear_inferiors): Delete. The contents of that function
5465 has been inlined in lynx_mourn;
5466 (lynx_wait_1): Save the ptid in the process's private data.
5467 (lynx_mourn): Free the process' private data. Replace call
5468 to lynx_clear_inferiors by call to clear_inferiors.
5470 2013-05-17 Yao Qi <yao@codesourcery.com>
5472 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5475 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5477 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5478 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5479 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5480 PT_TEXT_END_ADDR guards. Update comments.
5481 (linux_target_op) <read_offsets>: Conditionally define to
5482 linux_read_offsets if the target is UCLIBC and if it defines
5483 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5485 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5486 Andrew Jenner <andrew@codesourcery.com>
5488 * Makefile.in (SFILES): Add linux-nios2-low.c.
5489 (clean): Add action to delete nios2-linux.c.
5490 (nios2-linux.c): New rule.
5491 * configure.srv: Add nios2*-*-linux*.
5492 * linux-nios2-low.c: New.
5494 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5496 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5498 2013-04-25 Hui Zhu <hui@codesourcery.com>
5501 * ax.c (ax_printf): Add fflush.
5503 2013-04-22 Tom Tromey <tromey@redhat.com>
5505 * Makefile.in (SFILES): Add filestuff.c.
5506 (OBS): Add filestuff.o.
5507 (filestuff.o): New target.
5508 * config.in, configure: Rebuild.
5509 * configure.ac: Check for fdwalk, pipe2.
5511 2013-04-17 Pedro Alves <palves@redhat.com>
5513 * configure.ac (USE_THREAD_DB): Delete variable.
5514 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5515 Don't AC_SUBST USE_THREAD_DB.
5516 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5517 * config.in, configure: Regenerate.
5519 2013-04-16 Pedro Alves <palves@redhat.com>
5521 * linux-low.h (struct lwp_info) <thread_known>: Move under
5522 the USE_THREAD_DB #ifdef.
5524 2013-04-16 Pedro Alves <palves@redhat.com>
5526 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5527 (linux-low.o): Delete rule.
5528 * linux-low.h: Always include "gdb_thread_db.h" instead of
5529 conditionally including thread_db.h.
5530 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5533 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5535 * Makefile.in (install-only): Fix make install regression.
5537 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5539 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5540 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5542 * gdbserver.1: Remove.
5544 2013-03-22 Pedro Alves <palves@redhat.com>
5546 * linux-low.c (handle_extended_wait): Don't call
5547 linux_enable_event_reporting.
5549 2013-03-15 Tony Theodore <tonyt@logyst.com>
5552 * Makefile.in (SHELL): Use @SHELL@.
5554 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5556 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5559 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5561 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5562 Remove extraneous NULL element.
5564 2013-03-13 Yao Qi <yao@codesourcery.com>
5566 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5567 'V' block in trace frame.
5569 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5571 * target.h (struct target_ops): Add btrace ops.
5572 (target_supports_btrace): New macro.
5573 (target_enable_btrace): New macro.
5574 (target_disable_btrace): New macro.
5575 (target_read_btrace): New macro.
5576 * gdbthread.h (struct thread_info): Add btrace field.
5577 * server.c: Include btrace-common.h.
5578 (handle_btrace_general_set): New function.
5579 (handle_btrace_enable): New function.
5580 (handle_btrace_disable): New function.
5581 (handle_general_set): Call handle_btrace_general_set.
5582 (handle_qxfer_btrace): New function.
5583 (struct qxfer qxfer_packets[]): Add btrace entry.
5584 * inferiors.c (remove_thread): Disable btrace.
5585 * linux-low: Include linux-btrace.h.
5586 (linux_low_enable_btrace): New function.
5587 (linux_low_read_btrace): New function.
5588 (linux_target_ops): Add btrace ops.
5589 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5590 Add srv_linux_btrace=yes.
5591 (x86_64-*-linux*): Add linux-btrace.o.
5592 Add srv_linux_btrace=yes.
5593 * configure.ac: Define HAVE_LINUX_BTRACE.
5594 * config.in: Regenerated.
5595 * configure: Regenerated.
5597 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5599 * server.c (handle_qxfer): Preserve error message if -3 is
5601 (qxfer): Document the -3 return value.
5603 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5605 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5606 (linux_btrace_h): New variable.
5607 (linux-btrace.o): New rule.
5609 2013-03-08 Stan Shebs <stan@codesourcery.com>
5610 Hafiz Abid Qadeer <abidh@codesourcery.com>
5612 * tracepoint.c (trace_buffer_size): New global.
5613 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5614 (init_trace_buffer): Change to one-argument function. Allocate
5615 trace buffer memory.
5616 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5617 handle QTBuffer:size packet.
5618 (cmd_bigqtbuffer_size): New function.
5619 (initialize_tracepoint): Call init_trace_buffer with
5620 DEFAULT_TRACE_BUFFER_SIZE.
5621 * server.c (handle_query): Add QTBuffer:size in the
5624 2013-03-07 Yao Qi <yao@codesourcery.com>
5626 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5627 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5629 (cmd_qtsp): Adjust condition. Do post increment.
5630 Set cur_action and cur_step_action back to 0.
5632 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5635 * linux-low.c (linux_write_memory): Return early success if LEN is
5638 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5640 * configure.srv: Add x86_64-*-cygwin* as target.
5642 2013-02-28 Tom Tromey <tromey@redhat.com>
5644 * configure.ac: Invoke AC_SYS_LARGEFILE.
5645 * configure, config.in: Rebuild.
5647 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5649 * win32-low.c: Throughout, fix format strings and casts of
5650 printf-like functions to avoid type related warnings on all
5652 (get_child_debug_event): Print dwDebugEventCode as hex since
5653 that's how it's usually documented.
5655 2013-02-28 Yao Qi <yao@codesourcery.com>
5657 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5660 2013-02-27 Jiong Wang <jiwang@tilera.com>
5662 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5663 (reg-tilegx32.c): New rule.
5664 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5665 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5666 different register info initializer according to elf class.
5667 (init_registers_tilgx32): New function. The tilegx32 register info
5669 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5670 (tile_store_gregset): Likewise.
5672 2013-02-27 Yao Qi <yao@codesourcery.com>
5674 * server.c (process_point_options): Print debug message when
5675 debug_threads is true.
5677 2013-02-26 Yao Qi <yao@codesourcery.com>
5679 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5681 2013-02-19 Pedro Alves <palves@redhat.com>
5682 Kai Tietz <ktietz@redhat.com>
5686 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5687 instead of strtoul to extract address from packet.
5688 (process_serial_event) <'z'>: Likewise.
5690 2013-02-18 Yao Qi <yao@codesourcery.com>
5692 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5694 2013-02-14 Pedro Alves <palves@redhat.com>
5698 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5699 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5701 2013-02-14 Pedro Alves <palves@redhat.com>
5703 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5705 2013-02-14 Pedro Alves <palves@redhat.com>
5707 * tracepoint.c (save_string): Delete.
5708 (add_tracepoint_action): Use savestring instead of save_string.
5710 2013-02-12 Pedro Alves <palves@redhat.com>
5712 * linux-xtensa-low.c: Ditto.
5713 * xtensa-xtregs.c: Ditto.
5715 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5717 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5720 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5722 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5723 aarch64_num_wp_regs and aarch64_num_bp_regs to
5724 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5726 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5728 * linux-aarch64-low.c (ps_get_thread_area): Replace
5729 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5731 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5732 Marcus Shawcroft <marcus.shawcroft@arm.com>
5733 Nigel Stephens <nigel.stephens@arm.com>
5734 Yufeng Zhang <yufeng.zhang@arm.com>
5736 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5737 (aarch64.c, aarch64-without-fpu.c): New targets.
5738 * configure.srv (aarch64*-*-linux*): New.
5739 * linux-aarch64-low.c: New file.
5741 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5743 * linux-low.c (handle_extended_wait, linux_create_inferior)
5744 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5745 (dequeue_one_deferred_signal, linux_resume_one_thread)
5746 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5747 (linux_tracefork_grandchild, linux_test_for_tracefork)
5748 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5749 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5750 where the argument is 0.
5752 2013-01-25 Yao Qi <yao@codesourcery.com>
5754 * event-loop.c: Include "queue.h".
5755 (gdb_event_p): New typedef.
5756 (struct gdb_event) <next_event>: Remove.
5757 (event_queue): Change to QUEUE(gdb_event_p).
5758 (async_queue_event): Remove.
5759 (gdb_event_xfree): New.
5760 (initialize_event_loop): New.
5761 (process_event): Use API from QUEUE.
5762 (wait_for_event): Likewise.
5763 * server.c (main): Call initialize_event_loop.
5764 * server.h (initialize_event_loop): Declare.
5766 2013-01-18 Yao Qi <yao@codesourcery.com>
5768 * ax.h (struct eval_agent_expr_context): New.
5769 (gdb_eval_agent_expr): Update declaration.
5770 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5771 TFRAME. Add new argument CTX.
5772 * server.h (struct eval_agent_expr_context): Declare.
5773 (agent_mem_read, agent_tsv_read): Update declaration.
5774 (agent_mem_read_string): Likewise.
5775 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5776 (add_traceframe_block): Add new argument TPOINT.
5777 Increase TPOINT->traceframe_usage.
5778 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5779 eval_tracepoint_agent_expr.
5780 (condition_true_at_tracepoint): Likewise.
5781 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5782 (agent_mem_read_string, agent_tsv_read): Likewise.
5784 2013-01-16 Yao Qi <yao@codesourcery.com>
5786 * linux-low.c (linux_resume_one_lwp): Don't check
5787 'lwp->bp_reinsert != 0'.
5789 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5790 Pedro Alves <palves@redhat.com>
5792 * lynx-low.c (ptrace_request_to_str): Define a temporary
5793 macro and use it to simplify this function's implementation.
5795 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5797 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5800 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5802 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5804 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5806 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5808 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5810 * lynx-low.c (lynx_resume): Use the resume_info parameter
5811 to determine the ptid for the lynx_ptrace call, unless
5812 it is equal to minus_one_ptid, in which case we use the
5813 ptid of the current_inferior.
5814 (lynx_wait_1): After having received a thread create/exit
5815 event, resume the inferior's execution using the signaling
5816 thread's ptid, rather than the old ptid.
5818 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5820 * lynx-low.c (lynx_resume): Delete variable ret.
5822 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5824 * gdbreplay.c (gdbreplay_version): Update copyright year.
5825 * server.c (gdbserver_version): Likewise.
5827 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5829 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5832 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5834 * lynx-low.c (ptrace_request_to_str): Add handling for
5837 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5839 * lynx-low.c (lynx_attach): Delete variable new_process.
5841 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5843 * lynx-low.c (lynx_create_inferior): Delete variable
5846 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5848 * lynx-low.c (ptrace_request_to_str): Do not handle
5849 PTRACE_GETTHREADLIST if this macro does not exist.
5851 2012-12-15 Yao Qi <yao@codesourcery.com>
5853 * Makefile.in (OBS): Add notif.o.
5854 * notif.c, notif.h: New.
5855 * server.c: Include "notif.h".
5856 (struct vstop_notif) <next>: Remove.
5858 (queue_stop_reply): Update.
5859 (push_event, send_next_stop_reply): Remove.
5860 (discard_queued_stop_replies): Update.
5861 (notif_stop): New variable.
5862 (handle_v_stopped): Remove.
5863 (handle_v_requests): Don't call handle_v_stopped. Call
5864 handle_ack_notif instead.
5865 (queue_stop_reply_callback): Call notif_event_enque instead
5866 of queue_stop_reply.
5867 (handle_status): Don't call send_next_stop_reply, call
5868 notif_write_event instead.
5869 (kill_inferior_callback): Likewise.
5870 (detach_or_kill_inferior_callback): Likewise.
5871 (main): Call initialize_notif.
5872 (process_serial_event): Call QUEUE_is_empty.
5873 (handle_target_event): Call notif_push instead of push event.
5874 * server.h (push_event): Remove declaration.
5876 2012-12-10 Tom Tromey <tromey@redhat.com>
5878 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5879 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5882 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5883 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5884 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5885 (amd64-linux-ipa.o, ax.o): Rewrite.
5886 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5887 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5888 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5889 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5890 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5891 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5892 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5893 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5894 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5895 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5896 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5897 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5898 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5899 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5900 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5901 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5902 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5903 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5904 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5905 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5906 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5907 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5908 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5909 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5910 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5911 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5912 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5913 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5914 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5915 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5916 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5917 (reg-tilegx.o): Remove.
5918 (all_object_files): New macro.
5919 Include .deps files.
5920 * aclocal.m4, configure: Rebuild.
5921 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5922 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5923 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5925 2012-12-05 Tom Tromey <tromey@redhat.com>
5928 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5930 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5932 * configure.ac: Check for linux/perf_event.h.
5933 * config.in: Regenerated.
5934 * configure: Regenerated.
5936 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5938 * hostio.c (handle_readlink): Decrease buffer size
5939 parameter passed to readlink by one byte.
5941 2012-11-26 Yao Qi <yao@codesourcery.com>
5943 * configure.ac (build_warnings): Append '-Wempty-body'.
5944 * configure: Regenerated.
5945 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5948 2012-11-15 Pierre Muller <muller@sourceware.org>
5950 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5951 * config.in: Regenerate.
5952 * configure: Regenerate.
5953 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5954 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5955 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5956 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5958 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5959 instead of <sys/wait.h> header.
5960 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5962 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5964 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5965 (various make rules): Remove -DGDBSERVER
5967 2012-11-09 Yao Qi <yao@codesourcery.com>
5969 * spu-low.c (current_ptid): Move it to ..
5970 * gdbthread.h: ... here. New.
5971 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5972 * server.c (myresume, process_serial_event): Likewise.
5973 * thread-db.c (thread_db_find_new_threads): Likewise.
5974 * tracepoint.c (run_inferior_command): Likewise.
5976 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5978 * server.c (handle_search_memory_1): Include access length in
5981 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5983 * linux-crisv32-low.c: Fix compile errors.
5985 2012-09-04 Yao Qi <yao@codesourcery.com>
5987 * tracepoint.c (cmd_qtsv): Adjust debug message.
5988 Don't check CUR_TPOINT.
5990 2012-08-28 Yao Qi <yao@codesourcery.com>
5992 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5993 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5994 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5995 Remove declarations of xmalloc, xreallloc, xstrdup and
5997 * Makefile.in (libiberty_h): New.
5998 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5999 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6001 2012-08-23 Yao Qi <yao@codesourcery.com>
6003 * server.h: Remove declaration of 'xsnprintf'.
6005 2012-08-22 Keith Seitz <keiths@redhat.com>
6007 * server.h: Include build-gnulib-gbserver/config.h.
6008 * gdbreplay.c: Likewise.
6010 2012-08-08 Doug Evans <dje@google.com>
6012 * Makefile.in (SFILES): Add gdb_vecs.c.
6013 (OBS): Add gdb_vecs.o.
6014 (gdb_vecs_h, host_defs_h): New variables.
6015 (thread-db.o): Add $(gdb_vecs_h) dependency.
6016 (gdb_vecs.o): New rule.
6017 * thread-db.c: #include "gdb_vecs.h".
6018 (thread_db_load_search): Use a vector to iterate over path elements.
6019 Handle text appearing after "$pdir".
6021 * configure.ac: Add check for strstr.
6022 * config.in: Regenerate.
6023 * configure: Regenerate.
6025 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6027 * hostio.c (handle_pread): If pread fails, fall back to attempting
6029 (handle_pwrite): Likewise for pwrite.
6031 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6033 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6034 between unsupported TYPE and unimplementable ADDR/LEN combination.
6035 (arm_insert_point): Act on new return value.
6037 2012-07-31 Pedro Alves <palves@redhat.com>
6039 * server.c (process_point_options): Only skip tokens if we find
6040 one that is unrecognized. Don't treat 'X' specially while
6041 skipping unrecognized tokens.
6043 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6045 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6046 to 4-byte-align HW breakpoint addresses for Thumb.
6048 2012-07-27 Yao Qi <yao@codesourcery.com>
6052 * server.h: Declare gdb_agent_about_to_close.
6053 * target.c (kill_inferior): Include "agent.h".
6054 New. Send command 'kill'.
6055 * target.h (kill_inferior): Removed macro.
6056 * tracepoint.c (gdb_agent_about_to_close): New.
6057 (gdb_agent_helper_thread): Handle command 'close'.
6058 Wait endlessly until the inferior stops.
6059 Install gdb_agent_remove_socket to atexit hook.
6060 (agent_socket_name): New static variable.
6061 (gdb_agent_socket_init): Replace local variable 'name' with
6062 'agent_socket_name'.
6063 (gdb_agent_remove_socket): New.
6065 2012-07-27 Yao Qi <yao@codesourcery.com>
6067 * server.c (process_point_options): Stop at 'X' when parsing.
6069 2012-07-19 Michael Eager <eager@eagercon.com>
6071 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6073 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6074 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6075 hardware breakpoint.
6077 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6079 * gdbserver/linux-low.c (initialize_low): Call
6080 linux_ptrace_init_warnings.
6082 2012-07-02 Doug Evans <dje@google.com>
6084 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6087 2012-07-02 Stan Shebs <stan@codesourcery.com>
6089 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6090 (ax.o): Add it to build rule.
6092 (OBS): Add format.o.
6093 (IPA_OBS): Add format.o.
6094 * server.c (handle_query): Claim support for breakpoint commands.
6095 (process_point_options): Add command case.
6096 (process_serial_event): Leave running if there are printfs in
6098 * mem-break.h (any_persistent_commands): Declare.
6099 (add_breakpoint_commands): Declare.
6100 (gdb_no_commands_at_breakpoint): Declare.
6101 (run_breakpoint_commands): Declare.
6102 * mem-break.c (struct point_command_list): New struct.
6103 (struct breakpoint): New field command_list.
6104 (any_persistent_commands): New function.
6105 (add_commands_to_breakpoint): New function.
6106 (add_breakpoint_commands): New function.
6107 (gdb_no_commands_at_breakpoint): New function.
6108 (run_breakpoint_commands): New function.
6109 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6111 * ax.c: Include format.h.
6112 (ax_printf): New function.
6113 (gdb_eval_agent_expr): Add printf opcode.
6115 2012-06-13 Yao Qi <yao@codesourcery.com>
6117 * server.c (start_inferior): Remove duplicated writes to fields
6118 'last_resume_kind' and 'last_status' of 'current_inferior'.
6120 2012-06-12 Yao Qi <yao@codesourcery.com>
6121 Pedro Alves <palves@redhat.com>
6123 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6125 * server.c (handle_v_cont): Extend comment.
6127 2012-06-11 Yao Qi <yao@codesourcery.com>
6129 * linux-low.c (linux_attach): Add 'static'.
6131 2012-06-06 Yao Qi <yao@codesourcery.com>
6133 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6135 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6137 Fix gcc -flto compilation warning.
6138 * server.c (main): Make variable multi_mode and attach volatile.
6140 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6142 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6143 if the platform doesn't know about it.
6145 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6147 * Makefile.in (SFILES): Add linux-tile-low.c.
6148 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6149 * configure.srv: Handle tilegx-*-linux*.
6150 * linux-tile-low.c: New file.
6152 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6154 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6156 2012-05-24 Pedro Alves <palves@redhat.com>
6160 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6162 2012-05-24 Pedro Alves <palves@redhat.com>
6166 Replace target_signal with gdb_signal throughout.
6168 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6170 * linux-low.c (linux_store_registers): Avoid the copying sequence
6171 when no data has been retrieved by ptrace.
6173 2012-05-22 Will Deacon <will.deacon@arm.com>
6175 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6176 Include asm/ptrace.h.
6177 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6180 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6182 * linux-low.c (linux_store_registers): Don't re-retrieve data
6183 with ptrace that has already been obtained from /proc. Always
6184 copy any data retrieved with ptrace to the buffer supplied.
6186 2012-05-11 Yao Qi <yao@codesourcery.com>
6187 Pedro Alves <palves@redhat.com>
6189 * linux-low.c (enum stopping_threads_kind): New.
6190 (stopping_threads): Change type to `enum stopping_threads_kind'.
6191 (handle_extended_wait): If stopping and suspending threads, leave
6192 the new_lwp suspended too.
6193 (linux_wait_for_event): Adjust.
6194 (stop_all_lwps): Set `stopping_threads' to
6195 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6196 whether we're suspending threads or just stopping them. Assert no
6199 2012-04-29 Yao Qi <yao@codesourcery.com>
6201 * server.h: Move some code to ...
6202 * gdbthread.h: ... here. New.
6203 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6204 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6205 (nto-low.o, win32-low.o): Likewise.
6206 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6207 * regcache.c, remote-utils.c, server.c: Likewise.
6208 * target.c, tracepoint.c, win32-low.c: Likewise.
6210 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6212 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6213 (PTRACE_ARG4_TYPE): Likewise.
6214 (PTRACE_XFER_TYPE): Likewise.
6215 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6216 ptrace to PTRACE_ARG3_TYPE.
6217 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6218 (PTRACE_ARG4_TYPE): Likewise.
6219 (PTRACE_XFER_TYPE): Likewise.
6220 (linux_detach_one_lwp): Cast fourth argument of
6221 ptrace to long then PTRACE_ARG4_TYPE.
6222 (regsets_fetch_inferior_registers): Cast third argument of
6223 ptrace to long then PTRACE_ARG3_TYPE.
6224 (regsets_store_inferior_registers): Likewise.
6226 2012-04-20 Pedro Alves <palves@redhat.com>
6228 * configure: Regenerate.
6230 2012-04-19 Pedro Alves <palves@redhat.com>
6232 * Makefile.in (GNULIB_BUILDDIR): New.
6233 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6234 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6235 (all, install-only, uninstall, clean-info, all-lib, clean): No
6236 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6237 (maintainer-clean realclean distclean): Use subdir_do.
6239 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6240 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6241 * acinclude.m4: Include acx_configure_dir.m4.
6242 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6243 calls. Call AC_PROG_RANLIB. Configure gnulib using
6246 (GNULIB_STDINT_H): Adjust.
6247 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6248 * gdbreplay.c: Include build-gnulib/config.h.
6249 * server.h: Likewise.
6250 * aclocal.m4: Regenerate.
6251 * config.in: Regenerate.
6252 * configure: Regenerate.
6254 2012-04-19 Pedro Alves <palves@redhat.com>
6256 * Makefile.in (LIBGNU, INCGNU): Adjust.
6257 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6258 (all, install-only, uninstall, clean-info, all-lib, clean)
6259 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6260 * configure.ac: Adjust AC_OUTPUT output.
6261 * aclocal.m4: Regenerate.
6262 * configure: Regenerate.
6264 2012-04-19 Pedro Alves <palves@redhat.com>
6266 * Makefile.in (generated_files): New.
6267 (server_h): Remove the explicit dependency on config.h, and depend
6268 on $generated_files.
6270 2012-04-19 Pedro Alves <palves@redhat.com>
6272 * Makefile.in (INCGNU): Add -Ignulib.
6274 2012-04-19 Pedro Alves <palves@redhat.com>
6276 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6277 (INCGNU): ... this, and spell out -I here.
6278 (GNULIB_LIB): Rename to ...
6280 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6282 2012-04-19 Pedro Alves <palves@redhat.com>
6284 * config.in: Regenerate.
6286 2012-04-19 Pedro Alves <palves@redhat.com>
6288 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6289 * server.h (memmem): Remove declaration.
6290 * config.in: Regenerate.
6291 * configure: Regenerate.
6293 2012-04-19 Yao Qi <yao@codesourcery.com>
6295 * Makefile.in (SFILES): Add common/vec.c.
6299 2012-04-19 Yao Qi <yao@codesourcery.com>
6301 * remote-utils.c (prepare_resume_reply): Replace with macro
6302 target_core_of_thread.
6303 * server.c (handle_qxfer_threads_proper): Likewise.
6304 * target.h (traget_core_of_thread): New macro.
6306 2012-04-18 Pedro Alves <palves@redhat.com>
6308 * aclocal.m4: Regenerate.
6309 * configure: Regenerate.
6311 2012-04-16 Yao Qi <yao@codesourcery.com>
6313 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6314 duplicated on address.
6316 2012-04-16 Yao Qi <yao@codesourcery.com>
6318 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6319 (struct tracepoint_action_ops) <send>: New field.
6320 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6321 (agent_expr_send, x_tracepoint_action_send): New.
6322 (l_tracepoint_action_send): New.
6323 (cmd_qtdp): Download and install tracepoint
6324 according to `use_agent'.
6325 (run_inferior_command): Add one more parameter `len'.
6327 (tracepoint_send_agent): New.
6328 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6330 2012-04-16 Yao Qi <yao@codesourcery.com>
6332 * tracepoint.c (download_tracepoints): Moved to ...
6333 (cmd_qtstart): ... here.
6335 2012-04-14 Yao Qi <yao@codesourcery.com>
6337 * tracepoint.c: Include inttypes.h.
6338 (struct collect_memory_action): Use sized types.
6339 (struct tracepoint): Likewise.
6340 (cmd_qtdp, stop_tracing): Update print specifiers.
6341 (cmd_qtp, response_tracepoint): Likewise.
6342 (collect_data_at_tracepoint): Likewise.
6343 (collect_data_at_step): Likewise.
6345 2012-04-14 Yao Qi <yao@codesourcery.com>
6347 Import gnulib module inttypes.
6348 * aclocal.m4, config.in, configure: Regenerated.
6350 2012-04-14 Yao Qi <yao@codesourcery.com>
6352 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6353 Makefile and config.status at last.
6355 2012-04-13 Yao Qi <yao@codesourcery.com>
6357 * tracepoint.c: Include stdint.h unconditionally.
6359 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6361 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6362 on BFD_HAVE_SYS_PROCFS_TYPE.
6363 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6364 * configure: Regenerate.
6365 * config.in: Likewise.
6367 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6369 * Makefile.in (clean): Also remove x32.c x32-linux.c
6370 x32-avx.c x32-avx-linux.c.
6371 (x32.o): New target.
6373 (x32-linux.o): Likewise.
6374 (x32-linux.c): Likewise.
6375 (x32-avx.o): Likewise.
6376 (x32-avx.c): Likewise.
6377 (x32-avx-linux.o): Likewise.
6378 (x32-avx-linux.c): Likewise.
6380 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6381 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6382 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6383 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6384 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6385 i386/x32-avx-linux.xml.
6387 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6388 (init_registers_x32_avx_linux): Likwise.
6389 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6390 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6392 2012-04-13 Pedro Alves <palves@redhat.com>
6394 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6395 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6396 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6397 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6400 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6402 * linux-x86-low.c (compat_x32_clock_t): New.
6403 (compat_x32_siginfo_t): Likewise.
6404 (compat_x32_siginfo_from_siginfo): Likewise.
6405 (siginfo_from_compat_x32_siginfo): Likewise.
6406 (linux_is_elf64): Likewise.
6407 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6408 and siginfo_from_compat_x32_siginfo for x32.
6409 (x86_arch_setup): Set linux_is_elf64.
6411 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6414 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6416 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6417 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6418 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6419 compatible with process.
6421 2012-04-12 Yao Qi <yao@codesourcery.com>
6423 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6424 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6425 (install-only, install-info, clean): Handle sub dir gnulib.
6426 (all-lib, am--refresh): New targets.
6427 (memmem.o): Remove target.
6428 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6429 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6430 (AC_REPLACE_FUNCS): Remove memmem.
6431 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6432 (AC_OUTPUT): Generate Makefile in gnulib/.
6433 * aclocal.m4, config.in, configure: Regenerated.
6435 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6437 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6439 2012-04-05 Pedro Alves <palves@redhat.com>
6441 -Werror=strict-aliasing
6443 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6446 2012-04-04 Pedro Alves <palves@redhat.com>
6448 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6449 (sparc_store_gregset_from_stack, sparc_store_gregset)
6450 (sparc_breakpoint_at): Fix formatting.
6452 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6454 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6456 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6457 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6458 * config.in: Regenerate.
6459 * configure: Likewise.
6461 2012-03-29 Pedro Alves <palves@redhat.com>
6463 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6464 Correct ptrace arguments.
6466 2012-03-28 Pedro Alves <palves@redhat.com>
6468 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6469 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6470 (IA64_FR1_REGNUM): New defines.
6471 (ia64_fetch_register): New.
6472 (the_low_target): Install it.
6473 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6475 * linux-low.c (linux_fetch_registers): Try the
6476 the_low_target.fetch_register hook first.
6478 * linux-arm-low.c (the_low_target): Adjust.
6479 * linux-bfin-low.c (the_low_target): Adjust.
6480 * linux-cris-low.c (the_low_target): Adjust.
6481 * linux-crisv32-low.c (the_low_target): Adjust.
6482 * linux-m32r-low.c (the_low_target): Adjust.
6483 * linux-m68k-low.c (the_low_target): Adjust.
6484 * linux-mips-low.c (the_low_target): Adjust.
6485 * linux-ppc-low.c (the_low_target): Adjust.
6486 * linux-s390-low.c (the_low_target): Adjust.
6487 * linux-sh-low.c (the_low_target): Adjust.
6488 * linux-sparc-low.c (the_low_target): Adjust.
6489 * linux-tic6x-low.c (the_low_target): Adjust.
6490 * linux-x86-low.c (the_low_target): Adjust.
6491 * linux-xtensa-low.c (the_low_target): Adjust.
6493 2012-03-26 Pedro Alves <palves@redhat.com>
6495 * server.c (handle_qxfer_libraries): Don't bail early if
6496 the_target->qxfer_libraries_svr4 is not NULL.
6498 2012-03-26 Pedro Alves <palves@redhat.com>
6500 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6502 2012-03-23 Pedro Alves <palves@redhat.com>
6504 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6505 "library-list-svr4" element's start tag when the the DSO list is
6508 2012-03-23 Pedro Alves <palves@redhat.com>
6510 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6511 a variable whose type size is the same as the inferior's pointer
6514 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6516 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6518 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6519 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6520 * linux-low.h: Include <signal.h>.
6521 (struct siginfo): Remove forward declaration.
6522 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6525 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6527 * .gitignore: Ignore more files.
6529 2012-03-19 Pedro Alves <palves@redhat.com>
6530 Jan Kratochvil <jan.kratochvil@redhat.com>
6532 * server.c (cont_thread, general_thread): Add describing comments.
6533 (start_inferior): Clear `cont_thread'.
6534 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6537 2012-03-15 Yao Qi <yao@codesourcery.com>
6539 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6541 (cmd_qtdp): ... here.
6543 2012-03-15 Yao Qi <yao@codesourcery.com>
6545 * tracepoint.c (struct tracepoint_action_ops): New.
6546 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6547 (m_tracepoint_action_download): New.
6548 (r_tracepoint_action_download): New.
6549 (x_tracepoint_action_download): New.
6550 (l_tracepoint_action_download): New.
6551 (add_tracepoint_action): Install `action->ops' according type.
6552 (download_tracepoint_1): Move code `download' function pointer
6553 of various tracepoint_action_ops.
6555 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6557 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6558 linux_ptrace_attach_warnings.
6560 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6562 * Makefile.in (linux-ptrace.o): New.
6563 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6564 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6565 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6566 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6567 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6569 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6571 2012-03-08 Yao Qi <yao@codesourcery.com>
6572 Pedro Alves <palves@redhat.com>
6574 Fix PR server/13392.
6575 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6577 * tracepoint.c (remove_tracepoint): New.
6578 (cmd_qtdp): Call remove_tracepoint when failed to install.
6580 2012-03-07 Pedro Alves <palves@redhat.com>
6582 * linux-low.c (get_detach_signal): New.
6583 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6584 Pass on pending signals to PTRACE_DETACH. Check the result of the
6586 * server.c (program_signals, program_signals_p): New.
6587 (handle_general_set): Handle QProgramSignals.
6588 * server.h (program_signals, program_signals_p): Declare.
6590 2012-03-05 Pedro Alves <palves@redhat.com>
6591 Jan Kratochvil <jan.kratochvil@redhat.com>
6593 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6596 2012-03-03 Yao Qi <yao@codesourcery.com>
6598 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6599 agent_look_up_symbols.
6601 2012-03-03 Yao Qi <yao@codesourcery.com>
6603 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6604 (linux-x86-low.o): Likewise.
6605 * server.h: Remove in_process_agent_loaded.
6606 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6610 2012-03-03 Yao Qi <yao@codesourcery.com>
6612 * tracepoint.c (gdb_agent_capability): New global.
6613 (in_process_agent_loaded_ust): Renamed to
6614 `in_process_agent_supports_ust'.
6616 (in_process_agent_supports_ust): Call agent_capability_check.
6617 (clear_installed_tracepoints): Assert that agent supports
6620 2012-03-03 Yao Qi <yao@codesourcery.com>
6622 * linux-low.c (linux_supports_agent): New.
6623 (linux_target_ops): Initialize field `supports_agent' with
6624 linux_supports_agent.
6625 * target.h (struct target_ops) <supports_agent>: New.
6626 (target_supports_agent): New macro.
6627 * server.c (handle_general_set): Handle packet 'QAgent'.
6628 (handle_query): Send `QAgent+'.
6629 * Makefile.in (server.o): Depends on agent.h.
6631 2012-03-03 Yao Qi <yao@codesourcery.com>
6633 * Makefile.in (OBS): Add agent.o.
6634 Add new rule for agent.o.
6635 Track dependence of tracepoint.c on agent.h.
6636 * tracepoint.c (run_inferior_command_1):
6637 (run_inferior_command): Call agent_run_command.
6638 (gdb_ust_connect_sync_socket): Deleted. Move it to
6640 (resume_thread, stop_thread): Likewise.
6641 (gdb_ust_socket_init): Renamed to ...
6642 (gdb_agent_socket_init): ... New.
6643 (gdb_ust_thread): Renamed to ...
6644 (gdb_agent_helper_thread): ... New.
6645 (gdb_ust_init): Move some code to ...
6646 (gdb_agent_init): ... here. New.
6647 [HAVE_UST]: Call gdb_ust_init.
6648 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6649 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6650 * config.in, configure: Regenerated.
6652 2012-03-02 Pedro Alves <palves@redhat.com>
6654 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6655 * linux-low.c (struct simple_pid_list): New.
6656 (stopped_pids): New a struct simple_pid_list pointer.
6657 (add_to_pid_list, pull_pid_from_list): New.
6658 (handle_extended_wait): Don't assume the first signal new children
6659 report is SIGSTOP. Adjust call to pull_pid_from_list.
6660 (linux_wait_for_lwp): Adjust.
6662 2012-03-02 Yao Qi <yao@codesourcery.com>
6664 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6667 2012-03-02 Yao Qi <yao@codesourcery.com>
6669 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6670 `stop_pc' and `tpoint'. Update caller.
6672 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6674 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6675 * linux-low.c (use_linux_regsets): New macro.
6676 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6677 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6678 (linux_register_in_regsets): New function.
6679 (usr_fetch_inferior_registers): Skip registers covered by
6681 (usr_store_inferior_registers): Likewise.
6682 (usr_fetch_inferior_registers): New macro.
6683 (usr_store_inferior_registers): Likewise.
6684 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6685 (linux_store_registers): Likewise.
6686 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6688 (init_registers_mips64_dsp_linux): Likewise.
6689 (init_registers_mips_linux): New macro.
6690 (init_registers_mips_dsp_linux): Likewise.
6691 (mips_dsp_num_regs): Likewise.
6692 (DSP_BASE, DSP_CONTROL): New fallback macros.
6693 (mips_base_regs): New macro.
6694 (mips_regmap): Use it. Fix the size.
6695 (mips_dsp_regmap): New variable.
6696 (mips_dsp_regset_bitmap): Likewise.
6697 (mips_arch_setup): New function.
6698 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6700 (mips_cannot_store_register): Likewise.
6701 (the_low_target): Update .arch_setup, .num_regs and .regmap
6702 initializers. Add .regset_bitmap initializer.
6703 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6705 * linux-bfin-low.c (the_low_target): Likewise.
6706 * linux-cris-low.c (the_low_target): Likewise.
6707 * linux-crisv32-low.c (the_low_target): Likewise.
6708 * linux-ia64-low.c (the_low_target): Likewise.
6709 * linux-m32r-low.c (the_low_target): Likewise.
6710 * linux-m68k-low.c (the_low_target): Likewise.
6711 * linux-ppc-low.c (the_low_target): Likewise.
6712 * linux-s390-low.c (the_low_target): Likewise.
6713 * linux-sh-low.c (the_low_target): Likewise.
6714 * linux-sparc-low.c (the_low_target): Likewise.
6715 * linux-tic6x-low.c (the_low_target): Likewise.
6716 * linux-x86-low.c (the_low_target): Likewise.
6717 * linux-xtensa-low.c (the_low_target): Likewise.
6718 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6719 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6720 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6722 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6723 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6725 2012-02-29 Yao Qi <yao@codesourcery.com>
6726 Pedro Alves <palves@redhat.com>
6728 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6729 `step_over_finished' is true.
6731 2012-02-27 Pedro Alves <palves@redhat.com>
6733 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6734 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6736 2012-02-27 Pedro Alves <palves@redhat.com>
6739 * linux-low.c (pid_is_stopped): New.
6740 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6742 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6744 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6747 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6749 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6751 2012-02-24 Luis Machado <lgustavo@codesourcery>
6753 * server.c (handle_query): Advertise support for target-side
6754 breakpoint condition evaluation.
6755 (process_point_options): New function.
6756 (process_serial_event): When inserting a breakpoint, check for
6757 a target-side condition that should be evaluated.
6759 * mem-break.c: Include regcache.h and ax.h.
6760 (point_cond_list_t): New data structure.
6761 (breakpoint) <cond_list>: New field.
6762 (find_gdb_breakpoint_at): Make non-static.
6763 (delete_gdb_breakpoint_at): Clear any target-side
6765 (clear_gdb_breakpoint_conditions): New function.
6766 (add_condition_to_breakpoint): Likewise.
6767 (add_breakpoint_condition): Likewise.
6768 (gdb_condition_true_at_breakpoint): Likewise.
6769 (gdb_breakpoint_here): Return result directly instead
6770 of going through a local variable.
6772 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6773 (clear_gdb_breakpoint_conditions): Likewise.
6774 (add_breakpoint_condition): Likewise.
6775 (gdb_condition_true_at_breakpoint): Likewise.
6777 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6778 (need_step_over_p): Take target-side breakpoint condition into
6781 2012-02-24 Luis Machado <lgustavo@codesourcery>
6783 * server.h: Include tracepoint.h.
6784 (agent_mem_read, agent_get_trace_state_variable_value,
6785 agent_set_trace_state_variable_value,
6786 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6787 get_set_tsv_func_addr): New prototypes.
6789 * ax.h: New include file.
6790 * ax.c: New source file.
6792 * tracepoint.c: Include ax.h.
6793 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6794 agent_expr, eval_result_type): Move to ax.h.
6795 (parse_agent_expr): Rename to ...
6796 (gdb_parse_agent_expr): ... this, make it non-static and move
6798 (unparse_agent_expr) Rename to ...
6799 (gdb_unparse_agent_expr): ... this, make it non-static and move
6801 (eval_agent_expr): Rename to ...
6802 (eval_tracepoint_agent_expr): ... this.
6803 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6804 forward declarations.
6805 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6806 (agent_get_trace_state_variable_value): New function.
6807 (agent_set_trace_state_variable_value): New function.
6808 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6809 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6810 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6811 (condition_true_at_tracepoint): Likewise.
6812 (parse_agent_expr): Rename to ...
6813 (gdb_parse_agent_expr): ... this and move to ax.c.
6814 (unparse_agent_expr): Rename to ...
6815 (gdb_unparse_agent_expr): ... this and move to ax.c.
6816 (gdb_agent_op_name): Move to ax.c.
6817 (eval_agent_expr): Rename to ...
6818 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6820 (eval_tracepoint_agent_expr): New function.
6821 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6823 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6825 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6826 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6827 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6828 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6829 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6830 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6831 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6832 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6833 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6834 (compile_bytecodes): Remove forward declaration.
6835 (is_goto_target): Move to ax.c.
6836 (compile_bytecodes): Move to ax.c and call
6837 agent_get_trace_state_variable_value (...) and
6838 agent_set_trace_state_variable_value (...).
6840 * Makefile.in: Update ax.c and IPA dependencies.
6842 2012-02-24 Pedro Alves <palves@redhat.com>
6844 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6845 (cmd_bigqtbuffer_circular): ... this. Only handle
6846 'QTBuffer:circular:'.
6847 (handle_tracepoint_general_set): Adjust.
6849 2012-02-16 Yao Qi <yao@codesourcery.com>
6851 * inferiors.c: Move code to ...
6852 * dll.c: .... here. New.
6853 * server.h: Declare clear_dlls.
6854 * Makefile.in (SFILES): Add dll.c.
6858 2012-02-11 Yao Qi <yao@codesourcery.com>
6860 * server.c: (handle_monitor_command): Add a new parameter
6862 (handle_query): Update caller.
6864 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6866 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6867 * configure, config.in: Regenerate.
6868 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6871 2012-02-02 Pedro Alves <palves@redhat.com>
6873 Try SIGKILL first, then PTRACE_KILL.
6874 * linux-low.c (linux_kill_one_lwp): New.
6875 (linux_kill_one_lwp): Rename to ...
6876 (kill_one_lwp_callback): ... this. Use the new
6879 2012-02-02 Pedro Alves <palves@redhat.com>
6881 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6884 2012-01-27 Pedro Alves <palves@redhat.com>
6886 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6887 (elf_64_file_p): Make static.
6888 (linux_pid_exe_is_elf_64_file): New.
6889 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6890 Delete declarations.
6891 (linux_pid_exe_is_elf_64_file): Declare.
6892 * linux-x86-low.c (x86_arch_setup): Use
6893 linux_pid_exe_is_elf_64_file.
6895 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6897 * linux-low.c (linux_wait_for_event_1): Rename to ...
6898 (linux_wait_for_event): ... here and merge it with former
6899 linux_wait_for_event - new variable wait_ptid, use it.
6900 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6902 2012-01-23 Pedro Alves <palves@redhat.com>
6904 * server.c (main): Avoid yet another case of infinite loop while
6905 detaching/killing after a longjmp.
6907 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6910 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6912 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6914 * hostio.c (handle_readlink): New function.
6915 (handle_vFile): Call it to handle "vFile:readlink" packets.
6917 2012-01-20 Pedro Alves <palves@redhat.com>
6918 Ulrich Weigand <ulrich.weigand@linaro.org>
6920 * server.c (handle_v_requests): Only support vAttach and vRun to
6921 start multiple processes when in extended protocol mode.
6923 2012-01-17 Pedro Alves <palves@redhat.com>
6925 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6926 memalign plus mprotect to allocate the scratch buffer.
6928 2012-01-13 Pedro Alves <palves@redhat.com>
6930 * server.c (attach_inferior): Clear `cont_thread'.
6932 2012-01-13 Pedro Alves <palves@redhat.com>
6934 * server.c (main): Avoid infinite loop while detaching/killing
6937 2012-01-09 Doug Evans <dje@google.com>
6939 * server.c (start_inferior): Set last_ptid in --wrapper case.
6941 2012-01-06 Yao Qi <yao@codesourcery.com>
6943 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6945 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6947 2012-01-04 Yao Qi <yao@codesourcery.com>
6949 * tracepoint.c (cmd_qtdp): Print debug message
6950 for static tracepoint.
6952 2012-01-04 Yao Qi <yao@codesourcery.com>
6954 * tracepoint.c (trace_vdebug): Differentiate debug message
6955 between gdbserver and IPA.
6957 2012-01-03 Yao Qi <yao@codesourcery.com>
6959 * tracepoint.c (tracepoint_was_hit): Don't collect for
6962 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6964 * terminal.h: Reformat copyright header.
6966 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6968 * server.c (gdbserver_version): Update copyright year.
6969 * gdbreplay.c (gdbreplay_version): Likewise.
6971 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6973 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6976 2011-12-18 Hui Zhu <teawater@gmail.com>
6977 * linux-low.c (linux_create_inferior): Save return value to ret.
6979 2011-12-18 Hui Zhu <teawater@gmail.com>
6981 * linux-low.c (linux_create_inferior): Save return value to ret.
6983 2011-12-16 Doug Evans <dje@google.com>
6985 * linux-low.c (linux_create_inferior): If stdio connection,
6986 redirect stdin from /dev/null, stdout to stderr.
6987 * remote-utils.c (remote_is_stdio): New static global.
6988 (remote_connection_is_stdio): New function.
6989 (remote_prepare): Handle stdio connection.
6990 (remote_open): Ditto.
6991 (remote_close): Don't close stdin for stdio connections.
6992 (read_prim,write_prim): New functions. Replace all calls to
6993 read/write to these.
6994 * server.c (main): Watch for "-" argument. Move call to
6995 remote_prepare before start_inferior.
6996 * server.h (STDIO_CONNECTION_NAME): New macro.
6997 (remote_connection_is_stdio): Declare.
6999 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7000 in debugging output.
7002 2011-12-15 Yao Qi <yao@codesourcery.com>
7004 * tracepoint.c: Include sys/syscall.h.
7005 (gdb_ust_thread): Remove preprocessor conditional.
7007 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7009 * linux-low.c (linux_detach_one_lwp): Call
7010 the_low_target.prepare_to_resume before detaching.
7012 2011-12-14 Yao Qi <yao@codesourcery.com>
7014 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7017 2011-12-14 Yao Qi <yao@codesourcery.com>
7019 * i386-low.c (i386_low_stopped_data_address): Initialize local
7022 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7026 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7027 DR_CONTROL unless necessary. Extend comments.
7028 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7029 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7031 2011-12-13 Yao Qi <yao@codesourcery.com>
7033 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7035 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7037 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7039 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7040 Print new debug message for such case.
7042 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7044 Fix overlapping memcpy.
7045 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7046 the read_inferior_memory transfer.
7047 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7048 write_inferior_memory transfer.
7049 (set_fast_tracepoint_jump): New variable buf. Use it for the
7050 read_inferior_memory and write_inferior_memory transfers.
7051 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7052 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7053 Use it for the write_inferior_memory transfer.
7054 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7057 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7059 * linux-low.c (fetch_register, store_register): Make code
7060 consistent, fix formatting.
7062 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7064 * linux-low.c (usr_store_inferior_registers): Factor out code
7065 to handle individual registers into...
7066 (store_register): ... this new function.
7068 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7070 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7071 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7072 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7073 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7074 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7075 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7076 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7077 (srv_xmlfiles): Add new XML files.
7079 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7081 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7082 (init_registers_s390_linux32v1): Add prototype.
7083 (init_registers_s390_linux32v2): Likewise.
7084 (init_registers_s390_linux64v1): Likewise.
7085 (init_registers_s390_linux64v2): Likewise.
7086 (init_registers_s390x_linux64v1): Likewise.
7087 (init_registers_s390x_linux64v2): Likewise.
7088 (s390_num_regs): Increment to 52.
7089 (s390_regmap): Add orig_r2 register.
7090 (s390_num_regs_3264): Increment to 68.
7091 (s390_regmap_3264): Add orig_r2 register.
7092 (s390_collect_ptrace_register): Handle orig_r2 register.
7093 (s390_supply_ptrace_register): Likewise.
7094 (s390_fill_last_break): New function.
7095 (s390_store_last_break): Likewise.
7096 (s390_fill_system_call): New function.
7097 (s390_store_system_call): Likewise.
7098 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7100 (s390_check_regset): New function.
7101 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7102 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7103 Update target_regsets for available register sets.
7105 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7106 Jan Kratochvil <jan.kratochvil@redhat.com>
7108 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7109 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7111 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7112 * linux-low.h (struct process_info_private): New member r_debug.
7113 * server.c (handle_qxfer_libraries): Call
7114 the_target->qxfer_libraries_svr4.
7115 (handle_qxfer_libraries_svr4): New function.
7116 (qxfer_packets): New entry "libraries-svr4".
7117 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7118 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7119 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7120 PACKET_qXfer_libraries_svr4.
7122 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7124 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7125 PSW address/mask between 8-byte and 16-byte formats.
7126 (s390_supply_ptrace_register): Likewise.
7127 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7128 basic addressing mode bit.
7130 2011-11-24 Stan Shebs <stan@codesourcery.com>
7132 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7134 2011-11-17 Stan Shebs <stan@codesourcery.com>
7136 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7137 (tracing_start_time): New global.
7138 (tracing_stop_time): New global.
7139 (tracing_user_name): New global.
7140 (tracing_notes): New global.
7141 (tracing_stop_note): New global.
7142 (cmd_qtstart): Set traceframe_usage, start_time.
7143 (stop_tracing): Set stop_time.
7144 (cmd_qtstatus): Report additional status.
7145 (cmd_qtp): New function.
7146 (handle_tracepoint_query): Call it.
7147 (cmd_qtnotes): New function.
7148 (handle_tracepoint_general_set): Call it.
7149 (get_timestamp): Rename from tsv_get_timestamp.
7151 2011-11-14 Stan Shebs <stan@codesourcery.com>
7152 Kwok Cheung Yeung <kcy@codesourcery.com>
7154 * linux-x86-low.c (small_jump_insn): New.
7155 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7156 trampoline and error message, build a trampoline and issue a small
7157 jump instruction to it.
7158 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7159 trampoline and error message.
7160 (x86_get_min_fast_tracepoint_insn_len): New.
7161 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7162 * linux-low.h (struct linux_target_ops): Add arguments to
7163 install_fast_tracepoint_jump_pad operation, add new operation.
7164 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7166 (linux_get_min_fast_tracepoint_insn_len): New function.
7167 (linux_target_op): Add new operation.
7168 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7169 (gdb_trampoline_buffer_end): Ditto.
7170 (gdb_trampoline_buffer_error): Ditto.
7171 (struct ipa_sym_addresses): Add fields for new IPA variables.
7172 (symbol_list): Add entries for new IPA variables.
7173 (struct tracepoint): Add fields to hold the address range of the
7174 trampoline used by the tracepoint.
7175 (trampoline_buffer_head): New static variable.
7176 (trampoline_buffer_tail): Ditto.
7177 (claim_trampoline_space): New function.
7178 (have_fast_tracepoint_trampoline_buffer): New function.
7179 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7181 (install_fast_tracepoint): Ditto, also add error buffer argument.
7182 (cmd_qtminftpilen): New function.
7183 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7184 (fast_tracepoint_from_trampoline_address): New function.
7185 (fast_tracepoint_collecting): Handle trampoline as part of jump
7187 (set_trampoline_buffer_space): New function.
7188 (initialize_tracepoint): Initialize new IPA variables.
7189 * target.h (struct target_ops): Add arguments to
7190 install_fast_tracepoint_jump_pad operation, add new
7191 get_min_fast_tracepoint_insn_len operation.
7192 (target_get_min_fast_tracepoint_insn_len): New.
7193 (install_fast_tracepoint_jump_pad): Add arguments.
7194 * server.h (IPA_BUFSIZ): Define.
7195 * linux-i386-ipa.c: Include extra header files.
7196 (initialize_fast_tracepoint_trampoline_buffer): New function.
7197 (initialize_low_tracepoint): Call it.
7198 * server.h (set_trampoline_buffer_space): Declare.
7199 (claim_trampoline_space): Ditto.
7200 (have_fast_tracepoint_trampoline_buffer): Ditto.
7202 2011-11-14 Yao Qi <yao@codesourcery.com>
7204 * server.c (handle_query): Handle InstallInTrace for qSupported.
7205 * tracepoint.c (add_tracepoint): Sort list.
7206 (install_tracepoint, download_tracepoint): New.
7207 (cmd_qtdp): Call them to install and download tracepoints.
7208 (sort_tracepoints): Removed.
7209 (cmd_qtstart): Update.
7211 2011-11-14 Yao Qi <yao@codesourcery.com>
7213 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7214 * mem-break.h: Declare.
7215 * tracepoint.c (cmd_qtstart): Move some code to ...
7216 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7218 (download_tracepoints): Move some code to ...
7219 (download_tracepoint_1): ... here. New.
7221 2011-11-08 Yao Qi <yao@codesourcery.com>
7223 * remote-utils.c (relocate_instruction): A comment fix.
7225 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7227 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7228 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7229 dr_status_mirror and dr_control_mirror from debug_reg_state.
7230 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7231 (i386_initial_stuff): Remove use of deleted globals.
7232 (i386_get_thread_context, i386_set_thread_context,
7233 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7234 from debug_reg_state.
7236 2011-11-05 Yao Qi <yao@codesourcery.com>
7238 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7239 address as TPOINT's.
7241 2011-11-02 Stan Shebs <stan@codesourcery.com>
7243 * tracepoint.c (agent_mem_read_string): New function.
7244 (eval_agent_expr): Call it for tracenz.
7245 * server.c (handle_query): Report support for tracenz.
7247 2011-11-02 Yao Qi <yao@codesourcery.com>
7249 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7251 2011-11-02 Yao Qi <yao@codesourcery.com>
7253 * target.h: Fix a typo in comment.
7255 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7257 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7258 clobber the breakpoints' shadows with fast tracepoint jumps.
7259 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7260 * target.c (write_inferior_memory): Also pass MYADDR down to
7263 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7265 * configure.ac: Check support for personality routine.
7266 * configure: Regenerate.
7267 * config.in: Likewise.
7268 * linux-low.c: Include <sys/personality.h>.
7269 Define ADDR_NO_RANDOMIZE if necessary.
7270 (linux_create_inferior): Disable address space randomization when
7271 forking inferior, if requested.
7272 (linux_supports_disable_randomization): New function.
7273 (linux_target_ops): Install it.
7274 * server.h (disable_randomization): Declare.
7275 * server.c (disable_randomization): New global variable.
7276 (handle_general_set): Handle QDisableRandomization.
7277 (handle_query): Likewise for qSupported.
7278 (main): Support --disable-randomization and --no-disable-randomization
7279 command line arguments.
7280 * target.h (struct target_ops): Add supports_disable_randomization.
7281 (target_supports_disable_randomization): New macro.
7283 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7285 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7287 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7288 [!PT_GETDSBT] (target_loadmap): New definition.
7289 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7290 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7291 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7292 and PT_GETDSBT to LINUX_LOADMAP.
7293 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7294 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7296 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7298 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7299 (arm_linux_hwbp_cap): New static variable.
7300 (arm_linux_get_hwbp_cap): Replace by ...
7301 (arm_linux_init_hwbp_cap): ... this new function.
7302 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7303 (arm_linux_get_hw_watchpoint_count): Likewise.
7304 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7305 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7306 (arm_prepare_to_resume): Use perror_with_name instead of error.
7308 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7310 * linux-arm-low.c: Include <signal.h>.
7311 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7312 (struct arm_linux_hwbp_cap): New data type.
7313 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7314 (struct arm_linux_hw_breakpoint): New data type.
7315 (MAX_BPTS, MAX_WPTS): Define.
7316 (struct arch_process_info, struct arch_lwp_info): New data types.
7317 (arm_linux_get_hwbp_cap): New function.
7318 (arm_linux_get_hw_breakpoint_count): Likewise.
7319 (arm_linux_get_hw_watchpoint_count): Likewise.
7320 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7321 (arm_hwbp_control_initialize): Likewise.
7322 (arm_hwbp_control_is_enabled): Likewise.
7323 (arm_hwbp_control_is_initialized): Likewise.
7324 (arm_hwbp_control_disable): Likewise.
7325 (arm_linux_hw_breakpoint_equal): Likewise.
7326 (arm_linux_hw_point_initialize): Likewise.
7327 (struct update_registers_data): New data structure.
7328 (update_registers_callback: New function.
7329 (arm_insert_point): Likewise.
7330 (arm_remove_point): Likewise.
7331 (arm_stopped_by_watchpoint): Likewise.
7332 (arm_stopped_data_address): Likewise.
7333 (arm_new_process): Likewise.
7334 (arm_new_thread): Likewise.
7335 (arm_prepare_to_resume): Likewise.
7336 (the_low_target): Register arm_insert_point, arm_remove_point,
7337 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7338 arm_new_thread, and arm_prepare_to_resume.
7340 2011-09-15 Stan Shebs <stan@codesourcery.com>
7342 * server.h (struct emit_ops): Add compare-goto fields.
7343 * tracepoint.c (gdb_agent_op_sizes): New table.
7344 (emit_eq_goto): New function.
7345 (emit_ne_goto): New function.
7346 (emit_lt_goto): New function.
7347 (emit_le_goto): New function.
7348 (emit_gt_goto): New function.
7349 (emit_ge_goto): New function.
7350 (is_goto_target): New function.
7351 (compile_bytecodes): Recognize special cases of compare-goto
7352 combinations and call specialized emitters for them.
7353 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7354 (amd64_emit_ne_goto): New function.
7355 (amd64_emit_lt_goto): New function.
7356 (amd64_emit_le_goto): New function.
7357 (amd64_emit_gt_goto): New function.
7358 (amd64_emit_ge_goto): New function.
7359 (amd64_emit_ops): Add the new functions.
7360 (i386_emit_eq_goto): New function.
7361 (i386_emit_ne_goto): New function.
7362 (i386_emit_lt_goto): New function.
7363 (i386_emit_le_goto): New function.
7364 (i386_emit_gt_goto): New function.
7365 (i386_emit_ge_goto): New function.
7366 (i386_emit_ops): Add the new functions.
7368 2011-09-08 Stan Shebs <stan@codesourcery.com>
7370 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7371 (i386_emit_epilogue): Restore %ebx.
7373 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7375 * server.c (step_thread): Remove definition.
7376 (process_serial_event): Don't handle Hs.
7377 * server.h (step_thread): Remove declaration.
7378 * target.c (set_desired_inferior): Remove use of step_thread.
7380 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7382 * linux-low.c: Include linux-procfs.h.
7383 (linux_attach_lwp_1): Update comments.
7384 (linux_attach): Scan for existing threads when attaching to a
7385 process that is the tgid.
7386 * Makefile.in: Update dependencies.
7388 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7390 * configure.srv: Add linux-procfs.o dependencies.
7392 2011-08-14 Yao Qi <yao@codesourcery.com>
7394 * target.h (struct target_ops): Fix indent.
7395 * win32-low.c (win32_target_ops): Fix comment.
7397 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7398 Yao Qi <yao@codesourcery.com>
7400 * Makefile.in (clean): Remove tic6x-*.c files.
7401 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7402 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7403 (tic6x-c64xp-linux.c): Likewise.
7404 * configure.srv: Add support for tic6x-*-uclinux.
7405 * linux-tic6x-low.c: New.
7406 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7408 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7409 Yao Qi <yao@codesourcery.com>
7411 * target.h (struct target_ops): Add read_loadmap.
7412 * linux-low.c (struct target_loadseg): New type.
7413 (struct target_loadmap): New type.
7414 (linux_read_loadmap): New function.
7415 (linux_target_ops): Add linux_read_loadmap.
7416 * server.c (handle_query): Support qXfer:fdpic:read packet.
7417 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7420 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7422 * win32-low.c: Include <stdint.h>.
7424 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7426 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7427 to the inferior here.
7428 (i386_remove_aligned_watchpoint): Ditto.
7429 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7430 fit part of the watchpoint in the debug registers.
7431 (i386_update_inferior_debug_regs): New.
7432 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7433 registers, and only update the inferior on success.
7434 (i386_low_remove_watchpoint): Ditto.
7436 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7438 * linux-low.c (compare_ints, unique, list_threads, show_process,
7439 linux_core_of_thread): Delete.
7440 (linux_target_ops): Change linux_core_of_thread to
7441 linux_common_core_of_thread.
7442 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7443 * utils.c (malloc_failure): Change type of argument.
7444 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7445 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7446 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7447 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7448 (IPA_OBJS): Add common-utils-ipa.o.
7449 (ptid_h, linux_osdata_h): New macros.
7450 (server_h): Add common/common-utils.h, common/xml-utils.h,
7451 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7453 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7454 ptid.o, buffer.o): New rules.
7455 (linux-low.o): Add common/linux-osdata.h as a dependency.
7456 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7457 * configure.ac: Add AC_HEADER_DIRENT check.
7458 * config.in: Regenerate.
7459 * configure: Regenerate.
7460 * remote-utils.c (xml_escape_text): Delete.
7461 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7462 buffer_xml_printf): Move to common/buffer.c.
7463 * server.c (main): Remove call to initialize_inferiors.
7464 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7465 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7466 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7467 internal_error, gdb_assert, gdb_assert_fail): Delete.
7468 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7469 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7471 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7472 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7473 initialize_inferiors): Delete.
7475 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7477 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7480 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7482 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7484 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7486 2011-05-26 Yao Qi <yao@codesourcery.com>
7488 * Makefile.in (thread-db.o): Track dependence to
7489 common/gdb_thread_db.h.
7490 * thread-db.c: include gdb_thread_db.h from right place.
7492 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7494 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7495 __FILE__ and __LINE__ to internal_error.
7497 2011-05-13 Doug Evans <dje@google.com>
7499 * thread-db.c (try_thread_db_load_from_sdir): New function.
7500 (try_thread_db_load_from_dir): New function.
7501 (thread_db_load_search): Handle $sdir, ignore $pdir.
7502 Remove trying of system directories if search of
7503 libthread-db-search-path fails, that is now done via $sdir.
7505 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7507 * server.c (handle_query): Add EnableDisableTracepoints to the list
7508 of supported features.
7509 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7511 (cmd_qtenable_disable): New.
7512 (cmd_qtstart): Install tracepoints even if disabled.
7513 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7514 receiving a QTEnable or QTDisable packet.
7515 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7516 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7518 (gdb_probe): Skip data collection if static tracepoint is disabled.
7520 2011-05-10 Doug Evans <dje@google.com>
7522 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7524 2011-05-04 Doug Evans <dje@google.com>
7526 * linux-low.c (linux_join): Skip process lookup.
7527 * spu-low.c (spu_join): Ditto.
7528 * server.c (join_inferiors_callback): Delete.
7529 (process_serial_event): For 'D' packet (detach) call join_inferior
7532 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7534 * README: Don't mention xscale*-*-linux*.
7535 * configure.srv (xscale*-*-linux*): Don't handle target.
7537 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7539 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7541 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7542 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7543 (i386_emit_void_call_2): Likewise.
7545 2011-04-26 Yao Qi <yao@codesourcery.com>
7547 * linux-low.c: Move common macros to linux-ptrace.h.
7548 Include linux-ptrace.h.
7549 * Makefile.in (linux_ptrace_h): New.
7550 (linux-low.o): Depends on linux-ptrace.h.
7552 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7554 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7555 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7556 (remote_prepare): New function with most of the TCP code from ...
7557 (remote_open): ... here. Detect PORT here unconditionally. Move also
7558 setting transport_is_reliable.
7559 * server.c (run_once): New variable.
7560 (gdbserver_usage): Document it.
7561 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7562 the first run if RUN_ONCE.
7563 * server.h (run_once, remote_prepare): New declarations.
7565 2011-04-19 Tom Tromey <tromey@redhat.com>
7567 * win32-low.c (handle_load_dll): Remove duplicate "the".
7569 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7571 Remove support for old Cygwin 1.5 versions.
7572 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7573 function to avoid warning.
7574 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7577 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7579 * gdbserver/server.h (Macro _): Define it if not available.
7581 2011-03-14 Michael Snyder <msnyder@vmware.com>
7583 * hostio.c (handle_close): Remove unnecessary null test.
7585 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7587 * Makefile.in (maintainer-clean realclean distclean): Remove
7588 "make ... subdir_do" command.
7590 2011-03-10 Michael Snyder <msnyder@vmware.com>
7592 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7594 * server.c (handle_v_run): Free alloced buffer on early return.
7596 2011-03-09 Yao Qi <yao@codesourcery.com>
7599 2011-03-04 Yao Qi <yao@codesourcery.com>
7601 * Makefile.in: Remove GNU make feature --directory.
7603 2011-03-05 Yao Qi <yao@codesourcery.com>
7605 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7606 (subdir_do): New make target. Copied from gdb/Makefile.
7607 (maintainer-clean, realclean, distclean, clean): Call corresponding
7608 make targets in common/Makefile.
7610 2011-02-11 Yao Qi <yao@codesourcery.com>
7612 * configure.ac: Call AC_PROG_RANLIB.
7613 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7614 * configure: Regenerate.
7616 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7618 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7620 2011-03-06 Yao Qi <yao@codesourcery.com>
7622 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7624 2011-03-05 Yao Qi <yao@codesourcery.com>
7626 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7627 (subdir_do): New make target. Copied from gdb/Makefile.
7628 (maintainer-clean, realclean, distclean, clean): Call corresponding
7629 make targets in common/Makefile.
7631 2011-03-04 Yao Qi <yao@codesourcery.com>
7633 * Makefile.in: Remove GNU make feature --directory.
7635 2011-03-04 Michael Snyder <msnyder@vmware.com>
7637 * server.c (queue_stop_reply): Call xmalloc not malloc.
7639 2011-03-02 Michael Snyder <msnyder@vmware.com>
7641 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7643 2011-02-28 Michael Snyder <msnyder@vmware.com>
7645 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7646 (cmd_qtframe): Ditto.
7647 (cmd_qtbuffer): Ditto.
7648 (cmd_bigqtbuffer): Ditto.
7650 * utils.c (decimal2str): Initialize 'width' to nine, then
7653 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7655 * hostio.c (require_data): Free *data, not data.
7657 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7659 * hostio.c (require_data): Use free, not xfree.
7661 2011-02-27 Michael Snyder <msnyder@vmware.com>
7663 * server.c (handle_query): Discard unused value.
7665 * hostio.c (require_data): Free malloc memory before returning
7668 2011-02-26 Michael Snyder <msnyder@vmware.com>
7670 * linux-low.c (list_threads): Call closedir for dirent.
7672 2011-02-27 Michael Snyder <msnyder@vmware.com>
7674 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7675 a case statement falls through.
7677 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7679 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7682 2011-02-26 Michael Snyder <msnyder@vmware.com>
7684 * utils.c (decimal2str): Eliminate dead code and dead param.
7685 (pulongest): Drop dead param from call to decimal2str.
7688 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7690 Revert the following patch (not approved yet):
7691 2011-02-21 Hui Zhu <teawater@gmail.com>
7692 * tracepoint.c (tp_printf): New function.
7693 (eval_agent_expr): Handle gdb_agent_op_printf.
7695 2011-02-21 Hui Zhu <teawater@gmail.com>
7697 * tracepoint.c (tp_printf): New function.
7698 (eval_agent_expr): Handle gdb_agent_op_printf.
7700 2011-02-18 Tom Tromey <tromey@redhat.com>
7702 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7703 (tracepoint.o): Likewise.
7704 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7705 (gdb_agent_op_names): Likewise.
7707 2011-02-18 Tom Tromey <tromey@redhat.com>
7709 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7710 gdb_agent_op_rot>: New constants.
7711 (gdb_agent_op_names): Add pick and roll.
7712 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7715 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7717 * aclocal.m4: Regenerated with aclocal-1.11.1.
7719 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7721 * server.c (handle_qxfer_traceframe_info): New.
7722 (qxfer_packets): Register "traceframe-info".
7723 (handle_query): Report support for qXfer:traceframe-info:read+.
7724 * tracepoint.c (match_blocktype): New.
7725 (traceframe_find_block_type): Rename to ...
7726 (traceframe_walk_blocks): ... this. Add callback filter argument,
7728 (traceframe_find_block_type): New, reimplemented on top of
7729 traceframe_walk_blocks.
7730 (build_traceframe_info_xml): New.
7731 (traceframe_read_info): New.
7732 * server.h (traceframe_read_info): Declare.
7734 2011-02-11 Yao Qi <yao@codesourcery.com>
7736 * configure.ac: Call AC_PROG_RANLIB.
7737 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7738 * configure: Regenerate.
7740 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7742 * server.c (gdb_read_memory): Change return semantics to allow
7744 (handle_search_memory_1): Adjust.
7745 (process_serial_event) <'m' packet>: Handle partial transfers.
7746 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7748 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7750 * regcache.c (init_register_cache): Initialize
7751 regcache->register_status.
7752 (free_register_cache): Release regcache->register_status.
7753 (regcache_cpy): Copy register_status.
7754 (registers_to_string): Print 'x's for unavailable registers.
7755 (supply_register): Mark the register's status valid or
7756 unavailable, depending on whether a buffer was passed in or not.
7757 (supply_register_zeroed): New.
7758 (supply_regblock): Mark the registers' status valid or
7759 unavailable, depending on whether a buffer was passed in or not.
7760 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7761 (struct regcache): New `register_status' field.
7762 (supply_register_zeroed): Declare.
7763 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7764 supply_register_zeroed, rather than passing a NULL buffer to
7766 * tracepoint.c (fetch_traceframe_registers): Update comment.
7768 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7770 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7773 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7775 * server.h (decode_xfer_write): Change prototype.
7776 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7777 and don't extract the annex here.
7778 * server.c (decode_xfer_read): Remove `annex' parameter,
7779 and don't extract the annex here.
7781 (struct qxfer): New.
7782 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7783 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7784 (handle_qxfer_statictrace): New functions, abstracted out from
7785 handle_query, and made to use the struct qxfer interface.
7786 (handle_threads_qxfer_proper): Rename to ...
7787 (handle_qxfer_threads_proper): ... this.
7788 (handle_threads_qxfer): Rename to ...
7789 (handle_qxfer_threads): ... this. Adjust.
7790 (qxfer_packets): New array.
7791 (handle_qxfer): New function.
7792 (handle_query): Use handle_qxfer.
7794 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7796 * gdbreplay.c: Shorten lines of >= 80 columns.
7797 * linux-low.c: Ditto.
7798 * linux-ppc-low.c: Ditto.
7799 * linux-s390-low.c: Ditto.
7800 * linux-sparc-low.c: Ditto.
7801 * linux-x86-low.c: Ditto.
7802 * linux-xtensa-low.c: Ditto.
7803 * mem-break.c: Ditto.
7805 * regcache.h: Ditto.
7806 * remote-utils.c: Ditto.
7809 * thread-db.c: Ditto.
7810 * tracepoint.c: Ditto.
7812 * win32-low.h: Ditto.
7814 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7816 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7819 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7821 * server.c (gdbserver_version): Update copyright year in version
7823 * gdbreplay.c (gdbreplay_version): Ditto.
7825 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7827 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7828 * linux-bfin-low.c: New file.
7829 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7830 PT_DATA_ADDR for BFIN targets.
7831 * Makefile.in (SFILES): Add linux-bfin-low.c.
7832 (clean): Remove reg-bfin.c.
7833 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7834 * README: Mention supported Blackfin targets.
7836 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7838 * .gitignore: New file.
7840 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7842 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7844 2010-10-22 Jie Zhang <jie@codesourcery.com>
7846 * Makefile.in: Add FLAGS_TO_PASS variable.
7847 (install): Remove dependency of install-only and recursively
7848 invoke make for install-only.
7850 2010-10-04 Doug Evans <dje@google.com>
7852 * Makefile.in (uninstall): Use $(DESTDIR).
7854 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7858 * linux-x86-low.c (compat_siginfo_from_siginfo)
7859 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7860 si_code is < 0. Check for si_code == SI_TIMER before checking for
7863 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7865 * lynx-i386-low.c: New file.
7866 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7868 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7870 * lynx-low.c (ptrace_request_to_str): Remove handling for
7871 request values that have been removed in LynxOS 5.x.
7873 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7875 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7878 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7880 * configure.ac: Add --enable-inprocess-agent option.
7881 * configure: Rebuilt.
7883 2010-09-06 Yao Qi <yao@codesourcery.com>
7885 * linux-low.c (linux_kill): Remove unused variable.
7886 (linux_stabilize_threads): Likewise.
7887 * server.c (start_inferior): Likewise.
7888 (queue_stop_reply_callback): Likewise.
7889 * tracepoint.c (do_action_at_tracepoint): Likewise.
7891 2010-09-06 Yao Qi <yao@codesourcery.com>
7893 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7896 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7898 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7900 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7902 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7905 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7907 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7908 gdbserver/lynx-ppc-low.c: New files.
7909 * Makefile.in (lynx_low_h): New variable.
7910 (lynx-low.o, lynx-ppc-low.o): New rules.
7911 * configure.ac: On LynxOS, link with -lnetinet.
7912 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7913 * configure: regenerate.
7915 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7917 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7918 * configure.ac: Add check for vasprintf and vsnprintf.
7919 * configure, config.in: Regenerate.
7920 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7922 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7924 * gdbreplay.c: Move include of alloca.h up, next to include of
7926 * server.h: Add include of malloc.h.
7927 * mem-break.c: Remove include of malloc.h.
7928 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7930 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7932 * Makefile.in (memmem.o): Build with -Wno-error.
7934 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7936 * utils.c (xsnprintf): Make non-static.
7937 * server.h: Add xsnprintf declaration.
7938 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7939 replace calls to snprintf by calls to xsnprintf throughout.
7941 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7943 * configure.ac: Add configure check for alloca.
7944 * configure, config.in: Regenerate.
7945 * server.h: Include alloca.h if it exists.
7946 * gdbreplay.c: Include alloca.h if it exists.
7948 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7950 * linux-low.c (__SIGRTMIN): Define if not already defined.
7951 (linux_create_inferior): Check for __ANDROID__ rather than
7953 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7954 are already deferred.
7955 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7956 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7957 stopped and already has a pending signal to report.
7958 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7959 a pending signal to report or is moving out of a jump pad.
7960 (linux_init_signals): Check for __ANDROID__ rather than
7963 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7965 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7966 debug_threads check. Avoid a linear search when not doing debug
7969 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7971 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7972 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7973 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7974 (process_event): Change local fd's type to gdb_fildes_t.
7975 (create_file_handler): Adjust prototype.
7976 (delete_file_handler): Adjust prototype.
7977 (handle_file_event): Adjust prototype. Use pfildes.
7978 (create_file_event): Adjsut prototype.
7979 * remote-utils.c (remote_desc, listen_desc): Change type to
7981 * server.h: New gdb_fildes_t typedef.
7982 [USE_WIN32API]: Include winsock2.h.
7983 (delete_file_handler, add_file_handler): Adjust prototypes.
7985 * utils.c (pfildes): New.
7987 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7989 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7990 * configure: Regenerate.
7992 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7994 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7995 (linux_done_accessing_memory): ... this.
7996 (linux_target_ops): Adjust.
7997 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7998 * nto-low.c (nto_target_ops): Adjust comment.
7999 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8000 * spu-low.c (spu_target_ops): Adjust comment.
8001 * target.h (target_ops): Rename unprepare_to_access_memory field
8002 to done_accessing_memory.
8003 (unprepare_to_access_memory): Rename to ...
8004 (done_accessing_memory): ... this.
8006 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8008 * linux-low.c (linux_prepare_to_access_memory): New.
8009 (linux_unprepare_to_access_memory): New.
8010 (linux_target_ops): Install them.
8011 * server.c (read_memory): Rename to ...
8012 (gdb_read_memory): ... this. Use
8013 prepare_to_access_memory/prepare_to_access_memory.
8014 (write_memory): Rename to ...
8015 (gdb_write_memory): ... this. Use
8016 prepare_to_access_memory/prepare_to_access_memory.
8017 (handle_search_memory_1): Adjust.
8018 (process_serial_event): Adjust.
8019 * target.h (struct target_ops): New fields
8020 prepare_to_access_memory and unprepare_to_access_memory.
8021 (prepare_to_access_memory, unprepare_to_access_memory): New.
8022 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8023 prepare_to_access_memory/prepare_to_access_memory.
8024 * nto-low.c (nto_target_ops): Adjust.
8025 * spu-low.c (spu_target_ops): Adjust.
8026 * win32-low.c (win32_target_ops): Adjust.
8028 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8030 * Makefile.in (WARN_CFLAGS): Get it from configure.
8031 (WERROR_CFLAGS): New.
8032 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8033 * configure.ac: Introduce --enable-werror, which adds -Werror to
8034 the compiler command line. Enabled by default. Disable with
8035 --disable-werror. Add -Wdeclaration-after-statement
8036 Wpointer-arith and -Wformat-nonliteral to warning flags.
8037 * configure: Regenerate.
8039 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8041 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8043 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8045 * gdbreplay.c (remote_error): New.
8047 (expect): Use gdbchar. Check for error reading from GDB.
8048 Clarify sync error output.
8049 (play): Check for errors writing to GDB.
8050 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8051 * remote-utils.c (getpkt): Check for errors writing to the remote
8054 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8056 * linux-low.c (linux_wait_1): Move non-debugging code out of
8057 `debug_threads' control.
8059 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8061 * linux-low.c (linux_wait_1): Don't set last_status here.
8062 * server.c (push_event, queue_stop_reply_callback): Assert we're
8063 not pushing a TARGET_WAITKIND_IGNORE event.
8064 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8065 (myresume, handle_target_event): Set the thread's last_resume_kind
8066 and last_status from the target returned status.
8068 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8072 * linux-x86-low.c (update_debug_registers_callback): New.
8073 (i386_dr_low_set_addr): Use it.
8074 (i386_dr_low_get_addr): New.
8075 (i386_dr_low_set_control): Use update_debug_registers_callback.
8076 (i386_dr_low_get_control): New.
8077 (i386_dr_low_get_status): Adjust.
8078 * linux-low.c (linux_stop_lwp): New.
8079 * linux-low.h (linux_stop_lwp): Declare.
8081 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8082 argument instead of a i386_debug_reg_state.
8083 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8084 a i386_debug_reg_state.
8085 (i386_insert_aligned_watchpoint): Adjust.
8086 (i386_remove_aligned_watchpoint): Adjust.
8087 (i386_low_stopped_data_address): Read the debug registers from the
8088 inferior instead of from the mirrors.
8089 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8090 (i386_dr_low_get_addr): Declare.
8091 (i386_dr_low_get_control): Declare.
8092 (i386_dr_low_get_status): Change prototype.
8094 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8095 (i386_dr_low_get_addr): New.
8096 (i386_dr_low_get_control): New.
8097 (i386_dr_low_get_status): Adjust prototype. Return
8099 (i386_initial_stuff): Clear dr_status_mirror and
8101 (i386_get_thread_context): Adjust.
8102 (i386_set_thread_context): Adjust.
8103 (i386_thread_added): Adjust.
8105 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8107 * linux-low.h (linux_thread_area): Delete declaration.
8109 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8111 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8112 after its termination.
8114 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8116 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8117 (gdb_wants_all_stopped): Delete.
8118 (linux_wait_1): Don't call them.
8119 * server.c (handle_v_cont): Tag all threads as want-stopped.
8120 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8121 stopped as "client-wants-stopped".
8123 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8125 * Makefile.in (signals_h): New.
8126 (server_h): Depend on it.
8127 (server.o): Don't depend on $(signals_def).
8128 (signals.o): Depend on $(signals_def).
8130 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8132 * Makefile.in (signals_def): New.
8133 (server_h): Append include/gdb/signals.h and signals_def.
8134 (server.o): Append signals_def.
8136 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8138 * server.c (handle_target_event): Use target_signal_to_host for
8139 resume_info.sig initialization.
8140 * target.h (struct thread_resume) <sig>: New comment.
8142 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8144 * server.c (handle_query): strcpy() the returned string from paddress()
8145 instead of sprintf().
8146 * utils.c (paddress): Return phex_nz().
8148 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8150 * server.c (handle_v_cont): Call mourn_inferior if process
8152 (myresume): Likewise.
8154 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8156 Static tracepoints, and integration with UST.
8158 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8159 * mem-break.c (uninsert_all_breakpoints)
8160 (reinsert_all_breakpoints): New.
8161 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8162 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8163 (gdb_agent_ust_loaded, helper_thread_id)
8164 (gdb_agent_helper_thread_id): New macros.
8165 (struct ipa_sym_addresses): Add addr_ust_loaded,
8166 addr_helper_thread_id, addr_cmd_buf.
8167 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8168 (in_process_agent_loaded_ust): New.
8169 (write_e_ust_not_loaded): New.
8170 (maybe_write_ipa_ust_not_loaded): New.
8171 (struct collect_static_trace_data_action): New.
8172 (enum tracepoint_type) <static_tracepoint>: New.
8173 (struct tracepoint) <handle>: Mention static tracepoints.
8174 (struct static_tracepoint_ctx): New.
8175 (CMD_BUF_SIZE): New.
8176 (add_tracepoint_action): Handle static tracepoint actions.
8177 (unprobe_marker_at): New.
8178 (clear_installed_tracepoints): Handle static tracepoints.
8179 (cmd_qtdp): Handle static tracepoints.
8180 (probe_marker_at): New.
8181 (cmd_qtstart): Handle static tracepoints.
8182 (response_tracepoint): Handle static tracepoints.
8183 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8184 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8185 (get_context_regcache): Handle static tracepoints.
8186 (do_action_at_tracepoint): Handle static tracepoint actions.
8187 (traceframe_find_block_type): Handle static trace data blocks.
8188 (traceframe_read_sdata): New.
8189 (download_tracepoints): Download static tracepoint actions.
8190 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8191 (GDB_PROBE_NAME): New.
8196 (ust_marker_to_static_tracepoint): New.
8198 (collect_ust_data_at_tracepoint): New.
8199 (gdb_ust_probe): New.
8200 (UNIX_PATH_MAX, SOCK_DIR): New.
8201 (gdb_ust_connect_sync_socket): New.
8202 (resume_thread, stop_thread): New.
8203 (run_inferior_command): New.
8204 (init_named_socket): New.
8205 (gdb_ust_socket_init): New.
8206 (cstr_to_hexstr): New.
8208 (first_marker, next_marker): New.
8209 (response_ust_marker): New.
8210 (cmd_qtfstm, cmd_qtsstm): New.
8211 (unprobe_marker_at, probe_marker_at): New.
8212 (cmd_qtstmat, gdb_ust_thread): New.
8213 (gdb_ust_init): New.
8214 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8215 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8217 (x86_64_st_collect_regmap): New.
8218 (X86_64_NUM_ST_COLLECT_GREGS): New.
8219 (AMD64_RIP_REGNUM): New.
8220 (supply_static_tracepoint_registers): New.
8221 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8223 (i386_st_collect_regmap): New.
8224 (i386_NUM_ST_COLLECT_GREGS): New.
8225 (supply_static_tracepoint_registers): New.
8226 * server.c (handle_query): Handle qXfer:statictrace:read.
8227 <qSupported>: Report support for StaticTracepoints, and
8228 qXfer:statictrace:read features.
8229 * server.h (traceframe_read_sdata)
8230 (supply_static_tracepoint_registers): Declare.
8231 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8232 (unpack_varlen_hex): Include in IPA build.
8233 * Makefile.in (ustlibs, ustinc): New.
8234 (IPA_OBJS): Add remote-utils-ipa.o.
8235 ($(IPA_LIB)): Link -ldl and -lpthread.
8237 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8238 * config.in, configure: Regenerate.
8240 2010-06-20 Ian Lance Taylor <iant@google.com>
8241 Pedro Alves <pedro@codesourcery.com>
8243 * linux-x86-low.c (always_true): Delete.
8244 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8245 trying to fool the compiler with always_true.
8247 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8249 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8250 conditions in gdbserver.
8252 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8254 * spu-low.c (spu_read_memory): Wrap around local store limit.
8255 (spu_write_memory): Likewise.
8257 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8259 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8260 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8262 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8264 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8265 uses with LONGEST uses.
8267 2010-06-14 Stan Shebs <stan@codesourcery.com>
8268 Pedro Alves <pedro@codesourcery.com>
8272 * linux-x86-low.c: Include limits.h.
8277 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8278 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8279 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8280 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8281 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8282 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8283 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8284 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8285 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8286 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8287 (amd64_emit_void_call_2): New.
8288 (amd64_emit_ops): New.
8289 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8290 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8291 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8292 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8293 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8294 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8295 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8296 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8297 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8298 (i386_emit_stack_adjust, i386_emit_int_call_1)
8299 (i386_emit_void_call_2): New.
8300 (i386_emit_ops): New.
8301 (x86_emit_ops): New.
8302 (the_low_target): Install x86_emit_ops.
8303 * server.h (struct emit_ops): New.
8304 (get_raw_reg_func_addr): Declare.
8305 (current_insn_ptr, emit_error): Declare.
8306 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8307 (set_trace_state_variable_value): New defines.
8308 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8309 addr_get_trace_state_variable_value and
8310 addr_set_trace_state_variable_value.
8311 (symbol_list): New fields for get_raw_reg,
8312 get_trace_state_variable_value and set_trace_state_variable_value.
8313 (condfn): New typedef.
8314 (struct tracepoint): New field `compiled_cond'.
8315 (do_action_at_tracepoint): Clear compiled_cond.
8316 (get_trace_state_variable_value, set_trace_state_variable_value):
8318 (condition_true_at_tracepoint): If there's a compiled condition,
8320 (current_insn_ptr, emit_error): New globals.
8321 (struct bytecode_address): New.
8322 (get_raw_reg_func_addr): New.
8323 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8324 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8325 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8326 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8327 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8328 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8329 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8330 (compile_tracepoint_condition, compile_bytecodes): New.
8331 * target.h (emit_ops): Forward declare.
8332 (struct target_ops): New field emit_ops.
8333 (target_emit_ops): New.
8334 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8335 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8336 * linux-low.c (linux_emit_ops): New.
8337 (linux_target_ops): Install it.
8338 * linux-low.h (struct linux_target_ops): New field emit_ops.
8340 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8342 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8343 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8345 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8346 Stan Shebs <stan@codesourcery.com>
8348 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8349 (all): Depend on $(extra_libraries).
8350 (install-only): Install the IPA.
8351 (IPA_OBJS, IPA_LIB): New.
8352 (clean): Remove the IPA lib.
8353 (IPAGENT_CFLAGS): New.
8354 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8355 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8356 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8357 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8358 * configure.ac: Check for atomic builtins support in the compiler.
8359 (IPA_DEPFILES, extra_libraries): Define.
8360 * configure.srv (ipa_obj): Add description.
8361 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8362 (i[34567]86-*-linux*): Set ipa_obj.
8363 (x86_64-*-linux*): Set ipa_obj.
8364 * linux-low.c (stabilizing_threads): New.
8365 (supports_fast_tracepoints): New.
8366 (linux_detach): Stabilize threads before detaching.
8367 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8368 the lwp is either not stabilizing, or is moving out of a jump pad.
8369 (linux_fast_tracepoint_collecting): New.
8370 (maybe_move_out_of_jump_pad): New.
8371 (enqueue_one_deferred_signal): New.
8372 (dequeue_one_deferred_signal): New.
8373 (linux_wait_for_event_1): If moving out of a jump pad, defer
8374 pending signals to later.
8375 (linux_stabilize_threads): New.
8376 (linux_wait_1): Check if threads need moving out of jump pads, and
8378 (stuck_in_jump_pad_callback): New.
8379 (move_out_of_jump_pad_callback): New.
8381 (linux_resume_one_lwp): Handle moving out of jump pads.
8382 (linux_set_resume_request): Dequeue deferred signals.
8383 (need_step_over_p): Also step over fast tracepoint jumps.
8384 (start_step_over): Also uninsert fast tracepoint jumps.
8385 (finish_step_over): Also reinsert fast tracepoint jumps.
8386 (linux_install_fast_tracepoint_jump): New.
8387 (linux_target_ops): Install linux_stabilize_threads and
8388 linux_install_fast_tracepoint_jump_pad.
8389 * linux-low.h (linux_target_ops) <get_thread_area,
8390 install_fast_tracepoint_jump_pad>: New fields.
8391 (struct lwp_info) <collecting_fast_tracepoint,
8392 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8393 (linux_get_thread_area): Declare.
8394 * linux-x86-low.c (jump_insn): New.
8395 (x86_get_thread_area): New.
8396 (append_insns): New.
8398 (amd64_install_fast_tracepoint_jump_pad): New.
8399 (i386_install_fast_tracepoint_jump_pad): New.
8400 (x86_install_fast_tracepoint_jump_pad): New.
8401 (the_low_target): Install x86_get_thread_area and
8402 x86_install_fast_tracepoint_jump_pad.
8403 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8404 (struct fast_tracepoint_jump): New.
8405 (fast_tracepoint_jump_insn): New.
8406 (fast_tracepoint_jump_shadow): New.
8407 (find_fast_tracepoint_jump_at): New.
8408 (fast_tracepoint_jump_here): New.
8409 (delete_fast_tracepoint_jump): New.
8410 (set_fast_tracepoint_jump): New.
8411 (uninsert_fast_tracepoint_jumps_at): New.
8412 (reinsert_fast_tracepoint_jumps_at): New.
8413 (set_breakpoint_at): Use write_inferior_memory.
8414 (uninsert_raw_breakpoint): Use write_inferior_memory.
8415 (check_mem_read): Mask out fast tracepoint jumps.
8416 (check_mem_write): Mask out fast tracepoint jumps.
8417 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8418 (set_fast_tracepoint_jump): Declare.
8419 (delete_fast_tracepoint_jump)
8420 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8421 (reinsert_fast_tracepoint_jumps_at): Declare.
8422 * regcache.c: Don't compile many functions when building the
8423 in-process agent library.
8424 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8425 the register buffer in the heap.
8426 (free_register_cache): If the register buffer isn't owned by the
8427 regcache, don't free it.
8428 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8429 pre-existing register caches.
8430 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8432 (convert_ascii_to_int): : Constify `from' parameter type.
8433 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8434 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8435 the needed buffer in-place.
8436 (relocate_instruction): New.
8437 * server.c (handle_query) <qSymbols>: If the target supports
8438 tracepoints, give it a chance of looking up symbols. Report
8439 support for fast tracepoints.
8440 (handle_status): Stabilize threads.
8441 (process_serial_event): Adjust.
8442 * server.h (struct fast_tracepoint_jump): Forward declare.
8443 (struct process_info) <fast_tracepoint_jumps>: New field.
8444 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8445 (decode_X_packet, decode_M_packet): Adjust.
8446 (relocate_instruction): Declare.
8447 (in_process_agent_loaded): Declare.
8448 (tracepoint_look_up_symbols): Declare.
8449 (struct fast_tpoint_collect_status): Declare.
8450 (fast_tracepoint_collecting): Declare.
8451 (force_unlock_trace_buffer): Declare.
8452 (handle_tracepoint_bkpts): Declare.
8453 (initialize_low_tracepoint)
8454 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8455 * target.h (struct target_ops) <stabilize_threads,
8456 install_fast_tracepoint_jump_pad>: New fields.
8457 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8458 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8459 [HAVE_STDINT_H]: Include stdint.h.
8460 (trace_debug_1): Rename to ...
8461 (trace_vdebug): ... this.
8462 (trace_debug): Rename to ...
8463 (trace_debug_1): ... this. Add `level' parameter.
8465 (ATTR_USED, ATTR_NOINLINE): New.
8466 (IP_AGENT_EXPORT): New.
8467 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8468 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8469 (about_to_request_buffer_space, trace_buffer_is_full)
8470 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8471 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8472 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8473 (traceframe_write_count, traceframes_created)
8474 (trace_state_variables)
8475 New renaming defines.
8476 (struct ipa_sym_addresses): New.
8477 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8479 (ipa_sym_addrs): New.
8480 (all_tracepoint_symbols_looked_up): New.
8481 (in_process_agent_loaded): New.
8482 (write_e_ipa_not_loaded): New.
8483 (maybe_write_ipa_not_loaded): New.
8484 (tracepoint_look_up_symbols): New.
8485 (debug_threads) [IN_PROCESS_AGENT]: New.
8486 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8487 (UNKNOWN_SIDE_EFFECTS): New.
8488 (stop_tracing): New.
8489 (flush_trace_buffer): New.
8490 (stop_tracing_bkpt): New.
8491 (flush_trace_buffer_bkpt): New.
8492 (read_inferior_integer): New.
8493 (read_inferior_uinteger): New.
8494 (read_inferior_data_pointer): New.
8495 (write_inferior_data_pointer): New.
8496 (write_inferior_integer): New.
8497 (write_inferior_uinteger): New.
8498 (struct collect_static_trace_data_action): Delete.
8499 (enum tracepoint_type): New.
8500 (struct tracepoint) <type>: New field `type'.
8501 <actions_str, step_actions, step_actions_str>: Only include in
8503 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8504 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8505 (tracepoints): Use IP_AGENT_EXPORT.
8506 (last_tracepoint): Don't include in the IPA.
8507 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8508 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8509 (alloced_trace_state_variables): New.
8510 (trace_state_variables): Use IP_AGENT_EXPORT.
8511 (traceframe_t): Delete unused variable.
8512 (circular_trace_buffer): Don't include in the IPA.
8513 (trace_buffer_start): Delete.
8514 (struct trace_buffer_control): New.
8515 (trace_buffer_free): Delete.
8516 (struct ipa_trace_buffer_control): New.
8517 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8518 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8520 (trace_buffer_ctrl): New.
8521 (TRACE_BUFFER_CTRL_CURR): New.
8522 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8523 Reimplement as macros.
8524 (trace_buffer_wrap): Delete.
8525 (traceframe_write_count, traceframe_read_count)
8526 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8527 (struct tracepoint_hit_ctx) <type>: New field.
8528 (struct fast_tracepoint_ctx): New.
8529 (memory_barrier): New.
8531 (record_tracepoint_error): Update atomically in the IPA.
8532 (clear_inferior_trace_buffer): New.
8533 (about_to_request_buffer_space): New.
8534 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8535 updating the same buffer.
8536 (add_tracepoint): Default the tracepoint's type to trap
8537 tracepoint, and orig_size to -1.
8538 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8540 (create_trace_state_variable): New parameter `gdb'. Handle it.
8541 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8542 (cmd_qtdp): Handle fast tracepoints.
8544 (max_jump_pad_size): New.
8545 (gdb_jump_pad_head): New.
8546 (get_jump_space_head): New.
8547 (claim_jump_space): New.
8548 (sort_tracepoints): New.
8549 (MAX_JUMP_SIZE): New.
8550 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8552 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8553 support. Upload fast traceframes, and delete internal IPA
8555 (stop_tracing_handler): New.
8556 (flush_trace_buffer_handler): New.
8557 (cmd_qtstop): Upload fast tracepoints.
8558 (response_tracepoint): Handle fast tracepoints.
8559 (tracepoint_finished_step): Upload fast traceframes. Set the
8560 tracepoint hit context's tracepoint type.
8561 (handle_tracepoint_bkpts): New.
8562 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8563 type. Add comment about fast tracepoints.
8564 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8565 non-existing action_str field.
8566 (get_context_regcache): Handle fast tracepoints.
8567 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8569 (fast_tracepoint_from_jump_pad_address): New.
8570 (fast_tracepoint_from_ipa_tpoint_address): New.
8571 (collecting_t): New.
8572 (force_unlock_trace_buffer): New.
8573 (fast_tracepoint_collecting): New.
8576 (write_inferior_data_ptr): New.
8577 (target_tp_heap): New.
8578 (target_malloc): New.
8579 (download_agent_expr): New.
8581 (download_tracepoints): New.
8582 (download_trace_state_variables): New.
8583 (upload_fast_traceframes): New.
8584 (IPA_FIRST_TRACEFRAME): New.
8585 (IPA_NEXT_TRACEFRAME_1): New.
8586 (IPA_NEXT_TRACEFRAME): New.
8587 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8588 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8589 (gdb_jump_pad_buffer_end): New.
8590 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8591 (initialize_tracepoint): Adjust.
8592 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8593 buffer. Initialize the low module.
8594 * utils.c (PREFIX, TOOLNAME): New.
8595 (malloc_failure): Use PREFIX.
8596 (error): In the IPA, an error causes an exit.
8597 (fatal, warning): Use PREFIX.
8598 (internal_error): Use TOOLNAME.
8599 (NUMCELLS): Increase to 10.
8600 * configure, config.in: Regenerate.
8602 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8604 * server.c (handle_query) <qSupported>: Do two passes over the
8605 qSupported string to avoid nesting strtok.
8607 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8609 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8611 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8613 * configure: Regenerate.
8614 * proc-service.list: New.
8616 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8618 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8621 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8623 * gdbreplay.c (remote_open): Check error return from socket() call by
8624 its equality to -1 not by it being negative.
8625 * remote-utils.c (remote_open): Likewise.
8627 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8629 * config.h: Regenerate.
8631 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8633 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8634 doesn't provide PTRACE_GET_THREAD_AREA.
8636 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8638 * linux-m68k-low.c: Include <asm/ptrace.h>
8639 (ps_get_thread_area): Implement.
8641 2010-05-03 Doug Evans <dje@google.com>
8643 * event-loop.c (struct callback_event): New struct.
8644 (callback_list): New global.
8645 (append_callback_event, delete_callback_event): New functions.
8646 (process_callback): New function.
8647 (start_event_loop): Call it.
8648 * remote-utils.c (NOT_SCHEDULED): Define.
8649 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8650 moved out of readchar.
8651 (readchar): Rewrite. Call reschedule before returning.
8652 (reset_readchar): New function.
8653 (remote_close): Call it.
8654 (process_remaining, reschedule): New functions.
8655 * server.h (callback_handler_func): New typedef.
8656 (append_callback_event, delete_callback_event): Declare.
8658 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8660 * proc-service.c (ps_pglobal_lookup): Use
8661 thread_db_look_up_one_symbol.
8662 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8663 parameter. Use it instead of all_symbols_looked_up.
8664 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8666 (all_symbols_looked_up): Don't declare.
8667 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8668 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8670 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8671 Set all_symbols_looked_up here.
8672 (thread_db_look_up_one_symbol): New.
8673 (thread_db_get_tls_address): Adjust.
8674 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8675 thread_db object on the heap, and tentatively set it in the
8677 (thread_db_init): Don't set all_symbols_looked_up here.
8678 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8680 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8682 * linux-low.c (linux_kill, linux_detach): Adjust.
8683 (status_pending_p_callback): Remove redundant statement. Check
8684 for !TARGET_WAITIKIND_IGNORE, instead of
8685 TARGET_WAITKIND_STOPPED.
8686 (handle_tracepoints): Make sure LWP is locked. Adjust.
8687 (linux_wait_for_event_1): Adjust.
8688 (linux_cancel_breakpoints): New.
8689 (unsuspend_one_lwp): New.
8690 (unsuspend_all_lwps): New.
8691 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8692 (send_sigstop_callback): Change return type to int, add new
8693 `except' parameter and handle it.
8694 (suspend_and_send_sigstop_callback): New.
8695 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8696 pass them down. If SUSPEND, also increment the lwp's suspend
8698 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8699 (need_step_over_p): Don't consider suspended LWPs.
8700 (start_step_over): Adjust.
8701 (proceed_one_lwp): Change return type to int, add new `except'
8702 parameter and handle it.
8703 (unsuspend_and_proceed_one_lwp): New.
8704 (proceed_all_lwps): Use find_inferior instead of
8706 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8707 also decrement the suspend count of LWPs. Pass `except' down,
8708 instead of hacking its suspend count.
8709 (linux_pause_all): Add `freeze' parameter. Adjust.
8710 (linux_unpause_all): New.
8711 (linux_target_ops): Install linux_unpause_all.
8712 * server.c (handle_status): Adjust.
8713 * target.h (struct target_ops): New fields `unpause_all' and
8714 `cancel_breakpoints'. Add new parameter to `pause_all'.
8715 (pause_all): Add new `freeze' parameter.
8717 (cancel_breakpoints): New.
8718 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8720 (cmd_qtstart): Pause threads.
8721 (stop_tracing): Pause threads, and cancel breakpoints.
8722 * win32-low.c (win32_target_ops): Adjust.
8724 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8726 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8727 the inferior right away from here...
8728 (linux_wait_1): ... to here, and adjust to check the thread's
8729 last_resume_kind instead of the lwp's step or stop_expected flags.
8731 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8733 * README: Use consistent `GDB' and `GDBserver' spellings.
8735 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8737 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8738 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8739 (linux_detach_one_lwp): Assume the lwp is stopped.
8740 (any_thread_of): Delete.
8741 (linux_detach): Stop all lwps here. Don't blindly delete all
8743 (delete_lwp_callback): New.
8744 (linux_mourn): Delete all lwps of the process that is gone.
8745 (linux_wait_1): Don't delete the last lwp of the process here.
8746 * mem-break.h (mark_breakpoints_out): Declare.
8747 * mem-break.c (mark_breakpoints_out): New.
8748 (free_all_breakpoints): Use it.
8749 * server.c (handle_target_event): If the process is gone, mark
8751 * thread-db.c (struct thread_db) <create_bp>: New field.
8752 (thread_db_enable_reporting): Fix prototype. Store a thread event
8753 breakpoint reference in the thread_db struct.
8754 (thread_db_load_search): Clear the thread_db object.
8755 (try_thread_db_load_1): Ditto.
8756 (switch_to_process): New.
8757 (disable_thread_event_reporting): Use it.
8758 (remove_thread_event_breakpoints): New.
8759 (thread_db_detach, thread_db_mourn): Use it.
8761 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8763 * linux-low.c (linux_enable_event_reporting): New.
8764 (linux_wait_for_event_1, handle_extended_wait): Use it.
8766 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8768 * linux-low.c (linux_kill_one_lwp, linux_kill)
8769 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8770 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8771 SIGSTOP even if the LWP is stopped.
8772 (send_sigstop_callback): New.
8773 (stop_all_lwps): Use send_sigstop_callback instead.
8774 (linux_resume_one_thread): Adjust.
8775 (proceed_one_lwp): Still proceed an LWP that the client has
8776 requested to stop, if we haven't reported it as stopped yet. Make
8777 sure that LWPs the client want stopped, have a pending SIGSTOP.
8779 2010-04-26 Doug Evans <dje@google.com>
8781 * server.c (handle_general_set): Make static.
8783 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8784 Print received char after testing for error/eof instead of before.
8785 (input_interrupt): Tweak comment.
8787 2010-04-23 Doug Evans <dje@google.com>
8789 * server.c (start_inferior): Print inferior argv if --debug.
8791 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8793 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8794 * nto-x86-low.c: Include server.h
8796 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8798 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8799 be consistent with other sources of this directory.
8800 (init_registers_amd64): Correct name of source file of this function
8803 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8805 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8808 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8810 * win32-i386-low.c: Add 64-bit support.
8811 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8812 (init_registers_amd64): Declare.
8813 (mappings): Add 64-bit version of array.
8814 (init_windows_x86): New function.
8815 (the_low_target): Change init_arch field to init_windows_x86.
8817 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8819 * win32-low.c: Adapt to support also 64-bit architecture.
8820 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8821 (get_image_name): Use SIZE_T type for local variable `done'.
8822 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8823 (toolhelp_get_dll_name): Idem.
8824 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8825 Use uintptr_t typecast to avoid warning.
8826 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8827 (handle_exception): Use phex_nz to avoid warning.
8828 (win32_wait): Remove unused local variable `process'.
8830 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8832 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8835 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8837 * configure.ac: Use `ws2_32' library for srv_mingw.
8838 * configure: Regenerate.
8839 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8840 * remote-utils.c: Likewise.
8842 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8844 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8845 if __x86_64__ is defined.
8847 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8849 * configure: Regenerate.
8851 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8853 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8854 * target.h (target_ops): New get_tib_address field.
8855 * win32-low.h (win32_thread_info): Add thread_local_base field.
8856 * win32-low.c (child_add_thread): Add tlb argument.
8857 Set thread_local_base field to TLB.
8858 (get_child_debug_event): Adapt to child_add_thread change.
8859 (win32_get_tib_address): New function.
8860 (win32_target_ops): Set get_tib_address field to
8861 win32_get_tib_address.
8862 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8864 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8866 * linux-low.c (linux_mourn): Also remove the process.
8867 * server.c (handle_target_event): Don't remove the process here.
8868 * nto-low.c (nto_mourn): New.
8869 (nto_target_ops): Install it.
8870 * spu-low.c (spu_mourn): New.
8871 (spu_target_ops): Install it.
8872 * win32-low.c (win32_mourn): New.
8873 (win32_target_ops): Install it.
8875 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8877 * server.h (buffer_xml_printf): Remove redundant `;'.
8879 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8881 * regcache.c (set_register_cache): Invalidate regcaches before
8882 changing the register cache layout.
8883 (regcache_invalidate_one): Allow a NULL regcache.
8884 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8885 regcaches before changing the register cache layout or the target
8888 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8890 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8891 variable warning on Linux/x86-64.
8893 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8895 GDBserver disconnected tracing support.
8897 * linux-low.c (linux_remove_process): Delete.
8898 (add_lwp): Don't set last_resume_kind here.
8899 (linux_kill): Use `mourn'.
8900 (linux_detach): Use `thread_db_detach', and `mourn'.
8902 (linux_attach_lwp_1): Adjust comment.
8903 (linux_attach): last_resume_kind moved the thread_info; adjust.
8904 (status_pending_p_callback): Adjust.
8905 (linux_wait_for_event_1): Adjust.
8906 (count_events_callback, select_singlestep_lwp_callback)
8907 (select_event_lwp_callback, cancel_breakpoints_callback)
8908 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8909 (proceed_one_lwp): Adjust.
8910 (linux_async): Add debug output.
8911 (linux_thread_stopped): New.
8912 (linux_pause_all): New.
8913 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8915 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8916 (thread_db_free): Delete declaration.
8917 (thread_db_detach, thread_db_mourn): Declare.
8918 * thread-db.c (thread_db_init): Use thread_db_mourn.
8919 (thread_db_free): Delete, split in two.
8920 (disable_thread_event_reporting): New.
8921 (thread_db_detach): New.
8922 (thread_db_mourn): New.
8924 * server.h (struct thread_info) <last_resume_kind>: New field.
8925 <attached>: Add comment.
8926 <gdb_detached>: New field.
8927 (handler_func): Change return type to int.
8928 (handle_serial_event, handle_target_event): Ditto.
8929 (gdb_connected): Declare.
8931 (disconnected_tracing): Declare.
8932 (stop_tracing): Declare.
8934 * server.c (handle_query) <qSupported>: Report support for
8935 disconnected tracing.
8936 (queue_stop_reply_callback): Account for running threads.
8937 (gdb_wants_thread_stopped): New.
8938 (gdb_wants_all_threads_stopped): New.
8939 (gdb_reattached_process): New.
8940 (handle_status): Clear the `gdb_detached' flag of all processes.
8941 In all-stop, stop all threads.
8942 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8943 (process_serial_event): If the remote connection breaks, or if an
8944 exit was forced with "monitor exit", force an event loop exit.
8945 Handle disconnected tracing on detach.
8946 (handle_serial_event): Adjust.
8947 (handle_target_event): If GDB isn't connected, forward events back
8948 to the inferior, unless the last process exited, in which case,
8949 exit gdbserver. Adjust interface.
8951 * remote-utils.c (remote_open): Don't block in accept. Instead
8952 register an event loop source on the listen socket file
8953 descriptor. Refactor bits into ...
8954 (listen_desc): ... this new global.
8955 (gdb_connected): ... this new function.
8956 (enable_async_notification): ... this new function.
8957 (handle_accept_event): ... this new function.
8958 (remote_close): Clear remote_desc.
8960 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8962 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8964 (mourn_inferior): Define.
8965 (target_process_qsupported): Avoid the dangling else problem.
8966 (thread_stopped): Define.
8967 (pause_all): Define.
8968 (target_waitstatus_to_string): Declare.
8969 * target.c (target_waitstatus_to_string): New.
8971 * tracepoint.c (tracing): Make extern.
8972 (disconnected_tracing): New.
8973 (stop_tracing): Make extern. Handle tracing stops due to GDB
8975 (cmd_qtdisconnected): New.
8976 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8977 (handle_tracepoint_general_set): Handle QTDisconnected.
8979 * event-loop.c (event_handler_func): Change return type to int.
8980 (process_event): Bail out if the event handler wants the event
8982 (handle_file_event): Ditto.
8983 (start_event_loop): Bail out if the event handler wants the event
8986 * nto-low.c (nto_target_ops): Adjust.
8987 * spu-low.c (spu_wait): Don't remove the process here.
8988 (spu_target_ops): Adjust.
8989 * win32-low.c (win32_wait): Don't remove the process here.
8990 (win32_target_ops): Adjust.
8992 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8994 * regcache.c (realloc_register_cache): Invalidate inferior's
8995 regcache before recreating it.
8997 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8999 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9001 2010-04-09 Stan Shebs <stan@codesourcery.com>
9002 Pedro Alves <pedro@codesourcery.com>
9004 * server.h (LONGEST): New.
9005 (struct thread_info) <while_stepping>: New field.
9006 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9008 (initialize_tracepoint, handle_tracepoint_general_set)
9009 (handle_tracepoint_query, tracepoint_finished_step)
9010 (tracepoint_was_hit, release_while_stepping_state_list):
9011 (current_traceframe): Declare.
9012 * server.c (handle_general_set): Handle tracepoint packets.
9014 (write_memory): New.
9015 (handle_search_memory_1): Use read_memory.
9016 (handle_query): Report support for conditional tracepoints, trace
9017 state variables, and tracepoint sources. Handle tracepoint
9019 (main): Initialize the tracepoints module.
9020 (process_serial_event): Handle traceframe reads/writes.
9022 * linux-low.c (handle_tracepoints): New.
9023 (linux_wait_1): Call it.
9024 (linux_resume_one_lwp): Handle while-stepping.
9025 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9026 (linux_target_ops): Install them.
9027 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9029 * linux-x86-low.c (x86_supports_tracepoints): New.
9030 (the_low_target). Install it.
9032 * mem-break.h (delete_breakpoint): Declare.
9033 * mem-break.c (delete_breakpoint): Make external.
9035 * target.h (struct target_ops): Add `supports_tracepoints',
9036 `read_pc', and `write_pc' fields.
9037 (target_supports_tracepoints): Define.
9038 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9041 * regcache.h (struct regcache) <registers_owned>: New field.
9042 (init_register_cache, regcache_cpy): Declare.
9043 (regcache_read_pc, regcache_write_pc): Declare.
9044 (register_cache_size): Declare.
9045 (supply_regblock): Declare.
9046 * regcache.c (init_register_cache): New.
9047 (new_register_cache): Use it.
9048 (regcache_cpy): New.
9049 (register_cache_size): New.
9050 (supply_regblock): New.
9051 (regcache_read_pc, regcache_write_pc): New.
9053 * tracepoint.c: New.
9055 * Makefile.in (OBS): Add tracepoint.o.
9056 (tracepoint.o): New rule.
9058 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9060 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9062 (i386-mmx.c): Likewise.
9063 (i386-mmx-linux.o): Likewise.
9064 (i386-mmx-linux.c): Likewise.
9066 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9067 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9068 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9069 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9071 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9072 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9073 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9075 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9077 * Makefile.in (clean): Updated.
9079 (i386-avx.c): Likewise.
9080 (i386-avx-linux.o): Likewise.
9081 (i386-avx-linux.c): Likewise.
9082 (amd64-avx.o): Likewise.
9083 (amd64-avx.c): Likewise.
9084 (amd64-avx-linux.o): Likewise.
9085 (amd64-avx-linux.c): Likewise.
9087 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9088 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9089 (srv_amd64_regobj): Add amd64-avx.o.
9090 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9091 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9092 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9093 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9094 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9095 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9096 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9098 * i387-fp.c: Include "i386-xstate.h".
9100 (i387_cache_to_xsave): Likewise.
9101 (i387_xsave_to_cache): Likewise.
9102 (x86_xcr0): Likewise.
9104 * i387-fp.h (i387_cache_to_xsave): Likewise.
9105 (i387_xsave_to_cache): Likewise.
9106 (x86_xcr0): Likewise.
9108 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9109 * linux-crisv32-low.c (target_regsets): Likewise.
9110 * linux-m68k-low.c (target_regsets): Likewise.
9111 * linux-mips-low.c (target_regsets): Likewise.
9112 * linux-ppc-low.c (target_regsets): Likewise.
9113 * linux-s390-low.c (target_regsets): Likewise.
9114 * linux-sh-low.c (target_regsets): Likewise.
9115 * linux-sparc-low.c (target_regsets): Likewise.
9116 * linux-xtensa-low.c (target_regsets): Likewise.
9118 * linux-low.c: Include <sys/uio.h>.
9119 (regsets_fetch_inferior_registers): Support nt_type.
9120 (regsets_store_inferior_registers): Likewise.
9121 (linux_process_qsupported): New.
9122 (linux_target_ops): Add linux_process_qsupported.
9124 * linux-low.h (regset_info): Add nt_type.
9125 (linux_target_ops): Add process_qsupported.
9127 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9129 (init_registers_i386_avx_linux): New.
9130 (init_registers_amd64_avx_linux): Likewise.
9131 (xmltarget_i386_linux_no_xml): Likewise.
9132 (xmltarget_amd64_linux_no_xml): Likewise.
9133 (PTRACE_GETREGSET): Likewise.
9134 (PTRACE_SETREGSET): Likewise.
9135 (x86_fill_xstateregset): Likewise.
9136 (x86_store_xstateregset): Likewise.
9137 (use_xml): Likewise.
9138 (x86_linux_update_xmltarget): Likewise.
9139 (x86_linux_process_qsupported): Likewise.
9140 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9141 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9142 init_registers_i386_linux here. Call
9143 x86_linux_update_xmltarget.
9144 (the_low_target): Add x86_linux_process_qsupported.
9146 * server.c (handle_query): Call target_process_qsupported.
9148 * target.h (target_ops): Add process_qsupported.
9149 (target_process_qsupported): New.
9151 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9153 * inferiors.c (add_thread): Set last_status kind to
9154 TARGET_WAITKIND_IGNORE.
9155 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9156 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9157 (linux_wait_1): Move `thread' local definition to block that uses
9158 it. Don't NULL initialize `event_child'.
9159 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9160 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9161 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9163 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9165 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9166 an extended waitstatus, or by a watchpoint.
9167 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9168 thread was stepping or has been stopped by a watchpoint.
9170 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9172 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9173 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9174 of another, then delete the previous, and validate all
9176 (validate_inserted_breakpoint): New.
9177 (delete_disabled_breakpoints): New.
9178 (validate_breakpoints): New.
9179 (check_mem_read): Validate breakpoints before trusting their
9180 shadow. Delete disabled breakpoints.
9181 (check_mem_write): Validate breakpoints before trusting they
9182 should be inserted. Delete disabled breakpoints.
9183 * mem-break.h (validate_breakpoints):
9184 * server.c (handle_query): Validate breakpoints when we see a
9187 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9189 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9190 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9191 if we could tell there's a GDB breakpoint at stop_pc.
9192 (need_step_over_p): Don't do a step over if we find a GDB
9193 breakpoint at the resume PC.
9195 * mem-break.c (struct raw_breakpoint): New.
9196 (enum bkpt_type): New type `gdb_breakpoint'.
9197 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9198 fields. New field `raw'.
9199 (find_raw_breakpoint_at): New.
9200 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9202 (set_breakpoint_at): Adjust.
9203 (delete_raw_breakpoint): New.
9204 (release_breakpoint): New.
9205 (delete_breakpoint): Rename to...
9206 (delete_breakpoint_1): ... this. Add proc parameter. Use
9207 release_breakpoint. Return ENOENT.
9208 (delete_breakpoint): Reimplement.
9209 (find_breakpoint_at): Delete.
9210 (find_gdb_breakpoint_at): New.
9211 (delete_breakpoint_at): Delete.
9212 (set_gdb_breakpoint_at): New.
9213 (delete_gdb_breakpoint_at): New.
9214 (gdb_breakpoint_here): New.
9215 (set_reinsert_breakpoint): Use release_breakpoint.
9216 (uninsert_breakpoint): Rename to ...
9217 (uninsert_raw_breakpoint): ... this.
9218 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9219 (reinsert_raw_breakpoint): Change parameter type to
9221 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9223 (check_breakpoints): Adjust. Use release_breakpoint.
9224 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9225 (breakpoint_inserted_here): Ditto.
9226 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9227 Don't trust the breakpoint's shadow if it is not inserted.
9228 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9229 (delete_all_breakpoints): Adjust.
9230 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9231 use delete_breakpoint_1.
9233 * mem-break.h (breakpoints_supported): Delete declaration.
9234 (set_gdb_breakpoint_at): Declare.
9235 (gdb_breakpoint_here): Declare.
9236 (delete_breakpoint_at): Delete.
9237 (delete_gdb_breakpoint_at): Declare.
9239 * server.h (struct raw_breakpoint): Forward declare.
9240 (struct process_info): New field `raw_breakpoints'.
9242 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9245 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9247 * linux-low.c (status_pending_p_callback): Fix comment.
9248 (linux_wait_for_event_1): Move most of the internal breakpoint
9249 handling from here...
9250 (linux_wait_1): ... to here.
9251 (count_events_callback): New.
9252 (select_singlestep_lwp_callback): New.
9253 (select_event_lwp_callback): New.
9254 (cancel_breakpoints_callback): New.
9255 (select_event_lwp): New.
9256 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9257 priority to all LWPs that have had events that should be reported
9258 to the client. Cancel breakpoints when about to reporting the
9259 event to the client, not while stopping lwps. No longer cancel
9260 finished single-steps here.
9261 (cancel_finished_single_step): Delete.
9262 (cancel_finished_single_steps): Delete.
9264 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9266 * mem-break.c (enum bkpt_type): New.
9267 (struct breakpoint): New field `type'.
9268 (set_breakpoint_at): Change return type to struct breakpoint
9269 pointer. Set type to `other_breakpoint' by default.
9270 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9271 in the breakpoint list.
9272 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9273 (reinsert_breakpoint): Rename to ...
9274 (reinsert_raw_breakpoint): ... this.
9275 (reinsert_breakpoints_at): Adjust.
9276 * mem-break.h (struct breakpoint): Declare.
9277 (set_breakpoint_at): Change return type to struct breakpoint
9280 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9282 * server.c (handle_query): Assign, not compare.
9284 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9286 Teach linux gdbserver to step-over-breakpoints.
9288 * linux-low.c (can_hardware_single_step): New.
9289 (supports_breakpoints): New.
9290 (handle_extended_wait): If stopping threads, read the stop pc of
9293 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9294 low target doesn't support retrieving the PC.
9295 (add_lwp): Set last_resume_kind to resume_continue.
9296 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9297 (linux_attach): Don't clear stop_expected. Set the lwp's
9298 last_resume_kind to resume_stop.
9299 (linux_detach_one_lwp): Don't check for removed breakpoints.
9300 (check_removed_breakpoint): Delete.
9301 (status_pending_p): Rename to ...
9302 (status_pending_p_callback): ... this. Don't check for removed
9303 breakpoints. Don't consider threads that are stopped from GDB's
9305 (linux_wait_for_lwp): Always read the stop_pc here.
9306 (cancel_breakpoint): New.
9307 (step_over_bkpt): New global.
9308 (linux_wait_for_event_1): Implement stepping over breakpoints.
9309 (gdb_wants_lwp_stopped): New.
9310 (gdb_wants_all_stopped): New.
9311 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9312 single-step traps here. Store the thread's last reported target
9314 (send_sigstop): Don't clear stop_expected. Always set it,
9316 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9317 (cancel_finished_single_step): New.
9318 (cancel_finished_single_steps): New.
9319 (wait_for_sigstop): Don't cancel finished single-step traps here.
9320 (linux_resume_one_lwp): Don't check for removed breakpoints.
9321 Don't set `step' on non-hardware step archs.
9322 (linux_set_resume_request): Ignore resume_stop requests if already
9323 stopping or stopped. Set the lwp's last_resume_kind.
9324 (resume_status_pending_p): Don't check for removed breakpoints.
9325 (need_step_over_p): New.
9326 (start_step_over): New.
9327 (finish_step_over): New.
9328 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9329 requests. Clear the thread's last reported target waitstatus.
9330 Don't use the `suspended' flag. Don't consider pending breakpoints.
9331 (linux_resume): Start a step-over if necessary.
9332 (proceed_one_lwp): New.
9333 (proceed_all_lwps): New.
9334 (unstop_all_lwps): New.
9335 * linux-low.h (struct lwp_info): Rewrite comment for the
9336 `suspended' flag. Add the `stop_pc' field. Delete the
9337 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9338 Add `'last_resume_kind' and `need_step_over' fields.
9339 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9340 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9341 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9342 (set_raw_breakpoint_at): New.
9343 (set_breakpoint_at): Rewrite to use it.
9344 (reinsert_breakpoint_handler): Delete.
9345 (set_reinsert_breakpoint): New.
9346 (reinsert_breakpoint_by_bp): Delete.
9347 (delete_reinsert_breakpoints): New.
9348 (uninsert_breakpoint): Rewrite.
9349 (uninsert_breakpoints_at): New.
9350 (reinsert_breakpoint): Rewrite.
9351 (reinsert_breakpoints_at): New.
9352 (check_breakpoints): Rewrite.
9353 (breakpoint_here): New.
9354 (breakpoint_inserted_here): New.
9355 (check_mem_read): Adjust.
9356 * mem-break.h (breakpoints_supported, breakpoint_here)
9357 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9358 (reinsert_breakpoint_by_bp): Delete declaration.
9359 (delete_reinsert_breakpoints): Declare.
9360 (reinsert_breakpoint): Delete declaration.
9361 (reinsert_breakpoints_at): Declare.
9362 (uninsert_breakpoint): Delete declaration.
9363 (uninsert_breakpoints_at): Declare.
9364 (check_breakpoints): Adjust prototype.
9365 * server.h: Adjust include order.
9366 (struct thread_info): Declare here. Add a `last_status' field.
9368 2010-03-23 Michael Snyder <msnyder@vmware.com>
9370 * server.c (crc32): New function.
9371 (handle_query): Add handling for 'qCRC:' request.
9373 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9375 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9376 lwp had been stopped by a watchpoint.
9378 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9380 * server.h (internal_error): Declare.
9381 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9382 * utils.c (internal_error): New function.
9384 2010-03-15 Andreas Schwab <schwab@redhat.com>
9386 * configure.srv: Fix typo setting srv_regobj.
9388 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9390 * linux-low.c (fetch_register): Avoid passing a non string literal
9392 (usr_store_inferior_registers): Ditto.
9394 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9396 * linux-low.c (linux_write_memory): Bail out early if peeking
9399 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9401 * linux-low.h (struct lwp_info): New fields
9402 `stopped_by_watchpoint' and `stopped_data_address'.
9403 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9404 here, and cache them in the lwp object.
9405 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9407 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9409 (linux_stopped_by_watchpoint): Rewrite.
9410 (linux_stopped_data_address): Rewrite.
9412 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9414 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9415 switching the current inferior, not before.
9417 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9419 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9420 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9421 i386-linux.c and amd64-linux.c.
9422 (reg-i386.o): Removed.
9423 (reg-i386.c): Likewise.
9424 (reg-i386-linux.o): Likewise.
9425 (reg-i386-linux.c): Likewise.
9426 (reg-x86-64.o): Likewise.
9427 (reg-x86-64.c): Likewise.
9428 (reg-x86-64-linux.o): Likewise.
9429 (reg-x86-64-linux.c): Likewise.
9432 (i386-linux.o): Likewise.
9433 (i386-linux.c): Likewise.
9434 (amd64.o): Likewise.
9435 (amd64.c): Likewise.
9436 (amd64-linux.o): Likewise.
9437 (amd64-linux.c): Likewise.
9439 * configure.srv (srv_i386_regobj): New.
9440 (srv_i386_linux_regobj): Likewise.
9441 (srv_amd64_regobj): Likewise.
9442 (srv_amd64_linux_regobj): Likewise.
9443 (srv_i386_32bit_xmlfiles): Likewise.
9444 (srv_i386_64bit_xmlfiles): Likewise.
9445 (srv_i386_xmlfiles): Likewise.
9446 (srv_amd64_xmlfiles): Likewise.
9447 (srv_i386_linux_xmlfiles): Likewise.
9448 (srv_amd64_linux_xmlfiles): Likewise.
9449 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9450 srv_xmlfiles to $srv_i386_xmlfiles.
9451 (i[34567]86-*-mingw32ce*): Likewise.
9452 (i[34567]86-*-mingw*): Likewise.
9453 (i[34567]86-*-nto*): Likewise.
9454 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9455 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9456 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9457 (x86_64-*-linux*): Likewise.
9459 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9460 (init_registers_amd64_linux): New.
9461 (x86_arch_setup): Replace init_registers_x86_64_linux with
9462 init_registers_amd64_linux.
9464 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9466 * configure.ac: Check for libdl. If it is not available link against
9467 static libthread_db.
9468 * configure: Regenerate.
9470 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9474 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9475 handing a read watchpoint.
9476 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9478 2010-02-12 Doug Evans <dje@google.com>
9480 * linux-low.c (linux_supports_tracefork_flag): Document.
9481 (linux_look_up_symbols): Add comment.
9483 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9485 * regcache.c (supply_register): Clear regcache if buf is NULL.
9487 2010-02-02 Nicolas Roche <roche@sourceware.org>
9488 Joel Brobecker <brobecker@adacore.com>
9490 * inferiors.c (find_inferior): Add function documentation.
9491 (unloaded_dll): Handle the case where the unloaded dll has not
9492 been previously registered in the dll list.
9494 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9496 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9497 (thumb2_breakpoint): New.
9498 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9500 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9502 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9503 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9506 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9508 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9510 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9512 * linux-s390-low.c (s390_collect_ptrace_register)
9513 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9515 2010-01-21 Doug Evans <dje@google.com>
9517 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9518 (PTRACE_ARG4_TYPE): New macro.
9519 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9520 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9521 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9522 (usr_store_inferior_registers): Ditto.
9523 (linux_read_memory, linux_write_memory): Ditto.
9524 (linux_test_for_tracefork): Ditto.
9526 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9527 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9529 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9531 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9534 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9536 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9537 prototype to take a regcache. Adjust.
9539 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9541 * regcache.h (struct thread_info): Forward declare.
9542 (struct regcache): New.
9543 (new_register_cache): Adjust prototype.
9544 (get_thread_regcache): Declare.
9545 (free_register_cache): Adjust prototype.
9546 (registers_to_string, registers_from_string): Ditto.
9547 (supply_register, supply_register_by_name, collect_register)
9548 (collect_register_as_string, collect_register_by_name): Ditto.
9549 * regcache.c (struct inferior_regcache_data): Delete.
9550 (get_regcache): Rename to ...
9551 (get_thread_regcache): ... this. Adjust. Switch inferior before
9553 (regcache_invalidate_one): Adjust.
9554 (regcache_invalidate): Fix prototype.
9555 (new_register_cache): Return the new register cache.
9556 (free_register_cache): Change prototype.
9557 (realloc_register_cache): Adjust.
9558 (registers_to_string): Change prototype to take a regcache. Adjust.
9559 (registers_from_string): Ditto.
9560 (register_data): Ditto.
9561 (supply_register): Ditto.
9562 (supply_register_by_name): Ditto.
9563 (collect_register): Ditto.
9564 (collect_register_as_string): Ditto.
9565 (collect_register_by_name): Ditto.
9566 * server.c (process_serial_event): Adjust.
9567 * linux-low.h (regset_fill_func, regset_store_func): Change
9569 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9571 * linux-low.c (get_stop_pc): Adjust.
9572 (check_removed_breakpoint): Adjust.
9573 (linux_wait_for_event): Adjust.
9574 (linux_resume_one_lwp): Adjust.
9575 (fetch_register): Add regcache parameter. Adjust.
9576 (usr_store_inferior_registers): Ditto.
9577 (regsets_fetch_inferior_registers): Ditto.
9578 (regsets_store_inferior_registers): Ditto.
9579 (linux_fetch_registers, linux_store_registers): Ditto.
9580 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9582 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9584 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9585 prototype to take a regcache.
9586 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9587 * remote-utils.c (convert_ascii_to_int, outreg)
9588 (prepare_resume_reply): Change prototype to take a regcache.
9590 * target.h (struct target_ops) <fetch_registers, store_registers>:
9591 Change prototype to take a regcache.
9592 (fetch_inferior_registers, store_inferior_registers): Change
9593 prototype to take a regcache. Adjust.
9594 * proc-service.c (ps_lgetregs): Adjust.
9595 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9596 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9597 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9598 take a regcache. Adjust.
9599 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9600 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9601 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9602 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9603 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9604 (cris_cannot_fetch_register):
9605 (cris_breakpoint_at): Change prototype to take a regcache.
9607 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9608 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9609 to take a regcache. Adjust.
9610 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9612 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9613 take a regcache. Adjust.
9614 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9615 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9616 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9617 * linux-mips-low.c (mips_get_pc):
9618 (mips_set_pc): Change prototype to take a regcache. Adjust.
9619 (mips_reinsert_addr): Adjust.
9620 (mips_collect_register): Change prototype to take a regcache.
9622 (mips_supply_register):
9623 (mips_collect_register_32bit, mips_supply_register_32bit)
9624 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9625 (mips_store_fpregset): Ditto.
9626 * linux-ppc-low.c (ppc_supply_ptrace_register)
9627 (ppc_supply_ptrace_register): Ditto.
9628 (parse_spufs_run): Adjust.
9629 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9630 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9631 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9632 take a regcache. Adjust.
9633 * linux-s390-low.c (s390_collect_ptrace_register)
9634 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9635 (s390_set_pc): Change prototype to take a regcache. Adjust.
9636 (s390_arch_setup): Adjust.
9637 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9638 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9639 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9640 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9641 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9643 (sparc_breakpoint_at): Adjust.
9644 * linux-xtensa-low.c (xtensa_fill_gregset):
9645 (xtensa_store_gregset):
9646 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9647 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9648 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9649 prototype to take a regcache. Adjust.
9650 * win32-arm-low.c (arm_fetch_inferior_register)
9651 (arm_store_inferior_register): Change prototype to take a
9653 * win32-i386-low.c (i386_fetch_inferior_register)
9654 (i386_store_inferior_register): Change prototype to take a
9656 * win32-low.c (child_fetch_inferior_registers)
9657 (child_store_inferior_registers): Change prototype to take a
9659 (win32_wait): Adjust.
9660 (win32_fetch_inferior_registers): Change prototype to take a
9662 (win32_store_inferior_registers): Adjust.
9663 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9664 store_inferior_register>: Change prototype to take a regcache.
9666 2010-01-20 Doug Evans <dje@google.com>
9668 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9670 (linux_wait_for_event1, linux_init_signals): Ditto.
9671 (W_STOPCODE): Provide definition if missing.
9673 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9675 * linux-low.c (linux_core_of_thread): New.
9676 (compare_ints, show_process, list_threads): New.
9677 (linux_qxfer_osdata): Report threads and cores.
9678 (linux_target_op): Register linux_core_of_thread.
9679 * remote-utils.c (prepare_resume_reply): Report the core.
9680 (buffer_xml_printf): Support %d specifier.
9681 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9683 (handle_query): Handle qXfer:threads. Announce availability
9685 * target.h (struct target_ops): New field core_of_thread.
9687 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9689 * Makefile.in (clean): Remove new generated files.
9690 (reg-s390.o, reg-s390.c): Remove rules.
9691 (reg-s390x.o, reg-s390x.c): Likewise.
9692 (s390-linux32.o, s390-linux32.c): Add rules.
9693 (s390-linux64.o, s390-linux64.c): Likewise.
9694 (s390x-linux64.o, s390x-linux64.c): Likewise.
9695 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9696 * linux-s390-low.c: Include <elf.h>.
9697 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9698 (init_registers_s390): Remove prototype.
9699 (init_registers_s390x): Likewise.
9700 (init_registers_s390_linux32): Add prototype.
9701 (init_registers_s390_linux64): Likewise.
9702 (init_registers_s390x_linux64): Likewise.
9703 (s390_num_regs_3264): New define.
9704 (s390_regmap_3264): New global variable.
9705 (s390_cannot_fetch_register): Remove obsolete check.
9706 (s390_cannot_store_register): Likewise.
9707 (s390_collect_ptrace_register): Handle upper/lower register halves.
9708 (s390_supply_ptrace_register): Likewise.
9709 (s390_fill_gregset): Update to register number changes.
9710 (s390_get_hwcap): New routine.
9711 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9712 Install appropriate regmap and register set.
9714 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9716 * server.c (gdbserver_version): Update copyright year to 2010.
9717 * gdbreplay.c (gdbreplay_version): Likewise.
9719 2009-12-28 Doug Evans <dje@google.com>
9721 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9722 elf/external.h. Include <elf.h> instead but only if necessary.
9724 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9726 * linux-low.c (linux_remove_process): Remove `detaching'
9727 parameter. Don't release/detach from thread_db here.
9728 (linux_kill): Release/detach from thread_db here, ...
9729 (linux_detach): ... and here, before actually detaching.
9730 (linux_wait_1): ... and here, when a process exits.
9731 * thread-db.c (any_thread_of): New.
9732 (thread_db_free): Switch the current inferior to a thread of the
9735 2009-12-21 Doug Evans <dje@google.com>
9737 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9739 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9740 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9741 warning ifndef __NR_tkill. Move setting of errno there too.
9742 Delete unnecessary resetting of errno after syscall.
9743 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9745 * configure.ac: Check for dladdr.
9746 * config.in: Regenerate.
9747 * configure: Regenerate.
9748 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9749 (try_thread_db_load): Update.
9751 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9753 2009-12-18 Doug Evans <dje@google.com>
9755 * event-loop.c: Include unistd.h if it exists.
9757 * linux-low.c (my_waitpid): Move definition away from being in
9758 between linux_tracefork_child/linux_test_for_tracefork.
9760 * gdb_proc_service.h (psaddr_t): Fix type.
9761 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9762 signature to match glibc.
9764 2009-12-16 Doug Evans <dje@google.com>
9766 * linux-low.c (linux_read_memory): Fix argument to read.
9768 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9770 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9771 events, don't leave current_inferior pointing at null.
9773 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9775 * win32-low.c (LOG): Delete.
9776 (OUTMSG): Output to stderr.
9777 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9778 on compile time LOG macro.
9779 (win32_wait): Fix debug output.
9781 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9783 * win32-low.c (win32_add_one_solib): If the dll name is
9784 "ntdll.dll", prepend the system directory to the dll path.
9786 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9788 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9790 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9791 Vladimir Prus <vladimir@codesourcery.com>
9793 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9794 * configure.ac: Check for __mcoldfire__ and set
9795 gdb_cv_m68k_is_coldfire.
9796 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9797 reg-cf.o and reg-m68k.o.
9798 * configure: Regenerated.
9800 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9802 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9803 Pass it to thread_db_free.
9804 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9805 proper `detaching' argument to linux_remove_process.
9806 * linux-low.h (thread_db_free): Add `detaching' parameter.
9807 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9809 (thread_db_free): Add `detaching' parameter. Only
9810 call td_ta_clear_event if detaching from process.
9812 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9814 * thread-db.c (thread_db_free): Fix typo.
9816 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9819 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9821 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9823 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9824 with an i686 compiler.
9825 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9827 * configure: Rebuilt.
9829 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9833 * server.c (handle_search_memory_1): Correct read_addr initialization
9834 in loop for searching subsequent chunks.
9836 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9838 * configure.ac: New --with-libthread-db option.
9839 * thread-db.c: Allow direct dependence on libthread_db.
9840 (thread_db_free): Adjust.
9841 * config.in: Regenerate.
9842 * configure: Likewise.
9844 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9847 * thread-db.c (attach_thread): New function.
9848 (maybe_attach_thread): Return success/failure.
9849 (find_new_threads_callback): Adjust.
9850 (thread_db_find_new_threads): Loop until no new threads.
9852 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9854 * proc-service.c (ps_lgetregs): Formatting.
9856 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9858 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9859 * configure.ac: Adjust.
9860 * linux-low.h (struct process_info_private): Move members to struct
9862 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9863 * linux-low.c (linux_remove_process): Adjust.
9864 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9865 * server.c (handle_query): Move code ...
9866 (handle_monitor_command): ... here. New function.
9867 * target.h (struct target_ops): New member.
9868 * thread-db.c (struct thread_db): New.
9869 (libthread_db_search_path): New variable.
9870 (thread_db_create_event, thread_db_enable_reporting)
9871 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9872 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9873 (try_thread_db_load_1, dladdr_to_soname): New functions.
9874 (try_thread_db_load, thread_db_load_search): New functions.
9875 (thread_db_init): Search for libthread_db.
9876 (thread_db_free): New function.
9877 (thread_db_handle_monitor_command): Likewise.
9878 * config.in: Regenerate.
9879 * configure: Regenerate.
9881 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9883 * spu-low.c (spu_kill): Wait for inferior to terminate.
9884 Call clear_inferiors.
9885 (spu_detach): Call clear_inferiors.
9887 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9889 * aclocal.m4: Regenerate.
9890 * config.in: Likewise.
9891 * configure: Likewise.
9893 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9895 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9896 (parse_spufs_run): New function.
9897 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9898 (ppc_breakpoint_at): Handle SPU breakpoints.
9900 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9902 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9903 (SPUFS_MAGIC): Define.
9904 (spu_enumerate_spu_ids): New function.
9905 (linux_qxfer_spu): New function.
9906 (linux_target_ops): Install linux_qxfer_spu.
9908 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9910 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9911 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9912 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9913 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9914 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9915 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9916 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9917 (init_registers_powerpc_cell32l): Add prototype.
9918 (init_registers_powerpc_cell64l): Likewise.
9919 (ppc_arch_setup): Detect Cell/B.E. architecture.
9921 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9923 * Makefile.in (datarootdir): New variable.
9925 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9927 * linux-low.c (linux_write_memory): Update debugging output.
9928 * Makefile.in (clean): Add new descriptions.
9929 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9930 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9931 * configure.srv: Add new files for arm*-*-linux*.
9932 * linux-arm-low.c: Add new declarations.
9933 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9934 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9935 (HWCAP_VFPv3D16): New.
9936 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9937 instead of __IWMMXT__.
9938 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9939 (arm_arch_setup): New.
9940 (target_regsets): Remove #ifdef. Add VFP regset.
9941 (the_low_target): Use arm_arch_setup.
9943 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9945 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9946 the main thread again.
9948 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9950 Adding Neutrino gdbserver.
9951 * configure: Regenerated.
9952 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9953 * configure.srv (i[34567]86-*-nto*): New target.
9954 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9955 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9956 (nto_comctrl) [__QNX__]: New function.
9957 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9959 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9961 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9964 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9965 Pedro Alves <pedro@codesourcery.com>
9967 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9968 don't support CONTEXT_EXTENDED_REGISTERS.
9969 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9970 (the_low_target): Install them.
9971 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9972 failing with ERROR_PIPE_NOT_CONNECTED.
9974 2009-06-30 Doug Evans <dje@google.com>
9975 Pierre Muller <muller@ics.u-strasbg.fr>
9977 Add h/w watchpoint support to x86-linux, win32-i386.
9978 * Makefile.in (SFILES): Add i386-low.c
9979 (i386_low_h): Define.
9980 (i386-low.o): Add dependencies.
9981 (linux-x86-low.o): Add i386-low.h dependency.
9982 (win32-i386-low.o): Ditto.
9983 * i386-low.c: New file.
9984 * i386-low.h: New file.
9985 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9986 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9987 * linux-low.c (linux_add_process): Initialize arch_private.
9988 (linux_remove_process): Free arch_private.
9989 (add_lwp): Initialize arch_private.
9990 (delete_lwp): Free arch_private.
9991 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9993 * linux-low.h (process_info_private): New member arch_private.
9994 (lwp_info): New member arch_private.
9995 (linux_target_ops): New members new_process, new_thread,
9997 (ptid_of): New macro.
9998 * linux-x86-low.c: Include stddef.h, i386-low.h.
9999 (arch_process_info): New struct.
10000 (arch_lwp_info): New struct.
10001 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10002 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10003 (i386_dr_low_get_status): New function.
10004 (x86_insert_point, x86_remove_point): New functions.
10005 (x86_stopped_by_watchpoint): New function.
10006 (x86_stopped_data_address): New function.
10007 (x86_linux_new_process, x86_linux_new_thread): New functions.
10008 (x86_linux_prepare_to_resume): New function.
10009 (the_low_target): Add entries for insert_point, remove_point,
10010 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10012 * server.c (debug_hw_points): New global.
10013 (monitor_show_help): Document set debug-hw-points.
10014 (handle_query): Process "set debug-hw-points".
10015 * server.h (debug_hw_points): Declare.
10016 (paddress): Declare.
10017 * utils.c (NUMCELLS, CELLSIZE): New macros.
10018 (get_sell, xsnprintf, paddress): New functions.
10019 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10020 remove_point, stopped_by_watchpoint, stopped_data_address.
10021 * win32-i386-low.c: Include i386-low.h.
10022 (debug_reg_state): Replaces dr.
10023 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10024 (i386_dr_low_get_status): New function.
10025 (i386_insert_point, i386_remove_point): New functions.
10026 (i386_stopped_by_watchpoint): New function.
10027 (i386_stopped_data_address): New function.
10028 (i386_initial_stuff): Update.
10029 (get_thread_context,set_thread_context,i386_thread_added): Update.
10030 (the_low_target): Add entries for insert_point,
10031 remove_point, stopped_by_watchpoint, stopped_data_address.
10032 * win32-low.c (win32_insert_watchpoint): New function.
10033 (win32_remove_watchpoint): New function.
10034 (win32_stopped_by_watchpoint): New function.
10035 (win32_stopped_data_address): New function.
10036 (win32_target_ops): Add entries for insert_watchpoint,
10037 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10038 * win32-low.h (win32_target_ops): New members insert_point,
10039 remove_point, stopped_by_watchpoint, stopped_data_address.
10041 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10043 * server.c (process_serial_event): Re-return unsupported, not
10044 error, if the type isn't recognized. Re-allow supporting only
10045 insert or remove packets. Also call require_running for
10046 breakpoints. Add missing break statement to default case. Tidy.
10047 * target.h (struct target_ops): Rename insert_watchpoint to
10048 insert_point, and remove_watchpoint to remove_point.
10050 * linux-low.h (struct linux_target_ops): Likewise.
10051 * linux-low.c (linux_insert_watchpoint): Rename to ...
10052 (linux_insert_point): ... this. Adjust.
10053 (linux_remove_watchpoint): Rename to ...
10054 (linux_remove_point): ... this. Adjust.
10055 (linux_target_ops): Adjust.
10056 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10057 (cris_insert_point): ... this.
10058 (cris_remove_watchpoint): Rename to ...
10059 (cris_remove_point): ... this.
10060 (the_low_target): Adjust.
10062 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10064 * server.c (handle_v_kill): Pass signal_pid to
10065 kill_inferior if multi_process is zero.
10067 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10069 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10070 * target.h (target_ops): Comment for *_watchpoint to make it clear
10071 the functions can get types '0' and '1'.
10073 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10075 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10076 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10077 * regcache.c (get_regcache): Likewise.
10078 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10079 * win32-low.c (child_fetch_inferior_registers): Remove check for
10082 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10083 Pedro Alves <pedro@codesourcery.com>
10085 * target.h (struct target_ops) <supports_multi_process>: New
10087 (target_supports_multi_process): New.
10088 * server.c (handle_query): Even if GDB reports support, only
10089 enable multi-process if the target also supports it. Report
10090 multi-process support only if the target backend supports it.
10091 * linux-low.c (linux_supports_multi_process): New function.
10092 (linux_target_ops): Install it as target_supports_multi_process
10095 2009-05-24 Doug Evans <dje@google.com>
10097 Global renaming of find_thread_pid to find_thread_ptid.
10098 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10099 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10100 All callers updated.
10102 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10103 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10106 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10107 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10108 (linux_resume_one_lwp): Ditto.
10110 2009-05-23 Doug Evans <dje@google.com>
10112 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10113 from struct inferior_list_entry * to struct lwp_info *.
10114 All callers updated.
10116 2009-05-13 Doug Evans <dje@google.com>
10118 * linux-x86-low.c: Don't include assert.h.
10119 (x86_siginfo_fixup): Use fatal, not assert.
10120 (x86_arch_setup): Fix comment.
10122 2009-05-12 Doug Evans <dje@google.com>
10124 Biarch support for i386/amd64 gdbserver.
10125 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10126 Add linux-x86-low.c.
10127 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10128 (linux-x86-low.o): Add.
10129 * linux-x86-64-low.c: Delete.
10130 * linux-i386-low.c: Delete.
10131 * linux-x86-low.c: New file.
10132 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10134 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10136 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10137 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10138 (linux_child_pid_to_exec_file): New function.
10139 (elf_64_header_p, elf_64_file_p): New functions.
10140 (siginfo_fixup): New function.
10141 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10142 give target a chance to convert layout.
10143 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10144 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10146 2009-05-07 Doug Evans <dje@google.com>
10148 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10149 (regsets_store_inferior_registers): Ditto.
10151 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10155 * linux-low.c (must_set_ptrace_flags): Delete.
10156 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10158 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10159 `lwp->must_set_ptrace_flags' instead.
10160 (linux_wait_for_event_1): Set ptrace options here.
10161 (linux_wait_1): ... not here.
10163 2009-04-30 Doug Evans <dje@google.com>
10165 * inferiors.c (started_inferior_callback): New function.
10166 (attached_inferior_callback): New function.
10167 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10168 * server.c (print_started_pid, print_attached_pid): New functions.
10169 (detach_or_kill_for_exit): New function.
10170 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10171 * server.h (have_started_inferiors_p): Declare.
10172 (have_attached_inferiors_p): Declare.
10174 * inferiors.c (remove_process): Fix memory leak, free process.
10175 * linux-low.c (linux_remove_process): New function.
10176 (linux_kill): Call it instead of remove_process.
10177 (linux_detach, linux_wait_1): Ditto.
10179 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10181 * configure.srv: Add x86 Windows CE target.
10183 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10185 * inferiors.c (get_thread_process): Make global.
10186 * server.h (get_thread_process): Add prototype.
10187 * thread-db.c (find_one_thread): Use get_thread_process
10188 instead of current_process.
10189 (thread_db_get_tls_address): Do not crash if called when
10190 thread layer is not yet initialized.
10192 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10194 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10195 * spu-low.c (current_tid): Rename to ...
10196 (current_ptid): ... this.
10197 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10198 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10199 ptid_get_lwp (current_ptid) instead of current_tid.
10200 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10201 instead of current_tid. Use find_process_pid to verify pid
10202 argument is valid. Pass proper argument to remove_process.
10203 (spu_thread_alive): Compare current_ptid instead of current_tid.
10204 (spu_resume): Likewise.
10206 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10208 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10211 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10213 Implement the multiprocess extensions, and add linux multiprocess
10216 * server.h (ULONGEST): Declare.
10217 (struct ptid, ptid_t): New.
10218 (minus_one_ptid, null_ptid): Declare.
10219 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10220 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10221 (struct inferior_list_entry): Change `id' type from unsigned from
10223 (struct sym_cache, struct breakpoint, struct
10224 process_info_private): Forward declare.
10225 (struct process_info): Declare.
10226 (current_process): Declare.
10227 (all_processes): Declare.
10228 (initialize_inferiors): Declare.
10229 (add_thread): Adjust to use ptid_t.
10230 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10231 (add_process, remove_process, find_thread_pid): Declare.
10232 (find_inferior_id): Adjust to use ptid_t.
10233 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10234 (multi_process): Declare.
10235 (push_event): Adjust to use ptid_t.
10236 (read_ptid, write_ptid): Declare.
10237 (prepare_resume_reply): Adjust to use ptid_t.
10238 (clear_symbol_cache): Declare.
10239 * inferiors.c (all_processes): New.
10240 (null_ptid, minus_one_ptid): New.
10241 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10242 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10243 (add_thread): Change unsigned long to ptid. Remove gdb_id
10245 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10246 (gdb_id_to_thread): Rename to ...
10247 (find_thread_pid): ... this. Change unsigned long to ptid.
10248 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10249 (loaded_dll, pull_pid_from_list): Adjust.
10250 (add_process, remove_process, find_process_pid)
10251 (get_thread_process, current_process, initialize_inferiors): New.
10252 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10253 (struct target_waitstatus) <related_pid>: Ditto.
10254 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10255 return type to int.
10256 (struct target_ops) <join>: Add `pid' argument.
10257 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10258 (struct target_ops) <wait>: Add `ptid' field. Change return type
10260 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10261 (mywait): Add `ptid' argument. Change return type to ptid_t.
10262 (target_pid_to_str): Declare.
10263 * target.c (set_desired_inferior): Adjust to use ptids.
10264 (mywait): Add new `ptid' argument. Adjust.
10265 (target_pid_to_str): New.
10266 * mem-break.h (free_all_breakpoints): Declare.
10267 * mem-break.c (breakpoints): Delelete.
10268 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10269 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10270 to use per-process breakpoint list.
10271 (free_all_breakpoints): New.
10272 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10273 (symbol_cache, all_symbols_looked_up): Delete.
10275 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10277 (prepare_resume_reply): Change ptid argument's type from unsigned
10278 long to ptid_t. Adjust. Implement W;process and X;process.
10279 (free_sym_cache, clear_symbol_cache): New.
10280 (look_up_one_symbol): Adjust to per-process symbol cache. *
10281 * server.c (cont_thread, general_thread, step_thread): Change type
10283 (attached): Delete.
10284 (multi_process): New.
10285 (last_ptid): Change type to ptid_t.
10286 (struct vstop_notif) <ptid>: Change type to ptid_t.
10287 (queue_stop_reply, push_event): Change `ptid' argument's type to
10289 (discard_queued_stop_replies): Add `pid' argument.
10290 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10291 changes. Don't reference the `attached' global.
10292 (attach_inferior): Adjust to mywait interface changes.
10293 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10294 features. Handle and report "multiprocess+". Handle
10296 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10298 (handle_v_kill): New.
10299 (handle_v_stopped): Adjust to use target_pid_to_str.
10300 (handle_v_requests): Allow multiple attaches and runs when
10301 multiprocess extensions are in effect. Handle "vKill".
10302 (myresume): Adjust to use ptids.
10303 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10304 (handle_status): Adjust to discard_queued_stop_replies interface
10306 (first_thread_of, kill_inferior_callback)
10307 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10308 (main): Call initialize_inferiors. Adjust to use ptids, killing
10309 and detaching from all inferiors. Handle multiprocess packet
10311 * linux-low.h: Include gdb_proc_service.h.
10312 (struct process_info_private): New.
10313 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10314 <lwpid_of>: Use ptid_get_lwp.
10315 (get_lwp_thread): Adjust.
10316 (struct lwp_info): Add `dead' member.
10317 (find_lwp_pid): Declare.
10318 * linux-low.c (thread_db_active): Delete.
10319 (new_inferior): Adjust comment.
10320 (inferior_pid): Delete.
10321 (linux_add_process): New.
10322 (handle_extended_wait): Adjust.
10323 (add_lwp): Change unsigned long to ptid.
10324 (linux_create_inferior): Add process to processes table. Adjust
10325 to use ptids. Don't set new_inferior here.
10326 (linux_attach_lwp): Rename to ...
10327 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10328 it. Adjust to use ptids.
10329 (linux_attach_lwp): New.
10330 (linux_attach): Add process to processes table. Don't set
10332 (struct counter): New.
10333 (second_thread_of_pid_p, last_thread_of_process_p): New.
10334 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10335 multiple processes.
10336 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10337 processes. Remove process from process table.
10338 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10339 to multiple processes.
10340 (any_thread_of): New.
10341 (linux_detach): Add `pid' argument, and handle it. Remove process
10342 from processes table.
10343 (linux_join): Add `pid' argument. Handle it.
10344 (linux_thread_alive): Change unsighed long argument to ptid_t.
10345 Consider dead lwps as not being alive.
10346 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10347 threads we're not interested in.
10348 (same_lwp, find_lwp_pid): New.
10349 (linux_wait_for_lwp): Change `pid' argument's type from int to
10351 (linux_wait_for_event): Rename to ...
10352 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10353 from int to ptid_t. Adjust.
10354 (linux_wait_for_event): New.
10355 (linux_wait_1): Add `ptid' argument. Change return type to
10356 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10357 that exit from the process table.
10358 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10360 (mark_lwp_dead): New.
10361 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10362 stopping all threads, mark its main lwp as dead.
10363 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10365 (fetch_register, usr_store_inferior_registers)
10366 (regsets_fetch_inferior_registers)
10367 (regsets_store_inferior_registers, linux_read_memory)
10368 (linux_write_memory): Inline `inferior_pid'.
10369 (linux_look_up_symbols): Adjust to use per-process
10370 `thread_db_active'.
10371 (linux_request_interrupt): Adjust to use ptids.
10372 (linux_read_auxv): Inline `inferior_pid'.
10373 (initialize_low): Don't reference thread_db_active.
10374 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10375 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10376 (ps_getpid): Return the pid of the current inferior.
10377 * thread-db.c (proc_handle, thread_agent): Delete.
10378 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10380 (find_one_thread): Change argument type to ptid_t. Adjust to
10382 (maybe_attach_thread): Adjust to per-process data and ptids.
10383 (thread_db_find_new_threads): Ditto.
10384 (thread_db_init): Ditto.
10385 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10386 processes table. Adjust to use ptids.
10387 (spu_kill, spu_detach): Adjust interface. Remove process from
10389 (spu_join, spu_thread_alive): Adjust interface.
10390 (spu_wait): Adjust interface. Remove process from processes
10391 table. Adjust to use ptids.
10392 * win32-low.c (current_inferior_tid): Delete.
10393 (current_inferior_ptid): New.
10394 (debug_event_ptid): New.
10395 (thread_rec): Take a ptid. Adjust.
10396 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10397 (child_delete_thread): Ditto.
10398 (do_initial_child_stuff): Add `attached' argument. Add process to
10400 (child_fetch_inferior_registers, child_store_inferior_registers):
10402 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10403 (win32_attach): Pass 1 to do_initial_child_stuff.
10404 (win32_kill): Adjust interface. Remove process from processes
10406 (win32_detach): Ditto.
10407 (win32_join): Adjust interface.
10408 (win32_thread_alive): Take a ptid.
10409 (win32_resume): Adjust to use ptids.
10410 (get_child_debug_event): Ditto.
10411 (win32_wait): Adjust interface. Remove exiting process from
10414 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10416 Non-stop mode support.
10418 * server.h (non_stop): Declare.
10419 (gdb_client_data, handler_func): Declare.
10420 (delete_file_handler, add_file_handler, start_event_loop):
10422 (handle_serial_event, handle_target_event, push_event)
10423 (putpkt_notif): Declare.
10424 * target.h (enum resume_kind): New.
10425 (struct thread_resume): Replace `step' field by `kind' field.
10426 (TARGET_WNOHANG): Define.
10427 (struct target_ops) <wait>: Add `options' argument.
10428 <supports_non_stop, async, start_non_stop>: New fields.
10429 (target_supports_non_stop, target_async): New.
10430 (start_non_stop): Declare.
10431 (mywait): Add `options' argument.
10432 * target.c (mywait): Add `options' argument. Print child exit
10433 notifications here.
10434 (start_non_stop): New.
10435 * server.c (non_stop, own_buf, mem_buf): New globals.
10436 (struct vstop_notif): New.
10437 (notif_queue): New global.
10438 (queue_stop_reply, push_event, discard_queued_stop_replies)
10439 (send_next_stop_reply): New.
10440 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10442 (attach_inferior): In non-stop mode, don't wait for the target
10444 (handle_general_set): Handle QNonStop.
10445 (handle_query): When handling qC, return the current general
10446 thread, instead of the first thread of the list.
10447 (handle_query): If the backend supports non-stop mode, include
10448 QNonStop+ in the qSupported query response.
10449 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10451 (handle_v_attach, handle_v_run): Handle non-stop mode.
10452 (handle_v_stopped): New.
10453 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10454 (myresume): Adjust to use resume_kind. Handle non-stop.
10455 (queue_stop_reply_callback): New.
10456 (handle_status): Handle non-stop mode.
10457 (main): Clear non_stop flag on reconnection. Use the event-loop.
10458 Refactor serial protocol handling from here ...
10459 (process_serial_event): ... to this new function. When GDB
10460 selects any thread, select one here. In non-stop mode, wait until
10461 GDB acks all pending events before exiting.
10462 (handle_serial_event, handle_target_event): New.
10463 * remote-utils.c (remote_open): Install remote_desc in the event
10465 (remote_close): Remove remote_desc from the event loop.
10466 (putpkt_binary): Rename to...
10467 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10468 (putpkt_binary): New as wrapper around putpkt_binary_1.
10469 (putpkt_notif): New.
10470 (prepare_resume_reply): In non-stop mode, don't change the
10472 * event-loop.c: New.
10473 * Makefile.in (OBJ): Add event-loop.o.
10474 (event-loop.o): New rule.
10476 * linux-low.h (pid_of): Moved here.
10478 (get_lwp_thread): Use lwpid_of.
10479 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10480 * linux-low.c (pid_of): Delete.
10481 (inferior_pid): Use lwpid_of.
10482 (linux_event_pipe): New.
10483 (target_is_async_p): New.
10485 (handle_extended_wait): Use lwpid_of.
10486 (add_lwp): Don't set lwpid field.
10487 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10488 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10489 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10490 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10491 first. Adjust to linux_wait_for_event interface changes. Use
10493 (linux_detach): Don't delete the main lwp here.
10494 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10495 (status_pending_p): Don't consider explicitly suspended lwps.
10496 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10497 pointer. Add OPTIONS argument. Change return type to int. Use
10498 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10499 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10500 pointer. Add status pointer argument. Return a pid instead of a
10501 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10502 changes. In non-stop mode, don't switch to a random thread.
10503 (linux_wait): Rename to...
10504 (linux_wait_1): ... this. Add target_options argument, and handle
10505 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10506 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10507 clean exit and signal exit code. Don't stop all threads in
10508 non-stop mode. In all-stop mode, only stop all threads when
10509 reporting a stop to GDB. Handle explicit thread stop requests.
10510 (async_file_flush, async_file_mark): New.
10512 (send_sigstop): Use lwpid_of.
10513 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10514 interface changes. In non-stop mode, don't switch to a random
10516 (linux_resume_one_lwp): Use lwpid_of.
10517 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10518 (linux_resume_one_thread): ... this. Handle resume_stop. In
10519 non-stop mode, don't look for pending flag in all threads.
10520 (resume_status_pending_p): Don't consider explicitly suspended
10522 (my_waitpid): Reimplement. Emulate __WALL.
10523 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10525 (sigchld_handler, linux_supports_non_stop, linux_async)
10526 (linux_start_non_stop): New.
10527 (linux_target_ops): Register linux_supports_non_stop, linux_async
10528 and linux_start_non_stop.
10529 (initialize_low): Install SIGCHLD handler.
10530 * thread-db.c (thread_db_create_event, find_one_thread)
10531 (thread_db_get_tls_address): Use lwpid_of.
10532 * win32-low.c (win32_detach): Adjust to use resume_kind.
10533 (win32_wait): Add `options' argument.
10534 * spu-low.c (spu_resume): Adjust to use resume_kind.
10535 (spu_wait): Add `options' argument.
10537 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10539 Decouple target code from remote protocol.
10541 * target.h (enum target_waitkind): New.
10542 (struct target_waitstatus): New.
10543 (struct target_ops) <wait>: Return an unsigned long. Take a
10544 target_waitstatus pointer instead of a char pointer.
10545 (mywait): Likewise.
10546 * target.c (mywait): Change prototype to return an unsigned long.
10547 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10548 * server.h (thread_from_wait, old_thread_from_wait): Delete
10550 (prepare_resume_reply): Change prototype to take a
10552 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10553 (last_status, last_ptid): New.
10554 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10555 pid instead of a signal.
10556 (attach_inferior): Remove "status" and "signal" parameters.
10558 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10560 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10561 (handle_v_requests, myresume): Remove "status" and "signal"
10562 parameters. Adjust.
10563 (handle_status): New.
10564 (main): Delete local `status'. Adjust.
10565 * remote-utils.c: Include target.h.
10566 (prepare_resume_reply): Change prototype to take a
10567 target_waitstatus. Adjust.
10569 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10571 * spu-low.c (spu_wait): Adjust.
10572 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10574 (win32_wait): Adjust.
10576 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10578 * target.h (struct thread_resume): Delete leave_stopped member.
10579 (struct target_ops): Add a `n' argument to the `resume' callback.
10580 * server.c (start_inferior): Adjust.
10581 (handle_v_cont, myresume): Adjust.
10582 * linux-low.c (check_removed_breakpoint): Adjust to resume
10583 interface change, and to removed leave_stopped field.
10584 (resume_ptr): Delete.
10585 (struct thread_resume_array): New.
10586 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10587 resume interface change.
10588 (linux_continue_one_thread, linux_queue_one_thread)
10589 (resume_status_pending_p): Check if the resume field is NULL
10590 instead of checking the leave_stopped member.
10591 (linux_resume): Adjust to the target resume interface change.
10592 * spu-low.c (spu_resume): Adjust to the target resume interface
10594 * win32-low.c (win32_detach, win32_resume): Ditto.
10596 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10598 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10600 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10602 (linux_continue_one_thread): Only preserve the stepping flag if
10603 there's a pending breakpoint.
10605 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10607 * server.c (main): After the inferior having exited, call
10608 remote_close before exiting gdbserver.
10610 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10612 Fix size of FPSCR in Power 7 processors.
10613 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10614 (PPC_FEATURE_HAS_DFP): New #define.
10615 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10618 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10620 * server.c (handle_query) Whitespace and formatting.
10622 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10624 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10625 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10626 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10627 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10628 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10629 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10630 Makefile.in, configure.ac: Fix whitespace throughout.
10631 * configure: Regenerate.
10633 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10635 * inferiors.c (find_inferior): Make it safe for the callback
10636 function to delete the currently iterated inferior.
10638 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10640 * Makefile.in (linuw_low_h): Move higher.
10641 (thread-db.o): Depend on $(linux_low_h).
10643 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10645 Rename "process" to "lwp" throughout.
10647 * linux-low.c (all_processes): Rename to...
10648 (all_lwps): ... this.
10649 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10650 (add_process): Rename to ...
10651 (add_lwp): ... this. Adjust.
10652 (linux_create_inferior): Adjust.
10653 (linux_attach_lwp): Adjust.
10654 (linux_attach): Adjust.
10655 (linux_kill_one_process): Rename to ...
10656 (linux_kill_one_lwp): ... this. Adjust.
10657 (linux_kill): Adjust.
10658 (linux_detach_one_process): Rename to ...
10659 (linux_detach_one_lwp): ... this. Adjust.
10660 (linux_detach): Adjust.
10661 (check_removed_breakpoint): Adjust.
10662 (status_pending_p): Adjust.
10663 (linux_wait_for_process): Rename to ...
10664 (linux_wait_for_lwp): ... this. Adjust.
10665 (linux_wait_for_event): Adjust.
10666 (send_sigstop): Adjust.
10667 (wait_for_sigstop): Adjust.
10668 (stop_all_processes): Rename to ...
10669 (stop_all_lwps): ... this.
10670 (linux_resume_one_process): Rename to ...
10671 (linux_resume_one_lwp): ... this. Adjust.
10672 (linux_set_resume_request, linux_continue_one_thread)
10673 (linux_queue_one_thread, resume_status_pending_p)
10674 (usr_store_inferior_registers, regsets_store_inferior_registers)
10675 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10677 * linux-low.h (get_process): Rename to ...
10678 (get_lwp): ... this. Adjust.
10679 (get_thread_process): Rename to ...
10680 (get_thread_lwp): ... this. Adjust.
10681 (get_process_thread): Rename to ...
10682 (get_lwp_thread): ... this. Adjust.
10683 (struct process_info): Rename to ...
10684 (struct lwp_info): ... this.
10685 (all_processes): Rename to ...
10686 (all_lwps): ... this.
10687 * proc-service.c (ps_lgetregs): Adjust.
10688 * thread-db.c (thread_db_create_event, find_one_thread)
10689 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10691 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10693 * server.c (handle_query): Handle "qAttached".
10695 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10697 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10698 GPLv3, update license URL.
10700 2009-03-01 Doug Evans <dje@google.com>
10702 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10703 (server_h): Add gdb_signals.h.
10704 (signals.o): Update.
10705 * server.h (target_signal_from_host,target_signal_to_host_p)
10706 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10708 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10710 * remote-utils.c (getpkt): Also generate remote-debug
10711 information if noack_mode is set.
10713 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10715 * server.c (handle_query): Report qXfer:siginfo:read and
10716 qXfer:siginfo:write as supported and handle them.
10717 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10718 * linux-low.c (linux_xfer_siginfo): New.
10719 (linux_target_ops): Set it.
10721 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10723 * server.c (gdbserver_usage): Mention --remote-debug.
10724 (main): Accept '--remote-debug' switch.
10726 2009-01-18 Doug Evans <dje@google.com>
10728 * regcache.c (new_register_cache): No need to check result of xcalloc.
10729 * server.c (handle_search_memory): Back out calls to xmalloc,
10730 result is checked and error is returned to user upon failure.
10731 (handle_query): Ditto. Add more checks for result of malloc.
10732 (handle_v_cont): Check result of malloc, report error back to
10734 (handle_v_run): Ditto. Call freeargv.
10735 * server.h (freeargv): Declare.
10736 * utils.c (freeargv): New fn.
10738 2009-01-15 Doug Evans <dje@google.com>
10740 * gdbreplay.c (perror_with_name): Make arg const char *.
10741 * server.h (target_signal_to_name): Make return type const char *.
10742 * thread-db.c (thread_db_err_str): Make return type const char *.
10743 * utils.c (perror_with_name): Make arg const char *.
10745 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10747 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10748 when handling a EXIT_PROCESS_DEBUG_EVENT.
10750 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10752 * gdbreplay.c (gdbreplay_version): Update copyright year.
10753 * server.c (gdbserver_version): Likewise.
10755 2009-01-05 Doug Evans <dje@google.com>
10757 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10758 (handle_extended_wait): Improve comment.
10760 2008-12-13 Doug Evans <dje@google.com>
10762 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10763 * server.h (ATTR_MALLOC): New macro.
10764 (xmalloc,xcalloc,xstrdup): Declare.
10765 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10766 * inferiors.c: Ditto.
10767 * linux-low.c: Ditto.
10768 * mem-break.c: Ditto.
10769 * regcache.c: Ditto.
10770 * remote-utils.c: Ditto.
10773 * win32-low.c: Ditto.
10775 2008-12-12 Doug Evans <dje@google.com>
10777 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10778 in debugging printf.
10780 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10782 2008-12-09 Doug Evans <dje@google.com>
10784 * linux-low.h (struct process_info): Delete member tid, unused.
10785 * thread-db.c (find_one_thread): Update.
10786 (maybe_attach_thread): Update.
10788 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10790 * target.h (struct target_ops): Add qxfer_osdata member.
10791 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10793 (linux_qxfer_osdata): New functions.
10794 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10796 * server.c (handle_query): Handle "qXfer:osdata:read:".
10797 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10798 (buffer_xml_printf): New functions.
10799 * server.h (struct buffer): New.
10800 (buffer_grow_str, buffer_grow_str0): New macros.
10801 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10802 (buffer_xml_printf): Declare.
10804 2008-11-24 Doug Evans <dje@google.com>
10806 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10808 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10810 * server.c (handle_v_run): Always use the supplied argument list.
10812 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10814 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10815 (xtensa_regmap_table): Add entry for scompare1.
10817 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10819 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10820 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10821 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10822 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10823 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10824 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10825 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10826 XML target descriptions.
10827 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10828 when inferior is running on an ISA 2.05 or later processor. Add
10829 special case to return offset for full 64-bit slot of FPSCR when
10832 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10834 * Makefile.in (SFILES, clean): Added sparc64 files.
10835 (reg-sparc64.o, reg-sparc64.c): New.
10836 * configure.srv (sparc*-*-linux*): New configuration.
10837 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10838 syscall arguments for SPARC.
10839 (regsets_store_inferior_registers): Likewise.
10840 * linux-sparc-low.c: New file.
10842 2008-10-21 Doug Evans <dje@google.com>
10844 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10845 (READLINE_DIR,READLINE_DEP): Delete.
10846 (INTERNAL_CFLAGS): Update.
10847 (LINTFLAGS): Update.
10849 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10851 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10852 whole argv from the last run, not just argv[0].
10854 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10856 * regcache.c (new_register_cache): Return NULL if the register
10857 cache size isn't known yet.
10858 (free_register_cache): Avoid dereferencing a NULL regcache.
10860 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10862 * configure.srv: Merge MIPS and MIPS64.
10864 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10866 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10868 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10870 * Makefile.in: Add required vsx dependencies.
10872 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10873 Declare init_registers_powerpc_vsx32l.
10874 Declare init_registers_powerpc_vsx64l.
10875 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10876 (ppc_arch_setup): Check for VSX in hwcap.
10877 (ppc_fill_vsxregset): New function.
10878 (ppc_store_vsxregset): New function.
10879 Add new VSX entry in regset_info target_regsets.
10881 * configure.srv: Add new VSX dependencies.
10883 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10885 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10886 (remote_open): Set or clear transport_is_reliable.
10887 (putpkt_binary): Don't expect acks in noack mode.
10888 (getpkt): Don't send ack/nac in noack mode.
10889 * server.c (handle_general_set): Handle QStartNoAckMode.
10890 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10892 (main): Reset noack_mode on every connection.
10893 * server.h (noack_mode): Declare.
10895 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10897 * Makefile.in (GDBREPLAY_OBS): New variable.
10898 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10900 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10901 Daniel Jacobowitz <dan@codesourcery.com>
10903 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10904 (usr_store_inferior_registers): Likewise.
10905 (regsets_store_inferior_registers): Likewise.
10907 2008-07-31 Rolf Jansen <rj@surtec.com>
10908 Pedro Alves <pedro@codesourcery.com>
10910 * configure.ac: Check for memmem declaration.
10911 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10912 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10913 (disable_packet_qfThreadInfo): Unconditionally compile.
10914 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10915 * configure, config.in: Regenerate.
10917 2008-07-28 Doug Kwan <dougkwan@google.com>
10919 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10920 (linux_write_memory): Remove declaration of errno.
10922 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10924 * linux-low.c (handle_extended_wait): Do not use "status"
10925 variable uninitialized.
10927 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10929 * server.c (handle_v_attach): Inhibit reporting dll changes.
10931 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10933 * remote-utils.c (prepare_resume_reply): If requested, don't
10934 output "thread:TID" in the T stop reply.
10936 * server.c (disable_packet_vCont, disable_packet_Tthread)
10937 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10938 (handle_query): If requested, disable support for qC, qfThreadInfo
10940 (handle_v_requests): If requested, disable support for vCont.
10941 (gdbserver_show_disableable): New.
10942 (main): Handle --disable-packet and --disable-packet=LIST.
10944 * server.h (disable_packet_vCont, disable_packet_Tthread)
10945 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10947 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10949 * server.c (gdbserver_usage): Mention --version.
10951 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10953 * Makefile.in (gdbreplay.o): New rule.
10955 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10957 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10958 message, not gdbserver.
10960 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10961 Nathan Sidwell <nathan@codesourcery.com>
10962 Joseph Myers <joseph@codesourcery.com>
10964 * acinclude.m4: Include ../../config/acx.m4.
10965 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10966 * configure, config.in: Regenerate.
10967 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10968 * server.c (gdbserver_version): Print PKGVERSION.
10969 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10970 (main): Adjust gdbserver_usage calls.
10971 * gdbreplay.c (version, host_name): Add declarations.
10972 (gdbreplay_version, gdbreplay_usage): New.
10973 (main): Accept --version and --help options.
10975 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10977 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10978 (arm_breakpoint_at): Handle Thumb.
10979 (the_low_target): Add comment.
10981 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10983 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10985 2008-05-09 Doug Evans <dje@google.com>
10987 * server.h (decode_search_memory_packet): Declare.
10988 * remote-utils.c (decode_search_memory_packet): New fn.
10989 * server.c (handle_search_memory_1): New fn.
10990 (handle_search_memory): New fn.
10991 (handle_query): Process qSearch:memory packets.
10993 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10995 * regcache.c (registers_length): Remove.
10996 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10997 full register packet.
10998 * regcache.h (registers_length): Remove prototype.
10999 * server.h (PBUFSIZ): Define to 16384.
11001 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11003 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11004 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11005 powerpc-64l.o, and powerpc-altivec64l.o.
11006 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11007 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11008 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11009 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11010 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11013 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11014 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11015 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11016 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11017 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11018 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11019 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11020 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11021 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11022 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11025 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11026 (init_registers_powerpc_32l): ... this new prototype.
11027 (init_registers_powerpc_32): Remove, replace by ...
11028 (init_registers_powerpc_altivec32l): ... this new prototype.
11029 (init_registers_powerpc_e500): Remove, replace by ...
11030 (init_registers_powerpc_e500l): ... this new prototype.
11031 (init_registers_ppc64): Remove, replace by ...
11032 (init_registers_powerpc_64l): ... this new prototype.
11033 (init_registers_powerpc_64): Remove, replace by ...
11034 (init_registers_powerpc_altivec64l): ... this new prototype.
11035 (ppc_num_regs): Set to 73.
11036 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11037 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11038 (ppc_cannot_store_register): Handle orig_r3 and trap.
11039 (ppc_arch_setup): Update init_registers_... calls.
11040 (ppc_fill_gregset): Handle orig_r3 and trap.
11042 * inferiors.c (clear_inferiors): Reset current_inferior.
11044 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11046 * acinclude.m4: Add override.m4.
11047 * configure: Regenerate.
11049 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11051 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11052 initial call to init_register_ppc64.
11054 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11056 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11057 single powerpc*-*-linux* case.
11058 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11060 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11062 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11063 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11065 * linux-ppc-low.c: Include <elf.h>.
11066 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11067 (ppc_hwcap): New global variable.
11068 (ppc_regmap): Remove __SPE__ #ifdef sections.
11069 (ppc_regmap_e500): New global variable.
11070 (ppc_cannot_store_register): Update __SPE__ special case.
11071 (ppc_get_hwcap): New function.
11072 (ppc_arch_setup): Use it to determine whether inferior supports
11073 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11074 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11075 Do not access registers if target does not support AltiVec.
11076 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11077 Do not access registers if target does not support SPE.
11078 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11080 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11082 * linux-low.c (disabled_regsets, num_regsets): New.
11083 (use_regsets_p): Delete.
11084 (linux_wait_for_process): Clear disabled_regsets.
11085 (regsets_fetch_inferior_registers): Check and set it.
11086 (regsets_store_inferior_registers): Likewise.
11087 (linux_fetch_registers, linux_store_registers): Do not use
11089 (initialize_low): Allocate disabled_regsets.
11091 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11093 * Makefile.in (LIBOBJS): New.
11094 (OBS): Use LIBOBJS.
11095 (memmem.o): New rule.
11096 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11097 * configure: Regenerated.
11099 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11101 * server.c (handle_query): Never return "unsupported" for
11102 qXfer:features:read queries.
11104 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11106 * server.c (get_features_xml): Fix inverted condition.
11107 (handle_query): Always support qXfer:feature:read.
11109 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11111 * server.c (wrapper_argv): New.
11112 (start_inferior): Handle wrapper_argv. If set, expect an extra
11114 (gdbserver_usage): Document --wrapper.
11115 (main): Parse --wrapper.
11117 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11119 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11120 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11121 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11122 (ppc_set_pc): Likewise.
11123 (ppc_arch_setup): New function.
11124 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11125 of collect_register.
11126 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11128 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11130 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11131 instead of linux-ppc64-low.o.
11132 * linux-ppc64-low.c: Remove file.
11133 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11134 (linux-ppc64-low.o): Remove rule.
11136 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11137 (init_registers_powerpc_64): Likewise.
11138 (ppc_regmap): Conditionally define depending on __powerpc64__.
11139 (ppc_cannot_store_register): Do not special-case "fpscr" when
11140 compiled on __powerpc64__.
11141 (ppc_collect_ptrace_register): New function.
11142 (ppc_supply_ptrace_register): New function.
11143 (ppc_breakpoint): Change type to "unsigned int".
11144 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11145 (the_low_target): Conditionally provide initializers for the
11146 arch_setup member depending on __powerpc64__. Install
11147 collect_ptrace_register and supply_ptrace_register members.
11149 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11151 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11152 * server.c (gdbserver_xmltarget): Define.
11153 (get_features_xml): Use it to replace "target.xml" and arch_string.
11155 * configure.srv: Remove srv_xmltarget. Add XML files that were
11156 mentioned there to srv_xmlfiles instead. Remove conditional tests
11157 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11158 srv_xmlfiles and srv_regobj to include all possible choices.
11159 * configure.ac (srv_xmltarget): Remove.
11160 (srv_xmlfiles): Do not add "target.xml".
11161 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11162 checks for supplementary target information.
11163 * configure: Regenerate.
11164 * Makefile.in (XML_TARGET): Remove.
11165 (target.xml): Remove rule.
11166 (clean): Do not clean up target.xml.
11167 (.PRECIOUS): Do not mention target.xml.
11169 * target.h (struct target_ops): Remove arch_string member.
11170 * linux-low.c (linux_arch_string): Remove.
11171 (linux_target_ops): Remove arch_string initializer.
11172 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11173 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11174 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11175 * spu-low.c (spu_arch_string): Remove.
11176 (spu_target_ops): Remove arch_string initializer.
11177 * win32-low.c (win32_arch_string): Remove.
11178 (win32_target_ops): Remove arch_string initializer.
11179 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11180 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11181 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11183 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11185 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11186 by collect_ptrace_register and supply_ptrace_register hooks.
11187 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11188 instead of checking for the_low_target.left_pad_xfer.
11189 (usr_store_inferior_registers): Use collect_ptrace_register callback
11190 instead of checking for the_low_target.left_pad_xfer.
11192 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11193 (s390_supply_ptrace_register): Likewise.
11194 (s390_fill_gregset): Call s390_collect_ptrace_register.
11195 (the_low_target): Update.
11197 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11198 (ppc_supply_ptrace_register): Likewise.
11199 (the_low_target): Update.
11201 * linux-i386-low.c (the_low_target): Update.
11202 * linux-x86-64-low.c (the_low_target): Update.
11204 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11206 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11207 reg-s390.o and reg-s390x.o.
11209 * linux-low.c (new_inferior): New global variable.
11210 (linux_create_inferior, linux_attach): Set it.
11211 (linux_wait_for_process): Call the_low_target.arch_setup after the
11212 target has stopped for the first time.
11213 (initialize_low): Do not call the_low_target.arch_setup.
11215 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11216 (s390_set_pc): Likewise.
11217 (s390_arch_setup): New function.
11218 (the_low_target): Use s390_arch_setup as arch_setup routine.
11220 * regcache.c (realloc_register_cache): New function.
11221 (set_register_cache): Call it for each existing regcache.
11223 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11225 * server.h (init_registers): Remove prototype.
11227 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11228 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11229 instead of init_registers ().
11230 * linux-arm-low.c (init_registers_arm): Add prototype.
11231 (init_registers_arm_with_iwmmxt): Likewise.
11232 (the_low_target): Add initializer for arch_setup field.
11233 * linux-cris-low.c (init_registers_cris): Add prototype.
11234 (the_low_target): Add initializer for arch_setup field.
11235 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11236 (the_low_target): Add initializer for arch_setup field.
11237 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11238 (the_low_target): Add initializer for arch_setup field.
11239 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11240 (the_low_target): Add initializer for arch_setup field.
11241 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11242 (the_low_target): Add initializer for arch_setup field.
11243 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11244 (the_low_target): Add initializer for arch_setup field.
11245 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11246 (init_registers_mips64_linux): Likewise.
11247 (the_low_target): Add initializer for arch_setup field.
11248 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11249 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11250 (the_low_target): Add initializer for arch_setup field.
11251 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11252 (init_registers_powerpc_64): Likewise.
11253 (the_low_target): Add initializer for arch_setup field.
11254 * linux-s390-low.c (init_registers_s390): Add prototype.
11255 (init_registers_s390x): Likewise.
11256 (the_low_target): Add initializer for arch_setup field.
11257 * linux-sh-low.c (init_registers_sh): Add prototype.
11258 (the_low_target): Add initializer for arch_setup field.
11259 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11260 (the_low_target): Add initializer for arch_setup field.
11261 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11262 (the_low_target): Add initializer for arch_setup field.
11264 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11265 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11266 instead of init_registers ().
11267 * win32-arm-low.c (init_registers_arm): Add prototype.
11268 (the_low_target): Add initializer for arch_setup field.
11269 * win32-i386-low.c (init_registers_i386): Add prototype.
11270 (the_low_target): Add initializer for arch_setup field.
11272 * spu-low.c (init_registers_spu): Add prototype.
11273 (initialize_low): Call initialie_registers_spu () instead of
11274 initialize_registers ().
11276 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11278 * server.c (handle_v_requests): When handling the vRun and vAttach
11279 packets, if already debugging a process, don't kill it. Return an
11282 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11284 * server.c (handle_query): Correct length check.
11286 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11288 * win32-low.c (do_initial_child_stuff): Add process handle
11289 parameter. Set current_process_handle and current_process_id from the
11290 parameters. Clear globals.
11291 (win32_create_inferior): Don't set current_process_handle and
11292 current_process_id here. Instead pass them on the call to
11293 do_initial_child_stuff.
11294 (win32_attach): Likewise.
11295 (win32_clear_inferiors): New.
11296 (win32_kill): Don't close the current process handle or the
11297 current thread handle here. Instead call win32_clear_inferiors.
11298 (win32_detach): Don't open a new handle to the process. Call
11299 win32_clear_inferiors.
11300 (win32_join): Don't rely on current_process_handle; open a new
11301 handle using the process id.
11302 (win32_wait): Call win32_clear_inferiors when the inferior process
11305 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11307 * server.c (monitor_show_help): Add "exit".
11309 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11311 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11312 (clean): Add reg-xtensa.c.
11313 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11314 * configure.srv (xtensa*-*-linux*) New target.
11315 * linux-xtensa-low.c: New.
11316 * xtensa-xtregs.c: New.
11318 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11320 * hostio.c: Don't include errno.h.
11321 (errno_to_fileio_errno): Move to hostio-errno.
11322 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11323 error number outputting to the target->hostio_last_error callback.
11324 (hostio_packet_error): Use FILEIO_EINVAL directly.
11325 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11326 calls to hostio_error.
11327 * hostio-errno.c: New.
11328 * server.h (hostio_last_error_from_errno): Declare.
11329 * target.h (target_ops): Add hostio_last_error member.
11330 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11331 as hostio_last_error handler.
11332 * spu-low.c (spu_target_ops): Likewise.
11333 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11334 (wince_hostio_last_error): New functions.
11335 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11336 as hostio_last_error handler.
11337 (win32_target_ops) [!_WIN32_WCE]: Register
11338 hostio_last_error_from_errno as hostio_last_error handler.
11339 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11340 (hostio-errno.o): New rule.
11341 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11342 * configure.srv (srv_hostio_err_objs): New variable. Default to
11344 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11345 * configure: Regenerate.
11347 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11349 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11350 (linux_kill, linux_detach): Clean up the process list.
11351 * remote-utils.c (remote_open): Improve port number parsing.
11352 (putpkt_binary, input_interrupt): Only send interrupts if the target
11354 * server.c (extended_protocol): Make static.
11355 (attached): Define earlier.
11356 (exit_requested, response_needed, program_argv): New variables.
11357 (target_running): New.
11358 (start_inferior): Clear attached here.
11359 (attach_inferior): Set attached here.
11360 (require_running): Define.
11361 (handle_query): Use require_running and target_running. Implement
11363 (handle_v_attach, handle_v_run): New.
11364 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11365 (gdbserver_usage): Update.
11366 (main): Redo argument parsing. Handle --debug and --multi. Handle
11367 --attach along with other options or after the port. Save
11368 program_argv. Support no initial program. Resynchronize
11369 communication with GDB after an error. Handle "monitor exit".
11370 Use require_running and target_running. Always allow the extended
11371 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11372 restart in extended mode.
11373 * README: Refer to the GDB manual. Update --attach usage.
11375 2007-12-20 Andreas Schwab <schwab@suse.de>
11377 * linux-low.c (STACK_SIZE): Define.
11378 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11379 (linux_test_for_tracefork): Likewise.
11381 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11383 * linux-low.c (linux_wait_for_event): Update messages. Do not
11384 reinsert auto-delete breakpoints.
11385 * mem-break.c (struct breakpoint): Change return type of handler to
11387 (set_breakpoint_at): Update handler type.
11388 (reinsert_breakpoint_handler): Return 1 instead of calling
11390 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11392 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11393 * mem-break.h (set_breakpoint_at): Update handler type.
11394 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11395 * win32-low.c (auto_delete_breakpoint): New.
11396 (get_child_debug_event): Use it.
11398 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11400 * configure.ac: Check for pread and pwrite.
11401 * hostio.c (handle_pread): Fall back to lseek and read.
11402 (handle_pwrite): Fall back to lseek and write.
11403 * config.in, configure: Regenerated.
11405 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11407 * server.c (myresume): Add own_buf argument.
11408 (main): Update calls.
11410 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11412 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11413 * remote-utils.c (remote_open): Do not call disable_async_io.
11414 (block_async_io): Delete.
11415 (unblock_async_io): Make static.
11416 (initialize_async_io): New.
11417 * server.c (handle_v_cont): Handle async I/O here.
11418 (myresume): Likewise. Move other common resume tasks here...
11419 (main): ... from here. Call initialize_async_io. Disable async
11420 I/O before the main loop.
11421 * server.h (initialize_async_io): Declare.
11422 (block_async_io, unblock_async_io): Delete prototypes.
11423 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11425 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11427 * remote-utils.c (readchar): Allow binary data in received messages.
11429 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11431 * win32-low.c (attaching): New global.
11432 (win32_create_inferior): Clear the `attaching' global.
11433 (win32_attach): Set the `attaching' global.
11434 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11435 attaching. Only set a breakpoint at the entry point if not
11438 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11440 * server.c (main): Don't report dll events on the initial
11441 connection on attaches.
11443 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11445 * server.c (main): Relax numerical bases supported for the pid of
11446 the --attach command line argument.
11448 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11450 * win32-low.c (win32_attach): Call OpenProcess before
11451 DebugActiveProcess, not after. Add last error output to error
11454 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11456 * win32-low.c (win32_get_thread_context)
11457 (win32_set_thread_context): New functions.
11458 (thread_rec): Use win32_get_thread_context.
11459 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11460 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11463 2007-12-03 Leo Zayas
11464 Pedro Alves <pedro_alves@portugalmail.pt>
11466 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11468 (child_add_thread): Minor cleanup.
11469 (child_continue): Resume artificially suspended threads before
11470 calling ContinueDebugEvent.
11471 (suspend_one_thread): New.
11472 (fake_breakpoint_event): New.
11473 (get_child_debug_event): Change return type to int. Check here if
11474 gdb sent an interrupt request. If a soft interrupt was requested,
11475 fake a breakpoint event. Return 0 if there is no event to handle,
11477 (win32_wait): Don't check here if gdb sent an interrupt request.
11478 Ensure there is a valid event to handle.
11479 (win32_request_interrupt): Add soft interruption method as last
11482 2007-12-03 Leo Zayas
11483 Pedro Alves <pedro_alves@portugalmail.pt>
11485 * win32-low.h (win32_thread_info): Add descriptions to the
11486 structure members. Replace `suspend_count' counter by a
11488 * win32-low.c (thread_rec): Update condition of when to get the
11489 context from the inferior. Rely on ContextFlags being set if it
11490 has already been retrieved. Only suspend the inferior thread if
11491 we haven't already. Warn if that fails.
11492 (continue_one_thread): s/suspend_count/suspended/. Only call
11493 ResumeThread once. Warn if that fails.
11495 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11497 * win32-low.c (win32_wait): Don't read from the inferior when it
11498 has already exited.
11500 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11502 * Makefile.in (win32_low_h): New variable.
11503 (win32-low.o): Add dependency on $(win32_low_h).
11504 (win32-arm-low.o, win32-i386-low.o): New rules.
11506 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11508 * hostio.c: Correct copyright year.
11510 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11512 * Makefile.in (OBS): Add hostio.o.
11513 (hostio.o): New rule.
11514 * server.h (handle_vFile): Declare.
11515 * hostio.c: New file.
11516 * server.c (handle_v_requests): Take packet_len and new_packet_len
11517 for binary packets. Call handle_vFile.
11518 (main): Update call to handle_v_requests.
11520 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11522 * linux-low.c: Include <sched.h>.
11524 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11526 * linux-low.c (linux_tracefork_grandchild): New.
11527 (linux_tracefork_child): Use clone.
11528 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11530 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11532 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11534 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11536 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11538 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11540 * inferiors.c (change_inferior_id): Delete.
11541 (add_pid_to_list, pull_pid_from_list): New.
11542 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11543 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11544 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11545 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11546 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11547 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11548 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11549 (using_threads): Always set to 1.
11550 (handle_extended_wait): New.
11551 (add_process): Do not set TID.
11552 (linux_create_inferior): Set must_set_ptrace_flags.
11553 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11554 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11555 (linux_thread_alive): Rename TID argument to LWPID.
11556 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11557 (linux_wait_for_event): Do not use TID or check using_threads. Update
11558 call to dead_thread_notify. Call handle_extended_wait.
11559 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11560 (send_sigstop): Delete sigstop_sent.
11561 (wait_for_sigstop): Avoid TID.
11562 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11563 (linux_test_for_tracefork): New.
11564 (linux_lookup_signals): Use thread_db_active and
11565 linux_supports_tracefork_flag.
11566 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11567 * linux-low.h (get_process_thread): Avoid TID.
11568 (struct process_ifo): Move thread_known and tid to the end. Remove
11570 (linux_attach_lwp, thread_db_init): Update prototypes.
11571 * server.h (change_inferior_id): Delete prototype.
11572 (add_pid_to_list, pull_pid_from_list): New prototypes.
11573 * thread-db.c (thread_db_use_events): New.
11574 (find_first_thread): Rename to...
11575 (find_one_thread): ...this. Update callers and messages. Do not
11576 call fatal. Check thread_db_use_events. Do not call
11577 change_inferior_id or new_thread_notify.
11578 (maybe_attach_thread): Update. Do not call new_thread_notify.
11579 (thread_db_init): Set thread_db_use_events. Check use_events.
11580 * utils.c (fatal, warning): Correct message prefix.
11582 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11584 * Makefile.in (clean): Remove new files.
11585 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11586 (powerpc-64.o, powerpc-64.c): New rules.
11587 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11588 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11590 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11592 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11593 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11594 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11595 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11596 (target_regsets): Add AltiVec and SPE register sets.
11597 * configure.ac: Check for AltiVec and SPE.
11598 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11599 (ppc_fill_vrregset, ppc_store_vrregset): New.
11600 (target_regsets): Add AltiVec register set.
11601 * configure: Regenerated.
11603 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11605 * linux-low.c (O_LARGEFILE): Define.
11606 (linux_read_memory): Use /proc/PID/mem.
11607 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11608 * configure, config.in: Regenerated.
11610 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11612 * linux-low.c (linux_wait_for_event): Do not pass signals while
11615 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11617 * win32-low.c (create_process): New.
11618 (win32_create_inferior): Use create_process instead of
11619 CreateProcess. If create_process failed retry appending an ".exe"
11620 suffix. Store the GetLastError result immediatelly after
11621 create_process calls and use it on the call to error.
11623 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11625 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11627 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11629 * configure.ac: Switch license to GPLv3.
11631 2007-08-01 Michael Snyder <msnyder@access-company.com>
11633 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11635 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11637 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11639 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11640 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11641 CloseToolhelp32Snapshot.
11642 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11643 CloseToolhelp32Snapshot.
11645 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11647 * server.c (main): Check for inferior exit before main loop.
11649 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11651 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11652 instead of on tmp_desc.
11654 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11655 Daniel Jacobowitz <dan@codesourcery.com>
11657 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11658 (add_thread): Minor cleanups.
11659 (clear_inferiors): Move lower in the file. Clear the DLL
11661 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11662 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11663 (xml_escape_text): New.
11664 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11666 (handle_v_cont): Report errors.
11667 (gdbserver_version): Update.
11668 (main): Correct size of own_buf. Do not report initial DLL events.
11669 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11670 (unloaded_dll, xml_escape_text): New.
11671 * win32-low.c (enum target_waitkind): Update comments.
11672 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11673 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11674 (win32_EnumProcessModules, win32_GetModuleInformation)
11675 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11676 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11677 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11678 (win32_Module32First, win32_Module32Next, load_toolhelp)
11679 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11680 (get_child_debug_event): Handle DLL events.
11681 (win32_wait): Likewise.
11683 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11685 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11686 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11688 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11690 * win32-low.c (handle_output_debug_string): Ignore event if not
11693 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11695 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11697 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11699 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11701 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11703 * inferiors.c (change_inferior_id): Add comment.
11704 * linux-low.c (check_removed_breakpoint): Add an early
11705 prototype. Improve debug output.
11706 (linux_attach): Doc update.
11707 (linux_detach_one_process, linux_detach): Clean up before releasing
11709 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11710 * linux-low.h (struct process_info): Doc improvement.
11711 * mem-break.c (delete_all_breakpoints): New.
11712 * mem-break.h (delete_all_breakpoints): New prototype.
11713 * thread-db.c (find_first_thread): New.
11714 (thread_db_create_event): Call it instead of
11715 thread_db_find_new_threads. Clean up unused variables.
11716 (maybe_attach_thread): Remove first thread handling.
11717 (thread_db_find_new_threads): Use find_first_thread.
11718 (thread_db_get_tls_address): Likewise.
11720 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11722 * thread-db.c (thread_db_find_new_threads): Add prototype.
11723 (thread_db_create_event): Check for the main thread before adding
11725 (maybe_attach_thread): Only enable event reporting if TID == 0.
11726 (thread_db_get_tls_address): Check for new threads.
11728 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11730 * linux-low.c (linux_create_inferior): Try execv before execvp.
11731 * spu-low.c (spu_create_inferior): Likewise.
11733 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11735 * linux-low.c (linux_create_inferior): Change execv to execvp.
11736 * spu-low.c (spu_create_inferior): Likewies.
11738 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11740 * Makefile.in (clean): Clean new files instead of deleted ones.
11741 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11742 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11744 * configure.srv: Specify XML files and new regformats for MIPS and
11746 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11747 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11748 an entry for the restart register.
11749 (mips_cannot_fetch_register, mips_cannot_store_register)
11750 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11751 register names to match the XML descriptions.
11752 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11753 restart register instead of $0.
11755 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11756 Markus Deuling <deuling@de.ibm.com>
11758 * remote-utils.c (decode_xfer_write): New function.
11759 * server.h (decode_xfer_write): Add prototype.
11760 * server.c (handle_query): Add PACKET_LEN argument. Support
11761 qXfer:spu:read and qXfer:spu:write packets.
11762 (main): Pass packet_len to handle_query.
11763 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11764 * target.h (target_ops): Add qxfer_spu.
11766 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11768 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11769 accessing non-seekable spufs files.
11771 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11773 * server.c (handle_query): Add reply for qC packet.
11775 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11776 Leo Zayas <lerele@champenstudios@com>
11778 * server.h (check_remote_input_interrupt_request): New function.
11779 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11780 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11781 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11782 (check_remote_input_interrupt_request): New function.
11783 * server.h (check_remote_input_interrupt_request): Declare.
11784 * win32-low.c (winapi_DebugBreakProcess,
11785 winapi_GenerateConsoleCtrlEvent): New typedefs.
11786 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11788 (win32_wait): Check for remote interrupt request
11789 with check_remote_input_interrupt_request.
11790 (win32_request_interrupt): New function.
11791 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11793 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11795 * win32-low.c (debug_registers_changed,
11796 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11797 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11798 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11799 (thread_rec): Get context using the low target.
11800 (child_add_thread): Call thread_added on the low target,
11801 which does the same thing.
11803 (do_initial_child_stuff): Remove debug registers references.
11804 Set context using the low target. Resume threads after
11805 setting the contexts.
11806 (child_continue): Remove dead variable. Remove debug
11807 registers references.
11808 (child_fetch_inferior_registers): Go through the low target.
11809 (do_child_store_inferior_registers): Remove.
11810 (child_store_inferior_registers): Go through the low target.
11811 (win32_resume): Remove debug registers references.
11812 Set context using the low target.
11813 (handle_exception): Change return type to void. Don't record
11814 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11815 first chance exception.
11816 (get_child_debug_event): Change return type to void. Remove
11817 goto loop. Always return after waiting for debug event.
11818 (win32_wait): Convert to switch statement. Handle spurious
11821 * win32-i386-low.c (debug_registers_changed,
11822 debug_registers_used): New.
11823 (initial_stuff): Rename to ...
11824 (i386_initial_stuff): ... this. Clear debug registers
11826 (store_debug_registers): Delete.
11827 (i386_get_thread_context): New.
11828 (load_debug_registers): Delete.
11829 (i386_set_thread_context): New.
11830 (i386_thread_added): New.
11831 (single_step): Rename to ...
11832 (i386_single_step): ... this.
11833 (do_fetch_inferior_registers): Rename to ...
11834 (i386_fetch_inferior_register): ... this.
11835 (i386_store_inferior_register): New.
11836 (the_low_target): Adapt to new interface.
11838 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11839 (arm_get_thread_context): New.
11840 (arm_set_thread_context): New.
11842 (do_fetch_inferior_registers): Rename to ...
11843 (arm_fetch_inferior_register): ... this.
11844 (arm_store_inferior_register): New.
11845 (arm_wince_breakpoint): Reimplement as unsigned long.
11846 (arm_wince_breakpoint_len): Define.
11847 (the_low_target): Adapt to new interface.
11849 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11850 load_debug_registers. Add get_thread_context, set_thread_context,
11851 thread_added and store_inferior_register. Rename
11852 fetch_inferior_registers to fetch_inferior_register.
11853 (regptr): Remove declaration.
11855 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11857 * linux-low.c (linux_detach): Change return type to int. Return 0.
11858 * spu-low.c (spu_detach): Likewise.
11860 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11862 * target.h (target_ops): Change return type of detach to int.
11864 (join_inferior): New.
11865 * server.c (main): Don't skip detach support on mingw32.
11866 If the inferior doesn't support detaching return error.
11867 Call join_inferior instead of using waitpid.
11868 * linux-low.c (linux_join): New.
11869 (linux_target_op): Add linux_join.
11870 * spu-low.c (spu_join): New.
11871 (spu_target_ops): Add spu_join.
11872 * win32-low.c (win32_detach): Adapt to new interface.
11873 Reopen current_process_handle before detaching. Issue a child
11874 resume before detaching.
11876 (win32_target_op): Add win32_join.
11878 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11880 * win32-low.c (win32-attach): Fix return value.
11881 * target.h (target_ops): Describe ATTACH return values.
11883 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11885 * win32-low.c (GETPROCADDRESS): Define.
11886 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11887 (winapi_DebugSetProcessKillOnExit): Likewise.
11888 (win32_create_inferior): Force usage of ansi CreateProcessA.
11889 (win32_attach): Use GETPROCADDRESS.
11890 (win32_detach): Likewise.
11892 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11894 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11896 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11898 * win32-low.c: Commit leftover changes from 2007-03-29.
11900 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11902 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11903 fields short instead of int. Add explicit padding.
11904 (i387_cache_to_fsave): Remove unnecessary casts.
11905 (i387_fsave_to_cache): Doc fix.
11906 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11908 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11910 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11911 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11913 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11915 * configure.srv (arm*-*-mingw32ce*): Move near the other
11918 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11920 * configure.ac: Add errno checking.
11921 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11922 sys/file.h and malloc.h.
11923 (AC_CHECK_DECLS): Add perror.
11924 (srv_mingwce): Handle.
11925 * configure.srv (i[34567]86-*-cygwin*): Add
11926 win32-i386-low.o to srv_tgtobj.
11927 (i[34567]86-*-mingw*): Likewise.
11928 (arm*-*-mingw32ce*): Add case.
11929 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11930 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11931 [__MINGW32CE__] (strerror): New function.
11932 [__MINGW32CE__] (errno): Define to GetLastError.
11933 [__MINGW32CE__] (COUNTOF): New macro.
11934 (remote_open): Remove extra close call.
11935 * mem-break.c (delete_breakpoint_at): New function.
11936 * mem-break.h (delete_breakpoint_at): Declare.
11937 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11938 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11939 [USE_WIN32API] (read, write): Add char* casts.
11940 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11941 * server.h: Include wincecompat.h on Windows CE.
11942 [HAVE_ERRNO_H]: Check.
11943 (perror): Declare if not declared.
11944 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11945 (perror_with_name): Remove errno declaration.
11946 * wincecompat.h: New.
11947 * wincecompat.c: New.
11948 * win32-low.h: New.
11949 * win32-arm-low.c: New.
11950 * win32-i386-low.c: New.
11951 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11952 (OUTMSG2): Make it safe.
11954 (COUNTOF): New macro.
11955 (NUM_REGS): Get it from the low target.
11956 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11957 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11958 (thread_rec): Let low target handle debug registers.
11959 (child_add_thread): Likewise.
11960 (child_init_thread_list): Likewise.
11961 (continue_one_thread): Likewise.
11963 (do_child_fetch_inferior_registers): Move to ...
11964 * win32-i386-low.c: ... here, and rename to ...
11965 (do_fetch_inferior_registers): ... this.
11966 * win32-low.c (child_fetch_inferior_registers):
11967 Go through the low target.
11968 (do_child_store_inferior_registers): Use regptr.
11969 (strwinerror): New function.
11970 (win32_create_inferior): Handle Windows CE.
11971 Use strwinerror instead of strerror on Windows error
11972 codes. Add program to the error output.
11973 Don't close the main thread handle on Windows CE.
11974 (win32_attach): Use coredll.dll on Windows CE.
11975 (win32_kill): Close current process and current
11977 (win32_detach): Use coredll.dll on Windows CE.
11978 (win32_resume): Let low target handle debug registers, and
11980 (handle_exception): Add/Remove initial breakpoint. Avoid
11981 non-existant WSTOPSIG on Windows CE.
11982 (win32_read_inferior_memory): Cast to remove warning.
11983 (win32_arch_string): Go through the low target.
11984 (initialize_low): Call set_breakpoint_data with the low
11985 target's breakpoint.
11986 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11987 FOP_REGNUM, mappings): Move to ...
11988 * win32-i386-low.c: ... here.
11989 * win32-low.c (win32_thread_info): Move to ...
11990 * win32-low.h: ... here.
11991 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11992 win32-arm-low.c and wincecompat.c.
11993 (all:): Add $EXEEXT.
11994 (install-only:): Likewise.
11995 (gdbserver:): Likewise.
11996 (gdbreplay:): Likewise.
11997 * config.in: Regenerate.
11998 * configure: Regenerate.
12000 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12002 * win32-low.c: Rename typedef thread_info to
12003 win32_thread_info throughout.
12005 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12007 * win32-i386-low.c: Rename to ...
12008 * win32-low.c: ... this.
12009 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12010 * Makefile.in: Likewise.
12012 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12014 * remote-utils.c (monitor_output): Constify msg parameter.
12015 * server.h (monitor_output): Likewise.
12016 * win32-i386-low.c (handle_output_debug_string): New.
12017 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12018 handle_output_debug_string.
12019 (get_child_debug_event): Likewise.
12021 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12023 * server.c (main): Correct strtoul check.
12025 2007-03-27 Jon Ringle <jon@ringle.org>
12027 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12029 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12031 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12033 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12035 * terminal.h: Check HAVE_SGTTY_H.
12037 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12039 * remote-utils.c (remote_open): Print out the assigned port number.
12041 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12043 * remote-utils.c (monitor_output): New function.
12044 * server.c (debug_threads): Define here.
12045 (monitor_show_help): New function.
12046 (handle_query): Handle qRcmd.
12047 (main): Do not handle 'd' packet.
12048 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12049 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12052 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12054 * Makefile.in (EXEEXT): New.
12055 (clean): Use $(EXEEXT).
12057 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12059 * target.h (target_ops): Rename send_signal to request_interrupt,
12060 and remove enum target_signal parameter.
12061 * linux-low.c (linux_request_interrupt): Rename from
12062 linux_send_signal, and always send SIGINT.
12063 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12064 and always send SIGINT.
12065 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12067 (input_interrupt): Likewise.
12069 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12071 * server.c (get_features_xml): Check if target implemented
12073 * win32-i386-low.c (win32_arch_string): New.
12074 (win32_target_ops): Add win32_arch_string as arch_string member.
12076 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12078 * spu-low.c (spu_arch_string): New.
12079 (spu_target_ops): Add spu_arch_string.
12081 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12083 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12084 * configure.ac: Do not check for terminal.h.
12085 * configure, config.in: Regenerated.
12087 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12089 * Makefile.in (OBS): Add $(XML_BUILTIN).
12090 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12092 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12093 (arm-with-iwmmxt.c): New.
12094 * config.in, configure: Regenerate.
12095 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12096 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12097 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12098 (arm*-*-linux*): Add iWMMXt and regset support.
12099 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12100 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12101 (arm_store_wmmxregset, target_regsets): New.
12102 * server.c (get_features_xml): Take annex argument. Check builtin
12104 (handle_query): Handle multiple annexes.
12106 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12108 * remote-utils.c [USE_WIN32API] (read, write): Define.
12109 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12112 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12114 * linux-i386-low.c (the_low_target): Set arch_string.
12115 * linux-x86-64-low.c (the_low_target): Likewise.
12116 * linux-low.c (linux_arch_string): New.
12117 (linux_target_ops): Add it.
12118 * linux-low.h (struct linux_target_ops): Add arch_string.
12119 * server.c (write_qxfer_response): Use const void * for DATA.
12120 (get_features_xml): New.
12121 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12122 * target.h (struct target_ops): Add arch_string method.
12124 2007-01-03 Denis Pilat <denis.pilat@st.com>
12125 Daniel Jacobowitz <dan@codesourcery.com>
12127 * linux-low.c (linux_kill): Handle being called with no threads.
12128 * win32-i386-low.c (win32_kill): Likewise.
12129 (get_child_debug_event): Clear current_process_handle.
12131 2006-12-30 Denis PILAT <denis.pilat@st.com>
12132 Daniel Jacobowitz <dan@codesourcery.com>
12134 * remote-utils.c (remote_open): Check the type of specified
12135 serial port devices before opening them.
12136 * server.c (main): Kill the inferior if an error occurs during
12137 the first remote_open.
12139 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12141 * README: Update supported targets.
12143 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12145 * Makefile.in (clean): Remove reg-mips64.c.
12146 (reg-mips64.c, reg-mips64.o): New rules.
12147 * configure.srv: Handle mips64. Include regset support for mips.
12148 * linux-mips-low.c (union mips_register): New.
12149 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12150 (mips_breakpoint, mips_breakpoint_at): Use int.
12151 (mips_collect_register, mips_supply_register)
12152 (mips_collect_register_32bit, mips_supply_register_32bit)
12153 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12154 (mips_store_fpregset, target_regsets): New.
12155 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12157 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12159 * configure.srv: Add target "spu*-*-*".
12160 * Makefile.in (clean): Remove reg-spu.c.
12161 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12162 * spu-low.c: New file.
12164 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12166 * configure.ac: Correct td_thr_tls_get_addr test.
12167 * configure: Regenerated.
12169 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12171 * linux-low.c (linux_wait_for_event): Reformat. Use the
12172 pass_signals array.
12173 * remote-utils.c (decode_address_to_semicolon): New.
12174 * server.c (pass_signals, handle_general_set): New.
12175 (handle_query): Mention QPassSignals for qSupported.
12176 (main): Call handle_general_set.
12177 * server.h (pass_signals, decode_address_to_semicolon): New.
12179 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12181 * server.c (handle_query): Correct error handling for read_auxv.
12183 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12185 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12186 and srv_linux_thread_db to yes.
12187 * linux-s390-low.c (s390_fill_gregset): New function.
12188 (target_regsets): Define data structure.
12190 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12192 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12193 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12194 * config.in, configure: Regenerated.
12195 * inferiors.c (gdb_id_to_thread): New function.
12196 (gdb_id_to_thread_id): Use it.
12197 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12198 * linux-low.h (struct process_info): Add th member.
12199 (thread_db_get_tls_address): New prototype.
12200 * remote-utils.c (decode_address): Make non-static.
12201 * server.c (handle_query): Handle qGetTLSAddr.
12202 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12203 * target.h (struct target_ops): Add get_tls_address.
12204 * thread-db.c (maybe_attach_thread): Save the thread handle.
12205 (thread_db_get_tls_address): New.
12207 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12209 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12210 (linux_resume_one_process): Take a siginfo_t *. Update all
12211 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12212 (struct pending_signals): Add a siginfo_t.
12213 (linux_wait_for_process): Always set last_status.
12214 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12215 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12216 * linux-low.h (struct process_info): Add last_status.
12218 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12220 * remote-utils.c (try_rle): New function.
12221 (putpkt_binary): Use it.
12223 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12225 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12226 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12227 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12228 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12229 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12232 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12234 * server.c (terminal_fd): New variable.
12235 (old_foreground_pgrp): Likewise.
12236 (restore_old_foreground_pgrp): New function.
12237 (start_inferior): Record the terminal file descriptor in terminal_fd
12238 and its original foreground group in old_foreground_pgrp. Register
12239 restore_old_foreground_pgrp with atexit().
12241 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12243 * server.c (handle_query): Correct qPart to qXfer.
12245 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12247 * configure.ac: Check for more headers which are missing on
12248 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12249 * configure.srv: Add Cygwin and mingw32.
12250 * remote-utils.c: Don't include headers unconditionally which
12251 are missing on mingw32. Include <winsock.h> for mingw32.
12252 (remote_open): Adjust for mingw32 support. Flush
12253 standard error after writing to it.
12254 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12255 (unblock_async_io, enable_async_io, disable_async_io)
12256 (readchar, getpkt): Update for Winsock support.
12257 (prepare_resume_reply): Expect a protocol signal number.
12258 * server.c: Disable <sys/wait.h> on mingw32.
12259 (start_inferior): Adjust for mingw32 support. Flush
12260 standard error after writing to it.
12261 (attach_inferior): Likewise. Use protocol signal
12263 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12265 * win32-i386-low.c: New file.
12266 * Makefile.in (XM_CLIBS): Set.
12267 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12268 (win32-i386-low.o): New dependency rule.
12269 * linux-low.c (linux_wait): Use target signal numbers.
12270 * target.h (struct target_ops): Doc fix.
12271 * server.h (target_signal_to_name): New prototype.
12272 * gdbreplay.c: Don't include headers unconditionally which
12273 are missing on mingw32. Include <winsock.h> for mingw32.
12274 (remote_close, remote_open): Adjust for Winsock support.
12275 * configure, config.in: Regenerated.
12277 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12279 * server.c (decode_xfer_read, write_qxfer_response): New.
12280 (handle_query): Take a packet length argument. Handle
12281 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12282 the qSupported response.
12283 (main): Update call to handle_query.
12285 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12287 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12288 (putpkt_binary): Renamed from putpkt and adjusted for binary
12290 (putpkt): New wrapper for putpkt_binary.
12291 (readchar): Don't mask off the high bit.
12292 (decode_X_packet): New function.
12293 * server.c (main): Call putpkt_binary if a handler sets the packet
12294 length. Save the length of the incoming packet. Handle 'X'.
12295 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12297 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12299 * server.c (handle_query): Handle qSupported.
12301 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12303 * remote-utils.c (all_symbols_looked_up): New variable.
12304 (look_up_one_symbol): Check it.
12305 * server.h (look_up_one_symbol): New declaration.
12306 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12308 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12310 * Makefile.in (linux-arm-low.o): Update dependencies.
12311 * linux-arm-low.c: Include "gdb_proc_service.h".
12312 (PTRACE_GET_THREAD_AREA): Define.
12313 (ps_get_thread_area): New function.
12315 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12317 * configure.srv (m68k*-*-uclinux*): New target.
12318 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12319 (linux_resume_one_process): Remove extraneous cast.
12320 (linux_read_offsets): New.
12321 (linux_target_op): Add linux_read_offsets on mmuless systems.
12322 * server.c (handle_query): Add qOffsets logic.
12323 * target.h (struct target_ops): Add read_offsets.
12325 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12327 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12328 (PTRACE_GET_THREAD_AREA): Define.
12329 (ps_get_thread_area): New function.
12330 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12331 (linux-x86-64-low.o): Update.
12333 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12335 * configure.ac: Remove checks for prfpregset_t.
12336 * gdb_proc_service.h: New file.
12337 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12338 new "gdb_proc_service.h".
12339 * proc-service.c: Likewise.
12340 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12341 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12342 * Makefile.in (gdb_proc_service_h): Updated.
12343 * configure, config.in: Regenerated.
12345 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12347 * remote-utils.c (prepare_resume_reply): Move declaration
12348 of gdb_id_from_wait to the top of the block.
12350 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12352 * linux-low.c (regsets_store_inferior_registers): Read the regset
12353 from the target before filling it.
12355 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12357 * server.c (attach_inferior): Return SIGTRAP for a successful
12360 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12362 * Makefile.in (OBS): Add version.o.
12363 (STAGESTUFF): Delete.
12364 (version.o): Add dependencies.
12365 (version.c): Replace rule.
12366 (clean): Remove version.c.
12367 * server.c (gdbserver_version): New.
12368 (gdbserver_usage): Use printf.
12369 (main): Handle --version and --help.
12370 * server.h (version, host_name): Add declarations.
12372 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12384 * linux-x86-64-low.c:
12386 * linux-s390-low.c:
12387 * linux-ppc64-low.c:
12389 * linux-mips-low.c:
12390 * linux-m68k-low.c:
12391 * linux-m32r-low.c:
12394 * linux-ia64-low.c:
12395 * linux-i386-low.c:
12396 * linux-crisv32-low.c:
12408 * gdbserver.1: Add (C) after Copyright. Update the FSF
12411 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12413 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12414 (arm_breakpoint_at): Recognize both breakpoints.
12415 (the_low_target): Use the correct breakpoint instruction.
12417 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12419 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12420 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12421 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12422 (the_low_target): Update.
12424 2005-10-25 Andreas Schwab <schwab@suse.de>
12426 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12428 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12429 (ia64_num_regs): Reduce to 462.
12431 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12433 * acinclude.m4: Correct quoting.
12434 * aclocal.m4: Regenerated.
12436 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12437 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12438 (thread_db_init): Call thread_db_err_str.
12439 * configure.ac: Check for TD_VERSION.
12440 * config.in, configure: Regenerated.
12442 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12444 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12446 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12448 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12449 is not available. Define HAVE_PTRACE_GETREGS if it is.
12450 * config.in, configure: Regenerated.
12451 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12452 * linux-i386-low.c, linux-m68k-low.c: Update to use
12453 HAVE_PTRACE_GETREGS.
12454 * linux-low.c (regsets_fetch_inferior_registers)
12455 (regsets_store_inferior_registers): Only return 0 if we processed
12457 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12458 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12460 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12462 * inferiors.c (struct thread_info): Add gdb_id.
12463 (add_thread): Add gdb_id argument.
12464 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12465 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12466 calls to add_thread.
12467 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12468 * server.c (handle_query): Use thread_to_gdb_id.
12469 (handle_v_cont, main): Use gdb_id_to_thread_id.
12470 * server.h (add_thread): Update prototype.
12471 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12474 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12476 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12477 left-padded registers.
12478 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12479 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12481 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12483 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12484 * configure: Regenerate.
12485 * config.in: Regenerate.
12486 * server.h (NEED_DECLARATION_STRERROR):
12487 Replace with !HAVE_DECL_STRERROR.
12489 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12491 * linux-low.c (linux_wait, linux_send_signal): Don't test
12492 an unsigned long variable for > 0 if it could be MAX_ULONG.
12493 * server.c (myresume): Likewise.
12494 * target.c (set_desired_inferior): Likewise.
12496 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12498 * configure.ac: Simplify and improve check for socklen_t.
12499 * configure, config.in: Regenerate.
12501 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12503 * acconfig.h: Remove.
12504 * configure.ac: Add a test for socklen_t. Use three-argument
12505 AC_DEFINE throughout.
12506 * config.in: Regenerated using autoheader 2.59.
12507 * configure: Regenerated.
12509 * gdbreplay.c (socklen_t): Provide a default.
12510 (remote_open): Use socklen_t.
12511 * remote-utils.c (socklen_t): Provide a default.
12512 (remote_open): Use socklen_t.
12513 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12516 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12518 * linux-low.c (linux_read_memory, linux_write_memory)
12519 (linux_read_auxv): Likewise.
12520 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12521 (check_mem_write): Likewise.
12522 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12524 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12525 (registers_from_string, register_data): Likewise.
12526 * server.c (handle_query, main): Likewise.
12527 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12528 (decode_M_packet): Likewise.
12529 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12530 * target.h (struct target_ops): Update read_memory, write_memory,
12532 (read_inferior_memory, write_inferior_memory): Update.
12533 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12534 to unsigned char *.
12535 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12536 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12537 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12538 linux-s390-low.c, linux-sh-low.c: Update for changes in
12539 read_inferior_memory and the_low_target->breakpoint.
12541 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12543 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12544 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12545 * configure.srv: Add powerpc64-*-linux*.
12546 * linux-ppc64-low.c: New file.
12548 2005-05-23 Orjan Friberg <orjanf@axis.com>
12550 * linux-cris-low.c: New file with support for CRIS.
12551 * linux-crisv32-low.c: Ditto for CRISv32.
12552 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12553 (clean): Add reg-cris.c and reg-crisv32.c.
12554 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12555 reg-crisv32.o, and reg-crisv32.c to make rules.
12556 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12557 recognized targets.
12559 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12561 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12562 of sizeof (PTRACE_XFER_TYPE).
12563 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12565 2005-05-12 Orjan Friberg <orjanf@axis.com>
12567 * target.h (struct target_ops): Add insert_watchpoint,
12568 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12569 pointers for hardware watchpoint support.
12570 * linux-low.h (struct linux_target_ops): Ditto.
12571 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12572 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12573 to linux_target_ops.
12574 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12576 * server.c (main): Recognize 'Z' and 'z' packets.
12578 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12580 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12581 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12582 (the_low_target): Add new members.
12584 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12586 * proc-service.c (ps_lgetregs): Search all_processes instead of
12589 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12591 * server.c (start_inferior): Change return type to int.
12592 (attach_inferior): Change sigptr to int *.
12593 (handle_v_cont, handle_v_requests): Change signal to int *.
12594 (main): Change signal to int.
12596 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12598 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12599 * configure.srv: Add m32r*-*-linux*.
12600 * linux-m32r-low.c: New file.
12602 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12604 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12606 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12608 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12609 Take unsigned long arguments for PIDs.
12610 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12611 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12612 (wait_for_sigstop, linux_resume_one_process)
12613 (regsets_fetch_inferior_registers, linux_send_signal)
12614 (linux_read_auxv): Likewise. Update the types of variables holding
12615 PIDs. Update format string specifiers.
12616 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12617 * remote-utils.c (prepare_resume_reply): Likewise.
12618 * server.c (cont_thread, general_thread, step_thread)
12619 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12621 (handle_query): Update format specifiers.
12622 (handle_v_cont, main): Use strtoul for thread IDs.
12623 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12624 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12625 (general_thread, step_thread, thread_from_wait)
12626 (old_thread_from_wait): Update.
12627 * target.h (struct thread_resume): Use unsigned long for THREAD.
12628 (struct target_ops): Use unsigned long for arguments to attach and
12631 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12633 * acinclude.m4: Include bfd/bfd.m4 directly.
12634 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12635 <agriffis@toolchain.org>.
12636 * aclocal.m4, configure: Regenerated.
12638 2005-01-07 Andrew Cagney <cagney@gnu.org>
12640 * configure.ac: Rename configure.in, require autoconf 2.59.
12641 * configure: Re-generate.
12643 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12645 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12646 LIBS when finished.
12647 * aclocal.m4: Regenerated.
12648 * configure: Regenerated.
12650 2004-11-21 Andreas Schwab <schwab@suse.de>
12652 * linux-m68k-low.c (m68k_num_gregs): Define.
12653 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12654 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12655 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12656 (m68k_breakpoint_at): New. Add to the_low_target.
12658 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12659 srv_linux_thread_db to yes.
12661 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12663 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12664 (ARCH_SET_FS): Likewise.
12665 (ARCH_GET_FS): Likewise.
12666 (ARCH_GET_GS): Likewise.
12668 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12670 * linux-i386-low.c (ps_get_thread_area): New.
12671 * linux-x86-64-low.c (ps_get_thread_area): New.
12672 * linux-low.c: Include <sys/syscall.h>.
12673 (linux_kill_one_process): Don't kill the first thread here.
12674 (linux_kill): Kill the first thread here.
12675 (kill_lwp): New function.
12676 (send_sigstop, linux_send_signal): Use it.
12677 * proc-service.c: Clean up #ifdefs.
12678 (fpregset_info): Delete.
12679 (ps_lgetregs): Update and enable implementation.
12680 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12682 * remote-utils.c (struct sym_cache, symbol_cache): New.
12683 (input_interrupt): Print a clearer message.
12684 (async_io_enabled): New variable.
12685 (enable_async_io, disable_async_io): Use it. Update comments.
12686 (look_up_one_symbol): Use the symbol cache.
12687 * thread-db.c (thread_db_look_up_symbols): New function.
12688 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12690 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12692 * configure.in: Test for -rdynamic.
12693 * configure: Regenerated.
12694 * Makefile (INTERNAL_LDFLAGS): New.
12695 (gdbserver, gdbreplay): Use it.
12697 2004-09-02 Andrew Cagney <cagney@gnu.org>
12699 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12701 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12703 * linux-low.c (linux_wait): Clear all_processes list also.
12705 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12707 * linux-low.c: Include <errno.h>. Remove extern declaration of
12710 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12712 * gdbreplay.c, server.h, utils.c: Update copyright years.
12714 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12716 * server.c (main): Print child status or termination signal from
12717 variable 'signal', not 'sig'.
12719 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12721 * linux-low.c (linux_read_memory): Change return type to
12722 int. Check for and return error from ptrace().
12723 * target.c (read_inferior_memory): Change return type to int. Pass
12724 back return status from the_target->read_memory().
12725 * target.h (struct target_ops): Adapt *read_memory() prototype.
12727 (read_inferior_memory): Adapt prototype.
12728 * server.c (main): Return an error packet if
12729 read_inferior_memory() returns an error.
12731 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12733 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12734 Unify with other clean targets.
12736 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12738 * server.c (handle_v_cont): Call set_desired_inferior.
12740 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12742 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12744 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12746 * linux-low.c (linux_wait): Unblock async I/O.
12747 (linux_resume): Block and enable async I/O.
12748 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12749 * server.h (block_async_io, unblock_async_io): Add prototypes.
12751 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12753 * remote-utils.c (remote_open): Print a status notice after
12754 opening a TCP port.
12755 * server.c (attach_inferior): Print a status notice after
12758 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12760 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12762 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12764 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12766 * server.c, target.h: Update copyright years.
12768 2004-02-25 Roland McGrath <roland@redhat.com>
12770 * target.h (struct target_ops): New member `read_auxv'.
12771 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12772 * linux-low.c (linux_read_auxv): New function.
12773 (linux_target_ops): Initialize `read_auxv' member to that.
12775 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12777 Committed by Jim Blandy <jimb@redhat.com>.
12779 * linux-s390-low.c (s390_num_regs): Update.
12780 (s390_regmap): Remove control registers. Use __s390x__ predefine
12781 instead of GPR_SIZE to distiguish s390 and s390x targets.
12783 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12785 * linux-low.c: Update copyright year.
12786 (check_removed_breakpoint): Clear pending_is_breakpoint.
12787 (linux_set_resume_request, linux_queue_one_thread)
12788 (resume_status_pending_p): New functions.
12789 (linux_continue_one_thread): Use process->resume.
12790 (linux_resume): Only resume threads if there are no pending events.
12791 * linux-low.h (struct process_info): Add resume request
12794 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12796 * regcache.c (new_register_cache): Clear the allocated register
12797 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12799 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12801 * linux-low.c (linux_resume): Take a struct thread_resume *
12803 (linux_wait): Update call.
12804 (resume_ptr): New static variable.
12805 (linux_continue_one_thread): Renamed from
12806 linux_continue_one_process. Use resume_ptr.
12807 (linux_resume): Use linux_continue_one_thread.
12808 * server.c (handle_v_cont, handle_v_requests): New functions.
12809 (myresume): New function.
12810 (main): Handle 'v' case.
12811 * target.h (struct thread_resume): New type.
12812 (struct target_ops): Change argument of "resume" to struct
12814 (myresume): Delete macro.
12816 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12818 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12819 (uninstall): Support DESTDIR.
12821 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12823 * configure.srv: Add xscale*linux copy of arm*linux entry.
12825 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12827 * linux-arm-low.c (arm_reinsert_addr): New function.
12828 (the_low_target): Add arm_reinsert_addr.
12830 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12832 * mem-break.c: Remove whitespace at end of file.
12834 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12836 * configure.in: Check whether we need to prototype strerror.
12837 * server.h: Optionally prototype strerror.
12838 * gdbreplay.c (perror_with_name): Use strerror.
12839 * linux-low.c (linux_attach_lwp): Use strerror.
12840 * utils.c (perror_with_name): Use strerror.
12841 * config.in, configure: Regenerated.
12843 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12845 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12846 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12848 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12850 * Makefile.in (SFILES): Update.
12851 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12852 low-sun3.c: Remove files.
12854 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12856 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12857 (linux_detach_one_process, linux_detach): New functions.
12858 (linux_target_ops): Add linux_detach.
12859 * server.c (main): Handle 'D' packet.
12860 * target.h (struct target_ops): Add "detach" member.
12861 (detach_inferior): Define.
12863 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12865 From Kelley Cook <kelleycook@wideopenwest.com>:
12866 * configure.srv: Accept i[34567]86 variants.
12868 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12870 * linux-low.c (linux_wait_for_event): Correct comment typos.
12871 (linux_resume_one_process): Call check_removed_breakpoint.
12872 (linux_send_signal): New function.
12873 (linux_target_ops): Add linux_send_signal.
12874 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12876 * target.h (struct target_ops): Add send_signal.
12878 2003-05-29 Jim Blandy <jimb@redhat.com>
12880 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12881 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12882 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12883 away part of the register's value.
12885 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12887 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12888 (linux_wait_for_event, linux_init_signals): Likewise.
12890 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12892 * configure.in: Check for stdlib.h.
12893 * configure: Regenerated.
12894 * config.in: Regenerated.
12896 2003-01-04 Andreas Schwab <schwab@suse.de>
12898 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12900 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12902 * Makefile.in: Remove obsolete code.
12904 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12906 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12907 defined(PT_FPR0_HI).
12909 2002-11-17 Stuart Hughes <seh@zee2.com>
12911 * linux-arm-low.c (arm_num_regs): Increase.
12912 (arm_regmap): Include status register.
12914 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12916 * linux-low.c (register_addr): Remove incorrect -1 check.
12918 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12920 * linux-low.c (linux_create_inferior): Call setpgid. Return
12922 (unstopped_p, linux_signal_pid): Remove.
12923 (linux_target_ops): Remove linux_signal_pid.
12924 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12925 global instead of target method.
12926 * target.h (struct target_ops): Remove signal_pid. Update comment
12927 for create_inferior.
12928 * server.c (signal_pid): New variable.
12929 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12930 gdbserver. Set the child to be the foreground process group.
12931 (attach_inferior): Set signal_pid.
12933 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12935 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12937 2002-08-20 Jim Blandy <jimb@redhat.com>
12939 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12942 2002-08-01 Andrew Cagney <cagney@redhat.com>
12944 * Makefile.in: Make chill references obsolete.
12946 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12948 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12949 * configure: Regenerate.
12950 * config.in: Regenerate.
12952 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12954 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12955 (perror_with_name, remote_close, remote_open, expect, play): Static.
12957 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12959 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12960 byte offsets instead of an array of indexes.
12961 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12963 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12965 * regcache.c: Add comment.
12967 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12969 * thread-db.c: New file.
12970 * proc-service.c: New file.
12971 * acinclude.m4: New file.
12972 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12973 proc-service.o, and thread-db.o.
12974 (linux-low.o): Add USE_THREAD_DB.
12975 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12976 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12977 * aclocal.m4: Regenerated.
12978 * config.in: Regenerated.
12979 * configure: Regenerated.
12980 * configure.in: Check for proc_service.h, sys/procfs.h,
12981 thread_db.h, and linux/elf.h headrs.
12982 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12983 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12984 Check for -lthread_db and thread support.
12985 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12986 PowerPC, and SuperH.
12987 * i387-fp.c: Constify arguments.
12988 * i387-fp.h: Likewise.
12989 * inferiors.c: (struct thread_info): Renamed from
12990 `struct inferior_info'. Remove PID member. Use generic inferior
12991 list header. All uses updated.
12992 (inferiors, signal_pid): Removed.
12993 (all_threads): New variable.
12994 (get_thread): Define.
12995 (add_inferior_to_list): New function.
12996 (for_each_inferior): New function.
12997 (change_inferior_id): New function.
12998 (add_inferior): Removed.
12999 (remove_inferior): New function.
13000 (add_thread): New function.
13001 (free_one_thread): New function.
13002 (remove_thread): New function.
13003 (clear_inferiors): Use for_each_inferior and free_one_thread.
13004 (find_inferior): New function.
13005 (find_inferior_id): New function.
13006 (inferior_target_data): Update argument type.
13007 (set_inferior_target_data): Likewise.
13008 (inferior_regcache_data): Likewise.
13009 (set_inferior_regcache_data): Likewise.
13010 * linux-low.c (linux_bp_reinsert): Remove.
13011 (all_processes, stopping_threads, using_thrads)
13012 (struct pending_signals, debug_threads, pid_of): New.
13013 (inferior_pid): Replace with macro.
13014 (struct inferior_linux_data): Remove.
13015 (get_stop_pc, add_process): New functions.
13016 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13017 Use add_process and add_thread.
13018 (linux_attach_lwp): New function, based on old linux_attach. Use
13019 add_process and add_thread. Set stop_expected for new threads.
13020 (linux_attach): New function.
13021 (linux_kill_one_process): New function.
13022 (linux_kill): Kill all LWPs.
13023 (linux_thread_alive): Use find_inferior_id.
13024 (check_removed_breakpoints, status_pending_p): New functions.
13025 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13026 Update. Use WNOHANG. Wait for cloned processes also. Update process
13027 struct for the found process.
13028 (linux_wait_for_event): New function.
13029 (linux_wait): Use it. Support LWPs.
13030 (send_sigstop, wait_for_sigstop, stop_all_processes)
13031 (linux_resume_one_process, linux_continue_one_process): New functions.
13032 (linux_resume): Support LWPs.
13033 (REGISTER_RAW_SIZE): Remove.
13034 (fetch_register): Use register_size instead. Call supply_register.
13035 (usr_store_inferior_registers): Likewise. Call collect_register.
13036 Fix recursive case.
13037 (regsets_fetch_inferior_registers): Improve error message.
13038 (regsets_store_inferior_registers): Add debugging.
13039 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13040 (unstopped_p, linux_signal_pid): New functions.
13041 (linux_target_ops): Add linux_signal_pid.
13042 (linux_init_signals): New function.
13043 (initialize_low): Call it. Initialize using_threads.
13044 * regcache.c (inferior_regcache_data): Add valid
13046 (get_regcache): Fetch registers lazily. Add fetch argument
13047 and update all callers.
13048 (regcache_invalidate_one, regcache_invalidate): New
13050 (new_register_cache): Renamed from create_register_cache.
13051 Return the new regcache.
13052 (free_register_cache): Change argument to a void *.
13053 (registers_to_string, registers_from_string): Call get_regcache
13054 with fetch flag set.
13055 (register_data): Make static. Pass fetch flag to get_regcache.
13056 (supply_register): Call get_regcache with fetch flag clear.
13057 (collect_register): Call get_regcache with fetch flag set.
13058 (collect_register_as_string): New function.
13059 * regcache.h: Update.
13060 * remote-utils.c (putpkt): Flush after debug output and use
13062 Handle input interrupts while waiting for an ACK.
13063 (input_interrupt): Use signal_pid method.
13064 (getpkt): Flush after debug output and use stderr.
13065 (outreg): Use collect_register_as_string.
13066 (new_thread_notify, dead_thread_notify): New functions.
13067 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13068 and general_thread.
13069 (look_up_one_symbol): Flush after debug output.
13070 * server.c (step_thread, server_waiting): New variables.
13071 (start_inferior): Don't use signal_pid. Update call to mywait.
13072 (attach_inferior): Update call to mywait.
13073 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13074 (main): Don't fetch/store registers explicitly. Use
13075 set_desired_inferior. Support proposed ``Hs'' packet. Update
13077 * server.h: Update.
13078 (struct inferior_list, struct_inferior_list_entry): New.
13079 * target.c (set_desired_inferior): New.
13080 (write_inferior_memory): Constify.
13081 (mywait): New function.
13082 * target.h: Update.
13083 (struct target_ops): New signal_pid method.
13084 (mywait): Removed macro, added prototype.
13086 * linux-low.h (regset_func): Removed.
13087 (regset_fill_func, regset_store_func): New.
13088 (enum regset_type): New.
13089 (struct regset_info): Add type field. Use new operation types.
13090 (struct linux_target_ops): stop_pc renamed to get_pc.
13091 Add decr_pc_after_break and breakpoint_at.
13092 (get_process, get_thread_proess, get_process_thread)
13093 (strut process_info, all_processes, linux_attach_lwp)
13094 (thread_db_init): New.
13096 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13097 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13098 (the_low_target): Add new members.
13099 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13100 (i386_store_fpxregset): Constify.
13101 (target_regsets): Add new kind identifier.
13102 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13103 (i386_set_pc): Add debugging.
13104 (i386_breakpoint_at): New function.
13105 (the_low_target): Add new members.
13106 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13107 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13108 (mips_breakpoint_at): New.
13109 (the_low_target): Add new members.
13110 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13111 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13112 (the_low_target): Add new members.
13113 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13114 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13115 (the_low_target): Add new members.
13116 * linux-x86-64-low.c (target_regsets): Add new kind
13119 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13121 From Martin Pool <mbp@samba.org>:
13122 * server.c (gdbserver_usage): New function.
13125 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13127 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13128 stop_at -> stop_pc.
13130 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13132 * Makefile.in: Remove obsolete code.
13134 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13136 * linux-low.c (regsets_fetch_inferior_registers),
13137 (regsets_store_inferior_registers): Removed cast to int from
13139 * regcache.h: Added declaration of struct inferior_info.
13141 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13143 * inferiors.c (struct inferior_info): Add regcache_data.
13144 (add_inferior): Call create_register_cache.
13145 (clear_inferiors): Call free_register_cache.
13146 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13147 * regcache.c (struct inferior_regcache_data): New.
13148 (registers): Remove.
13149 (get_regcache): New function.
13150 (create_register_cache, free_register_cache): New functions.
13151 (set_register_cache): Don't initialize the register cache here.
13152 (registers_to_string, registers_from_string, register_data): Call
13154 * regcache.h: Add prototypes.
13155 * server.h: Likewise.
13157 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13159 * mem-break.c: New file.
13160 * mem-break.h: New file.
13161 * Makefile.in: Add mem-break.o rule; update server.h
13163 * inferiors.c (struct inferior_info): Add target_data
13165 (clear_inferiors): Free target_data member if set.
13166 (inferior_target_data, set_inferior_target_data): New functions.
13167 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13168 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13169 * linux-low.c (linux_bp_reinsert): New variable.
13170 (struct inferior_linux_data): New.
13171 (linux_create_inferior): Use set_inferior_target_data.
13172 (linux_attach): Likewise. Call add_inferior.
13173 (linux_wait_for_one_inferior): New function.
13174 (linux_wait): Call it.
13175 (linux_write_memory): Add const.
13176 (initialize_low): Call set_breakpoint_data.
13177 * linux-low.h (struct linux_target_ops): Add breakpoint
13179 * server.c (attach_inferior): Remove extra add_inferior
13181 * server.h: Include mem-break.h. Update inferior.c
13183 * target.c (read_inferior_memory)
13184 (write_inferior_memory): New functions.
13185 * target.h (read_inferior_memory)
13186 (write_inferior_memory): Change macros to prototypes.
13187 (struct target_ops): Update comments. Add const to write_memory
13190 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13192 * linux-low.c (usr_store_inferior_registers): Support
13193 registers which are allowed to fail to store.
13194 * linux-low.h (linux_target_ops): Likewise.
13195 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13196 (ppc_cannot_store_register): FPSCR may not be storable.
13198 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13200 * server.h: Include <string.h> if HAVE_STRING_H.
13201 * ChangeLog: Correct paths in last ChangeLog entry.
13203 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13205 * linux-low.h: Remove obsolete prototypes.
13206 (struct linux_target_ops): New.
13207 (extern the_low_target): New.
13208 * linux-low.c (num_regs, regmap): Remove declarations.
13209 (register_addr): Use the_low_target explicitly.
13210 (fetch_register): Likewise.
13211 (usr_fetch_inferior_registers): Likewise.
13212 (usr_store_inferior_registers): Likewise.
13213 * linux-arm-low.c (num_regs): Remove.
13214 (arm_num_regs): Define.
13215 (arm_regmap): Renamed from regmap, made static.
13216 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13218 (arm_cannot_store_register): Renamed from cannot_store_register,
13220 (the_low_target): New.
13221 * linux-i386-low.c (num_regs): Remove.
13222 (i386_num_regs): Define.
13223 (i386_regmap): Renamed from regmap, made static.
13224 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13226 (i386_cannot_store_register): Renamed from cannot_store_register,
13228 (the_low_target): New.
13229 * linux-ia64-low.c (num_regs): Remove.
13230 (ia64_num_regs): Define.
13231 (ia64_regmap): Renamed from regmap, made static.
13232 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13234 (ia64_cannot_store_register): Renamed from cannot_store_register,
13236 (the_low_target): New.
13237 * linux-m68k-low.c (num_regs): Remove.
13238 (m68k_num_regs): Define.
13239 (m68k_regmap): Renamed from regmap, made static.
13240 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13242 (m68k_cannot_store_register): Renamed from cannot_store_register,
13244 (the_low_target): New.
13245 * linux-mips-low.c (num_regs): Remove.
13246 (mips_num_regs): Define.
13247 (mips_regmap): Renamed from regmap, made static.
13248 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13250 (mips_cannot_store_register): Renamed from cannot_store_register,
13252 (the_low_target): New.
13253 * linux-ppc-low.c (num_regs): Remove.
13254 (ppc_num_regs): Define.
13255 (ppc_regmap): Renamed from regmap, made static.
13256 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13258 (ppc_cannot_store_register): Renamed from cannot_store_register,
13260 (the_low_target): New.
13261 * linux-s390-low.c (num_regs): Remove.
13262 (s390_num_regs): Define.
13263 (s390_regmap): Renamed from regmap, made static.
13264 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13266 (s390_cannot_store_register): Renamed from cannot_store_register,
13268 (the_low_target): New.
13269 * linux-sh-low.c (num_regs): Remove.
13270 (sh_num_regs): Define.
13271 (sh_regmap): Renamed from regmap, made static.
13272 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13274 (sh_cannot_store_register): Renamed from cannot_store_register,
13276 (the_low_target): New.
13277 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13278 (the_low_target): New.
13280 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13282 * Makefile.in: Add stamp-h target.
13283 * configure.in: Create stamp-h.
13284 * configure: Regenerated.
13286 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13288 * inferiors.c: New file.
13289 * target.c: New file.
13290 * target.h: New file.
13291 * Makefile.in: Add target.o and inferiors.o. Update
13293 * linux-low.c (inferior_pid): New static variable,
13294 moved from server.c.
13295 (linux_create_inferior): Renamed from create_inferior.
13296 Call add_inferior. Return 0 on success instead of a PID.
13297 (linux_attach): Renamed from myattach.
13298 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13299 (linux_thread_alive): Renamed from mythread_alive.
13300 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13302 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13303 (regsets_store_inferior_registers): Correct error message.
13304 Add missing ``return 0''.
13305 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13306 (linux_store_registers): Renamed from store_inferior_registers.
13307 (linux_read_memory): Renamed from read_inferior_memory.
13308 (linux_write_memory): Renamed from write_inferior_memory.
13309 (linux_target_ops): New structure.
13310 (initialize_low): Call set_target_ops ().
13311 * remote-utils.c (unhexify): New function.
13312 (hexify): New function.
13313 (input_interrupt): Send signals to ``signal_pid''.
13314 * server.c (inferior_pid): Remove.
13315 (start_inferior): Update create_inferior call.
13316 (attach_inferior): Call add_inferior.
13317 (handle_query): New function.
13318 (main): Call handle_query for `q' packets.
13319 * server.h: Include "target.h". Remove obsolete prototypes.
13320 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13322 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13324 * Makefile.in: Add WARN_CFLAGS. Update configury
13326 * configure.in: Check for <string.h>
13327 * configure: Regenerate.
13328 * config.in: Regenerate.
13329 * gdbreplay.c: Include needed system headers.
13330 (remote_open): Remove strchr prototype.
13331 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13332 * regcache.c (supply_register): Change buf argument to const void *.
13333 (supply_register_by_name): Likewise.
13334 (collect_register): Change buf argument to void *.
13335 (collect_register_by_name): Likewise.
13336 * regcache.h: Add missing prototypes.
13337 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13338 * server.c (handle_query): New function.
13339 (attached): New static variable, moved out of main.
13340 (main): Quiet longjmp clobber warnings.
13341 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13342 * utils.c (error): Remove NORETURN.