1 2016-01-26 Yao Qi <yao.qi@linaro.org>
3 * linux-low.c (install_software_single_step_breakpoints): Call
4 regcache_read_pc instead of get_pc.
6 2016-01-26 Yao Qi <yao.qi@linaro.org>
8 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9 (unblock_async_io): Rename to ...
10 (block_unblock_async_io): ... it. New function.
11 (enable_async_io): Don't install SIGIO handler. Unblock it
13 (disable_async_io): Don't ignore SIGIO. Block it instead.
14 (initialize_async_io): Install SIGIO handler. Don't call
17 2016-01-26 Yao Qi <yao.qi@linaro.org>
19 * remote-utils.c (getpkt): If the buffer isn't empty, and the
20 first character is '\003', call *the_target->request_interrupt.
22 2016-01-25 Yao Qi <yao.qi@linaro.org>
24 * remote-utils.c (new_thread_notify): Remove.
25 (dead_thread_notify): Likewise.
26 * remote-utils.h (new_thread_notify): Remove declaration.
27 (dead_thread_notify): Likewise.
29 2016-01-23 Marcin KoĆcielnicki <koriakin@0x04.net>
31 * gdb.trace/pending.exp: Fix expected message on continue.
33 2016-01-22 Marcin KoĆcielnicki <koriakin@0x04.net>
35 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
36 it works properly on big-endian machines where sizeof (CORE_ADDR)
39 2016-01-21 Pedro Alves <palves@redhat.com>
41 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
42 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
43 * configure: Regenerate.
45 2016-01-21 Yao Qi <yao.qi@linaro.org>
47 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
48 is_thumb and set it according to CPSR saved on the stack.
49 (get_next_pcs_syscall_next_pc): Pass is_thumb to
50 arm_sigreturn_next_pc.
52 2016-01-18 Yao Qi <yao.qi@linaro.org>
54 * linux-low.c (linux_set_pc_64bit): New function.
55 (linux_get_pc_64bit): New function.
56 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
58 * linux-sparc-low.c (debug_threads): Remove declaration.
59 (sparc_get_pc): Remove.
60 (the_low_target): Use linux_get_pc_64bit instead of
62 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
63 (the_low_target): Use linux_get_pc_64bit and
66 2016-01-18 Yao Qi <yao.qi@linaro.org>
68 * linux-arm-low.c (debug_threads): Remove declaration.
69 (arm_get_pc, arm_set_pc): Remove.
70 (the_low_target): Use linux_get_pc_32bit and
72 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
73 (the_low_target): Use linux_get_pc_32bit and
75 * linux-cris-low.c (debug_threads): Remove declaration.
76 (cris_get_pc, cris_set_pc,): Remove.
77 (the_low_target): Use linux_get_pc_32bit and
79 * linux-crisv32-low.c (debug_threads): Remove declaration.
80 (cris_get_pc, cris_set_pc): Remove.
81 (the_low_target): Use linux_get_pc_32bit and
83 * linux-low.c: Include inttypes.h.
84 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
85 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
86 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
87 (the_low_target): Use linux_get_pc_32bit and
89 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
90 (the_low_target): Use linux_get_pc_32bit and
92 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
93 (the_low_target): Use linux_get_pc_32bit and
95 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
96 (the_low_target): Use linux_get_pc_32bit and
98 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
99 (the_low_target): Use linux_get_pc_32bit and
102 2016-01-18 Gary Benson <gbenson@redhat.com>
104 * configure.ac (AC_FUNC_FORK): New check.
105 * config.in: Regenerate.
106 * configure: Likewise.
108 2016-01-14 Yao Qi <yao.qi@linaro.org>
110 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
111 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
112 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
113 arm_get_next_pcs_ctor.
115 2016-01-12 Josh Stone <jistone@redhat.com>
116 Philippe Waroquiers <philippe.waroquiers@skynet.be>
118 * inferiors.h: Include "gdb_vecs.h".
119 (struct process_info): Add syscalls_to_catch.
120 * inferiors.c (remove_process): Free syscalls_to_catch.
121 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
122 syscall_return stops.
123 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
124 * server.c (handle_general_set): Handle QCatchSyscalls.
125 (handle_query): Report support for QCatchSyscalls.
126 * target.h (struct target_ops): Add supports_catch_syscall.
127 (target_supports_catch_syscall): New macro.
128 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
129 (struct lwp_info): Add syscall_state.
130 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
131 Maintain syscall_state and syscalls_to_catch across exec.
132 (get_syscall_trapinfo): New function, proxy to the_low_target.
133 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
134 (linux_low_filter_event): Toggle syscall_state entry/return for
135 syscall traps, and set it ignored for all others.
136 (gdb_catching_syscalls_p): New function.
137 (gdb_catch_this_syscall_p): New function.
138 (linux_wait_1): Handle SYSCALL_SIGTRAP.
139 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
140 (linux_supports_catch_syscall): New function.
141 (linux_target_ops): Install it.
142 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
143 (the_low_target): Install it.
145 2016-01-12 Mike Frysinger <vapier@gentoo.org>
147 * acinclude.m4: Include new ../warning.m4 file.
148 * configure: Regenerated.
149 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
151 2016-01-12 Mike Frysinger <vapier@gentoo.org>
153 * ax.c (is_goto_target): Mark static.
154 * linux-low.c (register_addr): Likewise.
155 (linux_fetch_registers, linux_store_registers): Likewise.
156 * mem-break.c (any_persistent_commands): Fix old prototype.
157 (add_commands_to_breakpoint): Mark static.
158 * regcache.c (find_register_by_name): Delete unused func.
159 * remote-utils.c (hex_or_minus_one): Mark static.
160 * server.c (monitor_show_help): Mark static.
161 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
162 handle_v_requests): Likewise.
164 2016-01-12 Pedro Alves <palves@redhat.com>
166 Remove use of the registered trademark symbol throughout.
168 2016-01-08 Yao Qi <yao.qi@linaro.org>
170 * remote-utils.c (getpkt): If c is '\003', call target hook
173 2016-01-06 Yao Qi <yao.qi@linaro.org>
175 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
177 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
178 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
179 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
180 (thumb2_breakpoint): Declare.
181 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
183 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
184 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
185 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
187 2016-01-01 Joel Brobecker <brobecker@adacore.com>
189 * gdbreplay.c (gdbreplay_version): Change copyright year in
191 * server.c (gdbserver_version): Likewise.
193 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
195 * server.c (crc32_table): Delete.
196 (crc32): Use libiberty's xcrc32 function.
198 2015-12-22 Joel Brobecker <brobecker@adacore.com>
200 * lynx-low.c (lynx_delete_thread_callback): New function.
201 (lynx_mourn): Properly delete our process and all of its
202 threads. Remove call to clear_inferiors.
204 2015-12-22 Joel Brobecker <brobecker@adacore.com>
206 * target.c (thread_search_callback): Add check that
207 the thread_stopped target callback is not NULL before
210 2015-12-21 Yao Qi <yao.qi@linaro.org>
212 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
215 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
217 * server.c (handle_query): Call target_supports_software_single_step.
219 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
221 * linux-low.c (single_step): New function.
222 (linux_resume_one_lwp_throw): Call single_step.
223 (start_step_over): Likewise.
225 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
227 * Makefile.in (SFILES): Append arch/arm-linux.c,
228 arch/arm-get-next-pcs.c.
229 (arm-linux.o): New rule.
230 (arm-get-next-pcs.o): New rule.
231 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
233 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
234 to linux-aarch32-low.c.
235 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
236 (arm_breakpoint_len, thumb_breakpoint): Likewise.
237 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
238 (thumb2_breakpoint_len): Likewise.
239 (arm_is_thumb_mode): Make non-static.
240 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
241 from linux-aarch32-low.c.
242 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
243 (arm_breakpoint_len, thumb_breakpoint): Likewise.
244 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
245 (thumb2_breakpoint_len): Likewise.
246 (arm_is_thumb_mode): New declaration.
247 * linux-arm-low.c: Include arch/arm-linux.h
248 aarch/arm-get-next-pcs.h, sys/syscall.h.
249 (get_next_pcs_ops): New struct.
250 (get_next_pcs_addr_bits_remove): New function.
251 (get_next_pcs_is_thumb): New function.
252 (get_next_pcs_read_memory_unsigned_integer): Likewise.
253 (arm_sigreturn_next_pc): Likewise.
254 (get_next_pcs_syscall_next_pc): Likewise.
255 (arm_gdbserver_get_next_pcs): Likewise.
256 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
258 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
259 * server.h: Include gdb_vecs.h.
261 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
263 * Makefile.in (SFILES): Append common/common-regcache.c.
264 (OBS): Append common-regcache.o.
265 (common-regcache.o): New rule.
266 * regcache.c (init_register_cache): Initialize cache to
268 (regcache_raw_read_unsigned): New function.
269 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
270 register_status enum.
272 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
274 * linux-aarch64-low.c (the_low_targets): Rename
275 breakpoint_reinsert_addr to get_next_pcs.
276 * linux-arm-low.c (the_low_targets): Likewise.
277 * linux-bfin-low.c (the_low_targets): Likewise.
278 * linux-cris-low.c (the_low_targets): Likewise.
279 * linux-crisv32-low.c (the_low_targets): Likewise.
280 * linux-low.c (can_software_single_step): Likewise.
281 (install_software_single_step_breakpoints): New function.
282 (start_step_over): Use install_software_single_step_breakpoints.
283 * linux-low.h: New CORE_ADDR vector.
284 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
286 * linux-mips-low.c (the_low_targets): Likewise.
287 * linux-nios2-low.c (the_low_targets): Likewise.
288 * linux-sparc-low.c (the_low_targets): Likewise.
290 2015-12-17 Pedro Alves <palves@redhat.com>
292 * linux-low.c (linux_kill_one_lwp): Remove references to
294 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
296 (linux_init_signals): Delete.
297 (initialize_low): Adjust.
298 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
300 2015-12-16 Pedro Alves <palves@redhat.com>
302 * configure.ac (compiler warning flags): When testing a
303 -Wno-foo option, check whether -Wfoo works instead.
304 * configure: Regenerate.
306 2015-12-11 Don Breazeal <donb@codesourcery.com>
308 * server.c (process_serial_event): Don't exit from gdbserver
309 in remote mode if there are still active inferiors.
311 2015-12-11 Yao Qi <yao.qi@linaro.org>
313 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
314 arm_breakpoint_at if the process is 32-bit.
316 2015-12-11 Yao Qi <yao.qi@linaro.org>
318 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
321 2015-12-07 Yao Qi <yao.qi@linaro.org>
323 * configure.srv: Append arm.o to srv_tgtobj for
324 aarch64*-*-linux* target.
325 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
326 from linux-arm-low.c.
327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
330 (thumb2_breakpoint_len): Likewise.
331 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
332 (arm_breakpoint_kinds): Likewise.
333 (arm_breakpoint_kind_from_pc): Likewise.
334 (arm_sw_breakpoint_from_kind): Likewise.
335 (arm_breakpoint_kind_from_current_state): Likewise.
336 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
337 (arm_sw_breakpoint_from_kind): Declare.
338 (arm_breakpoint_kind_from_current_state): Declare.
339 (arm_breakpoint_at): Declare.
340 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
341 arm_sw_breakpoint_from_kind if process is 32-bit.
342 (aarch64_breakpoint_kind_from_pc): New function.
343 (aarch64_breakpoint_kind_from_current_state): New function.
344 (the_low_target): Initialize fields breakpoint_kind_from_pc
345 and breakpoint_kind_from_current_state.
346 * linux-arm-low.c (arm_breakpoint_kinds): Move to
348 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
349 (arm_breakpoint, arm_breakpoint_len): Likewise.
350 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
351 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
352 (arm_is_thumb_mode): Likewise.
353 (arm_breakpoint_at): Likewise.
354 (arm_breakpoint_kind_from_pc): Likewise.
355 (arm_sw_breakpoint_from_kind): Likewise.
356 (arm_breakpoint_kind_from_current_state): Likewise.
359 2015-08-04 Yao Qi <yao.qi@linaro.org>
361 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
362 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
363 * server.c (extended_protocol): Remove "static".
364 * server.h (extended_protocol): Declare it.
366 2015-12-04 Josh Stone <jistone@redhat.com>
368 * target.h (struct target_ops) <arch_setup>: Rename to ...
369 (struct target_ops) <post_create_inferior>: ... this.
370 (target_arch_setup): Rename to ...
371 (target_post_create_inferior): ... this, calling post_create_inferior.
372 * server.c (start_inferior): Update target_arch_setup calls to
373 target_post_create_inferior.
374 * linux-low.c (linux_low_ptrace_options): Forward declare.
375 (linux_arch_setup): Update its comment for general use.
376 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
377 (struct linux_target_ops): Use linux_post_create_inferior.
378 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
379 to post_create_inferior.
380 * nto-low.c (struct nto_target_ops): Likewise.
381 * spu-low.c (struct spu_target_ops): Likewise.
382 * win32-low.c (struct win32_target_ops): Likewise.
384 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
386 * linux-arm-low.c: Remove duplicate arch/arm.h include.
388 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
390 * linux-arm-low.c (arm_reinsert_addr): Remove function.
391 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
392 * linux-cris-low.c (cris_reinsert_addr> Remove function.
393 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
394 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
395 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
396 * linux-mips-low.c (mips_reinsert_addr): Remove function.
397 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
398 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
399 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
400 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
403 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
405 * linux-low.c (linux_look_up_symbols): Don't call
406 linux_supports_traceclone.
407 * linux-low.h (thread_db_init): Remove use_events argument.
408 * thread-db.c (thread_db_use_event): Remove global variable.
409 (struct thread_db) <td_thr_event_enable_p>: Remove field.
410 (struct thread_db) <td_create_bp>: Remove field.
411 (thread_db_create_event): Remove function.
412 (thread_db_enable_reporting): Likewise.
413 (find_one_thread): Don't check for thread_db_use_events.
414 (attach_thread): Likewise.
415 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
416 (try_thread_db_load_1): Don't check for thread_db_use_events.
417 (thread_db_init): Remove use_events argument and thread events
419 (remove_thread_event_breakpoints): Remove function.
420 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
422 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
424 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
427 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
428 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
429 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
430 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
432 * linux-crisv32-low.c (cris_supports_hardware_single_step):
434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
435 * linux-low.c (can_hardware_single_step): Use
436 supports_hardware_single_step.
437 (can_software_single_step): New function.
438 (start_step_over): Call can_software_single_step.
439 (linux_supports_hardware_single_step): New function.
440 (struct target_ops) <supports_software_single_step>: Initialize.
441 * linux-low.h (struct linux_target_ops)
442 <supports_hardware_single_step>: Initialize.
443 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
445 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
446 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
447 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
448 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
449 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
451 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
452 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
454 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
455 (struct linux_target_ops) <tile_supports_hardware_single_step>:
457 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
459 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
462 * target.h (struct target_ops): <supports_software_single_step>:
464 (target_supports_software_single_step): New macro.
466 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
468 * linux-low.c (linux_wait_1): Fix pc advance condition.
469 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
470 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
472 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
474 * linux-arm-low.c (arm_is_thumb_mode): New function.
475 (arm_breakpoint_at): Use arm_is_thumb_mode.
476 (arm_breakpoint_kind_from_current_state): New function.
477 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
479 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
480 (linux_breakpoint_kind_from_current_state): New function.
481 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
482 * linux-low.h (struct linux_target_ops)
483 <breakpoint_kind_from_current_state>: New field.
484 * target.h (struct target_ops): Likewise.
485 (target_breakpoint_kind_from_current_state): New macro.
487 2015-11-30 Pedro Alves <palves@redhat.com>
489 * linux-low.c (linux_resume): Wake up the event loop before
492 2015-11-30 Pedro Alves <palves@redhat.com>
494 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
496 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
498 * target.c (struct thread_search): New structure.
499 (thread_search_callback): New function.
500 (prev_general_thread): New global.
501 (prepare_to_access_memory, done_accessing_memory): New functions.
502 * target.h (prepare_to_access_memory, done_accessing_memory):
503 Replace macros with function declarations.
505 2015-11-30 Pedro Alves <palves@redhat.com>
508 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
509 report TARGET_WAITKIND_NO_RESUMED.
510 * remote-utils.c (prepare_resume_reply): Handle
511 TARGET_WAITKIND_NO_RESUMED.
512 * server.c (report_no_resumed): New global.
513 (handle_query) <qSupported>: Handle "no-resumed+". Report
514 "no-resumed+" support.
515 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
516 return error if the client doesn't support no-resumed events.
517 (push_stop_notification): New function.
518 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
519 events if the client supports them.
521 2015-11-30 Pedro Alves <palves@redhat.com>
523 * linux-low.c (thread_still_has_status_pending_p): Don't check
525 (lwp_resumed): New function.
526 (status_pending_p_callback): Return early if the LWP is not
527 supposed to be resumed.
529 2015-11-30 Pedro Alves <palves@redhat.com>
531 * linux-low.c (handle_extended_wait): Assert that the LWP's
532 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
533 thread create events, leave the new child's status pending.
534 (linux_low_filter_event): If GDB wants to hear about thread exit
535 events, leave the LWP marked dead and don't delete it.
536 (linux_wait_for_event_filtered): Don't check for thread exit.
537 (filter_exit_event): New function.
538 (linux_wait_1): Use it, when returning an exit event.
539 (linux_resume_one_lwp_throw): Assert that the LWP's
540 waitstatus is TARGET_WAITKIND_IGNORE.
541 * remote-utils.c (prepare_resume_reply): Handle
542 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
543 * server.c (report_thread_events): New global.
544 (handle_general_set): Handle QThreadEvents.
545 (handle_query) <qSupported>: Handle and report QThreadEvents+;
546 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
547 TARGET_WAITKIND_THREAD_EXITED.
548 * server.h (report_thread_events): Declare.
550 2015-11-30 Pedro Alves <palves@redhat.com>
552 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
553 the thread's last_resume_kind was resume_stop.
555 2015-11-30 Pedro Alves <palves@redhat.com>
557 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
560 2015-11-30 Pedro Alves <palves@redhat.com>
562 * server.c (handle_v_requests): Handle vCtrlC.
564 2015-11-30 Pedro Alves <palves@redhat.com>
566 * gdbthread.h (find_any_thread_of_pid): Declare.
567 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
569 * server.c (handle_query): If current_thread is NULL, look for
570 another thread of the selected process.
572 2015-11-26 Daniel Colascione <dancol@dancol.org>
573 Simon Marchi <simon.marchi@ericsson.com>
575 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
576 * server.c (handle_qxfer_threads_worker): Refactor to include thread
578 * target.h (struct target_ops) <thread_name>: New field.
579 (target_thread_name): New macro.
581 2015-11-23 Joel Brobecker <brobecker@adacore.com>
583 * regcache.h (regcache_invalidate_pid): Add declaration.
584 * regcache.c (regcache_invalidate_pid): New function, extracted
585 from regcache_invalidate.
586 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
587 Add trivial documentation comment.
588 * lynx-low.c: Use regcache_invalidate_pid instead of
591 2015-11-23 Joel Brobecker <brobecker@adacore.com>
593 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
594 and Elf64_auxv_t if the target is Android.
596 2015-11-22 Doug Evans <xdje42@gmail.com>
598 * target.h: #include <sys/types.h>.
600 2015-11-19 Pedro Alves <palves@redhat.com>
602 * linux-low.c (linux_process_qsupported): Change prototype.
604 * linux-low.h (struct linux_target_ops) <process_qsupported>:
606 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
607 and adjust to loop over all features.
608 * server.c (handle_query) <qSupported>: Adjust to call
609 target_process_qsupported once, passing it a vector of unprocessed
611 * target.h (struct target_ops) <process_qsupported>: Change
613 (target_process_qsupported): Adjust.
615 2015-11-19 Pedro Alves <palves@redhat.com>
617 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
619 * configure: Regenerate.
621 2015-11-19 Pedro Alves <palves@redhat.com>
623 * configure: Regenerate.
625 2015-11-19 Yao Qi <yao.qi@linaro.org>
627 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
630 2015-11-19 Yao Qi <yao.qi@linaro.org>
632 * linux-aarch64-low.c (enum aarch64_operand_type): New.
633 (struct aarch64_operand): Move enum out.
635 2015-11-19 Yao Qi <yao.qi@linaro.org>
637 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
638 struct user_fpsimd_state *.
639 (aarch64_store_fpregset): Likewise.
641 2015-11-19 Yao Qi <yao.qi@linaro.org>
643 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
644 struct user_pt_regs *.
645 (aarch64_store_gregset): Likewise.
647 2015-11-18 Pedro Alves <palves@redhat.com>
649 * Makefile.in (all_object_files): Add $IPA_OBJS.
651 2015-11-17 Pedro Alves <palves@redhat.com>
653 * win32-low.c (win32_resume): Use gdb_signal_from_host,
654 GDB_SIGNAL_0 and gdb_signal_to_string.
656 2015-11-17 Pedro Alves <palves@redhat.com>
658 * win32-low.c (handle_output_debug_string): Remove parameter.
659 (win32_kill): Remove our_status local and adjust call to
660 handle_output_debug_string.
661 (get_child_debug_event): Adjust call to
662 handle_output_debug_string.
664 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
666 * linux-mips-low.c (mips_fill_gregset): Add cast.
667 (mips_store_gregset): Likewise.
668 (mips_fill_fpregset): Likewise.
669 (mips_store_fpregset): Likewise.
671 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
673 * linux-mips-low.c (mips_add_watchpoint): Rename private to
676 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
678 * linux-mips-low.c (mips_linux_new_thread): Change type of
679 watch_type to enum target_hw_bp_type.
681 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
683 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
684 Change return type to arm_hwbp_type.
686 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
688 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
689 (arm_store_gregset): Likewise.
690 * linux-arm-low.c (arm_get_hwcap): Likewise.
691 (arm_read_description): Likewise.
693 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
695 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
697 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
699 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
700 (ppc_fill_vsxregset): Likewise.
701 (ppc_store_vsxregset): Likewise.
702 (ppc_fill_vrregset): Likewise.
703 (ppc_store_vrregset): Likewise.
704 (ppc_fill_evrregset): Likewise.
705 (ppc_store_evrregset): Likewise.
707 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
709 * linux-ppc-low.c (ppc_usrregs_info): Remove
711 (ppc_arch_setup): Move lower in file.
713 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
715 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
716 (ps_pdwrite): Likewise.
718 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
720 * linux-arm-low.c (arm_new_thread): Move pointer dereference
721 to after assert checks.
723 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
725 * proc-service.c (ps_pdread): Add/adjust casts.
726 (ps_pdwrite): Add/adjust casts.
728 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
730 * server.c (handle_search_memory_1): Cast return value of
733 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
735 * server.c (write_qxfer_response): Change type of data to
738 2015-10-29 Pedro Alves <palves@redhat.com>
740 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
742 2015-10-29 Pedro Alves <palves@redhat.com>
744 * tracepoint.c (clear_installed_tracepoints): Add casts.
746 2015-10-29 Pedro Alves <palves@redhat.com>
748 * server.c (handle_v_cont, process_serial_event): Add enum
749 gdb_signal casts to signal parsing code.
751 2015-10-29 Pedro Alves <palves@redhat.com>
753 * linux-low.h (NULL_REGSET): Define.
754 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
755 * linux-arm-low.c (arm_regsets): Likewise.
756 * linux-crisv32-low.c (cris_regsets): Likewise.
757 * linux-m68k-low.c (m68k_regsets): Likewise.
758 * linux-mips-low.c (mips_regsets): Likewise.
759 * linux-nios2-low.c (nios2_regsets): Likewise.
760 * linux-ppc-low.c (ppc_regsets): Likewise.
761 * linux-s390-low.c (s390_regsets): Likewise.
762 * linux-sh-low.c (sh_regsets): Likewise.
763 * linux-sparc-low.c (sparc_regsets): Likewise.
764 * linux-tic6x-low.c (tic6x_regsets): Likewise.
765 * linux-tile-low.c (tile_regsets): Likewise.
766 * linux-x86-low.c (x86_regsets): Likewise.
767 * linux-xtensa-low.c (xtensa_regsets): Likewise.
769 2015-10-29 Pedro Alves <palves@redhat.com>
771 * linux-low.h (NULL_REGSET): Define.
772 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
773 * linux-arm-low.c (arm_regsets): Likewise.
774 * linux-crisv32-low.c (cris_regsets): Likewise.
775 * linux-m68k-low.c (m68k_regsets): Likewise.
776 * linux-mips-low.c (mips_regsets): Likewise.
777 * linux-nios2-low.c (nios2_regsets): Likewise.
778 * linux-ppc-low.c (ppc_regsets): Likewise.
779 * linux-s390-low.c (s390_regsets): Likewise.
780 * linux-sh-low.c (sh_regsets): Likewise.
781 * linux-sparc-low.c (sparc_regsets): Likewise.
782 * linux-tic6x-low.c (tic6x_regsets): Likewise.
783 * linux-tile-low.c (tile_regsets): Likewise.
784 * linux-x86-low.c (x86_regsets): Likewise.
785 * linux-xtensa-low.c (xtensa_regsets): Likewise.
787 2015-10-26 Doug Evans <dje@google.com>
789 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
791 2015-10-26 Doug Evans <dje@google.com>
793 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
795 2015-10-26 Doug Evans <dje@google.com>
797 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
799 (attach_thread, find_new_threads_callback): Ditto.
801 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
803 * mem-break.h (set_breakpoint_data): Remove.
805 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
807 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
808 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
809 (initialize_low): Remove set_breakpoint_data call.
810 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
811 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
812 (initialize_low): Remove set_breakpoint_data call.
813 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
814 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
815 (initialize_low): Remove set_breakpoint_data call.
817 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
819 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
820 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
821 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
822 * target.h (target_breakpoint_kind_from_pc): New macro.
824 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
826 * linux-low.c (default_breakpoint_kind_from_pc): New function.
827 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
828 the default breakpoint kind.
830 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
832 * linux-arm-low.c (arm_supports_z_point_type): Add software
835 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
837 * linux-arm-low.c: Refactor breakpoint definitions.
838 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
839 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
841 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
843 * Makefile.in: Add arm.c/o.
844 * configure.srv: Likewise.
845 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
846 (arm_breakpoint_kind_from_pc): New function.
847 (arm_sw_breakpoint_from_kind): Return proper kind.
848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
850 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
852 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
854 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
855 (struct raw_breakpoint) <size>: Remove.
856 (struct raw_breakpoint) <kind>: Add.
857 (bp_size): New function.
858 (bp_opcode): Likewise.
859 (find_raw_breakpoint_at): Adjust for kind.
860 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
861 (remove_memory_breakpoint): Adjust for kind call bp_size.
862 (set_raw_breakpoint_at): Adjust for kind.
863 (set_breakpoint): Likewise.
864 (set_breakpoint_at): Call breakpoint_kind_from_pc.
865 (delete_raw_breakpoint): Adjust for kind.
866 (delete_breakpoint): Likewise.
867 (find_gdb_breakpoint): Likewise.
868 (set_gdb_breakpoint_1): Likewise.
869 (set_gdb_breakpoint): Likewise.
870 (delete_gdb_breakpoint_1): Likewise.
871 (delete_gdb_breakpoint): Likewise.
872 (uninsert_raw_breakpoint): Likewise.
873 (reinsert_raw_breakpoint): Likewise.
874 (set_breakpoint_data): Remove.
875 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
876 (check_mem_read): Adjust for kind call bp_size.
877 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
878 (clone_one_breakpoint): Adjust for kind.
879 * mem-break.h (set_gdb_breakpoint): Likewise.
880 (delete_gdb_breakpoint): Likewise.
881 * server.c (process_serial_event): Likewise.
883 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
885 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
886 (struct linux_target_ops) <breakpoint>: Remove.
887 (struct linux_target_ops) <breakpoint_len>: Remove.
888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
890 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
891 (arm_sw_breakpoint_from_kind): New function.
892 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
893 (struct linux_target_ops) <breakpoint>: Remove.
894 (struct linux_target_ops) <breakpoint_len>: Remove.
895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
897 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
898 (struct linux_target_ops) <breakpoint>: Remove.
899 (struct linux_target_ops) <breakpoint_len>: Remove.
900 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
901 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
902 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
903 (struct linux_target_ops) <breakpoint>: Remove.
904 (struct linux_target_ops) <breakpoint_len>: Remove.
905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
906 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
907 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
908 and sw_breakpoint_from_kind to increment the pc.
909 (linux_breakpoint_kind_from_pc): New function.
910 (linux_sw_breakpoint_from_kind): New function.
911 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
912 (initialize_low): Call breakpoint_kind_from_pc and
913 sw_breakpoint_from_kind to replace breakpoint_data/len.
914 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
916 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
917 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
918 (struct linux_target_ops) <breakpoint>: Remove.
919 (struct linux_target_ops) <breakpoint_len>: Remove.
920 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
921 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
922 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
923 (struct linux_target_ops) <breakpoint>: Remove.
924 (struct linux_target_ops) <breakpoint_len>: Remove.
925 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
926 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
927 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
928 (struct linux_target_ops) <breakpoint>: Remove.
929 (struct linux_target_ops) <breakpoint_len>: Remove.
930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
932 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
933 (struct linux_target_ops) <breakpoint>: Remove.
934 (struct linux_target_ops) <breakpoint_len>: Remove.
935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
937 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
938 (struct linux_target_ops) <breakpoint>: Remove.
939 (struct linux_target_ops) <breakpoint_len>: Remove.
940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
942 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
943 (struct linux_target_ops) <breakpoint>: Remove.
944 (struct linux_target_ops) <breakpoint_len>: Remove.
945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
947 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
948 (struct linux_target_ops) <breakpoint>: Remove.
949 (struct linux_target_ops) <breakpoint_len>: Remove.
950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
952 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
953 (struct linux_target_ops) <breakpoint>: Remove.
954 (struct linux_target_ops) <breakpoint_len>: Remove.
955 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
956 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
957 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
958 (struct linux_target_ops) <breakpoint>: Remove.
959 (struct linux_target_ops) <breakpoint_len>: Remove.
960 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
962 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
963 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
964 (struct linux_target_ops) <breakpoint>: Remove.
965 (struct linux_target_ops) <breakpoint_len>: Remove.
966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
968 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
969 (struct linux_target_ops) <breakpoint>: Remove.
970 (struct linux_target_ops) <breakpoint_len>: Remove.
971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
974 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
976 * linux-cris-low.c (cris_get_pc): Remove void arg.
978 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
980 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
983 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
985 * inferiors.c (thread_pid_matches_callback): New function.
986 (find_thread_process): New function.
987 (remove_thread): Reset current_thread.
988 (remove_process): Assert threads have been removed first.
990 2015-10-15 Yao Qi <yao.qi@linaro.org>
992 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
994 (aarch64_remove_point): Likewise.
995 * regcache.c (regcache_register_size): New function.
997 2015-10-12 Yao Qi <yao.qi@linaro.org>
999 * linux-aarch64-low.c: Update all callers as emit_load_store
1000 is renamed to aarch64_emit_load_store.
1002 2015-10-12 Yao Qi <yao.qi@linaro.org>
1004 * linux-aarch64-low.c: Update all callers of function renaming
1005 from emit_insn to aarch64_emit_insn.
1007 2015-10-12 Yao Qi <yao.qi@linaro.org>
1009 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1010 arch/aarch64-insn.h.
1011 (struct aarch64_memory_operand): Likewise.
1013 (emit_insn): Move to arch/aarch64-insn.c.
1014 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1015 (emit_load_store): Move to arch/aarch64-insn.c.
1016 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1017 (can_encode_int32): Remove.
1019 2015-10-12 Yao Qi <yao.qi@linaro.org>
1021 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1022 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1023 (aarch64_relocate_instruction): Likewise.
1024 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1025 (struct aarch64_insn_visitor): Likewise.
1027 2015-10-12 Yao Qi <yao.qi@linaro.org>
1029 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1030 (struct aarch64_insn_visitor): New.
1031 (struct aarch64_insn_relocation_data): New.
1032 (aarch64_ftrace_insn_reloc_b): New function.
1033 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1034 (aarch64_ftrace_insn_reloc_cb): Likewise.
1035 (aarch64_ftrace_insn_reloc_tb): Likewise.
1036 (aarch64_ftrace_insn_reloc_adr): Likewise.
1037 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1038 (aarch64_ftrace_insn_reloc_others): Likewise.
1040 (aarch64_relocate_instruction): Use visitor.
1042 2015-10-12 Yao Qi <yao.qi@linaro.org>
1044 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1045 int. Add argument buf.
1046 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1047 aarch64_relocate_instruction.
1049 2015-10-12 Yao Qi <yao.qi@linaro.org>
1051 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1052 argument insn. Remove local variable insn. Don't call
1054 (aarch64_install_fast_tracepoint_jump_pad): Call
1057 2015-09-30 Yao Qi <yao.qi@linaro.org>
1059 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1060 (emit_load_store_pair): Likewise.
1062 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1064 * dll.c (match_dll): Add cast(s).
1065 (unloaded_dll): Likewise.
1066 * linux-low.c (second_thread_of_pid_p): Likewise.
1067 (delete_lwp_callback): Likewise.
1068 (count_events_callback): Likewise.
1069 (select_event_lwp_callback): Likewise.
1070 (linux_set_resume_request): Likewise.
1071 * server.c (accumulate_file_name_length): Likewise.
1072 (emit_dll_description): Likewise.
1073 (handle_qxfer_threads_worker): Likewise.
1074 (visit_actioned_threads): Likewise.
1075 * thread-db.c (any_thread_of): Likewise.
1076 * tracepoint.c (same_process_p): Likewise.
1077 (match_blocktype): Likewise.
1078 (build_traceframe_info_xml): Likewise.
1080 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1082 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1084 (gdb_unparse_agent_expr): Likewise.
1085 * hostio.c (require_data): Likewise.
1086 (handle_pread): Likewise.
1087 * linux-low.c (disable_regset): Likewise.
1088 (fetch_register): Likewise.
1089 (store_register): Likewise.
1090 (get_dynamic): Likewise.
1091 (linux_qxfer_libraries_svr4): Likewise.
1092 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1093 (set_fast_tracepoint_jump): Likewise.
1094 (uninsert_fast_tracepoint_jumps_at): Likewise.
1095 (reinsert_fast_tracepoint_jumps_at): Likewise.
1096 (validate_inserted_breakpoint): Likewise.
1097 (clone_agent_expr): Likewise.
1098 * regcache.c (init_register_cache): Likewise.
1099 * remote-utils.c (putpkt_binary_1): Likewise.
1100 (decode_M_packet): Likewise.
1101 (decode_X_packet): Likewise.
1102 (look_up_one_symbol): Likewise.
1103 (relocate_instruction): Likewise.
1104 (monitor_output): Likewise.
1105 * server.c (handle_search_memory): Likewise.
1106 (handle_qxfer_exec_file): Likewise.
1107 (handle_qxfer_libraries): Likewise.
1108 (handle_qxfer): Likewise.
1109 (handle_query): Likewise.
1110 (handle_v_cont): Likewise.
1111 (handle_v_run): Likewise.
1112 (captured_main): Likewise.
1113 * target.c (write_inferior_memory): Likewise.
1114 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1115 * tracepoint.c (init_trace_buffer): Likewise.
1116 (add_tracepoint_action): Likewise.
1117 (add_traceframe): Likewise.
1118 (add_traceframe_block): Likewise.
1119 (cmd_qtdpsrc): Likewise.
1120 (cmd_qtdv): Likewise.
1121 (cmd_qtstatus): Likewise.
1122 (response_source): Likewise.
1123 (response_tsv): Likewise.
1124 (cmd_qtnotes): Likewise.
1125 (gdb_collect): Likewise.
1126 (initialize_tracepoint): Likewise.
1128 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1130 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1131 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1132 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1134 (enum aarch64_condition_codes): New enum.
1135 (w0): New static global.
1138 (struct aarch64_memory_operand) <type>: New
1139 MEMORY_OPERAND_POSTINDEX type.
1140 (postindex_memory_operand): New helper function.
1141 (emit_ret): New function.
1142 (emit_load_store_pair): New function, factored out of emit_stp
1143 with support for MEMORY_OPERAND_POSTINDEX.
1144 (emit_stp): Rewrite using emit_load_store_pair.
1145 (emit_ldp): New function.
1146 (emit_load_store): Likewise.
1147 (emit_ldr): Mention post-index instruction in comment.
1148 (emit_ldrh): New function.
1149 (emit_ldrb): New function.
1150 (emit_ldrsw): Mention post-index instruction in comment.
1151 (emit_str): Likewise.
1152 (emit_subs): New function.
1153 (emit_cmp): Likewise.
1154 (emit_and): Likewise.
1155 (emit_orr): Likewise.
1156 (emit_orn): Likewise.
1157 (emit_eor): Likewise.
1158 (emit_mvn): Likewise.
1159 (emit_lslv): Likewise.
1160 (emit_lsrv): Likewise.
1161 (emit_asrv): Likewise.
1162 (emit_mul): Likewise.
1163 (emit_sbfm): Likewise.
1164 (emit_sbfx): Likewise.
1165 (emit_ubfm): Likewise.
1166 (emit_ubfx): Likewise.
1167 (emit_csinc): Likewise.
1168 (emit_cset): Likewise.
1169 (emit_nop): Likewise.
1170 (emit_ops_insns): New helper function.
1171 (emit_pop): Likewise.
1172 (emit_push): Likewise.
1173 (aarch64_emit_prologue): New function.
1174 (aarch64_emit_epilogue): Likewise.
1175 (aarch64_emit_add): Likewise.
1176 (aarch64_emit_sub): Likewise.
1177 (aarch64_emit_mul): Likewise.
1178 (aarch64_emit_lsh): Likewise.
1179 (aarch64_emit_rsh_signed): Likewise.
1180 (aarch64_emit_rsh_unsigned): Likewise.
1181 (aarch64_emit_ext): Likewise.
1182 (aarch64_emit_log_not): Likewise.
1183 (aarch64_emit_bit_and): Likewise.
1184 (aarch64_emit_bit_or): Likewise.
1185 (aarch64_emit_bit_xor): Likewise.
1186 (aarch64_emit_bit_not): Likewise.
1187 (aarch64_emit_equal): Likewise.
1188 (aarch64_emit_less_signed): Likewise.
1189 (aarch64_emit_less_unsigned): Likewise.
1190 (aarch64_emit_ref): Likewise.
1191 (aarch64_emit_if_goto): Likewise.
1192 (aarch64_emit_goto): Likewise.
1193 (aarch64_write_goto_address): Likewise.
1194 (aarch64_emit_const): Likewise.
1195 (aarch64_emit_call): Likewise.
1196 (aarch64_emit_reg): Likewise.
1197 (aarch64_emit_pop): Likewise.
1198 (aarch64_emit_stack_flush): Likewise.
1199 (aarch64_emit_zero_ext): Likewise.
1200 (aarch64_emit_swap): Likewise.
1201 (aarch64_emit_stack_adjust): Likewise.
1202 (aarch64_emit_int_call_1): Likewise.
1203 (aarch64_emit_void_call_2): Likewise.
1204 (aarch64_emit_eq_goto): Likewise.
1205 (aarch64_emit_ne_goto): Likewise.
1206 (aarch64_emit_lt_goto): Likewise.
1207 (aarch64_emit_le_goto): Likewise.
1208 (aarch64_emit_gt_goto): Likewise.
1209 (aarch64_emit_ge_got): Likewise.
1210 (aarch64_emit_ops_impl): New static global variable.
1211 (aarch64_emit_ops): New target function, return
1212 &aarch64_emit_ops_impl.
1213 (struct linux_target_ops): Install it.
1215 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1217 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1218 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1220 * linux-aarch64-ipa.c: New file.
1221 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1223 (aarch64_get_thread_area): New target method.
1224 (extract_signed_bitfield): New helper function.
1225 (aarch64_decode_ldr_literal): New function.
1226 (enum aarch64_opcodes): New enum.
1227 (struct aarch64_register): New struct.
1228 (struct aarch64_operand): New struct.
1229 (x0): New static global.
1238 (aarch64_register): New helper function.
1239 (register_operand): Likewise.
1240 (immediate_operand): Likewise.
1241 (struct aarch64_memory_operand): New struct.
1242 (offset_memory_operand): New helper function.
1243 (preindex_memory_operand): Likewise.
1244 (enum aarch64_system_control_registers): New enum.
1245 (ENCODE): New macro.
1246 (emit_insn): New helper function.
1247 (emit_b): New function.
1248 (emit_bcond): Likewise.
1249 (emit_cb): Likewise.
1250 (emit_tb): Likewise.
1251 (emit_blr): Likewise.
1252 (emit_stp): Likewise.
1253 (emit_ldp_q_offset): Likewise.
1254 (emit_stp_q_offset): Likewise.
1255 (emit_load_store): Likewise.
1256 (emit_ldr): Likewise.
1257 (emit_ldrsw): Likewise.
1258 (emit_str): Likewise.
1259 (emit_ldaxr): Likewise.
1260 (emit_stxr): Likewise.
1261 (emit_stlr): Likewise.
1262 (emit_data_processing_reg): Likewise.
1263 (emit_data_processing): Likewise.
1264 (emit_add): Likewise.
1265 (emit_sub): Likewise.
1266 (emit_mov): Likewise.
1267 (emit_movk): Likewise.
1268 (emit_mov_addr): Likewise.
1269 (emit_mrs): Likewise.
1270 (emit_msr): Likewise.
1271 (emit_sevl): Likewise.
1272 (emit_wfe): Likewise.
1273 (append_insns): Likewise.
1274 (can_encode_int32_in): New helper function.
1275 (aarch64_relocate_instruction): New function.
1276 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1277 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1278 (struct linux_target_ops): Install aarch64_get_thread_area,
1279 aarch64_install_fast_tracepoint_jump_pad and
1280 aarch64_get_min_fast_tracepoint_insn_len.
1282 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1284 * Makefile.in (aarch64-insn.o): New rule.
1285 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1287 2015-09-21 Yao Qi <yao.qi@linaro.org>
1289 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1291 2015-09-21 Yao Qi <yao.qi@linaro.org>
1293 * tracepoint.c (max_jump_pad_size): Remove.
1295 2015-09-18 Yao Qi <yao.qi@linaro.org>
1297 * linux-aarch64-low.c: Don't include sys/uio.h.
1298 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1300 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1302 * tracepoint.c (eval_result_type): Change prototype.
1303 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1305 2015-09-15 Pedro Alves <palves@redhat.com>
1307 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1308 Check whether to report exec events instead of checking whether
1309 multiprocess is enabled.
1311 2015-09-15 Pedro Alves <palves@redhat.com>
1314 * remote-utils.c (prepare_resume_reply): Merge
1315 TARGET_WAITKIND_VFORK_DONE switch case with the
1316 TARGET_WAITKIND_FORKED case.
1318 2015-09-15 Yao Qi <yao.qi@linaro.org>
1320 * server.c (handle_query): Check string comparison using
1321 "else if" instead of "if".
1323 2015-09-15 Yao Qi <yao.qi@linaro.org>
1325 * server.c (vCont_supported): New global variable.
1326 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1327 matches. Append ";vContSupported+" to own_buf.
1328 (handle_v_requests): Append ";s;S" to own_buf if target supports
1329 hardware single step or vCont_supported is false.
1330 (capture_main): Set vCont_supported to zero.
1332 2015-09-15 Yao Qi <yao.qi@linaro.org>
1334 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1336 (linux_supports_hardware_single_step): ... New function.
1337 (linux_target_ops): Update.
1338 * lynx-low.c (lynx_target_ops): Set field
1339 supports_hardware_single_step to target_can_do_hardware_single_step.
1340 * nto-low.c (nto_target_ops): Likewise.
1341 * spu-low.c (spu_target_ops): Likewise.
1342 * win32-low.c (win32_target_ops): Likewise.
1343 * target.c (target_can_do_hardware_single_step): New function.
1344 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1345 Remove. <supports_hardware_single_step>: New field.
1346 (target_supports_conditional_breakpoints): Remove.
1347 (target_supports_hardware_single_step): New macro.
1348 (target_can_do_hardware_single_step): Declare.
1349 * server.c (handle_query): Use target_supports_hardware_single_step
1350 instead of target_supports_conditional_breakpoints.
1352 2015-09-15 Yao Qi <yao.qi@linaro.org>
1354 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1356 (struct linux_target_ops the_low_target): Install
1357 aarch64_linux_siginfo_fixup.
1359 2015-09-11 Don Breazeal <donb@codesourcery.com>
1360 Luis Machado <lgustavo@codesourcery.com>
1362 * linux-low.c (linux_mourn): Static declaration.
1363 (linux_arch_setup): Move in front of
1364 handle_extended_wait.
1365 (linux_arch_setup_thread): New function.
1366 (handle_extended_wait): Handle exec events. Call
1367 linux_arch_setup_thread. Make event_lwp argument a
1368 pointer-to-a-pointer.
1369 (check_zombie_leaders): Do not check stopped threads.
1370 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1371 (linux_low_filter_event): Add lwp and thread for exec'ing
1372 non-leader thread if leader thread has been deleted.
1373 Refactor code into linux_arch_setup_thread and call it.
1374 Pass child lwp pointer by reference to handle_extended_wait.
1375 (linux_wait_for_event_filtered): Update comment.
1376 (linux_wait_1): Prevent clobbering exec event status.
1377 (linux_supports_exec_events): New function.
1378 (linux_target_ops) <supports_exec_events>: Initialize new member.
1379 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1381 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1382 * server.c (report_exec_events): New global variable.
1383 (handle_query): Handle qSupported query for exec-events feature.
1384 (captured_main): Initialize report_exec_events.
1385 * server.h (report_exec_events): Declare new global variable.
1386 * target.h (struct target_ops) <supports_exec_events>: New
1388 (target_supports_exec_events): New macro.
1389 * win32-low.c (win32_target_ops) <supports_exec_events>:
1390 Initialize new member.
1392 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1394 * linux-low.c (linux_low_enable_btrace): Remove.
1395 (linux_target_ops): Replace linux_low_enable_btrace with
1396 linux_enable_btrace.
1398 2015-09-03 Yao Qi <yao.qi@linaro.org>
1400 * linux-aarch64-low.c (aarch64_insert_point): Call
1401 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1404 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1406 * linux-low.c (check_stopped_by_breakpoint): Use
1407 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1409 2015-08-27 Pedro Alves <palves@redhat.com>
1411 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1413 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1415 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1416 the XNEW-family equivalent.
1417 (compile_bytecodes): Likewise.
1418 * dll.c (loaded_dll): Likewise.
1419 * event-loop.c (append_callback_event): Likewise.
1420 (create_file_handler): Likewise.
1421 (create_file_event): Likewise.
1422 * hostio.c (handle_open): Likewise.
1423 * inferiors.c (add_thread): Likewise.
1424 (add_process): Likewise.
1425 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1426 * linux-arm-low.c (arm_new_process): Likewise.
1427 (arm_new_thread): Likewise.
1428 * linux-low.c (add_to_pid_list): Likewise.
1429 (linux_add_process): Likewise.
1430 (handle_extended_wait): Likewise.
1431 (add_lwp): Likewise.
1432 (enqueue_one_deferred_signal): Likewise.
1433 (enqueue_pending_signal): Likewise.
1434 (linux_resume_one_lwp_throw): Likewise.
1435 (linux_resume_one_thread): Likewise.
1436 (linux_read_memory): Likewise.
1437 (linux_write_memory): Likewise.
1438 * linux-mips-low.c (mips_linux_new_process): Likewise.
1439 (mips_linux_new_thread): Likewise.
1440 (mips_add_watchpoint): Likewise.
1441 * linux-x86-low.c (initialize_low_arch): Likewise.
1442 * lynx-low.c (lynx_add_process): Likewise.
1443 * mem-break.c (set_raw_breakpoint_at): Likewise.
1444 (set_breakpoint): Likewise.
1445 (add_condition_to_breakpoint): Likewise.
1446 (add_commands_to_breakpoint): Likewise.
1447 (clone_agent_expr): Likewise.
1448 (clone_one_breakpoint): Likewise.
1449 * regcache.c (new_register_cache): Likewise.
1450 * remote-utils.c (look_up_one_symbol): Likewise.
1451 * server.c (queue_stop_reply): Likewise.
1452 (start_inferior): Likewise.
1453 (queue_stop_reply_callback): Likewise.
1454 (handle_target_event): Likewise.
1455 * spu-low.c (fetch_ppc_memory): Likewise.
1456 (store_ppc_memory): Likewise.
1457 * target.c (set_target_ops): Likewise.
1458 * thread-db.c (thread_db_load_search): Likewise.
1459 (try_thread_db_load_1): Likewise.
1460 * tracepoint.c (add_tracepoint): Likewise.
1461 (add_tracepoint_action): Likewise.
1462 (create_trace_state_variable): Likewise.
1463 (cmd_qtdpsrc): Likewise.
1464 (cmd_qtro): Likewise.
1465 (add_while_stepping_state): Likewise.
1466 * win32-low.c (child_add_thread): Likewise.
1467 (get_image_name): Likewise.
1469 2015-08-25 Yao Qi <yao.qi@linaro.org>
1471 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1473 2015-08-25 Yao Qi <yao.qi@linaro.org>
1475 * Makefile.in (aarch64-linux.o): New rule.
1476 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1478 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1479 (aarch64_init_debug_reg_state): Make it extern.
1480 (aarch64_linux_prepare_to_resume): Remove.
1482 2015-08-25 Yao Qi <yao.qi@linaro.org>
1484 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1485 lwp_arch_private_info and ptid_of_lwp.
1487 2015-08-25 Yao Qi <yao.qi@linaro.org>
1489 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1490 Find proc_info by find_process_pid. All callers updated.
1492 2015-08-25 Yao Qi <yao.qi@linaro.org>
1494 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1496 (debug_reg_change_callback): Remove.
1497 (aarch64_notify_debug_reg_change): Remove.
1499 2015-08-25 Yao Qi <yao.qi@linaro.org>
1501 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1502 Call current_lwp_ptid.
1504 2015-08-25 Yao Qi <yao.qi@linaro.org>
1506 * linux-aarch64-low.c (debug_reg_change_callback): Use
1509 2015-08-25 Yao Qi <yao.qi@linaro.org>
1511 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1513 2015-08-25 Yao Qi <yao.qi@linaro.org>
1515 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1517 2015-08-25 Yao Qi <yao.qi@linaro.org>
1519 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1522 2015-08-25 Yao Qi <yao.qi@linaro.org>
1524 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1526 (debug_reg_change_callback): Remove argument entry and add argument
1527 lwp. Remove local variable thread. Don't print thread id in the
1528 debugging output. Don't check whether pid of thread equals to pid.
1529 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1530 iterate_over_lwps instead find_inferior.
1532 2015-08-24 Pedro Alves <palves@redhat.com>
1534 * inferiors.c (get_first_process): New function.
1535 * inferiors.h (get_first_process): New declaration.
1536 * remote-utils.c (read_ptid): Default to the first process in the
1537 list, instead of to the current thread's process.
1539 2015-08-24 Pedro Alves <palves@redhat.com>
1541 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1542 * event-loop.c: Likewise.
1543 * remote-utils.c: Likewise.
1544 * tracepoint.c: Likewise.
1546 2015-08-24 Pedro Alves <palves@redhat.com>
1548 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1551 2015-08-21 Pedro Alves <palves@redhat.com>
1553 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1554 instead of literal 1.
1556 2015-08-21 Pedro Alves <palves@redhat.com>
1558 * tdesc.c (default_description): Explicitly zero-initialize.
1560 2015-08-21 Pedro Alves <palves@redhat.com>
1563 * inferiors.c (remove_thread): Discard any pending stop reply for
1565 * server.c (remove_all_on_match_pid): Rename to ...
1566 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1568 (discard_queued_stop_replies): Change parameter to a ptid. Now
1570 (handle_v_kill, kill_inferior_callback, captured_main)
1571 (process_serial_event): Adjust.
1572 * server.h (discard_queued_stop_replies): Declare.
1574 2015-08-21 Pedro Alves <palves@redhat.com>
1576 * linux-low.c (wait_for_sigstop): Always switch to no thread
1577 selected if the previously current thread dies.
1578 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1579 process instead of the current thread's.
1580 * remote-utils.c (input_interrupt): Don't check if there's no
1582 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1583 current thread to the general thread fails, error out.
1584 (handle_qxfer_auxv, handle_qxfer_libraries)
1585 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1586 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1587 (handle_query): Check if there's a thread selected instead of
1588 checking whether there's any thread in the thread list.
1589 (handle_qxfer_threads, handle_qxfer_btrace)
1590 (handle_qxfer_btrace_conf): Don't error out early if there's no
1591 thread in the thread list.
1592 (handle_v_cont, myresume): Don't set the current thread to the
1594 (process_serial_event) <Hg handling>: Also set thread_id if the
1595 previous general thread is still alive.
1596 (process_serial_event) <g/G handling>: If setting the current
1597 thread to the general thread fails, error out.
1598 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1599 thread's lwp instead of the current thread's.
1600 * target.c (set_desired_thread): If the desired thread was not
1601 found, leave the current thread pointing to NULL. Return an int
1602 (boolean) indicating success.
1603 * target.h (set_desired_thread): Change return type to int.
1605 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1607 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1608 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1610 (ps_get_thread_area): New function.
1612 2015-08-19 Gary Benson <gbenson@redhat.com>
1614 * hostio.c (handle_pread): Do not attempt to read more data
1615 than hostio_reply_with_data can fit in a packet.
1617 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1619 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1621 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1623 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1625 2015-08-06 Pedro Alves <palves@redhat.com>
1627 * tracepoint.c (expr_eval_result): Now an int.
1629 2015-08-06 Pedro Alves <palves@redhat.com>
1631 * gdbthread.h (struct regcache): Forward declare.
1632 (struct thread_info) <regcache_data>: Now a struct regcache
1634 * inferiors.c (inferior_regcache_data)
1635 (set_inferior_regcache_data): Now work with struct regcache
1637 * inferiors.h (struct regcache): Forward declare.
1638 (inferior_regcache_data, set_inferior_regcache_data): Now work
1639 with struct regcache pointers.
1640 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1641 (free_register_cache_thread): Remove struct regcache pointer
1644 2015-08-06 Pedro Alves <palves@redhat.com>
1646 * server.c (captured_main): On error, print the exception message
1647 to stderr, and if run_once is set, throw a quit.
1649 2015-08-06 Pedro Alves <palves@redhat.com>
1651 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1654 2015-08-06 Pedro Alves <palves@redhat.com>
1656 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1657 reading beyond the passed in buffer length.
1659 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1661 * tracepoint.c (symbol_list) <required>: Remove.
1663 2015-08-06 Pedro Alves <palves@redhat.com>
1665 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1666 count if stopping and suspending threads.
1667 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1668 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1669 (linux_detach): Complete an ongoing step-over.
1670 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1672 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1673 (linux_wait_1): If passing a signal to the inferior after
1674 finishing a step-over, unsuspend and re-resume all lwps. If we
1675 see a single-step event but the thread should be continuing, don't
1676 pass the trap to gdb.
1677 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1678 internal_error instead of gdb_assert.
1679 (enqueue_pending_signal): New function.
1680 (check_ptrace_stopped_lwp_gone): Add debug output.
1681 (start_step_over): Use internal_error instead of gdb_assert.
1682 (complete_ongoing_step_over): New function.
1683 (linux_resume_one_thread): Don't resume a suspended thread.
1684 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1687 2015-08-06 Pedro Alves <palves@redhat.com>
1689 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1690 (linux_thread_alive): Use lwp_is_marked_dead.
1691 (extended_event_reported): Delete.
1692 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1693 instead of extended_event_reported.
1694 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1696 (lwp_is_marked_dead): New function.
1697 (lwp_running): Use lwp_is_marked_dead.
1698 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1701 2015-08-06 Pedro Alves <palves@redhat.com>
1703 * linux-low.c (linux_wait_1): Move fork event output out of the
1704 !report_to_gdb check. Pass event_child->waitstatus to
1705 target_waitstatus_to_string instead of ourstatus.
1707 2015-08-04 Yao Qi <yao.qi@linaro.org>
1709 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1710 if current_thread is 32 bit.
1712 2015-08-04 Yao Qi <yao.qi@linaro.org>
1714 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1715 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1716 * server.c (extended_protocol): Remove "static".
1717 * server.h (extended_protocol): Declare it.
1719 2015-08-04 Yao Qi <yao.qi@linaro.org>
1721 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1722 both aarch64 and aarch32.
1723 (aarch64_set_pc): Likewise.
1725 2015-08-04 Yao Qi <yao.qi@linaro.org>
1727 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1728 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1729 arm-with-neon.xml to srv_xmlfiles.
1730 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1731 (is_64bit_tdesc): New function.
1732 (aarch64_linux_read_description): New function.
1733 (aarch64_arch_setup): Call aarch64_linux_read_description.
1734 (regs_info): Rename to regs_info_aarch64.
1735 (aarch64_regs_info): Return right regs_info.
1736 (initialize_low_arch): Call initialize_low_arch_aarch32.
1738 2015-08-04 Yao Qi <yao.qi@linaro.org>
1740 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1741 * linux-aarch32-low.c: New file.
1742 * linux-aarch32-low.h: New file.
1743 * linux-arm-low.c (arm_fill_gregset): Move it to
1744 linux-aarch32-low.c.
1745 (arm_store_gregset): Likewise.
1746 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1747 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1748 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1749 (regs_info): Rename to regs_info_arm.
1750 (arm_regs_info): Return regs_info_aarch32 if
1751 have_ptrace_getregset is 1 and target description is
1752 arm_with_neon or arm_with_vfpv3.
1753 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1754 Call initialize_low_arch_aarch32 instead.
1756 2015-08-04 Yao Qi <yao.qi@linaro.org>
1758 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1759 * linux-low.c: ... here.
1760 * linux-low.h (have_ptrace_getregset): Declare it.
1762 2015-08-04 Pedro Alves <palves@redhat.com>
1764 * thread-db.c (struct thread_db): Use new typedefs.
1765 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1767 (disable_thread_event_reporting): Cast result of dlsym to
1768 destination function pointer type.
1769 (thread_db_mourn): Use td_ta_delete_ftype.
1771 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1773 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1775 (CDX_BREAKPOINT): Define for R2.
1776 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1777 (the_low_target): Add comments.
1779 2015-07-30 Yao Qi <yao.qi@linaro.org>
1781 * linux-arm-low.c (arm_hwcap): Remove it.
1782 (arm_read_description): New local variable arm_hwcap. Don't
1783 set arm_hwcap to zero.
1785 2015-07-30 Yao Qi <yao.qi@linaro.org>
1787 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1788 Use regcache->tdesc instead.
1789 (arm_store_wmmxregset): Likewise.
1790 (arm_fill_vfpregset): Likewise.
1791 (arm_store_vfpregset): Likewise.
1793 2015-07-30 Yao Qi <yao.qi@linaro.org>
1795 * linux-arm-low.c: Include arch/arm.h.
1796 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1797 (arm_store_gregset): Likewise.
1799 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1801 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1802 ptrace's 4th parameter.
1804 2015-07-27 Yao Qi <yao.qi@linaro.org>
1806 * configure.srv (case aarch64*-*-linux*): Don't set
1809 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1811 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1813 * linux-arm-low.c: Likewise.
1814 * linux-cris-low.c: Likewise.
1815 * linux-crisv32-low.c: Likewise.
1816 * linux-low.c: Likewise.
1817 * linux-m68k-low.c: Likewise.
1818 * linux-mips-low.c: Likewise.
1819 * linux-nios2-low.c: Likewise.
1820 * linux-s390-low.c: Likewise.
1821 * linux-sparc-low.c: Likewise.
1822 * linux-tic6x-low.c: Likewise.
1823 * linux-tile-low.c: Likewise.
1824 * linux-x86-low.c: Likewise.
1826 2015-07-24 Pedro Alves <palves@redhat.com>
1828 * config.in: Regenerate.
1829 * configure: Regenerate.
1831 2015-07-24 Pedro Alves <palves@redhat.com>
1833 * acinclude.m4: Include ../ptrace.m4.
1834 * configure.ac: Call GDB_AC_PTRACE.
1835 * config.in, configure: Regenerate.
1837 2015-07-24 Yao Qi <yao.qi@linaro.org>
1839 * linux-low.c (linux_create_inferior): Remove setting to
1840 proc->priv->new_inferior.
1841 (linux_attach): Likewise.
1842 (linux_low_filter_event): Likewise.
1843 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1845 2015-07-24 Yao Qi <yao.qi@linaro.org>
1847 * linux-low.c (linux_arch_setup): New function.
1848 (linux_low_filter_event): If proc->tdesc is NULL and
1849 proc->attached is true, call the_low_target.arch_setup.
1850 Otherwise, keep status pending, and return.
1851 (linux_resume_one_lwp_throw): Don't call get_pc if
1852 thread->while_stepping isn't NULL. Don't call
1853 get_thread_regcache if proc->tdesc is NULL.
1854 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1855 (linux_target_ops): Install arch_setup.
1856 * server.c (start_inferior): Call the_target->arch_setup.
1857 * target.h (struct target_ops) <arch_setup>: New field.
1858 (target_arch_setup): New marco.
1859 * lynx-low.c (lynx_target_ops): Update.
1860 * nto-low.c (nto_target_ops): Update.
1861 * spu-low.c (spu_target_ops): Update.
1862 * win32-low.c (win32_target_ops): Update.
1864 2015-07-24 Yao Qi <yao.qi@linaro.org>
1866 * linux-low.c (linux_add_process): Don't set
1867 proc->priv->new_inferior.
1868 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1869 (linux_attach): Likewise.
1871 2015-07-24 Yao Qi <yao.qi@linaro.org>
1873 * server.c (start_inferior): Code refactor.
1875 2015-07-24 Yao Qi <yao.qi@linaro.org>
1877 * server.c (process_serial_event): Set general_thread.
1879 2015-07-21 Yao Qi <yao.qi@linaro.org>
1881 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1882 aarch64_linux_get_debug_reg_capacity.
1884 2015-07-17 Yao Qi <yao.qi@linaro.org>
1886 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1887 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1888 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1889 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1890 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1891 (AARCH64_HWP_ALIGNMENT): Likewise.
1892 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1893 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1894 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1895 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1896 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1897 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1898 (struct aarch64_debug_reg_state): Likewise.
1899 (struct arch_lwp_info): Likewise.
1900 (aarch64_align_watchpoint): Likewise.
1901 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1902 (aarch64_watchpoint_length): Likewise.
1903 (aarch64_point_encode_ctrl_reg): Likewise
1904 (aarch64_point_is_aligned): Likewise.
1905 (aarch64_align_watchpoint): Likewise.
1906 (aarch64_linux_set_debug_regs):
1907 (aarch64_dr_state_insert_one_point): Likewise.
1908 (aarch64_dr_state_remove_one_point): Likewise.
1909 (aarch64_handle_breakpoint): Likewise.
1910 (aarch64_handle_aligned_watchpoint): Likewise.
1911 (aarch64_handle_unaligned_watchpoint): Likewise.
1912 (aarch64_handle_watchpoint): Likewise.
1914 2015-07-17 Yao Qi <yao.qi@linaro.org>
1916 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1917 and don't aarch64_get_debug_reg_state. All callers update.
1918 (aarch64_handle_aligned_watchpoint): Likewise.
1919 (aarch64_handle_unaligned_watchpoint): Likewise.
1920 (aarch64_handle_watchpoint): Likewise.
1921 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1922 (aarch64_remove_point): Likewise.
1924 2015-07-17 Yao Qi <yao.qi@linaro.org>
1926 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1928 (aarch64_handle_unaligned_watchpoint): Likewise.
1930 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1932 Revert the previous 3 commits:
1933 Move gdb_regex* to common/
1934 Move linux_find_memory_regions_full & co.
1935 gdbserver build-id attribute generator
1937 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1938 Jan Kratochvil <jan.kratochvil@redhat.com>
1940 gdbserver build-id attribute generator.
1941 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1942 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1943 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1945 (get_dynamic): Use find_pdhr to traverse program headers.
1946 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1947 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1948 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1949 (get_hex_build_id): New.
1950 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1951 to reply XML document.
1953 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1954 Jan Kratochvil <jan.kratochvil@redhat.com>
1956 * target.c: Include target/target-utils.h and fcntl.h.
1957 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1958 (target_fileio_read_stralloc): New functions.
1960 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1962 * Makefile.in (OBS): Add gdb_regex.o.
1964 * config.in: Rebuilt.
1965 * configure: Rebuilt.
1967 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1968 Jan Kratochvil <jan.kratochvil@redhat.com>
1970 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1971 * Makefile.in (OBS): Add target-utils.o.
1972 (linux-maps.o, target-utils.o): New.
1973 * configure.srv (srv_linux_obj): Add linux-maps.o.
1975 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1977 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1979 (the_low_target): Install it.
1981 2015-07-14 Pedro Alves <palves@redhat.com>
1983 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1984 Instead, ignore ECHILD, and throw an error for other errnos.
1986 2015-07-10 Pedro Alves <palves@redhat.com>
1988 * event-loop.c (struct callback_event) <data>: Change type to
1989 gdb_client_data instance instead of gdb_client_data pointer.
1990 (append_callback_event): Adjust.
1992 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1994 * linux-aarch64-low.c: Add comments for each linux_target_ops
1995 method. Remove comments already covered in target_ops and
1996 linux_target_ops definitions.
1997 (the_low_target): Add comments for each unimplemented method.
1999 2015-07-09 Yao Qi <yao.qi@linaro.org>
2001 * linux-aarch64-low.c (aarch64_regmap): Remove.
2002 (aarch64_usrregs_info): Remove.
2003 (regs_info): Set field usrregs to NULL.
2005 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2007 * linux-low.c: Include "rsp-low.h"
2008 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2009 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2010 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2011 (handle_btrace_enable_pt): New.
2012 (handle_btrace_general_set): Support "pt".
2013 (handle_btrace_conf_general_set): Support "pt:size".
2015 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2017 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2020 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2022 * linux-aarch64-low.c: Remove comment about endianness.
2023 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2024 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2027 2015-06-24 Gary Benson <gbenson@redhat.com>
2029 * linux-i386-ipa.c (stdint.h): Do not include.
2030 * lynx-i386-low.c (stdint.h): Likewise.
2031 * lynx-ppc-low.c (stdint.h): Likewise.
2032 * mem-break.c (stdint.h): Likewise.
2033 * thread-db.c (stdint.h): Likewise.
2034 * tracepoint.c (stdint.h): Likewise.
2035 * win32-low.c (stdint.h): Likewise.
2037 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2039 * server.c (write_qxfer_response): Update call to
2040 remote_escape_output.
2042 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2043 Jan Kratochvil <jan.kratochvil@redhat.com>
2045 Merge multiple hex conversions.
2046 * gdbreplay.c (tohex): Rename to 'fromhex'.
2047 (logchar): Use fromhex.
2049 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2051 * server.c (handle_qxfer_libraries): Set `version' attribute for
2054 2015-06-10 Gary Benson <gbenson@redhat.com>
2056 * target.h (struct target_ops) <multifs_open>: New field.
2057 <multifs_unlink>: Likewise.
2058 <multifs_readlink>: Likewise.
2059 * linux-low.c (nat/linux-namespaces.h): New include.
2060 (linux_target_ops): Initialize the_target->multifs_open,
2061 the_target->multifs_unlink and the_target->multifs_readlink.
2062 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2063 * hostio.c (hostio_fs_pid): New static variable.
2064 (hostio_handle_new_gdb_connection): New function.
2065 (handle_setfs): Likewise.
2066 (handle_open): Use the_target->multifs_open as appropriate.
2067 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2068 (handle_readlink): Use the_target->multifs_readlink as
2070 (handle_vFile): Handle vFile:setfs packets.
2071 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2072 after target_handle_new_gdb_connection.
2074 2015-06-10 Gary Benson <gbenson@redhat.com>
2076 * configure.ac (AC_CHECK_FUNCS): Add setns.
2077 * config.in: Regenerate.
2078 * configure: Likewise.
2079 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2080 (linux-namespaces.o): New rule.
2081 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2083 2015-06-09 Gary Benson <gbenson@redhat.com>
2085 * hostio.c (handle_open): Process mode argument with
2086 fileio_to_host_mode.
2088 2015-06-01 Yao Qi <yao.qi@linaro.org>
2090 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2091 * linux-x86-low.c: Likewise.
2093 2015-05-28 Don Breazeal <donb@codesourcery.com>
2095 * linux-low.c (handle_extended_wait): Initialize
2096 thread_info.last_resume_kind for new fork children.
2098 2015-05-15 Pedro Alves <palves@redhat.com>
2100 * target.h (target_handle_new_gdb_connection): Rewrite using if
2101 wrapped in do/while.
2103 2015-05-14 Joel Brobecker <brobecker@adacore.com>
2105 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2106 * configure, config.in: Regenerate.
2107 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2110 2015-05-12 Don Breazeal <donb@codesourcery.com>
2112 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2113 PTRACE_EVENT_VFORK_DONE.
2114 (linux_low_ptrace_options, extended_event_reported): Add vfork
2116 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2117 and "vforkdone" for RSP 'T' Stop Reply Packet.
2118 * server.h (report_vfork_events): Declare
2121 2015-05-12 Don Breazeal <donb@codesourcery.com>
2123 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2124 (the_low_target) <new_fork>: Initialize new member.
2125 * linux-arm-low.c (arm_new_fork): New function.
2126 (the_low_target) <new_fork>: Initialize new member.
2127 * linux-low.c (handle_extended_wait): Call new target function
2129 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2130 * linux-mips-low.c (mips_add_watchpoint): New function
2131 extracted from mips_insert_point.
2132 (the_low_target) <new_fork>: Initialize new member.
2133 (mips_linux_new_fork): New function.
2134 (mips_insert_point): Call mips_add_watchpoint.
2135 * linux-x86-low.c (x86_linux_new_fork): New function.
2136 (the_low_target) <new_fork>: Initialize new member.
2138 2015-05-12 Don Breazeal <donb@codesourcery.com>
2140 * linux-low.c (handle_extended_wait): Implement return value,
2141 rename argument 'event_child' to 'event_lwp', handle
2142 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2143 (linux_low_ptrace_options): New function.
2144 (linux_low_filter_event): Call linux_low_ptrace_options,
2145 use different argument fo linux_enable_event_reporting,
2146 use return value from handle_extended_wait.
2147 (extended_event_reported): New function.
2148 (linux_wait_1): Call extended_event_reported and set
2149 status to report fork events.
2150 (linux_write_memory): Add pid to debug message.
2151 (reset_lwp_ptrace_options_callback): New function.
2152 (linux_handle_new_gdb_connection): New function.
2153 (linux_target_ops): Initialize new structure member.
2154 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2155 * lynx-low.c: Initialize new structure member.
2156 * remote-utils.c (prepare_resume_reply): Implement stop reason
2157 "fork" for "T" stop message.
2158 * server.c (handle_query): Call handle_new_gdb_connection.
2159 * server.h (report_fork_events): Declare global flag.
2160 * target.h (struct target_ops) <handle_new_gdb_connection>:
2162 (target_handle_new_gdb_connection): New macro.
2163 * win32-low.c: Initialize new structure member.
2165 2015-05-12 Don Breazeal <donb@codesourcery.com>
2167 * mem-break.c (APPEND_TO_LIST): Define macro.
2168 (clone_agent_expr): New function.
2169 (clone_one_breakpoint): New function.
2170 (clone_all_breakpoints): New function.
2171 * mem-break.h: Declare new functions.
2173 2015-05-12 Don Breazeal <donb@codesourcery.com>
2175 * linux-low.c (linux_supports_fork_events): New function.
2176 (linux_supports_vfork_events): New function.
2177 (linux_target_ops): Initialize new structure members.
2178 (initialize_low): Call linux_check_ptrace_features.
2179 * lynx-low.c (lynx_target_ops): Initialize new structure
2181 * server.c (report_fork_events, report_vfork_events):
2183 (handle_query): Add new features to qSupported packet and
2185 (captured_main): Initialize new global variables.
2186 * target.h (struct target_ops) <supports_fork_events>:
2188 <supports_vfork_events>: New member.
2189 (target_supports_fork_events): New macro.
2190 (target_supports_vfork_events): New macro.
2191 * win32-low.c (win32_target_ops): Initialize new structure
2194 2015-05-12 Gary Benson <gbenson@redhat.com>
2196 * server.c (handle_qxfer_exec_file): Use current process
2199 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2201 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2202 Remove HAVE_PTRACE_GETREGS conditionals.
2203 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2204 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2206 2015-05-08 Yao Qi <yao.qi@linaro.org>
2208 * linux-low.c (linux_supports_conditional_breakpoints): New
2210 (linux_target_ops): Install new target method.
2211 * lynx-low.c (lynx_target_ops): Install NULL hook for
2212 supports_conditional_breakpoints.
2213 * nto-low.c (nto_target_ops): Likewise.
2214 * spu-low.c (spu_target_ops): Likewise.
2215 * win32-low.c (win32_target_ops): Likewise.
2216 * server.c (handle_query): Check
2217 target_supports_conditional_breakpoints.
2218 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2220 (target_supports_conditional_breakpoints): New macro.
2222 2015-05-06 Pedro Alves <palves@redhat.com>
2225 * server.c (start_inferior): If the process exits, mourn it.
2227 2015-04-21 Gary Benson <gbenson@redhat.com>
2229 * hostio.c (fileio_open_flags_to_host): Factored out to
2230 fileio_to_host_openflags in common/fileio.c. Single use
2233 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2235 * linux-xtensa-low.c (xtensa_fill_gregset)
2236 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2239 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2241 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2242 (regs_info): Replace usrregs pointer with NULL.
2244 2015-04-17 Gary Benson <gbenson@redhat.com>
2246 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2247 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2248 * server.c (handle_qxfer_exec_file): New function.
2249 (qxfer_packets): Add exec-file entry.
2250 (handle_query): Report qXfer:exec-file:read as supported packet.
2252 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2254 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2256 2015-04-09 Gary Benson <gbenson@redhat.com>
2258 * hostio-errno.c (errno_to_fileio_error): Remove function.
2259 Update caller to use remote_fileio_to_fio_error.
2261 2015-04-09 Yao Qi <yao.qi@linaro.org>
2263 * linux-low.c (linux_insert_point): Call
2264 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2265 (linux_remove_point): Call remove_memory_breakpoint if type is
2267 * linux-x86-low.c (x86_insert_point): Don't call
2268 insert_memory_breakpoint.
2269 (x86_remove_point): Don't call remove_memory_breakpoint.
2271 2015-04-01 Pedro Alves <palves@redhat.com>
2272 Cleber Rosa <crosa@redhat.com>
2274 * server.c (gdbserver_usage): Reorganize and extend the usage
2277 2015-03-24 Pedro Alves <palves@redhat.com>
2279 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2280 output. Also dump TRAP_TRACE.
2281 (linux_low_filter_event): In debug output, distinguish a
2282 resume_stop SIGSTOP from a delayed SIGSTOP.
2284 2015-03-24 Gary Benson <gbenson@redhat.com>
2286 * linux-x86-low.c (x86_linux_new_thread): Moved to
2288 (x86_linux_prepare_to_resume): Likewise.
2290 2015-03-24 Gary Benson <gbenson@redhat.com>
2292 * Makefile.in (x86-linux-dregs.o): New rule.
2293 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2294 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2295 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2296 (x86_linux_dr_get): Likewise.
2297 (x86_linux_dr_set): Likewise.
2298 (update_debug_registers_callback): Likewise.
2299 (x86_linux_dr_set_addr): Likewise.
2300 (x86_linux_dr_get_addr): Likewise.
2301 (x86_linux_dr_set_control): Likewise.
2302 (x86_linux_dr_get_control): Likewise.
2303 (x86_linux_dr_get_status): Likewise.
2304 (x86_linux_update_debug_registers): Likewise.
2306 2015-03-24 Gary Benson <gbenson@redhat.com>
2308 * linux-x86-low.c (x86_linux_update_debug_registers):
2309 New function, factored out from...
2310 (x86_linux_prepare_to_resume): ...this.
2312 2015-03-24 Gary Benson <gbenson@redhat.com>
2314 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2315 (x86_linux_dr_set): Likewise.
2316 (update_debug_registers_callback): Likewise.
2317 (x86_linux_dr_set_addr): Likewise.
2318 (x86_linux_dr_get_addr): Likewise.
2319 (x86_linux_dr_set_control): Likewise.
2320 (x86_linux_dr_get_control): Likewise.
2321 (x86_linux_dr_get_status): Likewise.
2322 (x86_linux_prepare_to_resume): Likewise.
2324 2015-03-24 Gary Benson <gbenson@redhat.com>
2326 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2327 Use perror_with_name. Pass string through gettext.
2328 (x86_linux_dr_set): Likewise.
2330 2015-03-24 Gary Benson <gbenson@redhat.com>
2332 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2333 (x86_linux_dr_set_addr): ...this.
2334 (x86_dr_low_get_addr): Rename to...
2335 (x86_linux_dr_get_addr): ...this.
2336 (x86_dr_low_set_control): Rename to...
2337 (x86_linux_dr_set_control): ...this.
2338 (x86_dr_low_get_control): Rename to...
2339 (x86_linux_dr_get_control): ...this.
2340 (x86_dr_low_get_status): Rename to...
2341 (x86_linux_dr_get_status): ...this.
2342 (x86_dr_low): Update with new function names.
2344 2015-03-24 Gary Benson <gbenson@redhat.com>
2346 * Makefile.in (x86-linux.o): New rule.
2347 * configure.srv: Add x86-linux.o to relevant targets.
2348 * linux-low.c (lwp_set_arch_private_info): New function.
2349 (lwp_arch_private_info): Likewise.
2350 * linux-x86-low.c: Include nat/x86-linux.h.
2351 (arch_lwp_info): Removed structure.
2352 (update_debug_registers_callback):
2353 Use lwp_set_debug_registers_changed.
2354 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2355 and lwp_set_debug_registers_changed.
2356 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2358 2015-03-24 Gary Benson <gbenson@redhat.com>
2360 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2361 * linux-arm-low.c (arm_new_thread): Likewise.
2362 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2363 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2364 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2365 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2367 2015-03-24 Gary Benson <gbenson@redhat.com>
2369 * linux-low.c (ptid_of_lwp): New function.
2370 (lwp_is_stopped): Likewise.
2371 (lwp_stop_reason): Likewise.
2372 * linux-x86-low.c (update_debug_registers_callback):
2374 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2377 2015-03-24 Gary Benson <gbenson@redhat.com>
2379 * linux-low.h (linux_stop_lwp): Remove declaration.
2381 2015-03-24 Gary Benson <gbenson@redhat.com>
2383 * linux-low.h: Include nat/linux-nat.h.
2384 * linux-low.c (iterate_over_lwps_args): New structure.
2385 (iterate_over_lwps_filter): New function.
2386 (iterate_over_lwps): Likewise.
2387 * linux-x86-low.c (update_debug_registers_callback):
2388 Update signature to what iterate_over_lwps expects.
2389 Remove PID check that iterate_over_lwps now performs.
2390 (x86_dr_low_set_addr): Use iterate_over_lwps.
2391 (x86_dr_low_set_control): Likewise.
2393 2015-03-24 Gary Benson <gbenson@redhat.com>
2395 * linux-x86-low.c (x86_debug_reg_state): New function.
2396 (x86_linux_prepare_to_resume): Use the above.
2398 2015-03-24 Gary Benson <gbenson@redhat.com>
2400 * linux-low.c (current_lwp_ptid): New function.
2401 * linux-x86-low.c: Include nat/linux-nat.h.
2402 (x86_dr_low_get_addr): Use current_lwp_ptid.
2403 (x86_dr_low_get_control): Likewise.
2404 (x86_dr_low_get_status): Likewise.
2406 2015-03-20 Pedro Alves <palves@redhat.com>
2408 * tracepoint.c (cmd_qtstatus): Make "str" const.
2410 2015-03-20 Pedro Alves <palves@redhat.com>
2412 * server.c (handle_general_set): Make "req_str" const.
2414 2015-03-19 Pedro Alves <palves@redhat.com>
2416 * linux-low.c (linux_resume_one_lwp): Rename to ...
2417 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2418 instead call perror_with_name.
2419 (check_ptrace_stopped_lwp_gone): New function.
2420 (linux_resume_one_lwp): Reimplement as wrapper around
2421 linux_resume_one_lwp_throw that swallows errors if the LWP is
2424 2015-03-19 Pedro Alves <palves@redhat.com>
2426 * linux-low.c (count_events_callback, select_event_lwp_callback):
2427 No longer check whether the thread has resume_stop as last resume
2430 2015-03-19 Pedro Alves <palves@redhat.com>
2432 * linux-low.c (count_events_callback, select_event_lwp_callback):
2433 Use the lwp's status_pending_p field, not the thread's.
2435 2015-03-19 Pedro Alves <palves@redhat.com>
2437 * linux-low.c (select_event_lwp_callback): Update comments to
2438 no longer mention SIGTRAP.
2440 2015-03-18 Gary Benson <gbenson@redhat.com>
2442 * server.c (handle_query): Do not report vFile:fstat as supported.
2444 2015-03-11 Gary Benson <gbenson@redhat.com>
2446 * hostio.c (sys/types.h): New include.
2447 (sys/stat.h): Likewise.
2448 (common-remote-fileio.h): Likewise.
2449 (handle_fstat): New function.
2450 (handle_vFile): Handle vFile:fstat packets.
2452 2015-03-11 Gary Benson <gbenson@redhat.com>
2454 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2455 struct stat.st_blocks and struct stat.st_blksize.
2456 * configure: Regenerate.
2457 * config.in: Likewise.
2458 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2459 (OBS): Add common-remote-fileio.o.
2460 (common-remote-fileio.o): New rule.
2462 2015-03-09 Pedro Alves <palves@redhat.com>
2464 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2465 'struct sockaddr' pointer in 'accept' call.
2467 2015-03-09 Pedro Alves <palves@redhat.com>
2470 2015-03-07 Pedro Alves <palves@redhat.com>
2471 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2472 or <winsock2.h> here. Instead include "gdb_socket.h".
2473 (remote_open): Use union gdb_sockaddr_u.
2474 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2475 or <winsock2.h> here. Instead include "gdb_socket.h".
2476 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2477 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2479 (init_named_socket, gdb_agent_helper_thread): Use union
2482 2015-03-07 Pedro Alves <palves@redhat.com>
2484 * configure.ac (build_warnings): Move
2485 -Wdeclaration-after-statement to the C-specific set.
2486 * configure: Regenerate.
2488 2015-03-07 Pedro Alves <palves@redhat.com>
2490 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2491 or <winsock2.h> here. Instead include "gdb_socket.h".
2492 (remote_open): Use union gdb_sockaddr_u.
2493 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2494 or <winsock2.h> here. Instead include "gdb_socket.h".
2495 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2496 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2498 (init_named_socket, gdb_agent_helper_thread): Use union
2501 2015-03-07 Pedro Alves <palves@redhat.com>
2503 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2506 2015-03-06 Yao Qi <yao.qi@linaro.org>
2508 * linux-aarch64-low.c (aarch64_insert_point): Use
2509 show_debug_regs as a boolean.
2510 (aarch64_remove_point): Likewise.
2512 2015-03-05 Pedro Alves <palves@redhat.com>
2514 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2515 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2516 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2517 * nto-low.c (nto_target_ops): Likewise.
2518 * spu-low.c (spu_target_ops): Likewise.
2519 * win32-low.c (win32_target_ops): Likewise.
2521 2015-03-04 Pedro Alves <palves@redhat.com>
2523 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2524 Decide whether a breakpoint triggered based on the SIGTRAP's
2526 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2527 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2528 (linux_low_filter_event): Check for breakpoints before checking
2530 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2532 (linux_stopped_by_sw_breakpoint)
2533 (linux_supports_stopped_by_sw_breakpoint)
2534 (linux_stopped_by_hw_breakpoint)
2535 (linux_supports_stopped_by_hw_breakpoint): New functions.
2536 (linux_target_ops): Install new target methods.
2538 2015-03-04 Pedro Alves <palves@redhat.com>
2540 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2541 * server.c (swbreak_feature, hwbreak_feature): New globals.
2542 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2543 (captured_main): Clear swbreak_feature and hwbreak_feature.
2544 * server.h (swbreak_feature, hwbreak_feature): Declare.
2545 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2546 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2547 supports_stopped_by_hw_breakpoint>: New fields.
2548 (target_supports_stopped_by_sw_breakpoint)
2549 (target_stopped_by_sw_breakpoint)
2550 (target_supports_stopped_by_hw_breakpoint)
2551 (target_stopped_by_hw_breakpoint): Declare.
2553 2015-03-04 Pedro Alves <palves@redhat.com>
2555 enum lwp_stop_reason -> enum target_stop_reason
2556 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2557 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2558 (linux_wait_1, stuck_in_jump_pad_callback)
2559 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2560 (linux_stopped_by_watchpoint):
2561 * linux-low.h (enum lwp_stop_reason): Delete.
2562 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2563 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2565 2015-03-04 Yao Qi <yao.qi@linaro.org>
2567 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2569 2015-03-03 Gary Benson <gbenson@redhat.com>
2571 * hostio.c (handle_vFile): Fix prefix lengths.
2573 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2575 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2578 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2580 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2581 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2582 (clean): Add "rm -f" for above C files.
2583 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2584 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2585 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2586 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2587 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2588 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2589 (init_registers_s390x_vx_linux64)
2590 (init_registers_s390x_tevx_linux64)
2591 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2592 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2594 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2595 (s390_store_vxrs_high): New functions.
2596 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2598 (s390_arch_setup): Add logic for selecting one of the new target
2599 descriptions. Activate the new vector regsets if applicable.
2600 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2601 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2602 and init_registers_s390x_tevx_linux64.
2604 2015-03-01 Pedro Alves <palves@redhat.com>
2606 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2609 2015-02-27 Pedro Alves <palves@redhat.com>
2611 * linux-x86-low.c (u_debugreg_offset): New function.
2612 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2614 2015-02-27 Pedro Alves <palves@redhat.com>
2616 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2617 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2618 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2619 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2620 (ps_lsetfpregs, ps_getpid)
2621 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2622 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2623 (ps_lsetxregs, ps_plog): Declare.
2625 2015-02-27 Pedro Alves <palves@redhat.com>
2627 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2628 IP_AGENT_EXPORT_FUNC.
2629 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2630 IP_AGENT_EXPORT_FUNC.
2631 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2632 (IP_AGENT_EXPORT): Delete.
2633 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2634 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2635 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2636 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2637 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2638 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2639 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2640 (traceframe_read_count, traceframe_write_count)
2641 (traceframes_created, trace_state_variables, get_raw_reg)
2642 (get_trace_state_variable_value, set_trace_state_variable_value)
2643 (ust_loaded, helper_thread_id, cmd_buf): Use
2644 IPA_SYM_EXPORTED_NAME.
2645 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2646 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2647 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2648 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2649 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2650 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2651 EXTERN_C_PUSH/EXTERN_C_POP.
2652 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2653 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2654 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2655 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2656 (traceframe_write_count, traceframe_read_count)
2657 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2658 (about_to_request_buffer_space, get_trace_state_variable_value)
2659 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2660 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2661 EXTERN_C_PUSH/EXTERN_C_POP.
2662 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2663 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2664 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2665 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2666 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2667 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2668 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2669 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2671 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2672 (IP_AGENT_EXPORT_VAR_DECL): Define.
2674 (gdb_agent_get_raw_reg): Declare.
2676 2015-02-27 Tom Tromey <tromey@redhat.com>
2677 Pedro Alves <palves@redhat.com>
2679 Rename symbols whose names are reserved C++ keywords throughout.
2681 2015-02-27 Pedro Alves <palves@redhat.com>
2683 * Makefile.in (COMPILER): New, get it from autoconf.
2684 (CXX): Get from autoconf instead.
2685 (COMPILE.pre): Use COMPILER.
2686 (CC-LD): Rename to ...
2687 (CC_LD): ... this. Use COMPILER.
2688 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2689 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2690 * acinclude.m4: Include build-with-cxx.m4.
2691 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2692 Disable -Werror by default if building in C++ mode.
2693 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2694 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2695 the C++ compiler. Save/restore CXXFLAGS too.
2696 * configure: Regenerate.
2698 2015-02-27 Pedro Alves <palves@redhat.com>
2700 * acinclude.m4: Include libiberty.m4.
2701 * configure.ac: Call libiberty_INIT.
2702 * config.in, configure: Regenerate.
2704 2015-02-26 Pedro Alves <palves@redhat.com>
2706 * linux-low.c (linux_wait_1): When incrementing the PC past a
2707 program breakpoint always use the_low_target.breakpoint_len as
2708 increment, rather than the maximum between that and
2709 the_low_target.decr_pc_after_break.
2711 2015-02-23 Pedro Alves <palves@redhat.com>
2713 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2714 thread was doing a step-over; always adjust the PC if
2715 we stepped over a permanent breakpoint.
2716 (linux_wait_1): If we stepped over breakpoint that was on top of a
2717 permanent breakpoint, manually advance the PC past it.
2719 2015-02-23 Pedro Alves <palves@redhat.com>
2721 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2723 (x86_fill_gregset, x86_store_gregset): Use it when handling
2726 2015-02-20 Pedro Alves <palves@redhat.com>
2728 * thread-db.c: Include "nat/linux-procfs.h".
2729 (thread_db_init): Skip listing new threads if the kernel supports
2730 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2732 2015-02-20 Pedro Alves <palves@redhat.com>
2734 * linux-low.c (status_pending_p_callback): Use ptid_match.
2736 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2738 PR breakpoints/16812
2739 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2740 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2741 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2743 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2745 PR breakpoints/15956
2746 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2748 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2750 * linux-low.c (linux_low_btrace_conf): Print size.
2751 * server.c (handle_btrace_conf_general_set): New.
2752 (hanle_general_set): Call handle_btrace_conf_general_set.
2753 (handle_query): Report Qbtrace-conf:bts:size as supported.
2755 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2757 * linux-low.c (linux_low_enable_btrace): Update parameters.
2758 (linux_low_btrace_conf): New.
2759 (linux_target_ops)<to_btrace_conf>: Initialize.
2760 * server.c (current_btrace_conf): New.
2761 (handle_btrace_enable): Rename to ...
2762 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2763 to target_enable_btrace. Update comment. Update users.
2764 (handle_qxfer_btrace_conf): New.
2765 (qxfer_packets): Add btrace-conf entry.
2766 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2767 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2768 (target_ops)<read_btrace_conf>: New.
2769 (target_enable_btrace): Update parameters.
2770 (target_read_btrace_conf): New.
2772 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2774 * server.c (handle_btrace_general_set): Remove call to
2775 target_supports_btrace.
2776 (supported_btrace_packets): New.
2777 (handle_query): Call supported_btrace_packets.
2778 * target.h: include btrace-common.h.
2779 (btrace_target_info): Removed.
2780 (supports_btrace, target_supports_btrace): Update parameters.
2782 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2784 * Makefile.in (SFILES): Add common/btrace-common.c.
2785 (OBS): Add common/btrace-common.o.
2786 (btrace-common.o): Add build rules.
2787 * linux-low: Include btrace-common.h.
2788 (linux_low_read_btrace): Use struct btrace_data. Call
2789 btrace_data_init and btrace_data_fini.
2791 2015-02-06 Pedro Alves <palves@redhat.com>
2793 * thread-db.c (find_new_threads_callback): Add debug output.
2795 2015-02-04 Pedro Alves <palves@redhat.com>
2797 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2798 (resume_stopped_resumed_lwps): New function.
2799 (linux_wait_for_event_filtered): Use it.
2801 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2803 * Makefile.in (SFILES): Add linux-personality.c.
2804 (linux-personality.o): New rule.
2805 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2806 list of objects to be built.
2807 * linux-low.c: Include nat/linux-personality.h.
2808 (linux_create_inferior): Remove code to disable address space
2809 randomization (moved to ../nat/linux-personality.c). Create
2810 cleanup to disable address space randomization.
2812 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2814 * Makefile.in (posix-strerror.o): New rule.
2815 (mingw-strerror.o): Likewise.
2816 * configure: Regenerated.
2817 * configure.ac: Source file ../common/common.host. Initialize new
2818 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2820 2015-01-14 Yao Qi <yao@codesourcery.com>
2822 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2823 (ppc-linux.o): New rule.
2824 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2825 * configure.ac: AC_CHECK_FUNCS(getauxval).
2826 * config.in: Re-generated.
2827 * configure: Re-generated.
2828 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2829 ppc64_64bit_inferior_p
2831 2015-01-14 Yao Qi <yao@codesourcery.com>
2833 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2834 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2835 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2836 (PT_ORIG_R3, PT_TRAP): Likewise.
2837 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2838 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2839 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2841 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2843 * i387-fp.c (i387_cache_to_xsave): In look over
2844 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2845 zmmh_low_space field by use of zmmh_high_space.
2847 2015-01-09 Pedro Alves <palves@redhat.com>
2849 * linux-low.c (step_over_bkpt): Move higher up in the file.
2850 (handle_extended_wait): Don't store the stop_pc here.
2851 (get_stop_pc): Adjust comments and rename to ...
2852 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2853 stopped for a software breakpoint or hardware breakpoint.
2854 (thread_still_has_status_pending_p): New function.
2855 (status_pending_p_callback): Use
2856 thread_still_has_status_pending_p. If the event is no longer
2857 interesting, resume the LWP.
2858 (handle_tracepoints): Add assert.
2859 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2860 (wstatus_maybe_breakpoint): New function.
2861 (cancel_breakpoint): Delete function.
2862 (check_stopped_by_watchpoint): New function, factored out from
2863 linux_low_filter_event.
2864 (lp_status_maybe_breakpoint): Delete function.
2865 (linux_low_filter_event): Remove filter_ptid argument.
2866 Leave thread group exits pending here. Store the LWP's stop PC.
2867 Always leave events pending.
2868 (linux_wait_for_event_filtered): Pull all events out of the
2869 kernel, and leave them all pending.
2870 (count_events_callback, select_event_lwp_callback): Consider all
2872 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2873 (select_event_lwp): Only give preference to the stepping LWP in
2874 all-stop mode. Adjust comments.
2875 (ignore_event): New function.
2876 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2877 references to cancel_breakpoints. Adjust to renames. Also give
2878 equal priority to all LWPs that have had events in non-stop mode.
2879 If reporting a software breakpoint event, unadjust the LWP's PC.
2880 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2881 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2883 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2884 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2885 (linux_stopped_by_watchpoint): Adjust.
2886 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2887 * linux-low.h (enum lwp_stop_reason): New.
2888 (struct lwp_info) <stop_pc>: Adjust comment.
2889 <stopped_by_watchpoint>: Delete field.
2890 <stop_reason>: New field.
2891 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2892 * mem-break.c (software_breakpoint_inserted_here)
2893 (hardware_breakpoint_inserted_here): New function.
2894 * mem-break.h (software_breakpoint_inserted_here)
2895 (hardware_breakpoint_inserted_here): Declare.
2896 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2897 (cancel_breakpoints): Delete.
2898 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2899 (upload_fast_traceframes): Remove references to
2902 2015-01-09 Pedro Alves <palves@redhat.com>
2904 * thread-db.c (find_new_threads_callback): Ignore thread if the
2905 kernel thread ID is -1.
2907 2015-01-09 Pedro Alves <palves@redhat.com>
2909 * linux-low.c (linux_attach_fail_reason_string): Move to
2910 nat/linux-ptrace.c, and rename.
2911 (linux_attach_lwp): Update comment.
2912 (attach_proc_task_lwp_callback): New function.
2913 (linux_attach): Adjust to rename and use
2914 linux_proc_attach_tgid_threads.
2915 (linux_attach_fail_reason_string): Delete declaration.
2917 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2919 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2920 * server.c (gdbserver_version): Likewise.
2922 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2924 * remote-utils.c: Include ctype.h.
2925 (input_interrupt): Explicitly handle the case when the char
2926 received is the NUL byte. Improve the printing of non-ASCII
2929 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2931 * linux-low.c (linux_low_filter_event): Update call to
2932 linux_enable_event_reporting following the addition of
2933 a new parameter to that function.
2935 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2938 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2939 (AARCH64_FPCR_REGNO): Likewise.
2940 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2941 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2942 (aarch64_store_fpregset): Likewise.
2944 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2946 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2947 Remove FIXME comment about assumption about N.
2949 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2951 * configure.ac: If large-file support is disabled in GDBserver,
2952 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2953 * configure: Regenerate.
2955 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2957 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2958 warning upon ENODATA from ptrace.
2959 * linux-s390-low.c (s390_store_tdb): New.
2960 (s390_regsets): Add regset for NT_S390_TDB.
2962 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2964 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2965 without a fill_function.
2966 * linux-s390-low.c (s390_fill_last_break): Remove.
2967 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2968 (s390_arch_setup): Use regset's size instead of fill_function for
2971 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2973 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2974 the regset's store function when ptrace returned an error.
2975 * regcache.c (get_thread_regcache): Invalidate register cache
2976 before fetching inferior's registers.
2978 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2980 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2981 while-loop as for-loop.
2982 (regsets_store_inferior_registers): Likewise.
2984 2014-11-28 Yao Qi <yao@codesourcery.com>
2986 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2987 * config.in, configure: Re-generate.
2988 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2991 2014-11-21 Yao Qi <yao@codesourcery.com>
2993 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2994 (AC_CHECK_HEADERS): Remove malloc.h.
2995 * configure: Re-generated.
2996 * config.in: Re-generated.
2997 * server.h: Don't include alloca.h and malloc.h.
2998 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2999 Don't include malloc.h.
3001 2014-11-17 Joel Brobecker <brobecker@adacore.com>
3003 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3004 corresponding ERRNO check in same block.
3006 2014-11-12 Pedro Alves <palves@redhat.com>
3008 * server.c (cont_thread): Update comment.
3009 (start_inferior, attach_inferior): No longer clear cont_thread.
3010 (handle_v_cont): No longer set cont_thread.
3011 (captured_main): Clear cont_thread each time a GDB connects.
3013 2014-11-12 Pedro Alves <palves@redhat.com>
3015 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3016 thread, and don't resume all threads if the Hc thread has exited.
3018 2014-11-12 Pedro Alves <palves@redhat.com>
3020 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3021 the process group instead of to a specific LWP.
3023 2014-10-15 Pedro Alves <palves@redhat.com>
3026 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3028 (arm_set_thread_context): Delete.
3029 (the_low_target): Adjust.
3030 * win32-i386-low.c (debug_registers_changed)
3031 (debug_registers_used): Delete.
3032 (update_debug_registers_callback): New function.
3033 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3034 needing to update their debug registers.
3035 (win32_get_current_dr): New function.
3036 (x86_dr_low_get_addr, x86_dr_low_get_control)
3037 (x86_dr_low_get_status): Fetch the debug register from the thread
3039 (i386_initial_stuff): Adjust.
3040 (i386_get_thread_context): Remove current_event parameter. Don't
3041 clear debug_registers_changed nor copy DR values to
3043 (i386_set_thread_context): Delete.
3044 (i386_prepare_to_resume): New function.
3045 (i386_thread_added): Mark the thread as needing to update irs
3047 (the_low_target): Remove i386_set_thread_context and install
3048 i386_prepare_to_resume.
3049 * win32-low.c (win32_get_thread_context): Adjust.
3050 (win32_set_thread_context): Use SetThreadContext
3052 (win32_prepare_to_resume): New function.
3053 (win32_require_context): New function, factored out from ...
3054 (thread_rec): ... this.
3055 (continue_one_thread): Call win32_prepare_to_resume on each thread
3056 we're about to continue.
3057 (win32_resume): Call win32_prepare_to_resume on the event thread.
3058 * win32-low.h (struct win32_thread_info)
3059 <debug_registers_changed>: New field.
3060 (struct win32_target_ops): Change prototype of set_thread_context,
3061 delete set_thread_context and add prepare_to_resume.
3062 (win32_require_context): New declaration.
3064 2014-10-08 Gary Benson <gbenson@redhat.com>
3066 * server.h: Do not include common-exceptions.h.
3068 2014-10-08 Gary Benson <gbenson@redhat.com>
3070 * server.h: Do not include cleanups.h.
3072 2014-09-30 James Hogan <james.hogan@imgtec.com>
3074 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3077 2014-09-23 Yao Qi <yao@codesourcery.com>
3079 * linux-low.c (lp_status_maybe_breakpoint): New function.
3080 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3081 (count_events_callback): Likewise.
3082 (select_event_lwp_callback): Likewise.
3083 (cancel_breakpoints_callback): Likewise.
3085 2014-09-19 Don Breazeal <donb@codesourcery.com>
3087 * linux-low.c (handle_extended_wait): Call
3088 linux_ptrace_get_extended_event.
3089 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3090 linux_is_extended_waitstatus.
3092 2014-09-16 Joel Brobecker <brobecker@adacore.com>
3094 * Makefile.in (CPPFLAGS): Define.
3095 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3096 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3098 2014-09-16 Gary Benson <gbenson@redhat.com>
3100 * inferiors.h (current_inferior): Renamed as...
3101 (current_thread): New variable. All uses updated.
3102 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3103 (maybe_move_out_of_jump_pad): Likewise.
3104 (cancel_breakpoint): Likewise.
3105 (linux_low_filter_event): Likewise.
3106 (wait_for_sigstop): Likewise.
3107 (linux_resume_one_lwp): Likewise.
3108 (need_step_over_p): Likewise.
3109 (start_step_over): Likewise.
3110 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3111 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3112 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3113 and save_inferior as saved_thread.
3114 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3116 (regcache_invalidate_thread): Likewise.
3117 * remote-utils.c (prepare_resume_reply): Likewise.
3118 * thread-db.c (thread_db_get_tls_address): Likewise.
3119 (disable_thread_event_reporting): Likewise.
3120 (remove_thread_event_breakpoints): Likewise.
3121 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3123 * target.h (set_desired_inferior): Renamed as...
3124 (set_desired_thread): New declaration. All uses updated.
3125 * server.c (myresume): Updated comment to reference thread instead
3127 (handle_serial_event): Likewise.
3128 (handle_target_event): Likewise.
3130 2014-09-12 Tom Tromey <tromey@redhat.com>
3131 Gary Benson <gbenson@redhat.com>
3133 * regcache.h: Include common-regcache.h.
3134 (regcache_read_pc): Don't declare.
3135 * regcache.c (get_thread_regcache_for_ptid): New function.
3137 2014-09-11 Tom Tromey <tromey@redhat.com>
3138 Gary Benson <gbenson@redhat.com>
3140 * symbol.c: New file.
3141 * Makefile.in (SFILES): Add symbol.c.
3142 (OBS): Add symbol.o.
3144 2014-09-11 Gary Benson <gbenson@redhat.com>
3146 * target.c (target_stop_ptid, target_continue_ptid): New
3149 2014-09-11 Tom Tromey <tromey@redhat.com>
3150 Gary Benson <gbenson@redhat.com>
3152 * target.h: Include target/target.h.
3153 * target.c (target_read_memory, target_read_uint32)
3154 (target_write_memory): New functions.
3156 2014-09-11 Gary Benson <gbenson@redhat.com>
3158 * server.h (debug_hw_points): Don't declare.
3159 * server.c (debug_hw_points): Don't define. Replace all uses
3160 with show_debug_regs.
3161 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3162 all uses with show_debug_regs.
3164 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3166 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3167 endianness into account.
3168 (ppc_supply_ptrace_register): Likewise.
3170 2014-09-03 James Hogan <james.hogan@imgtec.com>
3172 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3173 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3175 2014-09-03 Gary Benson <gbenson@redhat.com>
3177 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3178 ALL_DEBUG_ADDRESS_REGISTERS.
3180 2014-09-02 Gary Benson <gbenson@redhat.com>
3182 * i386-low.h: Renamed as...
3183 * x86-low.h: New file. All type, function and variable name
3184 prefixes changed from "i386_" to "x86_". All references updated.
3185 * i386-low.c: Renamed as...
3186 * x86-low.c: New file. All type, function and variable name
3187 prefixes changed from "i386_" to "x86_". All references updated.
3189 2014-09-02 Gary Benson <gbenson@redhat.com>
3191 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3192 (x86_linux_new_thread): Likewise.
3194 2014-08-29 Gary Benson <gbenson@redhat.com>
3196 * server.h (setjmp.h): Do not include.
3197 (toplevel): Do not declare.
3198 (common-exceptions.h): Include.
3199 (cleanups.h): Likewise.
3200 * server.c (toplevel): Do not define.
3201 (exit_code): New static global.
3202 (detach_or_kill_for_exit_cleanup): New function.
3203 (main): New function. Original main renamed to...
3204 (captured_main): New function.
3205 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3207 2014-08-29 Gary Benson <gbenson@redhat.com>
3209 * Makefile.in (SFILES): Add common/common-exceptions.c.
3210 (OBS): Add common-exceptions.o.
3211 (common-exceptions.o): New rule.
3212 * utils.c (prepare_to_throw_exception): New function.
3214 2014-08-29 Gary Benson <gbenson@redhat.com>
3216 * config.in: Regenerate.
3217 * configure: Likewise.
3219 2014-08-29 Gary Benson <gbenson@redhat.com>
3221 * Makefile.in (SFILES): Add common/cleanups.c.
3223 (cleanups.o): New rule.
3225 2014-08-29 Gary Benson <gbenson@redhat.com>
3227 * utils.c (internal_vwarning): New function.
3229 2014-08-28 Gary Benson <gbenson@redhat.com>
3231 * utils.h (fatal): Remove declaration.
3232 * utils.c (fatal): Remove function.
3234 2014-08-28 Gary Benson <gbenson@redhat.com>
3236 * tracepoint.c (gdb_agent_init): Replace fatal with
3238 (initialize_tracepoint): Likewise.
3240 2014-08-28 Gary Benson <gbenson@redhat.com>
3242 * remote-utils.c (remote_prepare): Replace fatal with error.
3244 2014-08-28 Gary Benson <gbenson@redhat.com>
3246 * linux-low.c (linux_async): Replace fatal with warning.
3248 (linux_start_non_stop): Return -1 if linux_async failed.
3250 2014-08-28 Gary Benson <gbenson@redhat.com>
3252 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3254 (i386_dr_low_get_addr): Remove vague comment.
3255 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3258 2014-08-28 Gary Benson <gbenson@redhat.com>
3260 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3261 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3263 (linux_resume_one_lwp): Likewise.
3264 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3266 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3267 with internal_error.
3268 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3269 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3270 (find_register_by_name): Replace fatal with internal_error.
3271 (find_regno): Likewise.
3272 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3273 * thread-db.c (thread_db_create_event): Likewise.
3274 (thread_db_load_search): Likewise.
3275 (try_thread_db_load_1): Likewise.
3276 * tracepoint.c (get_jump_space_head): Replace fatal with
3278 (claim_trampoline_space): Likewise.
3279 (have_fast_tracepoint_trampoline_buffer): Likewise.
3280 (cmd_qtstart): Likewise.
3281 (stop_tracing): Likewise.
3282 (fast_tracepoint_collecting): Likewise.
3283 (target_malloc): Likewise.
3284 (download_tracepoint): Likewise.
3285 (download_trace_state_variables): Replace check with gdb_assert.
3286 (upload_fast_traceframes): Replace fatal with internal_error.
3288 2014-08-19 Tom Tromey <tromey@redhat.com>
3289 Gary Benson <gbenson@redhat.com>
3291 * Makefile.in (SFILES): Add common/common-debug.c.
3292 (OBS): Add common-debug.o.
3293 (common-debug.o): New rule.
3294 * debug.h (debug_printf): Don't declare.
3295 * debug.c (debug_printf): Renamed and rewritten as...
3296 (debug_vprintf): New function.
3298 2014-08-19 Gary Benson <gbenson@redhat.com>
3300 * utils.h: Do not include print-utils.h.
3302 2014-08-19 Tom Tromey <tromey@redhat.com>
3303 Gary Benson <gbenson@redhat.com>
3305 * server.h: Add static assertion.
3306 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3308 2014-08-19 Tom Tromey <tromey@redhat.com>
3309 Gary Benson <gbenson@redhat.com>
3311 * Makefile.in (SFILES): Add common/errors.c.
3312 (OBS): Add errors.o.
3313 (IPA_OBS): Add errors-ipa.o.
3314 (errors.o): New rule.
3315 (errors-ipa.o): Likewise.
3316 * utils.h (perror_with_name, error, warning): Don't declare.
3317 * utils.c (warning): Renamed and rewritten as...
3318 (vwarning): New function.
3319 (error): Renamed and rewritten as...
3320 (verror): New function.
3321 (internal_error): Renamed and rewritten as...
3322 (internal_verror): New function.
3324 2014-08-07 Gary Benson <gbenson@redhat.com>
3326 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3327 * configure: Regenerate.
3328 * config.in: Likewise.
3329 * server.h: Do not include errno.h.
3330 * event-loop.c: Likewise.
3331 * hostio-errno.c: Likewise.
3332 * linux-low.c: Likewise.
3333 * remote-utils.c: Likewise.
3334 * spu-low.c: Likewise.
3335 * utils.c: Likewise.
3336 * gdbreplay.c: Unconditionally include errno.h.
3338 2014-08-07 Gary Benson <gbenson@redhat.com>
3340 * server.h: Do not include string.h.
3341 * event-loop.c: Likewise.
3342 * linux-low.c: Likewise.
3343 * regcache.c: Likewise.
3344 * remote-utils.c: Likewise.
3345 * spu-low.c: Likewise.
3346 * utils.c: Likewise.
3348 2014-08-07 Gary Benson <gbenson@redhat.com>
3350 * server.h: Do not include gdb_assert.h.
3352 2014-08-07 Gary Benson <gbenson@redhat.com>
3354 * server.h: Do not include common-utils.h.
3356 2014-08-07 Gary Benson <gbenson@redhat.com>
3358 * server.h: Do not include ptid.h.
3359 * notif.h: Likewise.
3361 2014-08-07 Gary Benson <gbenson@redhat.com>
3363 * server.h: Do not include gdb_locale.h.
3365 2014-08-07 Gary Benson <gbenson@redhat.com>
3367 * server.h: Do not include gdb/signals.h.
3368 * win32-low.c: Likewise.
3370 2014-08-07 Gary Benson <gbenson@redhat.com>
3372 * server.h: Do not include pathmax.h.
3374 2014-08-07 Gary Benson <gbenson@redhat.com>
3376 * server.h: Do not include libiberty.h.
3377 * linux-bfin-low.c: Likewise.
3379 2014-08-07 Gary Benson <gbenson@redhat.com>
3381 * server.h: Do not include ansidecl.h.
3383 2014-08-07 Gary Benson <gbenson@redhat.com>
3385 * linux-x86-low.c: Do not include stddef.h.
3386 * lynx-ppc-low.c: Likewise.
3387 * tracepoint.c: Likewise.
3389 2014-08-07 Gary Benson <gbenson@redhat.com>
3391 * server.h: Do not include stdarg.h.
3392 * nto-low.c: Likewise.
3394 2014-08-07 Gary Benson <gbenson@redhat.com>
3396 * server.h: Do not include stdlib.h.
3397 * inferiors.c: Likewise.
3398 * linux-low.c: Likewise.
3399 * regcache.c: Likewise.
3400 * spu-low.c: Likewise.
3401 * tracepoint.c: Likewise.
3402 * utils.c: Likewise.
3404 2014-08-07 Gary Benson <gbenson@redhat.com>
3406 * server.h: Do not include stdio.h.
3407 * linux-low.c: Likewise.
3408 * remote-utils.c: Likewise.
3409 * spu-low.c: Likewise.
3410 * utils.c: Likewise.
3411 * wincecompat.c: Likewise.
3413 2014-08-06 Gary Benson <gbenson@redhat.com>
3415 * regcache.c (init_register_cache): Move conditionals inside if.
3417 2014-08-06 Gary Benson <gbenson@redhat.com>
3419 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3421 2014-07-31 Gary Benson <gbenson@redhat.com>
3423 * ax.h: Do not include server.h.
3424 * gdbthread.h: Likewise.
3425 * lynx-low.h: Likewise.
3426 * notif.h: Likewise.
3428 2014-07-30 Gary Benson <gbenson@redhat.com>
3430 * server.h: Include common-defs.h.
3431 Do not include config.h or build-gnulib-gdbserver/config.h.
3433 2014-07-30 Gary Benson <gbenson@redhat.com>
3435 * hostio-errno.c: Move server.h to top of includes list.
3436 * inferiors.c: Likewise.
3437 * linux-x86-low.c: Likewise.
3438 * notif.c: Include server.h.
3440 2014-07-24 Tom Tromey <tromey@redhat.com>
3441 Gary Benson <gbenson@redhat.com>
3443 * server.h (CORE_ADDR): Now unsigned.
3445 2014-07-16 Pedro Alves <palves@redhat.com>
3447 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3449 2014-07-15 Pedro Alves <palves@redhat.com>
3451 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3454 2014-07-11 Pedro Alves <palves@redhat.com>
3456 * linux-low.c (kill_wait_lwp): New function, based on
3457 kill_one_lwp_callback, but use my_waitpid directly.
3458 (kill_one_lwp_callback, linux_kill): Use it.
3460 2014-06-23 Pedro Alves <palves@redhat.com>
3462 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3463 before setting DR0..DR3.
3465 2014-06-20 Gary Benson <gbenson@redhat.com>
3467 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3468 * configure: Regenerated.
3469 * config.in: Likewise.
3471 2014-06-20 Gary Benson <gbenson@redhat.com>
3473 * Makefile.in (SFILES): Update locations for files moved
3475 (object file files): Reordered.
3477 2014-06-20 Gary Benson <gbenson@redhat.com>
3479 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3480 (i386_dr_low_set_addr): Likewise.
3481 (i386_dr_low_get_addr): Likewise.
3482 (i386_dr_low_can_set_control): Likewise.
3483 (i386_dr_low_set_control): Likewise.
3484 (i386_dr_low_get_control): Likewise.
3485 (i386_dr_low_get_status): Likewise.
3486 (i386_get_debug_register_length): Likewise.
3487 * linux-x86-low.c (i386_dr_low_set_addr):
3488 Changed signature. Made static.
3489 (i386_dr_low_get_addr): Likewise.
3490 (i386_dr_low_set_control): Likewise.
3491 (i386_dr_low_get_control): Likewise.
3492 (i386_dr_low_get_status): Likewise.
3493 (i386_dr_low): New global variable.
3494 * win32-i386-low.c (i386_dr_low_set_addr):
3495 Changed signature. Made static.
3496 (i386_dr_low_get_addr): Likewise.
3497 (i386_dr_low_set_control): Likewise.
3498 (i386_dr_low_get_control): Likewise.
3499 (i386_dr_low_get_status): Likewise.
3500 (i386_dr_low): New global variable.
3502 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3504 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3505 * Makefile.in (AR, AR_FLAGS): Define.
3506 * configure: Regenerate.
3508 2014-06-19 Gary Benson <gbenson@redhat.com>
3510 * Makefile.in (i386-dregs.o): New rule.
3511 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3512 * i386-low.c (target.h): Remove include.
3513 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3514 (DR_CONTROL_SHIFT): Likewise.
3515 (DR_CONTROL_SIZE): Likewise.
3516 (DR_RW_EXECUTE): Likewise.
3517 (DR_RW_WRITE): Likewise.
3518 (DR_RW_READ): Likewise.
3519 (DR_RW_IORW): Likewise.
3520 (DR_LEN_1): Likewise.
3521 (DR_LEN_2): Likewise.
3522 (DR_LEN_4): Likewise.
3523 (DR_LEN_8): Likewise.
3524 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3525 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3526 (DR_ENABLE_SIZE): Likewise.
3527 (DR_LOCAL_SLOWDOWN): Likewise.
3528 (DR_GLOBAL_SLOWDOWN): Likewise.
3529 (DR_CONTROL_RESERVED): Likewise.
3530 (I386_DR_CONTROL_MASK): Likewise.
3531 (I386_DR_VACANT): Likewise.
3532 (I386_DR_LOCAL_ENABLE): Likewise.
3533 (I386_DR_GLOBAL_ENABLE): Likewise.
3534 (I386_DR_DISABLE): Likewise.
3535 (I386_DR_SET_RW_LEN): Likewise.
3536 (I386_DR_GET_RW_LEN): Likewise.
3537 (I386_DR_WATCH_HIT): Likewise.
3538 (i386_wp_op_t): Likewise.
3539 (i386_show_dr): Likewise.
3540 (i386_length_and_rw_bits): Likewise.
3541 (i386_insert_aligned_watchpoint): Likewise.
3542 (i386_remove_aligned_watchpoint): Likewise.
3543 (i386_handle_nonaligned_watchpoint): Likewise.
3544 i386_update_inferior_debug_regs(): Likewise.
3545 (i386_dr_insert_watchpoint): Likewise.
3546 (i386_dr_remove_watchpoint): Likewise.
3547 (i386_dr_region_ok_for_watchpoint): Likewise.
3548 (i386_dr_stopped_data_address): Likewise.
3549 (i386_dr_stopped_by_watchpoint): Likewise.
3551 2014-06-19 Gary Benson <gbenson@redhat.com>
3553 * i386-low.c (i386_dr_show): Renamed to
3554 i386_show_dr and made static. All uses updated.
3555 (i386_dr_length_and_rw_bits): Renamed to
3556 i386_length_and_rw_bits and made static.
3558 (i386_dr_insert_aligned_watchpoint): Renamed to
3559 i386_insert_aligned_watchpoint and made static.
3561 (i386_dr_remove_aligned_watchpoint): Renamed to
3562 i386_remove_aligned_watchpoint and made static.
3564 (i386_dr_update_inferior_debug_regs): Renamed to
3565 i386_update_inferior_debug_regs and made static.
3568 2014-06-18 Gary Benson <gbenson@redhat.com>
3570 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3571 (i386_dr_low_can_set_control): Likewise.
3572 (i386_get_debug_register_length): Likewise.
3573 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3574 (i386_dr_low_can_set_control): Likewise.
3575 (i386_get_debug_register_length): Likewise.
3577 2014-06-17 Gary Benson <gbenson@redhat.com>
3579 * i386-low.h (i386-dregs.h): New include.
3580 (DR_FIRSTADDR): Now in i386-dregs.h.
3581 (DR_LASTADDR): Likewise.
3582 (DR_NADDR): Likewise.
3583 (DR_STATUS): Likewise.
3584 (DR_CONTROL): Likewise.
3585 (i386_debug_reg_state): Likewise.
3586 (i386_dr_insert_watchpoint): Likewise.
3587 (i386_dr_remove_watchpoint): Likewise.
3588 (i386_dr_region_ok_for_watchpoint): Likewise.
3589 (i386_dr_stopped_data_address): Likewise.
3590 (i386_dr_stopped_by_watchpoint): Likewise.
3591 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3593 2014-06-18 Gary Benson <gbenson@redhat.com>
3595 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3596 i386_dr_insert_watchpoint.
3597 (i386_low_remove_watchpoint): Renamed to
3598 i386_dr_remove_watchpoint.
3599 (i386_low_region_ok_for_watchpoint): Renamed to
3600 i386_dr_region_ok_for_watchpoint.
3601 (i386_low_stopped_data_address): Renamed to
3602 i386_dr_stopped_data_address.
3603 (i386_low_stopped_by_watchpoint): Renamed to
3604 i386_dr_stopped_by_watchpoint.
3605 * i386-low.c (i386_show_dr): Renamed to
3606 i386_dr_show and made nonstatic. All uses updated.
3607 (i386_length_and_rw_bits): Renamed to
3608 i386_dr_length_and_rw_bits and made nonstatic.
3610 (i386_insert_aligned_watchpoint): Renamed to
3611 i386_dr_insert_aligned_watchpoint and made nonstatic.
3613 (i386_remove_aligned_watchpoint): Renamed to
3614 i386_dr_remove_aligned_watchpoint and made nonstatic.
3616 (i386_update_inferior_debug_regs): Renamed to
3617 i386_dr_update_inferior_debug_regs and made nonstatic.
3619 (i386_low_insert_watchpoint): Renamed to
3620 i386_dr_insert_watchpoint. All uses updated.
3621 (i386_low_remove_watchpoint): Renamed to
3622 i386_dr_remove_watchpoint. All uses updated.
3623 (i386_low_region_ok_for_watchpoint): Renamed to
3624 i386_dr_region_ok_for_watchpoint. All uses updated.
3625 (i386_low_stopped_data_address): Renamed to
3626 i386_dr_stopped_data_address. All uses updated.
3627 (i386_low_stopped_by_watchpoint): Renamed to
3628 i386_dr_stopped_by_watchpoint. All uses updated.
3630 2014-06-18 Gary Benson <gbenson@redhat.com>
3632 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3633 (i386_dr_low_can_set_control): Likewise.
3634 (i386_insert_aligned_watchpoint): New check.
3636 2014-06-18 Gary Benson <gbenson@redhat.com>
3638 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3641 2014-06-18 Gary Benson <gbenson@redhat.com>
3643 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3644 instead of fatal and error.
3645 (i386_handle_nonaligned_watchpoint): Likewise.
3647 2014-06-18 Gary Benson <gbenson@redhat.com>
3649 * i386-low.c (i386_get_debug_register_length): New macro.
3650 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3651 (i386_show_dr): Use debug_printf instead of fprintf. Use
3652 phex to format values.
3654 2014-06-18 Gary Benson <gbenson@redhat.com>
3656 * i386-low.h: Comment changes.
3657 * i386-low.c: Likewise.
3659 2014-06-18 Gary Benson <gbenson@redhat.com>
3661 * i386-low.c: Whitespace changes.
3663 2014-06-12 Tom Tromey <tromey@redhat.com>
3665 * utils.c (freeargv): Remove.
3667 2014-06-12 Tom Tromey <tromey@redhat.com>
3669 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3670 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3671 (parse_debug_format_options): Likewise.
3672 (gdbserver_usage): Likewise.
3673 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3674 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3675 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3677 ($(LIBGNU)): Depend on libiberty.
3678 (all-lib): Recurse into all subdirs.
3679 (install-only): Invoke "install" target in subdirs.
3680 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3682 * configure: Rebuild.
3683 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3684 for vasprintf, vsnprintf, or gettimeofday.
3685 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3688 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3690 * development.sh: Delete.
3691 * Makefile.in (config.status): Adjust dependency on development.sh.
3692 * configure.ac: Adjust development.sh source call.
3693 * configure: Regenerate.
3695 2014-06-02 Pedro Alves <palves@redhat.com>
3697 * ax.c (gdb_free_agent_expr): New function.
3698 * ax.h (gdb_free_agent_expr): New declaration.
3699 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3701 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3703 (clear_breakpoint_conditions_and_commands): New function.
3704 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3705 (clear_breakpoint_conditions_and_commands): New declaration.
3707 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3709 * linux-aarch64-low.c (asm/ptrace.h): Include.
3711 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3713 Fix TLS access for -static -pthread.
3714 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3715 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3716 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3718 2014-05-20 Pedro Alves <palves@redhat.com>
3720 * linux-aarch64-low.c (aarch64_insert_point)
3721 (aarch64_remove_point): No longer check whether the type is
3722 supported here. Adjust to new interface.
3723 (the_low_target): Install aarch64_supports_z_point_type as
3724 supports_z_point_type method.
3725 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3726 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3727 instead of a Z packet char. Adjust.
3728 (arm_supports_z_point_type): New function.
3729 (arm_insert_point, arm_remove_point): Adjust to new interface.
3730 (the_low_target): Install arm_supports_z_point_type.
3731 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3732 (cris_insert_point, cris_remove_point): Adjust to new interface.
3733 Don't check whether the type is supported here.
3734 (the_low_target): Install cris_supports_z_point_type.
3735 * linux-low.c (linux_supports_z_point_type): New function.
3736 (linux_insert_point, linux_remove_point): Adjust to new interface.
3737 * linux-low.h (struct linux_target_ops) <insert_point,
3738 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3739 raw_breakpoint pointer parameter.
3740 <supports_z_point_type>: New method.
3741 * linux-mips-low.c (mips_supports_z_point_type): New function.
3742 (mips_insert_point, mips_remove_point): Adjust to new interface.
3743 Use mips_supports_z_point_type.
3744 (the_low_target): Install mips_supports_z_point_type.
3745 * linux-ppc-low.c (the_low_target): Install NULL as
3746 supports_z_point_type method.
3747 * linux-s390-low.c (the_low_target): Install NULL as
3748 supports_z_point_type method.
3749 * linux-sparc-low.c (the_low_target): Install NULL as
3750 supports_z_point_type method.
3751 * linux-x86-low.c (x86_supports_z_point_type): New function.
3752 (x86_insert_point): Adjust to new insert_point interface. Use
3753 insert_memory_breakpoint. Adjust to new
3754 i386_low_insert_watchpoint interface.
3755 (x86_remove_point): Adjust to remove_point interface. Use
3756 remove_memory_breakpoint. Adjust to new
3757 i386_low_remove_watchpoint interface.
3758 (the_low_target): Install x86_supports_z_point_type.
3759 * lynx-low.c (lynx_target_ops): Install NULL as
3760 supports_z_point_type callback.
3761 * nto-low.c (nto_supports_z_point_type): New.
3762 (nto_insert_point, nto_remove_point): Adjust to new interface.
3763 (nto_target_ops): Install nto_supports_z_point_type.
3764 * mem-break.c: Adjust intro comment.
3765 (struct raw_breakpoint) <raw_type, size>: New fields.
3766 <inserted>: Update comment.
3767 <shlib_disabled>: Delete field.
3768 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3769 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3770 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3771 (raw_bkpt_type_to_target_hw_bp_type): New function.
3772 (find_enabled_raw_code_breakpoint_at): New function.
3773 (find_raw_breakpoint_at): New type and size parameters. Use them.
3774 (insert_memory_breakpoint): New function, based off
3775 set_raw_breakpoint_at.
3776 (remove_memory_breakpoint): New function.
3777 (set_raw_breakpoint_at): Reimplement.
3778 (set_breakpoint): New, based on set_breakpoint_at.
3779 (set_breakpoint_at): Reimplement.
3780 (delete_raw_breakpoint): Go through the_target->remove_point
3781 instead of assuming memory breakpoints.
3782 (find_gdb_breakpoint_at): Delete.
3783 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3784 (find_gdb_breakpoint): New function.
3785 (set_gdb_breakpoint_at): Delete.
3786 (z_type_supported): New function.
3787 (set_gdb_breakpoint_1): New function, loosely based off
3788 set_gdb_breakpoint_at.
3789 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3790 (delete_gdb_breakpoint_at): Delete.
3791 (delete_gdb_breakpoint_1): New function, loosely based off
3792 delete_gdb_breakpoint_at.
3793 (delete_gdb_breakpoint): New function.
3794 (clear_gdb_breakpoint_conditions): Rename to ...
3795 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3797 (add_condition_to_breakpoint): Make static.
3798 (add_breakpoint_condition): Take a struct breakpoint pointer
3799 instead of an address. Adjust.
3800 (gdb_condition_true_at_breakpoint): Rename to ...
3801 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3803 (gdb_condition_true_at_breakpoint): Reimplement.
3804 (add_breakpoint_commands): Take a struct breakpoint pointer
3805 instead of an address. Adjust.
3806 (gdb_no_commands_at_breakpoint): Rename to ...
3807 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3808 parameter. Return true if no breakpoint was found. Change debug
3810 (gdb_no_commands_at_breakpoint): Reimplement.
3811 (run_breakpoint_commands): Rename to ...
3812 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3813 and change return type to boolean.
3814 (run_breakpoint_commands): New function.
3815 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3816 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3817 breakpoint. Go through the_target->remove_point instead of
3818 assuming memory breakpoint.
3819 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3820 software and hardware breakpoints.
3821 (reinsert_raw_breakpoint): Go through the_target->insert_point
3822 instead of assuming memory breakpoint.
3823 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3824 software and hardware breakpoints.
3825 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3826 Check both software and hardware breakpoints.
3827 (validate_inserted_breakpoint): Assert the breakpoint is a
3828 software breakpoint. Set the inserted flag to -1 instead of
3829 setting shlib_disabled.
3830 (delete_disabled_breakpoints): Adjust.
3831 (validate_breakpoints): Only validate software breakpoints.
3832 Adjust to inserted flag change.
3833 (check_mem_read, check_mem_write): Skip breakpoint types other
3834 than software breakpoints. Adjust to inserted flag change.
3835 * mem-break.h (enum raw_bkpt_type): New enum.
3836 (raw_breakpoint, struct process_info): Forward declare.
3837 (Z_packet_to_target_hw_bp_type): Delete declaration.
3838 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3839 (set_gdb_breakpoint, delete_gdb_breakpoint)
3840 (clear_breakpoint_conditions): New declarations.
3841 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3842 (breakpoint_inserted_here): Update comment.
3843 (add_breakpoint_condition, add_breakpoint_commands): Replace
3844 address parameter with a breakpoint pointer parameter.
3845 (gdb_breakpoint_here): Update comment.
3846 (delete_gdb_breakpoint_at): Delete.
3847 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3848 * server.c (process_point_options): Take a struct breakpoint
3849 pointer instead of an address. Adjust.
3850 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3851 delete_gdb_breakpoint.
3852 * spu-low.c (spu_target_ops): Install NULL as
3853 supports_z_point_type method.
3854 * target.h: Include mem-break.h.
3855 (struct target_ops) <prepare_to_access_memory>: Update comment.
3856 <supports_z_point_type>: New field.
3857 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3858 instead of a char. Also take a raw breakpoint pointer.
3859 * win32-arm-low.c (the_low_target): Install NULL as
3860 supports_z_point_type.
3861 * win32-i386-low.c (i386_supports_z_point_type): New function.
3862 (i386_insert_point, i386_remove_point): Adjust to new interface.
3863 (the_low_target): Install i386_supports_z_point_type.
3864 * win32-low.c (win32_supports_z_point_type): New function.
3865 (win32_insert_point, win32_remove_point): Adjust to new interface.
3866 (win32_target_ops): Install win32_supports_z_point_type.
3867 * win32-low.h (struct win32_target_ops):
3868 <supports_z_point_type>: New method.
3869 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3870 instead of a char. Also take a raw breakpoint pointer.
3872 2014-05-20 Pedro Alves <palves@redhat.com>
3874 * mem-break.h: Include break-common.h.
3875 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3876 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3877 (Z_packet_to_target_hw_bp_type): New declaration.
3878 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3879 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3880 (Z_PACKET_ACCESS_WP): Delete macros.
3881 (Z_packet_to_hw_type): Delete function.
3882 * i386-low.h: Don't include break-common.h here.
3883 (Z_packet_to_hw_type): Delete declaration.
3884 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3885 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3886 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3887 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3888 * linux-aarch64-low.c: Don't include break-common.h here.
3889 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3890 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3891 (Z_packet_to_target_hw_bp_type): Delete function.
3892 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3894 (mips_insert_point, mips_remove_point): Use
3895 Z_packet_to_target_hw_bp_type.
3897 2014-05-20 Pedro Alves <palves@redhat.com>
3899 * linux-aarch64-low.c: Include break-common.h.
3900 (enum target_point_type): Delete.
3901 (Z_packet_to_point_type): Rename to ...
3902 (Z_packet_to_target_hw_bp_type): ... this, and return a
3903 target_hw_bp_type instead.
3904 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3905 instead of an enum target_point_type.
3906 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3908 (aarch64_dr_state_insert_one_point)
3909 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3910 (aarch64_handle_aligned_watchpoint)
3911 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3912 Take an enum target_hw_bp_type instead of an enum
3914 (aarch64_supports_z_point_type): New function.
3915 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3916 use Z_packet_to_target_hw_bp_type.
3918 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3920 * configure.ac: Only use -Werror by default when DEVELOPMENT
3922 * configure: Regenerate.
3924 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3926 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3927 * linux-x86-low.c (X86_64_USER_REGS): New.
3928 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3930 2014-04-28 Yao Qi <yao@codesourcery.com>
3932 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3935 2014-04-25 Pedro Alves <palves@redhat.com>
3938 * linux-low.c (linux_attach_fail_reason_string): New function.
3939 (linux_attach_lwp): Delete.
3940 (linux_attach_lwp_1): Rename to ...
3941 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3942 argument. Remove "initial" parameter. Return int instead of
3943 void. Don't error or warn here.
3944 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3945 failure to attach to the tgid. Call warning when failing to
3947 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3948 argument. Remove "initial" parameter. Return int instead of
3949 void. Don't error or warn here.
3950 (linux_attach_fail_reason_string): New declaration.
3951 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3952 interface change. Use linux_attach_fail_reason_string.
3954 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3955 Walfred Tedeschi <walfred.tedeschi@intel.com>
3957 * Makefile.in: Added rules to handle new files
3958 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3959 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3960 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3961 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3962 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3963 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3965 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3966 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3967 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3968 i386/x32-avx512.xml.
3969 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3970 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3971 i386/x32-avx512-linux.xml.
3972 * i387-fp.c (num_avx512_k_registers): New constant for number
3974 (num_avx512_zmmh_low_registers): New constant for number of
3975 lower ZMM registers (0-15).
3976 (num_avx512_zmmh_high_registers): New constant for number of
3977 higher ZMM registers (16-31).
3978 (num_avx512_ymmh_registers): New contant for number of higher
3979 YMM registers (ymm16-31 added by avx521 on x86_64).
3980 (num_avx512_xmm_registers): New constant for number of higher
3981 XMM registers (xmm16-31 added by AVX512 on x86_64).
3982 (struct i387_xsave): Add space for AVX512 registers.
3983 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3984 Add code to handle AVX512 registers.
3985 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3986 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3987 prototypei from generated file.
3988 (tdesc_amd64_avx512_linux): Likewise.
3989 (init_registers_x32_avx512_linux): Likewise.
3990 (tdesc_x32_avx512_linux): Likewise.
3991 (init_registers_i386_avx512_linux): Likewise.
3992 (tdesc_i386_avx512_linux): Likewise.
3993 (x86_64_regmap): Add AVX512 registers.
3994 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3996 (initialize_low_arch): Add code to initialize AVX512 registers.
3998 2014-04-23 Pedro Alves <palves@redhat.com>
4000 * mem-break.c (find_gdb_breakpoint_at): Make static.
4001 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4003 2014-04-23 Pedro Alves <palves@redhat.com>
4005 * i386-low.c: Don't include break-common.h here.
4006 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4007 prototype to take target_hw_bp_type as argument instead of a Z
4009 * i386-low.h: Include break-common.h here.
4010 (Z_packet_to_hw_type): Declare.
4011 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4013 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4014 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4015 (x86_remove_point): Convert the packet number to a
4016 target_hw_bp_type before calling i386_low_remove_watchpoint.
4017 * win32-i386-low.c (i386_insert_point): Convert the packet number
4018 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4019 (i386_remove_point): Convert the packet number to a
4020 target_hw_bp_type before calling i386_low_remove_watchpoint.
4022 2014-04-23 Pedro Alves <palves@redhat.com>
4024 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4026 2014-04-10 Pedro Alves <palves@redhat.com>
4028 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4029 Check if the condition or command is NULL before checking if the
4030 breakpoint is known. On success, return true.
4031 * mem-break.h (add_breakpoint_condition): Document return.
4032 (add_breakpoint_commands): Add describing comment.
4033 * server.c (skip_to_semicolon): New function.
4034 (process_point_options): Use it.
4036 2014-04-09 Pedro Alves <palves@redhat.com>
4038 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4041 2014-02-27 Pedro Alves <palves@redhat.com>
4044 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4046 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4048 (last_thread_of_process_p): Take a PID argument instead of a
4050 (linux_wait_for_lwp): Delete.
4051 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4053 (linux_low_filter_event): New function, party factored out from
4054 linux_wait_for_event.
4055 (linux_wait_for_event): Rename to ...
4056 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4057 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4058 sigsuspend. Check for zombie leaders.
4059 (linux_wait_for_event): Reimplement as wrapper around
4060 linux_wait_for_event_filtered.
4061 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4062 a normal or signal exit is seen, it's the whole process exiting.
4063 (wait_for_sigstop): No longer a for_each_inferior callback.
4064 Rewrite on top of linux_wait_for_event_filtered.
4065 (stop_all_lwps): Call wait_for_sigstop directly.
4066 * server.c (resume, handle_target_event): Handle
4067 TARGET_WAITKIND_NO_RESUMED.
4069 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4071 * win32-low.c (psapi_get_dll_name,
4072 * win32_CreateToolhelp32Snapshot): Delete.
4073 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4074 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4076 (handle_load_dll): Add function description.
4077 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4079 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4081 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4083 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4084 base address when calling win32_add_one_solib.
4085 (handle_load_dll): Delete local variable load_addr.
4086 Remove 0x1000 offset applied to DLL base address when calling
4087 win32_add_one_solib.
4088 (handle_unload_dll): Add comment.
4090 2014-02-26 Joel Brobecker <brobecker@adacore.com>
4092 * win32-low.c (win32_add_all_dlls): Renames
4093 win32_ensure_ntdll_loaded. Rewrite function documentation.
4094 Adjust implementation to always load all DLLs.
4095 Add 0x1000 offset to DLL base address when calling
4096 win32_add_one_solib.
4097 (child_initialization_done): New static global.
4098 (do_initial_child_stuff): Set child_initialization_done to
4099 zero during child initialization, and 1 after. Replace call
4100 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4102 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4103 (handle_unload_dll): Add function documentation.
4104 (get_child_debug_event): Ignore load and unload DLL events
4105 during child initialization.
4107 2014-02-20 Doug Evans <dje@google.com>
4109 Remove global all_lwps.
4110 * inferiors.h (ptid_of): Move here from linux-low.h.
4111 (pid_of, lwpid_of): Ditto.
4112 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4113 parameter is a struct thread_info * now.
4114 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4115 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4116 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4118 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4119 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4120 * linux-arm-low.c (update_registers_callback): Update, "entry"
4121 parameter is a struct thread_info * now.
4122 Fetch lwpid from current_inferior directly.
4123 (arm_insert_point): Pass &all_threads to find_inferior instead of
4125 (arm_remove_point): Ditto.
4126 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4127 (arm_prepare_to_resume): Fetch pid from thread.
4128 (arm_read_description): Fetch lwpid from current_inferior directly.
4129 * linux-low.c (all_lwps): Delete.
4130 (delete_lwp): Delete call to remove_inferior.
4131 (handle_extended_wait): Fetch lwpid from thread.
4132 (add_lwp): Don't set lwp->entry.id. Remove call to
4133 add_inferior_to_list.
4134 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4135 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4136 (kill_one_lwp_callback): Ditto.
4137 (linux_kill): Don't dereference NULL pointer.
4138 Fetch ptid,lwpid from thread.
4139 (get_detach_signal): Fetch ptid from thread.
4140 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4141 Simplify call to regcache_invalidate_thread.
4142 (delete_lwp_callback): Update, "entry" parameter is a
4143 struct thread_info * now. Fetch pid from thread.
4144 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4145 (status_pending_p_callback): Update, "entry" parameter is a
4146 struct thread_info * now. Fetch ptid from thread.
4147 (find_lwp_pid): Update, "entry" parameter is a
4148 struct thread_info * now.
4149 (linux_wait_for_lwp): Fetch pid from thread.
4150 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4151 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4152 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4153 (dequeue_one_deferred_signal): Ditto.
4154 (cancel_breakpoint): Fetch ptid from current_inferior.
4155 (linux_wait_for_event): Pass &all_threads to find_inferior,
4156 not &all_lwps. Fetch ptid, lwpid from thread.
4157 (count_events_callback): Update, "entry" parameter is a
4158 struct thread_info * now.
4159 (select_singlestep_lwp_callback): Ditto.
4160 (select_event_lwp_callback): Ditto.
4161 (cancel_breakpoints_callback): Ditto.
4162 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4164 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4165 (unsuspend_one_lwp): Update, "entry" parameter is a
4166 struct thread_info * now.
4167 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4169 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4170 Fetch lwpid from thread, not lwp.
4171 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4172 Pass &all_threads to find_inferior, not &all_lwps.
4173 (send_sigstop): Fetch lwpid from thread, not lwp.
4174 (send_sigstop_callback): Update, "entry" parameter is a
4175 struct thread_info * now.
4176 (suspend_and_send_sigstop_callback): Ditto.
4177 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4178 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4179 struct thread_info * now.
4180 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4182 (lwp_running): Update, "entry" parameter is a
4183 struct thread_info * now.
4184 (stop_all_lwps): Fetch ptid from thread.
4185 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4186 (linux_resume_one_lwp): Fetch lwpid from thread.
4187 (linux_set_resume_request): Update, "entry" parameter is a
4188 struct thread_info * now. Fetch pid, lwpid from thread.
4189 (resume_status_pending_p): Update, "entry" parameter is a
4190 struct thread_info * now.
4191 (need_step_over_p): Ditto. Fetch lwpid from thread.
4192 (start_step_over): Fetch lwpid from thread.
4193 (linux_resume_one_thread): Update, "entry" parameter is a
4194 struct thread_info * now. Fetch lwpid from thread.
4195 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4196 (proceed_one_lwp): Update, "entry" parameter is a
4197 struct thread_info * now. Fetch lwpid from thread.
4198 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4199 struct thread_info * now.
4200 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4201 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4202 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4204 (regsets_store_inferior_registers): Ditto.
4205 (fetch_register, store_register): Ditto.
4206 (linux_read_memory, linux_write_memory): Ditto.
4207 (linux_request_interrupt): Ditto.
4208 (linux_read_auxv): Ditto.
4209 (linux_xfer_siginfo): Ditto.
4210 (linux_qxfer_spu): Ditto.
4211 (linux_qxfer_libraries_svr4): Ditto.
4212 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4213 moved to inferiors.h.
4215 (get_thread_lwp): Update.
4216 (struct lwp_info): Delete member "entry". Simplify comment for
4219 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4220 current_inferior directly.
4221 (update_watch_registers_callback): Update, "entry" parameter is a
4222 struct thread_info * now. Fetch pid from thread.
4223 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4224 (mips_insert_point): Fetch lwpid from current_inferior.
4225 Pass &all_threads to find_inferior, not &all_lwps.
4226 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4227 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4229 (mips_stopped_data_address): Ditto.
4230 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4232 * linux-tile-low.c (tile_arch_setup): Ditto.
4233 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4234 (update_debug_registers_callback): Update, "entry" parameter is a
4235 struct thread_info * now. Fetch pid from thread.
4236 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4237 Pass &all_threads to find_inferior, not &all_lwps.
4238 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4239 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4240 Pass &all_threads to find_inferior, not &all_lwps.
4241 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4242 (i386_dr_low_get_status): Ditto.
4243 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4244 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4245 (x86_linux_read_description): Ditto.
4246 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4248 2014-02-20 Doug Evans <dje@google.com>
4250 * inferiors.c (get_first_inferior): Fix buglet.
4252 2014-02-19 Doug Evans <dje@google.com>
4254 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4255 * inferiors.c (add_thread): Change result type to struct thread_info *.
4256 All callers updated.
4257 (add_lwp): Call add_thread here instead of in callers.
4258 All callers updated.
4259 * linux-low.h (get_lwp_thread): Rewrite.
4260 (struct lwp_info): New member "thread".
4262 2014-02-19 Doug Evans <dje@google.com>
4264 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4265 All callers updated.
4267 2014-02-19 Doug Evans <dje@google.com>
4269 * inferiors.c (add_thread): Fix whitespace.
4271 2014-02-19 Doug Evans <dje@google.com>
4273 * dll.c (clear_dlls): Replace accessing list implemention details
4275 * gdbthread.h (get_first_thread): Declare.
4276 * inferiors.c (for_each_inferior_with_data): New function.
4277 (get_first_thread): New function.
4278 (find_thread_ptid): Simplify.
4279 (get_first_inferior): New function.
4280 (clear_list): Delete.
4281 (one_inferior_p): New function.
4282 (clear_inferior_list): New function.
4283 (clear_inferiors): Update.
4284 * inferiors.h (for_each_inferior_with_data): Declare.
4285 (clear_inferior_list): Declare.
4286 (one_inferior_p): Declare.
4287 (get_first_inferior): Declare.
4288 * linux-low.c (linux_wait_for_event): Replace accessing list
4289 implemention details with API function.
4290 * server.c (target_running): Ditto.
4291 (accumulate_file_name_length): New function.
4292 (emit_dll_description): New function.
4293 (handle_qxfer_libraries): Replace accessing list implemention
4294 details with API function.
4295 (handle_qxfer_threads_worker): New function.
4296 (handle_qxfer_threads_proper): Replace accessing list implemention
4297 details with API function.
4298 (handle_query): Ditto.
4299 (visit_actioned_threads_callback_ftype): New typedef.
4300 (visit_actioned_threads_data): New struct.
4301 (visit_actioned_threads): Rewrite to be find_inferior callback.
4302 (resume): Call find_inferior.
4303 (handle_status): Replace accessing list implemention
4304 details with API function.
4305 (process_serial_event): Replace accessing list implemention details
4307 * target.c (set_desired_inferior): Replace accessing list implemention
4308 details with API function.
4309 * tracepoint.c (same_process_p): New function.
4310 (gdb_agent_about_to_close): Replace accessing list implemention
4311 details with API function.
4312 * win32-low.c (child_delete_thread): Replace accessing list
4313 implemention details with API function.
4314 (match_dll_by_basename): New function.
4315 (dll_is_loaded_by_basename): New function.
4316 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4317 details call to dll_is_loaded_by_basename.
4319 2014-02-19 Doug Evans <dje@google.com>
4321 * dll.h (struct dll_info): Add comment.
4322 * gdbthread.h (struct thread_info): Add comment.
4323 (current_ptid): Simplify.
4324 * inferiors.c (add_process): Update.
4325 (remove_process): Update.
4326 * inferiors.h (struct process_info): Rename member "head" to "entry".
4327 * linux-low.c (delete_lwp): Update.
4329 (last_thread_of_process_p): Update.
4330 (kill_one_lwp_callback, linux_kill): Update.
4331 (status_pending_p_callback): Update.
4332 (wait_for_sigstop): Update. Simplify read of ptid.
4333 (start_step_over): Update.
4334 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4335 (get_lwp_thread): Update.
4336 (struct lwp_info): Rename member "head" to "entry".
4337 * regcache.h (inferior_list_entry): Delete.
4338 * server.c (kill_inferior_callback): Update.
4339 (detach_or_kill_inferior_callback): Update.
4340 (print_started_pid): Update.
4341 (print_attached_pid): Update.
4342 (process_serial_event): Simplify read of ptid.
4343 * thread-db.c (thread_db_create_event): Update.
4344 (thread_db_get_tls_address): Update.
4345 * win32-low.c (current_inferior_ptid): Simplify.
4347 2014-02-19 Tom Tromey <tromey@redhat.com>
4349 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4351 (target_supports_btrace): Update.
4353 2014-02-14 Yao Qi <yao@codesourcery.com>
4355 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4356 (rsp-low-ipa.o): New target.
4358 2014-02-12 Tom Tromey <tromey@redhat.com>
4360 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4361 convert_ascii_to_int.
4362 * regcache.c (registers_to_string): Likewise.
4363 * remote-utils.c (decode_M_packet): Likewise.
4364 * server.c (process_serial_event): Likewise.
4366 2014-02-12 Tom Tromey <tromey@redhat.com>
4368 * server.c (handle_query, handle_v_run): Use hex2bin, not
4370 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4372 2014-02-12 Tom Tromey <tromey@redhat.com>
4374 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4375 convert_int_to_ascii.
4376 * regcache.c (registers_to_string, collect_register_as_string):
4378 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4380 * server.c (process_serial_event): Likewise.
4381 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4382 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4384 2014-02-12 Tom Tromey <tromey@redhat.com>
4386 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4387 bin2hex, not hexify.
4388 * tracepoint.c (cmd_qtstatus): Likewise.
4390 2014-02-12 Tom Tromey <tromey@redhat.com>
4392 * remote-utils.c (monitor_output): Pass explicit length to
4395 2014-02-12 Tom Tromey <tromey@redhat.com>
4397 * tracepoint.c: Include rsp-low.h.
4398 * server.c: Include rsp-low.h.
4399 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4400 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4402 * remote-utils.c: Include rsp-low.h.
4403 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4404 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4405 (convert_int_to_ascii, convert_ascii_to_int): Move to
4407 * regcache.c: Include rsp-low.h.
4408 * ax.c: Include rsp-low.h.
4409 * Makefile.in (SFILES): Add common/rsp-low.c.
4410 (OBS): Add rsp-low.o.
4411 (rsp-low.o): New target.
4413 2014-02-12 Tom Tromey <tromey@redhat.com>
4415 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4416 Include print-utils.h.
4417 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4418 (plongest, thirty_two, phex_nz): Remove.
4419 * Makefile.in (SFILES): Add common/print-utils.c.
4420 (OBS): Add print-utils.o.
4421 (print-utils-ipa.o): New target.
4422 (print-utils.o): New target.
4423 (IPA_OBJS): Add print-utils-ipa.o.
4425 2014-02-06 Tom Tromey <tromey@redhat.com>
4427 * Makefile.in (SFILES): Fix indentation.
4429 2014-02-05 Doug Evans <dje@google.com>
4431 * linux-low.c (linux_wait_for_event): Improve comment.
4432 (linux_wait_1): Keep current_inferior in sync with event_child.
4434 2014-01-22 Doug Evans <dje@google.com>
4436 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4438 2014-01-22 Doug Evans <dje@google.com>
4440 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4441 * configure: Regenerate.
4442 * config.in: Regenerate.
4443 * Makefile.in (SFILES): Add debug.c.
4445 * debug.c: New file.
4446 * debug.h: New file.
4447 * linux-aarch64-low.c (*): Update all debugging printfs to use
4448 debug_printf instead of fprintf.
4449 * linux-arm-low.c (*): Ditto.
4450 * linux-cris-low.c (*): Ditto.
4451 * linux-crisv32-low.c (*): Ditto.
4452 * linux-m32r-low.c (*): Ditto.
4453 * linux-sparc-low.c (*): Ditto.
4454 * linux-x86.c (*): Ditto.
4455 * linux-low.c (*): Ditto.
4456 (linux_wait_1): Add calls to debug_enter, debug_exit.
4457 (linux_wait): Remove redundant debugging printf.
4458 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4459 (linux_resume, unstop_all_lwps): Ditto.
4460 * mem-break.c (*): Update all debugging printfs to use
4461 debug_printf instead of fprintf.
4462 * remote-utils.c (*): Ditto.
4463 * thread-db.c (*): Ditto.
4464 * server.c #include <ctype.h>, "gdb_vecs.h".
4465 (debug_threads): Moved to debug.c.
4466 (*): Update all debugging printfs to use debug_printf instead of
4468 (start_inferior): Replace call to fflush with call to debug_flush.
4469 (monitor_show_help): Mention set debug-format.
4470 (parse_debug_format_options): New function.
4471 (handle_monitor_command): Handle "monitor set debug-format".
4472 (gdbserver_usage): Mention --debug-format.
4473 (main): Parse --debug-format.
4474 * server.h (debug_threads): Declaration moved to debug.h.
4476 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4477 trace_debug_1 that uses debug_printf.
4478 (tracepoint_look_up_symbols): Update all debugging printfs to use
4479 debug_printf instead of fprintf.
4481 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4483 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4486 2014-01-17 Pedro Alves <palves@redhat.com>
4489 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4490 defined after including gdb_proc_service.h.
4492 2014-01-16 Doug Evans <dje@google.com>
4494 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4495 (match_dll): Use it.
4497 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4499 * target.h (target_ops) <read_btrace>: Change parameters and
4500 return type to allow error reporting.
4501 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4502 trace reading errors on.
4503 * linux-low.c (linux_low_read_btrace): Pass trace reading
4505 (linux_low_disable_btrace): New.
4507 2014-01-15 Doug Evans <dje@google.com>
4509 * inferiors.c (thread_id_to_gdb_id): Delete.
4510 * inferiors.h (thread_id_to_gdb_id): Delete.
4512 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4514 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4515 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4518 2014-01-08 Pedro Alves <palves@redhat.com>
4520 * server.c (handle_status): Don't discard previous queued stop
4521 replies or thread's pending status here.
4522 (main) <disconnection>: Do it here instead.
4524 2014-01-08 Pedro Alves <palves@redhat.com>
4526 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4527 * server.c (visit_actioned_threads, handle_pending_status): New
4529 (handle_v_cont): Factor out parts to ...
4530 (resume): ... this new function. If in all-stop, and a thread
4531 being resumed has a pending status, report it without actually
4533 (myresume): Adjust to use the new 'resume' function.
4534 (clear_pending_status_callback, set_pending_status_callback)
4535 (find_status_pending_thread_callback): New functions.
4536 (handle_status): Handle the case of multiple threads having
4537 interesting statuses to report. Report threads' real last signal
4538 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4539 with an interesting thread to report the status for, instead of
4540 always reporting the status of the first thread.
4542 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4544 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4545 * gdbreplay.c (gdbreplay_version): Likewise.
4547 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4549 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4550 iov.iov_len with the real length in use.
4552 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4554 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4555 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4556 for all targets that use win32-low.c.
4557 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4558 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4560 2013-12-13 Pedro Alves <palves@redhat.com>
4562 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4563 if equal to TARGET_WAITKIND_LOADED.
4564 * win32-low.c (cached_status): New static global.
4565 (win32_wait): Add declaration.
4566 (do_initial_child_stuff): Flush all initial pending debug events
4567 up to the initial breakpoint.
4568 (win32_wait): If CACHED_STATUS was set, return that instead
4569 of doing a real wait. Remove the code resuming the execution
4570 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4571 during the initial phase. Also remove the code changing
4572 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4573 TARGET_WAITKIND_STOPPED.
4575 2013-12-11 Yao Qi <yao@codesourcery.com>
4577 * notif.c (handle_notif_ack): Return 0 if no notification
4580 2013-11-20 Doug Evans <dje@google.com>
4582 * linux-low.c (linux_set_resume_request): Fix comment.
4584 2013-11-20 Doug Evans <dje@google.com>
4586 * linux-low.c (resume_status_pending_p): Tweak comment.
4588 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4590 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4591 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4592 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4593 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4594 (srv_amd64_regobj): Add amd64-mpx.o.
4595 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4596 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4597 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4598 * i387-fp.c (num_pl_bnd_register) Added constant.
4599 (num_pl_bnd_cfg_registers) Added constant.
4600 (struct i387_xsave) Added reserved area and MPX fields.
4601 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4602 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4604 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4605 (init_registers_amd64_mpx_linux): Declare new function.
4606 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4607 (x86_64_regmap): Add MPX registers.
4608 (x86_linux_read_description): Add MPX case.
4609 (initialize_low_arch): Initialize MPX targets.
4611 2013-11-18 Tom Tromey <tromey@redhat.com>
4613 * configure: Rebuild.
4614 * configure.ac: Don't check for stdlib.h.
4615 * gdbreplay.c: Unconditionally include stdlib.h.
4617 2013-11-18 Tom Tromey <tromey@redhat.com>
4619 * config.in: Rebuild.
4620 * configure: Rebuild.
4621 * configure.ac: Don't use AC_HEADER_DIRENT.
4623 2013-11-18 Tom Tromey <tromey@redhat.com>
4625 * server.h: Don't check HAVE_STRING_H.
4626 * gdbreplay.c: Don't check HAVE_STRING_H.
4627 * configure: Rebuild.
4629 2013-11-18 Tom Tromey <tromey@redhat.com>
4631 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4634 2013-11-08 Tom Tromey <tromey@redhat.com>
4636 * configure, config.in: Rebuild.
4637 * configure.ac: Remove unused configury.
4639 2013-11-08 Tom Tromey <tromey@redhat.com>
4641 * acinclude.m4: Include common.m4, codeset.m4.
4642 * configure, config.in: Rebuild.
4643 * configure.ac: Use GDB_AC_COMMON.
4645 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4647 * linux-s390-low.c (HWCAP_S390_TE): New define.
4648 (s390_arch_setup): Consider the TE field in the HWCAP for
4649 determining 'have_regset_tdb'.
4651 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4654 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4657 2013-10-02 Pedro Alves <palves@redhat.com>
4659 * server.c (process_serial_event): Don't output "GDBserver
4660 exiting" if GDB is connected through stdio.
4661 * target.c (mywait): Likewise, be silent if GDB is connected
4664 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4666 * lynx-low.c (lynx_add_threads_after_attach): New function.
4667 (lynx_attach): Remove call to add_thread. Add call to
4668 lynx_add_threads_after_attach instead.
4670 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4672 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4673 * config.in, configure: Regenerated.
4675 2013-09-18 Yao Qi <yao@codesourcery.com>
4678 * server.c (start_inferior): Clear 'resume_info'.
4680 2013-09-16 Jiong Wang <jiwang@tilera.com>
4682 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4685 2013-09-16 Jiong Wang <jiwang@tilera.com>
4687 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4688 linux-tile-low.o to srv_tgtobj.
4690 2013-09-16 Will Newton <will.newton@linaro.org>
4692 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4695 2013-09-06 Pedro Alves <palves@redhat.com>
4697 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4698 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4699 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4700 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4701 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4702 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4704 2013-09-06 Pedro Alves <palves@redhat.com>
4706 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4707 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4709 2013-09-06 Pedro Alves <palves@redhat.com>
4711 * linux-amd64-ipa.c: Include tracepoint.h.
4712 * linux-i386-ipa.c: Include tracepoint.h.
4714 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4716 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4717 (ps_get_thread_area): New function.
4719 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4721 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4722 (initialize_low_arch): Call init_registers_crisv32 rather than
4723 init_register_crisv32.
4725 2013-09-05 Pedro Alves <palves@redhat.com>
4727 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4729 * hostio.h: ... this new file.
4730 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4731 win32-low.c: Include hostio.h.
4733 2013-09-05 Pedro Alves <palves@redhat.com>
4735 * server.h (gdb_client_data, handler_func, callback_handler_func)
4736 (delete_file_handler, add_file_handler, append_callback_event)
4737 (delete_callback_event, start_event_loop, initialize_event_loop):
4738 Move to event-loop.h and include it.
4739 * event-loop.h: New file.
4741 2013-09-05 Pedro Alves <palves@redhat.com>
4743 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4744 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4745 (loaded_dll, unloaded_dll): Move to ...
4746 * dll.h: ... this new file.
4747 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4749 2013-09-05 Pedro Alves <palves@redhat.com>
4751 * server.h (current_process, get_thread_process, all_processes)
4752 (add_inferior_to_list, for_each_inferior, current_inferior)
4753 (remove_inferior, add_process, remove_process, find_process_pid)
4754 (have_started_inferiors_p, have_attached_inferiors_p)
4755 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4756 (clear_inferiors, find_inferior, find_inferior_id)
4757 (inferior_target_data, set_inferior_target_data)
4758 (inferior_regcache_data, set_inferior_regcache_data): Move to
4759 inferiors.h, and include it.
4760 * inferiors.h: New file.
4762 2013-09-05 Pedro Alves <palves@redhat.com>
4764 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4768 2013-09-05 Pedro Alves <palves@redhat.com>
4770 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4772 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4773 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4774 (handle_tracepoint_general_set, handle_tracepoint_query)
4775 (tracepoint_finished_step, tracepoint_was_hit)
4776 (release_while_stepping_state_list, current_traceframe)
4777 (in_readonly_region, traceframe_read_mem)
4778 (fetch_traceframe_registers, traceframe_read_sdata)
4779 (traceframe_read_info, struct fast_tpoint_collect_status)
4780 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4781 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4782 (supply_fast_tracepoint_registers)
4783 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4784 (ipa_tdesc, claim_trampoline_space)
4785 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4786 (agent_mem_read, agent_get_trace_state_variable_value)
4787 (agent_set_trace_state_variable_value, agent_tsv_read)
4788 (agent_mem_read_string, get_raw_reg_func_addr)
4789 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4790 * tracepoint.h: ... this new file.
4792 2013-09-05 Pedro Alves <palves@redhat.com>
4794 * server.h (perror_with_name, error, fatal, warning, paddress)
4795 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4797 * utils.h: New file.
4799 2013-09-05 Pedro Alves <palves@redhat.com>
4801 * server.h (remote_debug, noack_mode, transport_is_reliable)
4802 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4803 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4804 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4805 (write_enn, initialize_async_io, enable_async_io)
4806 (disable_async_io, check_remote_input_interrupt_request)
4807 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4808 (dead_thread_notify, prepare_resume_reply)
4809 (decode_address_to_semicolon, decode_address, decode_m_packet)
4810 (decode_M_packet, decode_X_packet, decode_xfer_write)
4811 (decode_search_memory_packet, unhexify, hexify)
4812 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4813 (look_up_one_symbol, relocate_instruction)
4814 (monitor_output): Move to remote-utils.h, and include it.
4815 * remote-utils.h: New file.
4817 2013-09-05 Pedro Alves <palves@redhat.com>
4819 * server.h (_): Delete.
4821 2013-09-02 Pedro Alves <palves@redhat.com>
4823 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4824 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4826 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4828 2013-09-02 Pierre Muller <muller@sourceware.org>
4830 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4831 or WriteProcessMemory complete successfully and handle
4832 ERROR_PARTIAL_COPY error.
4834 2013-09-02 Pedro Alves <palves@redhat.com>
4836 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4837 error instead of EIO.
4839 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4842 * linux-low.c: Include filestuff.h.
4843 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4844 * lynx-low.c: Include filestuff.h.
4845 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4846 * server.c: Include filestuff.h.
4847 (main): Call notice_open_fds.
4848 * spu-low.c: Include filestuff.h.
4849 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4851 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4853 * Makefile.in: Explain why ../target and ../nat are not
4854 listed as include file search paths.
4855 (linux-waitpid.o): New object file rule.
4856 * configure.srv (srv_native_linux_obj): New variable.
4857 Replace all occurrences of linux native object files with
4858 $srv_native_linux_obj.
4859 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4860 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4861 (linux_enable_event_reporting): Remove declaration.
4862 (my_waitpid): Moved to common/linux-waitpid.c.
4863 (linux_wait_for_event): Pass ptid when calling
4864 linux_enable_event_reporting.
4865 (linux_supports_tracefork_flag): Remove.
4866 (linux_enable_event_reporting): Likewise.
4867 (linux_tracefork_grandchild): Remove.
4868 (STACK_SIZE): Moved to common/linux-ptrace.c.
4869 (linux_tracefork_child): Remove.
4870 (linux_test_for_tracefork): Remove.
4871 (linux_look_up_symbols): Call linux_supports_traceclone.
4872 (initialize_low): Remove call to linux_test_for_tracefork.
4873 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4874 common/linux-ptrace.h.
4875 (PTRACE_TYPE_ARG4): Likewise.
4876 Include linux-ptrace.h.
4878 2013-08-21 Pedro Alves <palves@redhat.com>
4880 * config.in: Renegerate.
4882 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4884 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4885 (SFILES): Remove $(srcdir)/common/target-common.c and
4886 add $(srcdir)/target/waitstatus.c.
4887 (OBS): Remove target-common.o and add waitstatus.o.
4888 (server_h): Remove $(srcdir)/../common/target-common.h and
4889 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4890 and $(srcdir)/../target/waitstatus.h.
4891 (target-common.o): Remove.
4892 (waitstatus.o): New target object file.
4893 * target.h: Do not include target-common.h and
4894 include target/resume.h, target/wait.h and
4895 target/waitstatus.h.
4897 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4899 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4900 to PTRACE_TYPE_ARG3.
4901 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4902 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4904 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4905 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4907 2013-07-27 Jie Zhang <jie@codesourcery.com>
4908 Daniel Jacobowitz <dan@codesourcery.com>
4909 Yao Qi <yao@codesourcery.com>
4911 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4912 (mips-linux-watch.o): New rule.
4913 (mips_linux_watch_h): New variable.
4914 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4916 * linux-mips-low.c: Include mips-linux-watch.h.
4917 (struct arch_process_info, struct arch_lwp_info): New.
4918 (update_watch_registers_callback): New function.
4919 (mips_linux_new_process, mips_linux_new_thread) New functions.
4920 (mips_linux_prepare_to_resume, mips_insert_point): New
4922 (mips_remove_point, mips_stopped_by_watchpoint): New
4924 (rsp_bp_type_to_target_hw_bp_type): New function.
4925 (mips_stopped_data_address): New function.
4926 (the_low_target): Add watchpoint support functions.
4928 2013-07-27 Yao Qi <yao@codesourcery.com>
4930 * i386-low.c: Include break-common.h.
4931 (enum target_hw_bp_type): Remove.
4933 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4935 * Makefile.in (SFILES): /common/target-common.c.
4936 (OBS): Add target-common.o.
4937 (server_h): Add $(srcdir)/../common/target-common.h.
4938 (target-common.o): New target.
4939 * server.c (queue_stop_reply_callback): Free
4940 status string after use.
4941 * target.c (target_waitstatus_to_string): Remove.
4942 * target.h: Include target-common.h.
4943 (resume_kind): Likewise.
4944 (target_waitkind): Likewise.
4945 (target_waitstatus): Likewise.
4946 (TARGET_WNOHANG): Likewise.
4948 2013-07-04 Yao Qi <yao@codesourcery.com>
4950 * Makefile.in (host_alias): Use @host_noncanonical@.
4951 (target_alias): Use @target_noncanonical@.
4952 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4953 ACX_NONCANONICAL_HOST.
4954 * configure: Regenerated.
4957 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4959 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4960 * configure: Rebuild.
4961 * Makefile.in (version_host, version_target): Get from configure.
4962 (version.c): Use $(version_host) and $(version_target).
4964 2013-07-03 Pedro Alves <palves@redhat.com>
4966 * Makefile.in (config.status): Depend on development.sh.
4967 * acinclude.m4: Include libmcheck.m4.
4968 * configure: Regenerate.
4970 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4972 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4973 attribute inside the parentheses.
4974 (winapi_DebugSetProcessKillOnExit): Ditto.
4975 (winapi_DebugBreakProcess): Ditto.
4976 (winapi_GenerateConsoleCtrlEvent): Ditto.
4978 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4980 * notif.h (notif_event): Add a dummy member to avoid compiler
4983 2013-07-01 Pedro Alves <palves@redhat.com>
4985 * hostio.c (HOSTIO_PATH_MAX): Define.
4986 (require_filename, handle_open, handle_unlink, handle_readlink):
4989 2013-07-01 Pedro Alves <palves@redhat.com>
4991 * server.h: Include "pathmax.h".
4992 * linux-low.c: Don't include sys/param.h.
4993 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4995 * win32-low.c: Don't include sys/param.h.
4996 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4998 2013-07-01 Pedro Alves <palves@redhat.com>
5000 * event-loop.c: Don't check HAVE_UNISTD_H before including
5002 * gdbreplay.c: Likewise.
5003 * remote-utils.c: Likewise.
5004 * server.c: Likewise.
5005 * configure.ac: Don't check for unistd.h.
5006 * configure: Regenerate.
5008 2013-06-28 Tom Tromey <tromey@redhat.com>
5010 * Makefile.in (version.c): Use version.in, not
5013 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5015 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5016 * configure: Rebuild.
5017 * Makefile.in (version_host, version_target): Get from configure.
5018 (version.c): Use $(version_host) and $(version_target).
5020 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5022 Fix trace-status to output user name without trailing colon.
5023 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5025 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5027 Fix trace-status to output proper start-time and stop-time.
5028 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5029 output start time and stop time in hex as gdb expects.
5031 2013-06-26 Pedro Alves <pedro@codesourcery.com>
5033 * tracepoint.c (build_traceframe_info_xml): Output trace state
5034 variables present in the trace buffer.
5036 2013-06-24 Tom Tromey <tromey@redhat.com>
5038 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5040 (version.o): Remove.
5041 * gdbreplay.c: Include version.h.
5042 (version, host_name): Don't declare.
5043 * server.h: Include version.h.
5044 (version, host_name): Don't declare.
5046 2013-06-12 Pedro Alves <palves@redhat.com>
5048 * linux-x86-low.c (linux_is_elf64): Delete global.
5049 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5050 with local linux_pid_exe_is_elf_64_file use.
5052 2013-06-11 Pedro Alves <palves@redhat.com>
5054 * linux-low.c (regset_disabled, disable_regset): New functions.
5055 (regsets_fetch_inferior_registers)
5056 (regsets_store_inferior_registers): Use them.
5057 (initialize_regsets_info); Don't allocate the disabled_regsets
5059 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5062 2013-06-11 Pedro Alves <palves@redhat.com>
5064 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5067 2013-06-11 Pedro Alves <palves@redhat.com>
5069 * linux-x86-low.c (initialize_low_arch): Call
5070 init_registers_x32_avx_linux.
5072 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5074 Fix compatibility with Android Bionic.
5075 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5078 2013-06-07 Pedro Alves <palves@redhat.com>
5081 * Makefile.in (OBS): Add tdesc.o.
5082 (IPA_OBJS): Add tdesc-ipa.o.
5083 (tdesc-ipa.o): New rule.
5084 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5086 * linux-low.c (new_inferior): Delete.
5087 (disabled_regsets, num_regsets): Delete.
5088 (linux_add_process): Adjust to set the new per-process
5090 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5091 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5092 was a stop. When calling arch_setup, switch the current inferior
5093 to the thread that got an event.
5094 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5095 (regsets_fetch_inferior_registers)
5096 (regsets_store_inferior_registers): New regsets_info parameter.
5098 (linux_register_in_regsets): New regs_info parameter. Adjust to
5100 (register_addr, fetch_register, store_register): New usrregs_info
5101 parameter. Adjust to use it.
5102 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5103 parameter regs_info. Adjust to use it.
5104 (linux_fetch_registers): Get the current inferior's regs_info, and
5106 (linux_store_registers): Ditto.
5107 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5108 (initialize_low): Don't initialize the target_regsets here. Call
5109 initialize_low_arch.
5110 * linux-low.h (target_regsets): Delete declaration.
5111 (struct regsets_info): New.
5112 (struct usrregs_info): New.
5113 (struct regs_info): New.
5114 (struct process_info_private) <new_inferior>: New field.
5115 (struct linux_target_ops): Delete the num_regs, regmap, and
5116 regset_bitmap fields. New field regs_info.
5117 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5118 * i387-fp.c (num_xmm_registers): Delete.
5119 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5120 calls to new interface.
5121 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5122 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5123 Infer the number of xmm registers from the regcache's target
5125 * i387-fp.h (num_xmm_registers): Delete.
5126 * inferiors.c (add_thread): Don't install the thread's regcache
5128 * proc-service.c (gregset_info): Fetch the current inferior's
5129 regs_info. Adjust to use it.
5130 * regcache.c: Include tdesc.h.
5131 (register_bytes, reg_defs, num_registers)
5132 (gdbserver_expedite_regs): Delete.
5133 (get_thread_regcache): If the thread doesn't have a regcache yet,
5134 create one, instead of aborting gdbserver.
5135 (regcache_invalidate_one): Rename to ...
5136 (regcache_invalidate_thread): ... this.
5137 (regcache_invalidate_one): New.
5138 (regcache_invalidate): Only invalidate registers of the current
5140 (init_register_cache): Add target_desc parameter, and use it.
5141 (new_register_cache): Ditto. Assert the target description has a
5142 non zero registers_size.
5143 (regcache_cpy): Add assertions. Adjust.
5144 (realloc_register_cache, set_register_cache): Delete.
5145 (registers_to_string, registers_from_string): Adjust.
5146 (find_register_by_name, find_regno, find_register_by_number)
5147 (register_cache_size): Add target_desc parameter, and use it.
5148 (free_register_cache_thread, free_register_cache_thread_one)
5149 (regcache_release, register_cache_size): New.
5150 (register_size): Add target_desc parameter, and use it.
5151 (register_data, supply_register, supply_register_zeroed)
5152 (supply_regblock, supply_register_by_name, collect_register)
5153 (collect_register_as_string, collect_register_by_name): Adjust.
5154 * regcache.h (struct target_desc): Forward declare.
5155 (struct regcache) <tdesc>: New field.
5156 (init_register_cache, new_register_cache): Add target_desc
5158 (regcache_invalidate_thread): Declare.
5159 (regcache_invalidate_one): Delete declaration.
5160 (regcache_release): Declare.
5161 (find_register_by_number, register_cache_size, register_size)
5162 (find_regno): Add target_desc parameter.
5163 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5165 * remote-utils.c: Include tdesc.h.
5166 (outreg, prepare_resume_reply): Adjust.
5167 * server.c: Include tdesc.h.
5168 (gdbserver_xmltarget): Delete declaration.
5169 (get_features_xml, process_serial_event): Adjust.
5170 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5172 (struct process_info) <tdesc>: New field.
5173 (ipa_tdesc): Declare.
5174 * tdesc.c: New file.
5175 * tdesc.h: New file.
5176 * tracepoint.c: Include tdesc.h.
5177 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5178 (get_context_regcache): Adjust to pass ipa_tdesc down.
5179 (do_action_at_tracepoint): Adjust to get the register cache size
5180 from the context regcache's description.
5181 (traceframe_walk_blocks): Adjust to get the register cache size
5182 from the current trace frame's description.
5183 (traceframe_get_pc): Adjust to get current trace frame's
5184 description and pass it down.
5185 (gdb_collect): Adjust to get the register cache size from the
5187 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5188 (gdbserver_xmltarget): Delete.
5189 (initialize_low_tracepoint): Set the ipa's target description.
5190 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5191 (initialize_low_tracepoint): Set the ipa's target description.
5192 * linux-x86-low.c: Include tdesc.h.
5193 [__x86_64__] (is_64bit_tdesc): New.
5194 (ps_get_thread_area, x86_get_thread_area): Use it.
5195 (i386_cannot_store_register): Rename to ...
5196 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5197 (i386_cannot_fetch_register): Rename to ...
5198 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5199 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5201 (target_regsets): Rename to ...
5202 (x86_regsets): ... this.
5203 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5205 (x86_siginfo_fixup): Use is_64bit_tdesc.
5206 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5207 (tdesc_x32_avx_linux, tdesc_x32_linux)
5208 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5210 (x86_linux_update_xmltarget): Delete.
5211 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5212 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5213 (AMD64_LINUX_USER64_CS): New.
5214 (x86_linux_read_description): New, based on
5215 x86_linux_update_xmltarget.
5216 (same_process_callback): New.
5217 (x86_arch_setup_process_callback): New.
5218 (x86_linux_update_xmltarget): New.
5219 (x86_regsets_info): New.
5220 (amd64_linux_regs_info): New.
5221 (i386_linux_usrregs_info): New.
5222 (i386_linux_regs_info): New.
5223 (x86_linux_regs_info): New.
5224 (x86_arch_setup): Reimplement.
5225 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5226 (x86_emit_ops): Ditto.
5227 (the_low_target): Adjust. Install x86_linux_regs_info,
5228 x86_cannot_fetch_register, and x86_cannot_store_register.
5229 (initialize_low_arch): New.
5230 * linux-ia64-low.c (tdesc_ia64): Declare.
5231 (ia64_fetch_register): Adjust.
5232 (ia64_usrregs_info, regs_info): New globals.
5233 (ia64_regs_info): New function.
5234 (the_low_target): Adjust.
5235 (initialize_low_arch): New function.
5236 * linux-sparc-low.c (tdesc_sparc64): Declare.
5237 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5239 (sparc_arch_setup): New function.
5240 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5241 (the_low_target): Adjust.
5242 (initialize_low_arch): New function.
5243 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5244 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5245 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5246 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5247 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5248 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5249 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5250 (tdesc_powerpc_isa205_vsx64l): Declare.
5251 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5252 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5253 (ppc_set_pc, ppc_get_hwcap): Adjust.
5254 (ppc_usrregs_info): Forward declare.
5255 (!__powerpc64__) ppc_regmap_adjusted: New global.
5256 (ppc_arch_setup): Adjust to the current process'es target
5258 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5259 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5260 (ppc_store_evrregset): Adjust.
5261 (target_regsets): Rename to ...
5262 (ppc_regsets): ... this, and make static.
5263 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5264 (ppc_regs_info): New function.
5265 (the_low_target): Adjust.
5266 (initialize_low_arch): New function.
5267 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5268 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5269 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5270 (tdesc_s390x_linux64v2): Declare.
5271 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5272 (s390_fill_gregset, s390_store_last_break): Adjust.
5273 (target_regsets): Rename to ...
5274 (s390_regsets): ... this, and make static.
5275 (s390_get_pc, s390_set_pc): Adjust.
5276 (s390_get_hwcap): New target_desc parameter, and use it.
5277 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5278 (s390_arch_setup): Adjust to set the current process'es target
5279 description. Don't adjust the regmap.
5280 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5281 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5282 (regs_info_3264): New globals.
5283 (s390_regs_info): New function.
5284 (the_low_target): Adjust.
5285 (initialize_low_arch): New function.
5286 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5287 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5288 [__mips64] (init_registers_mips_linux)
5289 (init_registers_mips_dsp_linux): Delete defines.
5290 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5291 (have_dsp): New global.
5292 (mips_read_description): New, based on mips_arch_setup.
5293 (mips_arch_setup): Reimplement.
5294 (get_usrregs_info): New function.
5295 (mips_cannot_fetch_register, mips_cannot_store_register)
5296 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5297 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5298 (target_regsets): Rename to ...
5299 (mips_regsets): ... this, and make static.
5300 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5301 (dsp_regs_info, regs_info): New globals.
5302 (mips_regs_info): New function.
5303 (the_low_target): Adjust.
5304 (initialize_low_arch): New function.
5305 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5306 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5308 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5309 (arm_read_description): New, with bits factored from
5311 (arm_arch_setup): Reimplement.
5312 (target_regsets): Rename to ...
5313 (arm_regsets): ... this, and make static.
5314 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5315 (arm_regs_info): New function.
5316 (the_low_target): Adjust.
5317 (initialize_low_arch): New function.
5318 * linux-m68k-low.c (tdesc_m68k): Declare.
5319 (target_regsets): Rename to ...
5320 (m68k_regsets): ... this, and make static.
5321 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5322 (m68k_regs_info): New function.
5323 (m68k_arch_setup): New function.
5324 (the_low_target): Adjust.
5325 (initialize_low_arch): New function.
5326 * linux-sh-low.c (tdesc_sharch): Declare.
5327 (target_regsets): Rename to ...
5328 (sh_regsets): ... this, and make static.
5329 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5330 (sh_regs_info, sh_arch_setup): New functions.
5331 (the_low_target): Adjust.
5332 (initialize_low_arch): New function.
5333 * linux-bfin-low.c (tdesc_bfin): Declare.
5334 (bfin_arch_setup): New function.
5335 (bfin_usrregs_info, regs_info): New globals.
5336 (bfin_regs_info): New function.
5337 (the_low_target): Adjust.
5338 (initialize_low_arch): New function.
5339 * linux-cris-low.c (tdesc_cris): Declare.
5340 (cris_arch_setup): New function.
5341 (cris_usrregs_info, regs_info): New globals.
5342 (cris_regs_info): New function.
5343 (the_low_target): Adjust.
5344 (initialize_low_arch): New function.
5345 * linux-cris-low.c (tdesc_crisv32): Declare.
5346 (cris_arch_setup): New function.
5347 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5348 (cris_regs_info): New function.
5349 (the_low_target): Adjust.
5350 (initialize_low_arch): New function.
5351 * linux-m32r-low.c (tdesc_m32r): Declare.
5352 (m32r_arch_setup): New function.
5353 (m32r_usrregs_info, regs_info): New globals.
5354 (m32r_regs_info): Adjust.
5355 (initialize_low_arch): New function.
5356 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5357 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5358 (tic6x_usrregs_info): Forward declare.
5359 (tic6x_read_description): New function, based on ...
5360 (tic6x_arch_setup): ... this. Reimplement.
5361 (target_regsets): Rename to ...
5362 (tic6x_regsets): ... this, and make static.
5363 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5364 (tic6x_regs_info): New function.
5365 (the_low_target): Adjust.
5366 (initialize_low_arch): New function.
5367 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5368 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5369 (target_regsets): Rename to ...
5370 (xtensa_regsets): ... this, and make static.
5371 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5373 (xtensa_arch_setup, xtensa_regs_info): New functions.
5374 (the_low_target): Adjust.
5375 (initialize_low_arch): New function.
5376 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5377 (nios2_arch_setup): Set the current process'es tdesc.
5378 (target_regsets): Rename to ...
5379 (nios2_regsets): ... this.
5380 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5381 (nios2_regs_info): New function.
5382 (the_low_target): Adjust.
5383 (initialize_low_arch): New function.
5384 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5385 (aarch64_arch_setup): Set the current process'es tdesc.
5386 (target_regsets): Rename to ...
5387 (aarch64_regsets): ... this.
5388 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5389 (aarch64_regs_info): New function.
5390 (the_low_target): Adjust.
5391 (initialize_low_arch): New function.
5392 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5394 (target_regsets): Rename to ...
5395 (tile_regsets): ... this.
5396 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5397 (tile_regs_info): New function.
5398 (tile_arch_setup): Set the current process'es tdesc.
5399 (the_low_target): Adjust.
5400 (initialize_low_arch): New function.
5401 * spu-low.c (tdesc_spu): Declare.
5402 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5403 * win32-arm-low.c (tdesc_arm): Declare.
5404 (arm_arch_setup): New function.
5405 (the_low_target): Install arm_arch_setup instead of
5407 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5408 (init_windows_x86): Rename to ...
5409 (i386_arch_setup): ... this. Set `win32_tdesc'.
5410 (the_low_target): Adjust.
5411 * win32-low.c (win32_tdesc): New global.
5412 (child_add_thread): Don't create the thread cache here.
5413 (do_initial_child_stuff): Set the new process'es tdesc.
5414 * win32-low.h (struct target_desc): Forward declare.
5415 (win32_tdesc): Declare.
5416 * lynx-i386-low.c (tdesc_i386): Declare global.
5417 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5418 * lynx-low.c (lynx_tdesc): New global.
5419 (lynx_add_process): Set the new process'es tdesc.
5420 * lynx-low.h (struct target_desc): Forward declare.
5421 (lynx_tdesc): Declare global.
5422 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5423 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5424 * nto-low.c (nto_tdesc): New global.
5425 (do_attach): Set the new process'es tdesc.
5426 * nto-low.h (struct target_desc): Forward declare.
5427 (nto_tdesc): Declare.
5428 * nto-x86-low.c (tdesc_i386): Declare.
5429 (nto_x86_arch_setup): Set `nto_tdesc'.
5431 2013-06-04 Gary Benson <gbenson@redhat.com>
5433 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5434 to qSupported response when appropriate.
5435 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5436 with nonzero-length annex.
5437 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5438 arguments supplied in annex.
5440 2013-05-31 Doug Evans <dje@google.com>
5443 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5444 64 bits in 64-cross-32 environment.
5446 2013-05-28 Pedro Alves <palves@redhat.com>
5448 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5449 (aarch64-without-fpu.c): Delete rule.
5450 * configure.srv (aarch64*-*-linux*): Remove references to
5451 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5452 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5455 2013-05-24 Pedro Alves <palves@redhat.com>
5457 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5458 instead of strchr/decode_address. Error if the range isn't split
5459 with a ','. Don't assume there's be a ':' in the action.
5461 2013-05-23 Yao Qi <yao@codesourcery.com>
5462 Pedro Alves <palves@redhat.com>
5464 * linux-low.c (lwp_in_step_range): New function.
5465 (linux_wait_1): If the thread was range stepping and stopped
5466 outside the stepping range, report the stop to GDB. Otherwise,
5467 continue stepping. Add range stepping debug output.
5468 (linux_set_resume_request): Copy the step range from the resume
5470 (linux_supports_range_stepping): New.
5471 (linux_target_ops) <supports_range_stepping>: Set to
5472 linux_supports_range_stepping.
5473 * linux-low.h (struct linux_target_ops)
5474 <supports_range_stepping>: New field.
5475 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5476 * linux-x86-low.c (x86_supports_range_stepping): New.
5477 (the_low_target) <supports_range_stepping>: Set to
5478 x86_supports_range_stepping.
5479 * server.c (handle_v_cont): Handle 'r' action.
5480 (handle_v_requests): Append ";r" if the target supports range
5482 * target.h (struct thread_resume) <step_range_start,
5483 step_range_end>: New fields.
5484 (struct target_ops) <supports_range_stepping>:
5486 (target_supports_range_stepping): New macro.
5488 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5490 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5491 confusion in comment.
5493 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5495 * lynx-low.c (struct process_info_private): New type.
5496 (lynx_add_process): New function.
5497 (lynx_create_inferior, lynx_attach): Replace calls to
5498 add_process by calls to lynx_add_process.
5499 (lynx_resume): If PTID is null, then try using
5500 current_process()->private->last_wait_event_ptid.
5502 (lynx_clear_inferiors): Delete. The contents of that function
5503 has been inlined in lynx_mourn;
5504 (lynx_wait_1): Save the ptid in the process's private data.
5505 (lynx_mourn): Free the process' private data. Replace call
5506 to lynx_clear_inferiors by call to clear_inferiors.
5508 2013-05-17 Yao Qi <yao@codesourcery.com>
5510 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5513 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5515 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5516 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5517 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5518 PT_TEXT_END_ADDR guards. Update comments.
5519 (linux_target_op) <read_offsets>: Conditionally define to
5520 linux_read_offsets if the target is UCLIBC and if it defines
5521 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5523 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5524 Andrew Jenner <andrew@codesourcery.com>
5526 * Makefile.in (SFILES): Add linux-nios2-low.c.
5527 (clean): Add action to delete nios2-linux.c.
5528 (nios2-linux.c): New rule.
5529 * configure.srv: Add nios2*-*-linux*.
5530 * linux-nios2-low.c: New.
5532 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5534 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5536 2013-04-25 Hui Zhu <hui@codesourcery.com>
5539 * ax.c (ax_printf): Add fflush.
5541 2013-04-22 Tom Tromey <tromey@redhat.com>
5543 * Makefile.in (SFILES): Add filestuff.c.
5544 (OBS): Add filestuff.o.
5545 (filestuff.o): New target.
5546 * config.in, configure: Rebuild.
5547 * configure.ac: Check for fdwalk, pipe2.
5549 2013-04-17 Pedro Alves <palves@redhat.com>
5551 * configure.ac (USE_THREAD_DB): Delete variable.
5552 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5553 Don't AC_SUBST USE_THREAD_DB.
5554 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5555 * config.in, configure: Regenerate.
5557 2013-04-16 Pedro Alves <palves@redhat.com>
5559 * linux-low.h (struct lwp_info) <thread_known>: Move under
5560 the USE_THREAD_DB #ifdef.
5562 2013-04-16 Pedro Alves <palves@redhat.com>
5564 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5565 (linux-low.o): Delete rule.
5566 * linux-low.h: Always include "gdb_thread_db.h" instead of
5567 conditionally including thread_db.h.
5568 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5571 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5573 * Makefile.in (install-only): Fix make install regression.
5575 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5577 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5578 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5580 * gdbserver.1: Remove.
5582 2013-03-22 Pedro Alves <palves@redhat.com>
5584 * linux-low.c (handle_extended_wait): Don't call
5585 linux_enable_event_reporting.
5587 2013-03-15 Tony Theodore <tonyt@logyst.com>
5590 * Makefile.in (SHELL): Use @SHELL@.
5592 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5594 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5597 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5599 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5600 Remove extraneous NULL element.
5602 2013-03-13 Yao Qi <yao@codesourcery.com>
5604 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5605 'V' block in trace frame.
5607 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5609 * target.h (struct target_ops): Add btrace ops.
5610 (target_supports_btrace): New macro.
5611 (target_enable_btrace): New macro.
5612 (target_disable_btrace): New macro.
5613 (target_read_btrace): New macro.
5614 * gdbthread.h (struct thread_info): Add btrace field.
5615 * server.c: Include btrace-common.h.
5616 (handle_btrace_general_set): New function.
5617 (handle_btrace_enable): New function.
5618 (handle_btrace_disable): New function.
5619 (handle_general_set): Call handle_btrace_general_set.
5620 (handle_qxfer_btrace): New function.
5621 (struct qxfer qxfer_packets[]): Add btrace entry.
5622 * inferiors.c (remove_thread): Disable btrace.
5623 * linux-low: Include linux-btrace.h.
5624 (linux_low_enable_btrace): New function.
5625 (linux_low_read_btrace): New function.
5626 (linux_target_ops): Add btrace ops.
5627 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5628 Add srv_linux_btrace=yes.
5629 (x86_64-*-linux*): Add linux-btrace.o.
5630 Add srv_linux_btrace=yes.
5631 * configure.ac: Define HAVE_LINUX_BTRACE.
5632 * config.in: Regenerated.
5633 * configure: Regenerated.
5635 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5637 * server.c (handle_qxfer): Preserve error message if -3 is
5639 (qxfer): Document the -3 return value.
5641 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5643 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5644 (linux_btrace_h): New variable.
5645 (linux-btrace.o): New rule.
5647 2013-03-08 Stan Shebs <stan@codesourcery.com>
5648 Hafiz Abid Qadeer <abidh@codesourcery.com>
5650 * tracepoint.c (trace_buffer_size): New global.
5651 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5652 (init_trace_buffer): Change to one-argument function. Allocate
5653 trace buffer memory.
5654 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5655 handle QTBuffer:size packet.
5656 (cmd_bigqtbuffer_size): New function.
5657 (initialize_tracepoint): Call init_trace_buffer with
5658 DEFAULT_TRACE_BUFFER_SIZE.
5659 * server.c (handle_query): Add QTBuffer:size in the
5662 2013-03-07 Yao Qi <yao@codesourcery.com>
5664 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5665 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5667 (cmd_qtsp): Adjust condition. Do post increment.
5668 Set cur_action and cur_step_action back to 0.
5670 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5673 * linux-low.c (linux_write_memory): Return early success if LEN is
5676 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5678 * configure.srv: Add x86_64-*-cygwin* as target.
5680 2013-02-28 Tom Tromey <tromey@redhat.com>
5682 * configure.ac: Invoke AC_SYS_LARGEFILE.
5683 * configure, config.in: Rebuild.
5685 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5687 * win32-low.c: Throughout, fix format strings and casts of
5688 printf-like functions to avoid type related warnings on all
5690 (get_child_debug_event): Print dwDebugEventCode as hex since
5691 that's how it's usually documented.
5693 2013-02-28 Yao Qi <yao@codesourcery.com>
5695 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5698 2013-02-27 Jiong Wang <jiwang@tilera.com>
5700 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5701 (reg-tilegx32.c): New rule.
5702 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5703 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5704 different register info initializer according to elf class.
5705 (init_registers_tilgx32): New function. The tilegx32 register info
5707 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5708 (tile_store_gregset): Likewise.
5710 2013-02-27 Yao Qi <yao@codesourcery.com>
5712 * server.c (process_point_options): Print debug message when
5713 debug_threads is true.
5715 2013-02-26 Yao Qi <yao@codesourcery.com>
5717 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5719 2013-02-19 Pedro Alves <palves@redhat.com>
5720 Kai Tietz <ktietz@redhat.com>
5724 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5725 instead of strtoul to extract address from packet.
5726 (process_serial_event) <'z'>: Likewise.
5728 2013-02-18 Yao Qi <yao@codesourcery.com>
5730 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5732 2013-02-14 Pedro Alves <palves@redhat.com>
5736 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5737 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5739 2013-02-14 Pedro Alves <palves@redhat.com>
5741 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5743 2013-02-14 Pedro Alves <palves@redhat.com>
5745 * tracepoint.c (save_string): Delete.
5746 (add_tracepoint_action): Use savestring instead of save_string.
5748 2013-02-12 Pedro Alves <palves@redhat.com>
5750 * linux-xtensa-low.c: Ditto.
5751 * xtensa-xtregs.c: Ditto.
5753 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5755 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5758 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5760 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5761 aarch64_num_wp_regs and aarch64_num_bp_regs to
5762 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5764 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5766 * linux-aarch64-low.c (ps_get_thread_area): Replace
5767 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5769 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5770 Marcus Shawcroft <marcus.shawcroft@arm.com>
5771 Nigel Stephens <nigel.stephens@arm.com>
5772 Yufeng Zhang <yufeng.zhang@arm.com>
5774 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5775 (aarch64.c, aarch64-without-fpu.c): New targets.
5776 * configure.srv (aarch64*-*-linux*): New.
5777 * linux-aarch64-low.c: New file.
5779 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5781 * linux-low.c (handle_extended_wait, linux_create_inferior)
5782 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5783 (dequeue_one_deferred_signal, linux_resume_one_thread)
5784 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5785 (linux_tracefork_grandchild, linux_test_for_tracefork)
5786 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5787 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5788 where the argument is 0.
5790 2013-01-25 Yao Qi <yao@codesourcery.com>
5792 * event-loop.c: Include "queue.h".
5793 (gdb_event_p): New typedef.
5794 (struct gdb_event) <next_event>: Remove.
5795 (event_queue): Change to QUEUE(gdb_event_p).
5796 (async_queue_event): Remove.
5797 (gdb_event_xfree): New.
5798 (initialize_event_loop): New.
5799 (process_event): Use API from QUEUE.
5800 (wait_for_event): Likewise.
5801 * server.c (main): Call initialize_event_loop.
5802 * server.h (initialize_event_loop): Declare.
5804 2013-01-18 Yao Qi <yao@codesourcery.com>
5806 * ax.h (struct eval_agent_expr_context): New.
5807 (gdb_eval_agent_expr): Update declaration.
5808 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5809 TFRAME. Add new argument CTX.
5810 * server.h (struct eval_agent_expr_context): Declare.
5811 (agent_mem_read, agent_tsv_read): Update declaration.
5812 (agent_mem_read_string): Likewise.
5813 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5814 (add_traceframe_block): Add new argument TPOINT.
5815 Increase TPOINT->traceframe_usage.
5816 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5817 eval_tracepoint_agent_expr.
5818 (condition_true_at_tracepoint): Likewise.
5819 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5820 (agent_mem_read_string, agent_tsv_read): Likewise.
5822 2013-01-16 Yao Qi <yao@codesourcery.com>
5824 * linux-low.c (linux_resume_one_lwp): Don't check
5825 'lwp->bp_reinsert != 0'.
5827 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5828 Pedro Alves <palves@redhat.com>
5830 * lynx-low.c (ptrace_request_to_str): Define a temporary
5831 macro and use it to simplify this function's implementation.
5833 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5835 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5838 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5840 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5842 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5844 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5846 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5848 * lynx-low.c (lynx_resume): Use the resume_info parameter
5849 to determine the ptid for the lynx_ptrace call, unless
5850 it is equal to minus_one_ptid, in which case we use the
5851 ptid of the current_inferior.
5852 (lynx_wait_1): After having received a thread create/exit
5853 event, resume the inferior's execution using the signaling
5854 thread's ptid, rather than the old ptid.
5856 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5858 * lynx-low.c (lynx_resume): Delete variable ret.
5860 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5862 * gdbreplay.c (gdbreplay_version): Update copyright year.
5863 * server.c (gdbserver_version): Likewise.
5865 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5867 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5870 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5872 * lynx-low.c (ptrace_request_to_str): Add handling for
5875 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5877 * lynx-low.c (lynx_attach): Delete variable new_process.
5879 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5881 * lynx-low.c (lynx_create_inferior): Delete variable
5884 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5886 * lynx-low.c (ptrace_request_to_str): Do not handle
5887 PTRACE_GETTHREADLIST if this macro does not exist.
5889 2012-12-15 Yao Qi <yao@codesourcery.com>
5891 * Makefile.in (OBS): Add notif.o.
5892 * notif.c, notif.h: New.
5893 * server.c: Include "notif.h".
5894 (struct vstop_notif) <next>: Remove.
5896 (queue_stop_reply): Update.
5897 (push_event, send_next_stop_reply): Remove.
5898 (discard_queued_stop_replies): Update.
5899 (notif_stop): New variable.
5900 (handle_v_stopped): Remove.
5901 (handle_v_requests): Don't call handle_v_stopped. Call
5902 handle_ack_notif instead.
5903 (queue_stop_reply_callback): Call notif_event_enque instead
5904 of queue_stop_reply.
5905 (handle_status): Don't call send_next_stop_reply, call
5906 notif_write_event instead.
5907 (kill_inferior_callback): Likewise.
5908 (detach_or_kill_inferior_callback): Likewise.
5909 (main): Call initialize_notif.
5910 (process_serial_event): Call QUEUE_is_empty.
5911 (handle_target_event): Call notif_push instead of push event.
5912 * server.h (push_event): Remove declaration.
5914 2012-12-10 Tom Tromey <tromey@redhat.com>
5916 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5917 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5920 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5921 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5922 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5923 (amd64-linux-ipa.o, ax.o): Rewrite.
5924 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5925 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5926 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5927 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5928 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5929 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5930 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5931 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5932 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5933 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5934 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5935 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5936 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5937 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5938 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5939 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5940 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5941 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5942 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5943 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5944 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5945 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5946 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5947 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5948 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5949 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5950 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5951 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5952 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5953 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5954 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5955 (reg-tilegx.o): Remove.
5956 (all_object_files): New macro.
5957 Include .deps files.
5958 * aclocal.m4, configure: Rebuild.
5959 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5960 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5961 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5963 2012-12-05 Tom Tromey <tromey@redhat.com>
5966 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5968 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5970 * configure.ac: Check for linux/perf_event.h.
5971 * config.in: Regenerated.
5972 * configure: Regenerated.
5974 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5976 * hostio.c (handle_readlink): Decrease buffer size
5977 parameter passed to readlink by one byte.
5979 2012-11-26 Yao Qi <yao@codesourcery.com>
5981 * configure.ac (build_warnings): Append '-Wempty-body'.
5982 * configure: Regenerated.
5983 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5986 2012-11-15 Pierre Muller <muller@sourceware.org>
5988 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5989 * config.in: Regenerate.
5990 * configure: Regenerate.
5991 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5992 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5993 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5994 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5996 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5997 instead of <sys/wait.h> header.
5998 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6000 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6002 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6003 (various make rules): Remove -DGDBSERVER
6005 2012-11-09 Yao Qi <yao@codesourcery.com>
6007 * spu-low.c (current_ptid): Move it to ..
6008 * gdbthread.h: ... here. New.
6009 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6010 * server.c (myresume, process_serial_event): Likewise.
6011 * thread-db.c (thread_db_find_new_threads): Likewise.
6012 * tracepoint.c (run_inferior_command): Likewise.
6014 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
6016 * server.c (handle_search_memory_1): Include access length in
6019 2012-09-05 Michael Brandt <michael.brandt@axis.com>
6021 * linux-crisv32-low.c: Fix compile errors.
6023 2012-09-04 Yao Qi <yao@codesourcery.com>
6025 * tracepoint.c (cmd_qtsv): Adjust debug message.
6026 Don't check CUR_TPOINT.
6028 2012-08-28 Yao Qi <yao@codesourcery.com>
6030 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6031 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6032 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6033 Remove declarations of xmalloc, xreallloc, xstrdup and
6035 * Makefile.in (libiberty_h): New.
6036 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6037 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6039 2012-08-23 Yao Qi <yao@codesourcery.com>
6041 * server.h: Remove declaration of 'xsnprintf'.
6043 2012-08-22 Keith Seitz <keiths@redhat.com>
6045 * server.h: Include build-gnulib-gbserver/config.h.
6046 * gdbreplay.c: Likewise.
6048 2012-08-08 Doug Evans <dje@google.com>
6050 * Makefile.in (SFILES): Add gdb_vecs.c.
6051 (OBS): Add gdb_vecs.o.
6052 (gdb_vecs_h, host_defs_h): New variables.
6053 (thread-db.o): Add $(gdb_vecs_h) dependency.
6054 (gdb_vecs.o): New rule.
6055 * thread-db.c: #include "gdb_vecs.h".
6056 (thread_db_load_search): Use a vector to iterate over path elements.
6057 Handle text appearing after "$pdir".
6059 * configure.ac: Add check for strstr.
6060 * config.in: Regenerate.
6061 * configure: Regenerate.
6063 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6065 * hostio.c (handle_pread): If pread fails, fall back to attempting
6067 (handle_pwrite): Likewise for pwrite.
6069 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6071 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6072 between unsupported TYPE and unimplementable ADDR/LEN combination.
6073 (arm_insert_point): Act on new return value.
6075 2012-07-31 Pedro Alves <palves@redhat.com>
6077 * server.c (process_point_options): Only skip tokens if we find
6078 one that is unrecognized. Don't treat 'X' specially while
6079 skipping unrecognized tokens.
6081 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6083 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6084 to 4-byte-align HW breakpoint addresses for Thumb.
6086 2012-07-27 Yao Qi <yao@codesourcery.com>
6090 * server.h: Declare gdb_agent_about_to_close.
6091 * target.c (kill_inferior): Include "agent.h".
6092 New. Send command 'kill'.
6093 * target.h (kill_inferior): Removed macro.
6094 * tracepoint.c (gdb_agent_about_to_close): New.
6095 (gdb_agent_helper_thread): Handle command 'close'.
6096 Wait endlessly until the inferior stops.
6097 Install gdb_agent_remove_socket to atexit hook.
6098 (agent_socket_name): New static variable.
6099 (gdb_agent_socket_init): Replace local variable 'name' with
6100 'agent_socket_name'.
6101 (gdb_agent_remove_socket): New.
6103 2012-07-27 Yao Qi <yao@codesourcery.com>
6105 * server.c (process_point_options): Stop at 'X' when parsing.
6107 2012-07-19 Michael Eager <eager@eagercon.com>
6109 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6111 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6112 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6113 hardware breakpoint.
6115 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6117 * gdbserver/linux-low.c (initialize_low): Call
6118 linux_ptrace_init_warnings.
6120 2012-07-02 Doug Evans <dje@google.com>
6122 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6125 2012-07-02 Stan Shebs <stan@codesourcery.com>
6127 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6128 (ax.o): Add it to build rule.
6130 (OBS): Add format.o.
6131 (IPA_OBS): Add format.o.
6132 * server.c (handle_query): Claim support for breakpoint commands.
6133 (process_point_options): Add command case.
6134 (process_serial_event): Leave running if there are printfs in
6136 * mem-break.h (any_persistent_commands): Declare.
6137 (add_breakpoint_commands): Declare.
6138 (gdb_no_commands_at_breakpoint): Declare.
6139 (run_breakpoint_commands): Declare.
6140 * mem-break.c (struct point_command_list): New struct.
6141 (struct breakpoint): New field command_list.
6142 (any_persistent_commands): New function.
6143 (add_commands_to_breakpoint): New function.
6144 (add_breakpoint_commands): New function.
6145 (gdb_no_commands_at_breakpoint): New function.
6146 (run_breakpoint_commands): New function.
6147 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6149 * ax.c: Include format.h.
6150 (ax_printf): New function.
6151 (gdb_eval_agent_expr): Add printf opcode.
6153 2012-06-13 Yao Qi <yao@codesourcery.com>
6155 * server.c (start_inferior): Remove duplicated writes to fields
6156 'last_resume_kind' and 'last_status' of 'current_inferior'.
6158 2012-06-12 Yao Qi <yao@codesourcery.com>
6159 Pedro Alves <palves@redhat.com>
6161 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6163 * server.c (handle_v_cont): Extend comment.
6165 2012-06-11 Yao Qi <yao@codesourcery.com>
6167 * linux-low.c (linux_attach): Add 'static'.
6169 2012-06-06 Yao Qi <yao@codesourcery.com>
6171 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6173 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6175 Fix gcc -flto compilation warning.
6176 * server.c (main): Make variable multi_mode and attach volatile.
6178 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6180 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6181 if the platform doesn't know about it.
6183 2012-05-30 Jeff Kenton <jkenton@tilera.com>
6185 * Makefile.in (SFILES): Add linux-tile-low.c.
6186 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6187 * configure.srv: Handle tilegx-*-linux*.
6188 * linux-tile-low.c: New file.
6190 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6192 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6194 2012-05-24 Pedro Alves <palves@redhat.com>
6198 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6200 2012-05-24 Pedro Alves <palves@redhat.com>
6204 Replace target_signal with gdb_signal throughout.
6206 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6208 * linux-low.c (linux_store_registers): Avoid the copying sequence
6209 when no data has been retrieved by ptrace.
6211 2012-05-22 Will Deacon <will.deacon@arm.com>
6213 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6214 Include asm/ptrace.h.
6215 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6218 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6220 * linux-low.c (linux_store_registers): Don't re-retrieve data
6221 with ptrace that has already been obtained from /proc. Always
6222 copy any data retrieved with ptrace to the buffer supplied.
6224 2012-05-11 Yao Qi <yao@codesourcery.com>
6225 Pedro Alves <palves@redhat.com>
6227 * linux-low.c (enum stopping_threads_kind): New.
6228 (stopping_threads): Change type to `enum stopping_threads_kind'.
6229 (handle_extended_wait): If stopping and suspending threads, leave
6230 the new_lwp suspended too.
6231 (linux_wait_for_event): Adjust.
6232 (stop_all_lwps): Set `stopping_threads' to
6233 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6234 whether we're suspending threads or just stopping them. Assert no
6237 2012-04-29 Yao Qi <yao@codesourcery.com>
6239 * server.h: Move some code to ...
6240 * gdbthread.h: ... here. New.
6241 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6242 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6243 (nto-low.o, win32-low.o): Likewise.
6244 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6245 * regcache.c, remote-utils.c, server.c: Likewise.
6246 * target.c, tracepoint.c, win32-low.c: Likewise.
6248 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6250 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6251 (PTRACE_ARG4_TYPE): Likewise.
6252 (PTRACE_XFER_TYPE): Likewise.
6253 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6254 ptrace to PTRACE_ARG3_TYPE.
6255 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6256 (PTRACE_ARG4_TYPE): Likewise.
6257 (PTRACE_XFER_TYPE): Likewise.
6258 (linux_detach_one_lwp): Cast fourth argument of
6259 ptrace to long then PTRACE_ARG4_TYPE.
6260 (regsets_fetch_inferior_registers): Cast third argument of
6261 ptrace to long then PTRACE_ARG3_TYPE.
6262 (regsets_store_inferior_registers): Likewise.
6264 2012-04-20 Pedro Alves <palves@redhat.com>
6266 * configure: Regenerate.
6268 2012-04-19 Pedro Alves <palves@redhat.com>
6270 * Makefile.in (GNULIB_BUILDDIR): New.
6271 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6272 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6273 (all, install-only, uninstall, clean-info, all-lib, clean): No
6274 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6275 (maintainer-clean realclean distclean): Use subdir_do.
6277 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6278 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6279 * acinclude.m4: Include acx_configure_dir.m4.
6280 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6281 calls. Call AC_PROG_RANLIB. Configure gnulib using
6284 (GNULIB_STDINT_H): Adjust.
6285 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6286 * gdbreplay.c: Include build-gnulib/config.h.
6287 * server.h: Likewise.
6288 * aclocal.m4: Regenerate.
6289 * config.in: Regenerate.
6290 * configure: Regenerate.
6292 2012-04-19 Pedro Alves <palves@redhat.com>
6294 * Makefile.in (LIBGNU, INCGNU): Adjust.
6295 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6296 (all, install-only, uninstall, clean-info, all-lib, clean)
6297 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6298 * configure.ac: Adjust AC_OUTPUT output.
6299 * aclocal.m4: Regenerate.
6300 * configure: Regenerate.
6302 2012-04-19 Pedro Alves <palves@redhat.com>
6304 * Makefile.in (generated_files): New.
6305 (server_h): Remove the explicit dependency on config.h, and depend
6306 on $generated_files.
6308 2012-04-19 Pedro Alves <palves@redhat.com>
6310 * Makefile.in (INCGNU): Add -Ignulib.
6312 2012-04-19 Pedro Alves <palves@redhat.com>
6314 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6315 (INCGNU): ... this, and spell out -I here.
6316 (GNULIB_LIB): Rename to ...
6318 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6320 2012-04-19 Pedro Alves <palves@redhat.com>
6322 * config.in: Regenerate.
6324 2012-04-19 Pedro Alves <palves@redhat.com>
6326 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6327 * server.h (memmem): Remove declaration.
6328 * config.in: Regenerate.
6329 * configure: Regenerate.
6331 2012-04-19 Yao Qi <yao@codesourcery.com>
6333 * Makefile.in (SFILES): Add common/vec.c.
6337 2012-04-19 Yao Qi <yao@codesourcery.com>
6339 * remote-utils.c (prepare_resume_reply): Replace with macro
6340 target_core_of_thread.
6341 * server.c (handle_qxfer_threads_proper): Likewise.
6342 * target.h (traget_core_of_thread): New macro.
6344 2012-04-18 Pedro Alves <palves@redhat.com>
6346 * aclocal.m4: Regenerate.
6347 * configure: Regenerate.
6349 2012-04-16 Yao Qi <yao@codesourcery.com>
6351 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6352 duplicated on address.
6354 2012-04-16 Yao Qi <yao@codesourcery.com>
6356 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6357 (struct tracepoint_action_ops) <send>: New field.
6358 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6359 (agent_expr_send, x_tracepoint_action_send): New.
6360 (l_tracepoint_action_send): New.
6361 (cmd_qtdp): Download and install tracepoint
6362 according to `use_agent'.
6363 (run_inferior_command): Add one more parameter `len'.
6365 (tracepoint_send_agent): New.
6366 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6368 2012-04-16 Yao Qi <yao@codesourcery.com>
6370 * tracepoint.c (download_tracepoints): Moved to ...
6371 (cmd_qtstart): ... here.
6373 2012-04-14 Yao Qi <yao@codesourcery.com>
6375 * tracepoint.c: Include inttypes.h.
6376 (struct collect_memory_action): Use sized types.
6377 (struct tracepoint): Likewise.
6378 (cmd_qtdp, stop_tracing): Update print specifiers.
6379 (cmd_qtp, response_tracepoint): Likewise.
6380 (collect_data_at_tracepoint): Likewise.
6381 (collect_data_at_step): Likewise.
6383 2012-04-14 Yao Qi <yao@codesourcery.com>
6385 Import gnulib module inttypes.
6386 * aclocal.m4, config.in, configure: Regenerated.
6388 2012-04-14 Yao Qi <yao@codesourcery.com>
6390 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6391 Makefile and config.status at last.
6393 2012-04-13 Yao Qi <yao@codesourcery.com>
6395 * tracepoint.c: Include stdint.h unconditionally.
6397 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6399 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6400 on BFD_HAVE_SYS_PROCFS_TYPE.
6401 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6402 * configure: Regenerate.
6403 * config.in: Likewise.
6405 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6407 * Makefile.in (clean): Also remove x32.c x32-linux.c
6408 x32-avx.c x32-avx-linux.c.
6409 (x32.o): New target.
6411 (x32-linux.o): Likewise.
6412 (x32-linux.c): Likewise.
6413 (x32-avx.o): Likewise.
6414 (x32-avx.c): Likewise.
6415 (x32-avx-linux.o): Likewise.
6416 (x32-avx-linux.c): Likewise.
6418 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6419 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6420 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6421 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6422 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6423 i386/x32-avx-linux.xml.
6425 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6426 (init_registers_x32_avx_linux): Likwise.
6427 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6428 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6430 2012-04-13 Pedro Alves <palves@redhat.com>
6432 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6433 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6434 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6435 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6438 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6440 * linux-x86-low.c (compat_x32_clock_t): New.
6441 (compat_x32_siginfo_t): Likewise.
6442 (compat_x32_siginfo_from_siginfo): Likewise.
6443 (siginfo_from_compat_x32_siginfo): Likewise.
6444 (linux_is_elf64): Likewise.
6445 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6446 and siginfo_from_compat_x32_siginfo for x32.
6447 (x86_arch_setup): Set linux_is_elf64.
6449 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6452 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6454 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6455 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6456 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6457 compatible with process.
6459 2012-04-12 Yao Qi <yao@codesourcery.com>
6461 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6462 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6463 (install-only, install-info, clean): Handle sub dir gnulib.
6464 (all-lib, am--refresh): New targets.
6465 (memmem.o): Remove target.
6466 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6467 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6468 (AC_REPLACE_FUNCS): Remove memmem.
6469 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6470 (AC_OUTPUT): Generate Makefile in gnulib/.
6471 * aclocal.m4, config.in, configure: Regenerated.
6473 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6475 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6477 2012-04-05 Pedro Alves <palves@redhat.com>
6479 -Werror=strict-aliasing
6481 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6484 2012-04-04 Pedro Alves <palves@redhat.com>
6486 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6487 (sparc_store_gregset_from_stack, sparc_store_gregset)
6488 (sparc_breakpoint_at): Fix formatting.
6490 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6492 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6494 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6495 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6496 * config.in: Regenerate.
6497 * configure: Likewise.
6499 2012-03-29 Pedro Alves <palves@redhat.com>
6501 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6502 Correct ptrace arguments.
6504 2012-03-28 Pedro Alves <palves@redhat.com>
6506 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6507 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6508 (IA64_FR1_REGNUM): New defines.
6509 (ia64_fetch_register): New.
6510 (the_low_target): Install it.
6511 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6513 * linux-low.c (linux_fetch_registers): Try the
6514 the_low_target.fetch_register hook first.
6516 * linux-arm-low.c (the_low_target): Adjust.
6517 * linux-bfin-low.c (the_low_target): Adjust.
6518 * linux-cris-low.c (the_low_target): Adjust.
6519 * linux-crisv32-low.c (the_low_target): Adjust.
6520 * linux-m32r-low.c (the_low_target): Adjust.
6521 * linux-m68k-low.c (the_low_target): Adjust.
6522 * linux-mips-low.c (the_low_target): Adjust.
6523 * linux-ppc-low.c (the_low_target): Adjust.
6524 * linux-s390-low.c (the_low_target): Adjust.
6525 * linux-sh-low.c (the_low_target): Adjust.
6526 * linux-sparc-low.c (the_low_target): Adjust.
6527 * linux-tic6x-low.c (the_low_target): Adjust.
6528 * linux-x86-low.c (the_low_target): Adjust.
6529 * linux-xtensa-low.c (the_low_target): Adjust.
6531 2012-03-26 Pedro Alves <palves@redhat.com>
6533 * server.c (handle_qxfer_libraries): Don't bail early if
6534 the_target->qxfer_libraries_svr4 is not NULL.
6536 2012-03-26 Pedro Alves <palves@redhat.com>
6538 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6540 2012-03-23 Pedro Alves <palves@redhat.com>
6542 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6543 "library-list-svr4" element's start tag when the the DSO list is
6546 2012-03-23 Pedro Alves <palves@redhat.com>
6548 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6549 a variable whose type size is the same as the inferior's pointer
6552 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6554 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6556 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6557 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6558 * linux-low.h: Include <signal.h>.
6559 (struct siginfo): Remove forward declaration.
6560 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6563 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6565 * .gitignore: Ignore more files.
6567 2012-03-19 Pedro Alves <palves@redhat.com>
6568 Jan Kratochvil <jan.kratochvil@redhat.com>
6570 * server.c (cont_thread, general_thread): Add describing comments.
6571 (start_inferior): Clear `cont_thread'.
6572 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6575 2012-03-15 Yao Qi <yao@codesourcery.com>
6577 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6579 (cmd_qtdp): ... here.
6581 2012-03-15 Yao Qi <yao@codesourcery.com>
6583 * tracepoint.c (struct tracepoint_action_ops): New.
6584 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6585 (m_tracepoint_action_download): New.
6586 (r_tracepoint_action_download): New.
6587 (x_tracepoint_action_download): New.
6588 (l_tracepoint_action_download): New.
6589 (add_tracepoint_action): Install `action->ops' according type.
6590 (download_tracepoint_1): Move code `download' function pointer
6591 of various tracepoint_action_ops.
6593 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6595 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6596 linux_ptrace_attach_warnings.
6598 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6600 * Makefile.in (linux-ptrace.o): New.
6601 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6602 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6603 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6604 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6605 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6607 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6609 2012-03-08 Yao Qi <yao@codesourcery.com>
6610 Pedro Alves <palves@redhat.com>
6612 Fix PR server/13392.
6613 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6615 * tracepoint.c (remove_tracepoint): New.
6616 (cmd_qtdp): Call remove_tracepoint when failed to install.
6618 2012-03-07 Pedro Alves <palves@redhat.com>
6620 * linux-low.c (get_detach_signal): New.
6621 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6622 Pass on pending signals to PTRACE_DETACH. Check the result of the
6624 * server.c (program_signals, program_signals_p): New.
6625 (handle_general_set): Handle QProgramSignals.
6626 * server.h (program_signals, program_signals_p): Declare.
6628 2012-03-05 Pedro Alves <palves@redhat.com>
6629 Jan Kratochvil <jan.kratochvil@redhat.com>
6631 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6634 2012-03-03 Yao Qi <yao@codesourcery.com>
6636 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6637 agent_look_up_symbols.
6639 2012-03-03 Yao Qi <yao@codesourcery.com>
6641 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6642 (linux-x86-low.o): Likewise.
6643 * server.h: Remove in_process_agent_loaded.
6644 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6648 2012-03-03 Yao Qi <yao@codesourcery.com>
6650 * tracepoint.c (gdb_agent_capability): New global.
6651 (in_process_agent_loaded_ust): Renamed to
6652 `in_process_agent_supports_ust'.
6654 (in_process_agent_supports_ust): Call agent_capability_check.
6655 (clear_installed_tracepoints): Assert that agent supports
6658 2012-03-03 Yao Qi <yao@codesourcery.com>
6660 * linux-low.c (linux_supports_agent): New.
6661 (linux_target_ops): Initialize field `supports_agent' with
6662 linux_supports_agent.
6663 * target.h (struct target_ops) <supports_agent>: New.
6664 (target_supports_agent): New macro.
6665 * server.c (handle_general_set): Handle packet 'QAgent'.
6666 (handle_query): Send `QAgent+'.
6667 * Makefile.in (server.o): Depends on agent.h.
6669 2012-03-03 Yao Qi <yao@codesourcery.com>
6671 * Makefile.in (OBS): Add agent.o.
6672 Add new rule for agent.o.
6673 Track dependence of tracepoint.c on agent.h.
6674 * tracepoint.c (run_inferior_command_1):
6675 (run_inferior_command): Call agent_run_command.
6676 (gdb_ust_connect_sync_socket): Deleted. Move it to
6678 (resume_thread, stop_thread): Likewise.
6679 (gdb_ust_socket_init): Renamed to ...
6680 (gdb_agent_socket_init): ... New.
6681 (gdb_ust_thread): Renamed to ...
6682 (gdb_agent_helper_thread): ... New.
6683 (gdb_ust_init): Move some code to ...
6684 (gdb_agent_init): ... here. New.
6685 [HAVE_UST]: Call gdb_ust_init.
6686 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6687 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6688 * config.in, configure: Regenerated.
6690 2012-03-02 Pedro Alves <palves@redhat.com>
6692 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6693 * linux-low.c (struct simple_pid_list): New.
6694 (stopped_pids): New a struct simple_pid_list pointer.
6695 (add_to_pid_list, pull_pid_from_list): New.
6696 (handle_extended_wait): Don't assume the first signal new children
6697 report is SIGSTOP. Adjust call to pull_pid_from_list.
6698 (linux_wait_for_lwp): Adjust.
6700 2012-03-02 Yao Qi <yao@codesourcery.com>
6702 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6705 2012-03-02 Yao Qi <yao@codesourcery.com>
6707 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6708 `stop_pc' and `tpoint'. Update caller.
6710 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6712 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6713 * linux-low.c (use_linux_regsets): New macro.
6714 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6715 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6716 (linux_register_in_regsets): New function.
6717 (usr_fetch_inferior_registers): Skip registers covered by
6719 (usr_store_inferior_registers): Likewise.
6720 (usr_fetch_inferior_registers): New macro.
6721 (usr_store_inferior_registers): Likewise.
6722 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6723 (linux_store_registers): Likewise.
6724 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6726 (init_registers_mips64_dsp_linux): Likewise.
6727 (init_registers_mips_linux): New macro.
6728 (init_registers_mips_dsp_linux): Likewise.
6729 (mips_dsp_num_regs): Likewise.
6730 (DSP_BASE, DSP_CONTROL): New fallback macros.
6731 (mips_base_regs): New macro.
6732 (mips_regmap): Use it. Fix the size.
6733 (mips_dsp_regmap): New variable.
6734 (mips_dsp_regset_bitmap): Likewise.
6735 (mips_arch_setup): New function.
6736 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6738 (mips_cannot_store_register): Likewise.
6739 (the_low_target): Update .arch_setup, .num_regs and .regmap
6740 initializers. Add .regset_bitmap initializer.
6741 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6743 * linux-bfin-low.c (the_low_target): Likewise.
6744 * linux-cris-low.c (the_low_target): Likewise.
6745 * linux-crisv32-low.c (the_low_target): Likewise.
6746 * linux-ia64-low.c (the_low_target): Likewise.
6747 * linux-m32r-low.c (the_low_target): Likewise.
6748 * linux-m68k-low.c (the_low_target): Likewise.
6749 * linux-ppc-low.c (the_low_target): Likewise.
6750 * linux-s390-low.c (the_low_target): Likewise.
6751 * linux-sh-low.c (the_low_target): Likewise.
6752 * linux-sparc-low.c (the_low_target): Likewise.
6753 * linux-tic6x-low.c (the_low_target): Likewise.
6754 * linux-x86-low.c (the_low_target): Likewise.
6755 * linux-xtensa-low.c (the_low_target): Likewise.
6756 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6757 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6758 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6760 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6761 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6763 2012-02-29 Yao Qi <yao@codesourcery.com>
6764 Pedro Alves <palves@redhat.com>
6766 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6767 `step_over_finished' is true.
6769 2012-02-27 Pedro Alves <palves@redhat.com>
6771 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6772 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6774 2012-02-27 Pedro Alves <palves@redhat.com>
6777 * linux-low.c (pid_is_stopped): New.
6778 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6780 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6782 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6785 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6787 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6789 2012-02-24 Luis Machado <lgustavo@codesourcery>
6791 * server.c (handle_query): Advertise support for target-side
6792 breakpoint condition evaluation.
6793 (process_point_options): New function.
6794 (process_serial_event): When inserting a breakpoint, check for
6795 a target-side condition that should be evaluated.
6797 * mem-break.c: Include regcache.h and ax.h.
6798 (point_cond_list_t): New data structure.
6799 (breakpoint) <cond_list>: New field.
6800 (find_gdb_breakpoint_at): Make non-static.
6801 (delete_gdb_breakpoint_at): Clear any target-side
6803 (clear_gdb_breakpoint_conditions): New function.
6804 (add_condition_to_breakpoint): Likewise.
6805 (add_breakpoint_condition): Likewise.
6806 (gdb_condition_true_at_breakpoint): Likewise.
6807 (gdb_breakpoint_here): Return result directly instead
6808 of going through a local variable.
6810 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6811 (clear_gdb_breakpoint_conditions): Likewise.
6812 (add_breakpoint_condition): Likewise.
6813 (gdb_condition_true_at_breakpoint): Likewise.
6815 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6816 (need_step_over_p): Take target-side breakpoint condition into
6819 2012-02-24 Luis Machado <lgustavo@codesourcery>
6821 * server.h: Include tracepoint.h.
6822 (agent_mem_read, agent_get_trace_state_variable_value,
6823 agent_set_trace_state_variable_value,
6824 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6825 get_set_tsv_func_addr): New prototypes.
6827 * ax.h: New include file.
6828 * ax.c: New source file.
6830 * tracepoint.c: Include ax.h.
6831 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6832 agent_expr, eval_result_type): Move to ax.h.
6833 (parse_agent_expr): Rename to ...
6834 (gdb_parse_agent_expr): ... this, make it non-static and move
6836 (unparse_agent_expr) Rename to ...
6837 (gdb_unparse_agent_expr): ... this, make it non-static and move
6839 (eval_agent_expr): Rename to ...
6840 (eval_tracepoint_agent_expr): ... this.
6841 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6842 forward declarations.
6843 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6844 (agent_get_trace_state_variable_value): New function.
6845 (agent_set_trace_state_variable_value): New function.
6846 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6847 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6848 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6849 (condition_true_at_tracepoint): Likewise.
6850 (parse_agent_expr): Rename to ...
6851 (gdb_parse_agent_expr): ... this and move to ax.c.
6852 (unparse_agent_expr): Rename to ...
6853 (gdb_unparse_agent_expr): ... this and move to ax.c.
6854 (gdb_agent_op_name): Move to ax.c.
6855 (eval_agent_expr): Rename to ...
6856 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6858 (eval_tracepoint_agent_expr): New function.
6859 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6861 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6863 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6864 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6865 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6866 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6867 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6868 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6869 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6870 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6871 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6872 (compile_bytecodes): Remove forward declaration.
6873 (is_goto_target): Move to ax.c.
6874 (compile_bytecodes): Move to ax.c and call
6875 agent_get_trace_state_variable_value (...) and
6876 agent_set_trace_state_variable_value (...).
6878 * Makefile.in: Update ax.c and IPA dependencies.
6880 2012-02-24 Pedro Alves <palves@redhat.com>
6882 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6883 (cmd_bigqtbuffer_circular): ... this. Only handle
6884 'QTBuffer:circular:'.
6885 (handle_tracepoint_general_set): Adjust.
6887 2012-02-16 Yao Qi <yao@codesourcery.com>
6889 * inferiors.c: Move code to ...
6890 * dll.c: .... here. New.
6891 * server.h: Declare clear_dlls.
6892 * Makefile.in (SFILES): Add dll.c.
6896 2012-02-11 Yao Qi <yao@codesourcery.com>
6898 * server.c: (handle_monitor_command): Add a new parameter
6900 (handle_query): Update caller.
6902 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6904 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6905 * configure, config.in: Regenerate.
6906 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6909 2012-02-02 Pedro Alves <palves@redhat.com>
6911 Try SIGKILL first, then PTRACE_KILL.
6912 * linux-low.c (linux_kill_one_lwp): New.
6913 (linux_kill_one_lwp): Rename to ...
6914 (kill_one_lwp_callback): ... this. Use the new
6917 2012-02-02 Pedro Alves <palves@redhat.com>
6919 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6922 2012-01-27 Pedro Alves <palves@redhat.com>
6924 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6925 (elf_64_file_p): Make static.
6926 (linux_pid_exe_is_elf_64_file): New.
6927 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6928 Delete declarations.
6929 (linux_pid_exe_is_elf_64_file): Declare.
6930 * linux-x86-low.c (x86_arch_setup): Use
6931 linux_pid_exe_is_elf_64_file.
6933 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6935 * linux-low.c (linux_wait_for_event_1): Rename to ...
6936 (linux_wait_for_event): ... here and merge it with former
6937 linux_wait_for_event - new variable wait_ptid, use it.
6938 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6940 2012-01-23 Pedro Alves <palves@redhat.com>
6942 * server.c (main): Avoid yet another case of infinite loop while
6943 detaching/killing after a longjmp.
6945 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6948 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6950 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6952 * hostio.c (handle_readlink): New function.
6953 (handle_vFile): Call it to handle "vFile:readlink" packets.
6955 2012-01-20 Pedro Alves <palves@redhat.com>
6956 Ulrich Weigand <ulrich.weigand@linaro.org>
6958 * server.c (handle_v_requests): Only support vAttach and vRun to
6959 start multiple processes when in extended protocol mode.
6961 2012-01-17 Pedro Alves <palves@redhat.com>
6963 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6964 memalign plus mprotect to allocate the scratch buffer.
6966 2012-01-13 Pedro Alves <palves@redhat.com>
6968 * server.c (attach_inferior): Clear `cont_thread'.
6970 2012-01-13 Pedro Alves <palves@redhat.com>
6972 * server.c (main): Avoid infinite loop while detaching/killing
6975 2012-01-09 Doug Evans <dje@google.com>
6977 * server.c (start_inferior): Set last_ptid in --wrapper case.
6979 2012-01-06 Yao Qi <yao@codesourcery.com>
6981 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6983 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6985 2012-01-04 Yao Qi <yao@codesourcery.com>
6987 * tracepoint.c (cmd_qtdp): Print debug message
6988 for static tracepoint.
6990 2012-01-04 Yao Qi <yao@codesourcery.com>
6992 * tracepoint.c (trace_vdebug): Differentiate debug message
6993 between gdbserver and IPA.
6995 2012-01-03 Yao Qi <yao@codesourcery.com>
6997 * tracepoint.c (tracepoint_was_hit): Don't collect for
7000 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7002 * terminal.h: Reformat copyright header.
7004 2012-01-02 Joel Brobecker <brobecker@adacore.com>
7006 * server.c (gdbserver_version): Update copyright year.
7007 * gdbreplay.c (gdbreplay_version): Likewise.
7009 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7011 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7014 2011-12-18 Hui Zhu <teawater@gmail.com>
7015 * linux-low.c (linux_create_inferior): Save return value to ret.
7017 2011-12-18 Hui Zhu <teawater@gmail.com>
7019 * linux-low.c (linux_create_inferior): Save return value to ret.
7021 2011-12-16 Doug Evans <dje@google.com>
7023 * linux-low.c (linux_create_inferior): If stdio connection,
7024 redirect stdin from /dev/null, stdout to stderr.
7025 * remote-utils.c (remote_is_stdio): New static global.
7026 (remote_connection_is_stdio): New function.
7027 (remote_prepare): Handle stdio connection.
7028 (remote_open): Ditto.
7029 (remote_close): Don't close stdin for stdio connections.
7030 (read_prim,write_prim): New functions. Replace all calls to
7031 read/write to these.
7032 * server.c (main): Watch for "-" argument. Move call to
7033 remote_prepare before start_inferior.
7034 * server.h (STDIO_CONNECTION_NAME): New macro.
7035 (remote_connection_is_stdio): Declare.
7037 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7038 in debugging output.
7040 2011-12-15 Yao Qi <yao@codesourcery.com>
7042 * tracepoint.c: Include sys/syscall.h.
7043 (gdb_ust_thread): Remove preprocessor conditional.
7045 2011-12-14 Pedro Alves <pedro@codesourcery.com>
7047 * linux-low.c (linux_detach_one_lwp): Call
7048 the_low_target.prepare_to_resume before detaching.
7050 2011-12-14 Yao Qi <yao@codesourcery.com>
7052 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7055 2011-12-14 Yao Qi <yao@codesourcery.com>
7057 * i386-low.c (i386_low_stopped_data_address): Initialize local
7060 2011-12-13 Pedro Alves <pedro@codesourcery.com>
7064 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7065 DR_CONTROL unless necessary. Extend comments.
7066 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7067 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7069 2011-12-13 Yao Qi <yao@codesourcery.com>
7071 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7073 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7075 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7077 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7078 Print new debug message for such case.
7080 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7082 Fix overlapping memcpy.
7083 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7084 the read_inferior_memory transfer.
7085 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7086 write_inferior_memory transfer.
7087 (set_fast_tracepoint_jump): New variable buf. Use it for the
7088 read_inferior_memory and write_inferior_memory transfers.
7089 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7090 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7091 Use it for the write_inferior_memory transfer.
7092 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7095 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7097 * linux-low.c (fetch_register, store_register): Make code
7098 consistent, fix formatting.
7100 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7102 * linux-low.c (usr_store_inferior_registers): Factor out code
7103 to handle individual registers into...
7104 (store_register): ... this new function.
7106 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7108 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7109 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7110 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7111 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7112 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7113 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7114 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7115 (srv_xmlfiles): Add new XML files.
7117 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7119 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7120 (init_registers_s390_linux32v1): Add prototype.
7121 (init_registers_s390_linux32v2): Likewise.
7122 (init_registers_s390_linux64v1): Likewise.
7123 (init_registers_s390_linux64v2): Likewise.
7124 (init_registers_s390x_linux64v1): Likewise.
7125 (init_registers_s390x_linux64v2): Likewise.
7126 (s390_num_regs): Increment to 52.
7127 (s390_regmap): Add orig_r2 register.
7128 (s390_num_regs_3264): Increment to 68.
7129 (s390_regmap_3264): Add orig_r2 register.
7130 (s390_collect_ptrace_register): Handle orig_r2 register.
7131 (s390_supply_ptrace_register): Likewise.
7132 (s390_fill_last_break): New function.
7133 (s390_store_last_break): Likewise.
7134 (s390_fill_system_call): New function.
7135 (s390_store_system_call): Likewise.
7136 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7138 (s390_check_regset): New function.
7139 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7140 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7141 Update target_regsets for available register sets.
7143 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7144 Jan Kratochvil <jan.kratochvil@redhat.com>
7146 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7147 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7149 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7150 * linux-low.h (struct process_info_private): New member r_debug.
7151 * server.c (handle_qxfer_libraries): Call
7152 the_target->qxfer_libraries_svr4.
7153 (handle_qxfer_libraries_svr4): New function.
7154 (qxfer_packets): New entry "libraries-svr4".
7155 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7156 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7157 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7158 PACKET_qXfer_libraries_svr4.
7160 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7162 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7163 PSW address/mask between 8-byte and 16-byte formats.
7164 (s390_supply_ptrace_register): Likewise.
7165 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7166 basic addressing mode bit.
7168 2011-11-24 Stan Shebs <stan@codesourcery.com>
7170 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7172 2011-11-17 Stan Shebs <stan@codesourcery.com>
7174 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7175 (tracing_start_time): New global.
7176 (tracing_stop_time): New global.
7177 (tracing_user_name): New global.
7178 (tracing_notes): New global.
7179 (tracing_stop_note): New global.
7180 (cmd_qtstart): Set traceframe_usage, start_time.
7181 (stop_tracing): Set stop_time.
7182 (cmd_qtstatus): Report additional status.
7183 (cmd_qtp): New function.
7184 (handle_tracepoint_query): Call it.
7185 (cmd_qtnotes): New function.
7186 (handle_tracepoint_general_set): Call it.
7187 (get_timestamp): Rename from tsv_get_timestamp.
7189 2011-11-14 Stan Shebs <stan@codesourcery.com>
7190 Kwok Cheung Yeung <kcy@codesourcery.com>
7192 * linux-x86-low.c (small_jump_insn): New.
7193 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7194 trampoline and error message, build a trampoline and issue a small
7195 jump instruction to it.
7196 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7197 trampoline and error message.
7198 (x86_get_min_fast_tracepoint_insn_len): New.
7199 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7200 * linux-low.h (struct linux_target_ops): Add arguments to
7201 install_fast_tracepoint_jump_pad operation, add new operation.
7202 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7204 (linux_get_min_fast_tracepoint_insn_len): New function.
7205 (linux_target_op): Add new operation.
7206 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7207 (gdb_trampoline_buffer_end): Ditto.
7208 (gdb_trampoline_buffer_error): Ditto.
7209 (struct ipa_sym_addresses): Add fields for new IPA variables.
7210 (symbol_list): Add entries for new IPA variables.
7211 (struct tracepoint): Add fields to hold the address range of the
7212 trampoline used by the tracepoint.
7213 (trampoline_buffer_head): New static variable.
7214 (trampoline_buffer_tail): Ditto.
7215 (claim_trampoline_space): New function.
7216 (have_fast_tracepoint_trampoline_buffer): New function.
7217 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7219 (install_fast_tracepoint): Ditto, also add error buffer argument.
7220 (cmd_qtminftpilen): New function.
7221 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7222 (fast_tracepoint_from_trampoline_address): New function.
7223 (fast_tracepoint_collecting): Handle trampoline as part of jump
7225 (set_trampoline_buffer_space): New function.
7226 (initialize_tracepoint): Initialize new IPA variables.
7227 * target.h (struct target_ops): Add arguments to
7228 install_fast_tracepoint_jump_pad operation, add new
7229 get_min_fast_tracepoint_insn_len operation.
7230 (target_get_min_fast_tracepoint_insn_len): New.
7231 (install_fast_tracepoint_jump_pad): Add arguments.
7232 * server.h (IPA_BUFSIZ): Define.
7233 * linux-i386-ipa.c: Include extra header files.
7234 (initialize_fast_tracepoint_trampoline_buffer): New function.
7235 (initialize_low_tracepoint): Call it.
7236 * server.h (set_trampoline_buffer_space): Declare.
7237 (claim_trampoline_space): Ditto.
7238 (have_fast_tracepoint_trampoline_buffer): Ditto.
7240 2011-11-14 Yao Qi <yao@codesourcery.com>
7242 * server.c (handle_query): Handle InstallInTrace for qSupported.
7243 * tracepoint.c (add_tracepoint): Sort list.
7244 (install_tracepoint, download_tracepoint): New.
7245 (cmd_qtdp): Call them to install and download tracepoints.
7246 (sort_tracepoints): Removed.
7247 (cmd_qtstart): Update.
7249 2011-11-14 Yao Qi <yao@codesourcery.com>
7251 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7252 * mem-break.h: Declare.
7253 * tracepoint.c (cmd_qtstart): Move some code to ...
7254 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7256 (download_tracepoints): Move some code to ...
7257 (download_tracepoint_1): ... here. New.
7259 2011-11-08 Yao Qi <yao@codesourcery.com>
7261 * remote-utils.c (relocate_instruction): A comment fix.
7263 2011-11-07 Joel Brobecker <brobecker@adacore.com>
7265 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7266 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7267 dr_status_mirror and dr_control_mirror from debug_reg_state.
7268 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7269 (i386_initial_stuff): Remove use of deleted globals.
7270 (i386_get_thread_context, i386_set_thread_context,
7271 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7272 from debug_reg_state.
7274 2011-11-05 Yao Qi <yao@codesourcery.com>
7276 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7277 address as TPOINT's.
7279 2011-11-02 Stan Shebs <stan@codesourcery.com>
7281 * tracepoint.c (agent_mem_read_string): New function.
7282 (eval_agent_expr): Call it for tracenz.
7283 * server.c (handle_query): Report support for tracenz.
7285 2011-11-02 Yao Qi <yao@codesourcery.com>
7287 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7289 2011-11-02 Yao Qi <yao@codesourcery.com>
7291 * target.h: Fix a typo in comment.
7293 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7295 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7296 clobber the breakpoints' shadows with fast tracepoint jumps.
7297 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7298 * target.c (write_inferior_memory): Also pass MYADDR down to
7301 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7303 * configure.ac: Check support for personality routine.
7304 * configure: Regenerate.
7305 * config.in: Likewise.
7306 * linux-low.c: Include <sys/personality.h>.
7307 Define ADDR_NO_RANDOMIZE if necessary.
7308 (linux_create_inferior): Disable address space randomization when
7309 forking inferior, if requested.
7310 (linux_supports_disable_randomization): New function.
7311 (linux_target_ops): Install it.
7312 * server.h (disable_randomization): Declare.
7313 * server.c (disable_randomization): New global variable.
7314 (handle_general_set): Handle QDisableRandomization.
7315 (handle_query): Likewise for qSupported.
7316 (main): Support --disable-randomization and --no-disable-randomization
7317 command line arguments.
7318 * target.h (struct target_ops): Add supports_disable_randomization.
7319 (target_supports_disable_randomization): New macro.
7321 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7323 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7325 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7326 [!PT_GETDSBT] (target_loadmap): New definition.
7327 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7328 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7329 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7330 and PT_GETDSBT to LINUX_LOADMAP.
7331 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7332 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7334 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7336 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7337 (arm_linux_hwbp_cap): New static variable.
7338 (arm_linux_get_hwbp_cap): Replace by ...
7339 (arm_linux_init_hwbp_cap): ... this new function.
7340 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7341 (arm_linux_get_hw_watchpoint_count): Likewise.
7342 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7343 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7344 (arm_prepare_to_resume): Use perror_with_name instead of error.
7346 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7348 * linux-arm-low.c: Include <signal.h>.
7349 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7350 (struct arm_linux_hwbp_cap): New data type.
7351 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7352 (struct arm_linux_hw_breakpoint): New data type.
7353 (MAX_BPTS, MAX_WPTS): Define.
7354 (struct arch_process_info, struct arch_lwp_info): New data types.
7355 (arm_linux_get_hwbp_cap): New function.
7356 (arm_linux_get_hw_breakpoint_count): Likewise.
7357 (arm_linux_get_hw_watchpoint_count): Likewise.
7358 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7359 (arm_hwbp_control_initialize): Likewise.
7360 (arm_hwbp_control_is_enabled): Likewise.
7361 (arm_hwbp_control_is_initialized): Likewise.
7362 (arm_hwbp_control_disable): Likewise.
7363 (arm_linux_hw_breakpoint_equal): Likewise.
7364 (arm_linux_hw_point_initialize): Likewise.
7365 (struct update_registers_data): New data structure.
7366 (update_registers_callback: New function.
7367 (arm_insert_point): Likewise.
7368 (arm_remove_point): Likewise.
7369 (arm_stopped_by_watchpoint): Likewise.
7370 (arm_stopped_data_address): Likewise.
7371 (arm_new_process): Likewise.
7372 (arm_new_thread): Likewise.
7373 (arm_prepare_to_resume): Likewise.
7374 (the_low_target): Register arm_insert_point, arm_remove_point,
7375 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7376 arm_new_thread, and arm_prepare_to_resume.
7378 2011-09-15 Stan Shebs <stan@codesourcery.com>
7380 * server.h (struct emit_ops): Add compare-goto fields.
7381 * tracepoint.c (gdb_agent_op_sizes): New table.
7382 (emit_eq_goto): New function.
7383 (emit_ne_goto): New function.
7384 (emit_lt_goto): New function.
7385 (emit_le_goto): New function.
7386 (emit_gt_goto): New function.
7387 (emit_ge_goto): New function.
7388 (is_goto_target): New function.
7389 (compile_bytecodes): Recognize special cases of compare-goto
7390 combinations and call specialized emitters for them.
7391 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7392 (amd64_emit_ne_goto): New function.
7393 (amd64_emit_lt_goto): New function.
7394 (amd64_emit_le_goto): New function.
7395 (amd64_emit_gt_goto): New function.
7396 (amd64_emit_ge_goto): New function.
7397 (amd64_emit_ops): Add the new functions.
7398 (i386_emit_eq_goto): New function.
7399 (i386_emit_ne_goto): New function.
7400 (i386_emit_lt_goto): New function.
7401 (i386_emit_le_goto): New function.
7402 (i386_emit_gt_goto): New function.
7403 (i386_emit_ge_goto): New function.
7404 (i386_emit_ops): Add the new functions.
7406 2011-09-08 Stan Shebs <stan@codesourcery.com>
7408 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7409 (i386_emit_epilogue): Restore %ebx.
7411 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7413 * server.c (step_thread): Remove definition.
7414 (process_serial_event): Don't handle Hs.
7415 * server.h (step_thread): Remove declaration.
7416 * target.c (set_desired_inferior): Remove use of step_thread.
7418 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7420 * linux-low.c: Include linux-procfs.h.
7421 (linux_attach_lwp_1): Update comments.
7422 (linux_attach): Scan for existing threads when attaching to a
7423 process that is the tgid.
7424 * Makefile.in: Update dependencies.
7426 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7428 * configure.srv: Add linux-procfs.o dependencies.
7430 2011-08-14 Yao Qi <yao@codesourcery.com>
7432 * target.h (struct target_ops): Fix indent.
7433 * win32-low.c (win32_target_ops): Fix comment.
7435 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7436 Yao Qi <yao@codesourcery.com>
7438 * Makefile.in (clean): Remove tic6x-*.c files.
7439 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7440 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7441 (tic6x-c64xp-linux.c): Likewise.
7442 * configure.srv: Add support for tic6x-*-uclinux.
7443 * linux-tic6x-low.c: New.
7444 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7446 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7447 Yao Qi <yao@codesourcery.com>
7449 * target.h (struct target_ops): Add read_loadmap.
7450 * linux-low.c (struct target_loadseg): New type.
7451 (struct target_loadmap): New type.
7452 (linux_read_loadmap): New function.
7453 (linux_target_ops): Add linux_read_loadmap.
7454 * server.c (handle_query): Support qXfer:fdpic:read packet.
7455 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7458 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7460 * win32-low.c: Include <stdint.h>.
7462 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7464 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7465 to the inferior here.
7466 (i386_remove_aligned_watchpoint): Ditto.
7467 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7468 fit part of the watchpoint in the debug registers.
7469 (i386_update_inferior_debug_regs): New.
7470 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7471 registers, and only update the inferior on success.
7472 (i386_low_remove_watchpoint): Ditto.
7474 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7476 * linux-low.c (compare_ints, unique, list_threads, show_process,
7477 linux_core_of_thread): Delete.
7478 (linux_target_ops): Change linux_core_of_thread to
7479 linux_common_core_of_thread.
7480 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7481 * utils.c (malloc_failure): Change type of argument.
7482 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7483 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7484 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7485 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7486 (IPA_OBJS): Add common-utils-ipa.o.
7487 (ptid_h, linux_osdata_h): New macros.
7488 (server_h): Add common/common-utils.h, common/xml-utils.h,
7489 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7491 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7492 ptid.o, buffer.o): New rules.
7493 (linux-low.o): Add common/linux-osdata.h as a dependency.
7494 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7495 * configure.ac: Add AC_HEADER_DIRENT check.
7496 * config.in: Regenerate.
7497 * configure: Regenerate.
7498 * remote-utils.c (xml_escape_text): Delete.
7499 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7500 buffer_xml_printf): Move to common/buffer.c.
7501 * server.c (main): Remove call to initialize_inferiors.
7502 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7503 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7504 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7505 internal_error, gdb_assert, gdb_assert_fail): Delete.
7506 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7507 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7509 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7510 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7511 initialize_inferiors): Delete.
7513 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7515 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7518 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7520 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7522 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7524 2011-05-26 Yao Qi <yao@codesourcery.com>
7526 * Makefile.in (thread-db.o): Track dependence to
7527 common/gdb_thread_db.h.
7528 * thread-db.c: include gdb_thread_db.h from right place.
7530 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7532 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7533 __FILE__ and __LINE__ to internal_error.
7535 2011-05-13 Doug Evans <dje@google.com>
7537 * thread-db.c (try_thread_db_load_from_sdir): New function.
7538 (try_thread_db_load_from_dir): New function.
7539 (thread_db_load_search): Handle $sdir, ignore $pdir.
7540 Remove trying of system directories if search of
7541 libthread-db-search-path fails, that is now done via $sdir.
7543 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7545 * server.c (handle_query): Add EnableDisableTracepoints to the list
7546 of supported features.
7547 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7549 (cmd_qtenable_disable): New.
7550 (cmd_qtstart): Install tracepoints even if disabled.
7551 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7552 receiving a QTEnable or QTDisable packet.
7553 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7554 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7556 (gdb_probe): Skip data collection if static tracepoint is disabled.
7558 2011-05-10 Doug Evans <dje@google.com>
7560 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7562 2011-05-04 Doug Evans <dje@google.com>
7564 * linux-low.c (linux_join): Skip process lookup.
7565 * spu-low.c (spu_join): Ditto.
7566 * server.c (join_inferiors_callback): Delete.
7567 (process_serial_event): For 'D' packet (detach) call join_inferior
7570 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7572 * README: Don't mention xscale*-*-linux*.
7573 * configure.srv (xscale*-*-linux*): Don't handle target.
7575 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7577 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7579 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7580 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7581 (i386_emit_void_call_2): Likewise.
7583 2011-04-26 Yao Qi <yao@codesourcery.com>
7585 * linux-low.c: Move common macros to linux-ptrace.h.
7586 Include linux-ptrace.h.
7587 * Makefile.in (linux_ptrace_h): New.
7588 (linux-low.o): Depends on linux-ptrace.h.
7590 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7592 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7593 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7594 (remote_prepare): New function with most of the TCP code from ...
7595 (remote_open): ... here. Detect PORT here unconditionally. Move also
7596 setting transport_is_reliable.
7597 * server.c (run_once): New variable.
7598 (gdbserver_usage): Document it.
7599 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7600 the first run if RUN_ONCE.
7601 * server.h (run_once, remote_prepare): New declarations.
7603 2011-04-19 Tom Tromey <tromey@redhat.com>
7605 * win32-low.c (handle_load_dll): Remove duplicate "the".
7607 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7609 Remove support for old Cygwin 1.5 versions.
7610 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7611 function to avoid warning.
7612 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7615 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7617 * gdbserver/server.h (Macro _): Define it if not available.
7619 2011-03-14 Michael Snyder <msnyder@vmware.com>
7621 * hostio.c (handle_close): Remove unnecessary null test.
7623 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7625 * Makefile.in (maintainer-clean realclean distclean): Remove
7626 "make ... subdir_do" command.
7628 2011-03-10 Michael Snyder <msnyder@vmware.com>
7630 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7632 * server.c (handle_v_run): Free alloced buffer on early return.
7634 2011-03-09 Yao Qi <yao@codesourcery.com>
7637 2011-03-04 Yao Qi <yao@codesourcery.com>
7639 * Makefile.in: Remove GNU make feature --directory.
7641 2011-03-05 Yao Qi <yao@codesourcery.com>
7643 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7644 (subdir_do): New make target. Copied from gdb/Makefile.
7645 (maintainer-clean, realclean, distclean, clean): Call corresponding
7646 make targets in common/Makefile.
7648 2011-02-11 Yao Qi <yao@codesourcery.com>
7650 * configure.ac: Call AC_PROG_RANLIB.
7651 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7652 * configure: Regenerate.
7654 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7656 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7658 2011-03-06 Yao Qi <yao@codesourcery.com>
7660 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7662 2011-03-05 Yao Qi <yao@codesourcery.com>
7664 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7665 (subdir_do): New make target. Copied from gdb/Makefile.
7666 (maintainer-clean, realclean, distclean, clean): Call corresponding
7667 make targets in common/Makefile.
7669 2011-03-04 Yao Qi <yao@codesourcery.com>
7671 * Makefile.in: Remove GNU make feature --directory.
7673 2011-03-04 Michael Snyder <msnyder@vmware.com>
7675 * server.c (queue_stop_reply): Call xmalloc not malloc.
7677 2011-03-02 Michael Snyder <msnyder@vmware.com>
7679 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7681 2011-02-28 Michael Snyder <msnyder@vmware.com>
7683 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7684 (cmd_qtframe): Ditto.
7685 (cmd_qtbuffer): Ditto.
7686 (cmd_bigqtbuffer): Ditto.
7688 * utils.c (decimal2str): Initialize 'width' to nine, then
7691 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7693 * hostio.c (require_data): Free *data, not data.
7695 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7697 * hostio.c (require_data): Use free, not xfree.
7699 2011-02-27 Michael Snyder <msnyder@vmware.com>
7701 * server.c (handle_query): Discard unused value.
7703 * hostio.c (require_data): Free malloc memory before returning
7706 2011-02-26 Michael Snyder <msnyder@vmware.com>
7708 * linux-low.c (list_threads): Call closedir for dirent.
7710 2011-02-27 Michael Snyder <msnyder@vmware.com>
7712 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7713 a case statement falls through.
7715 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7717 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7720 2011-02-26 Michael Snyder <msnyder@vmware.com>
7722 * utils.c (decimal2str): Eliminate dead code and dead param.
7723 (pulongest): Drop dead param from call to decimal2str.
7726 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7728 Revert the following patch (not approved yet):
7729 2011-02-21 Hui Zhu <teawater@gmail.com>
7730 * tracepoint.c (tp_printf): New function.
7731 (eval_agent_expr): Handle gdb_agent_op_printf.
7733 2011-02-21 Hui Zhu <teawater@gmail.com>
7735 * tracepoint.c (tp_printf): New function.
7736 (eval_agent_expr): Handle gdb_agent_op_printf.
7738 2011-02-18 Tom Tromey <tromey@redhat.com>
7740 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7741 (tracepoint.o): Likewise.
7742 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7743 (gdb_agent_op_names): Likewise.
7745 2011-02-18 Tom Tromey <tromey@redhat.com>
7747 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7748 gdb_agent_op_rot>: New constants.
7749 (gdb_agent_op_names): Add pick and roll.
7750 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7753 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7755 * aclocal.m4: Regenerated with aclocal-1.11.1.
7757 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7759 * server.c (handle_qxfer_traceframe_info): New.
7760 (qxfer_packets): Register "traceframe-info".
7761 (handle_query): Report support for qXfer:traceframe-info:read+.
7762 * tracepoint.c (match_blocktype): New.
7763 (traceframe_find_block_type): Rename to ...
7764 (traceframe_walk_blocks): ... this. Add callback filter argument,
7766 (traceframe_find_block_type): New, reimplemented on top of
7767 traceframe_walk_blocks.
7768 (build_traceframe_info_xml): New.
7769 (traceframe_read_info): New.
7770 * server.h (traceframe_read_info): Declare.
7772 2011-02-11 Yao Qi <yao@codesourcery.com>
7774 * configure.ac: Call AC_PROG_RANLIB.
7775 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7776 * configure: Regenerate.
7778 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7780 * server.c (gdb_read_memory): Change return semantics to allow
7782 (handle_search_memory_1): Adjust.
7783 (process_serial_event) <'m' packet>: Handle partial transfers.
7784 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7786 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7788 * regcache.c (init_register_cache): Initialize
7789 regcache->register_status.
7790 (free_register_cache): Release regcache->register_status.
7791 (regcache_cpy): Copy register_status.
7792 (registers_to_string): Print 'x's for unavailable registers.
7793 (supply_register): Mark the register's status valid or
7794 unavailable, depending on whether a buffer was passed in or not.
7795 (supply_register_zeroed): New.
7796 (supply_regblock): Mark the registers' status valid or
7797 unavailable, depending on whether a buffer was passed in or not.
7798 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7799 (struct regcache): New `register_status' field.
7800 (supply_register_zeroed): Declare.
7801 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7802 supply_register_zeroed, rather than passing a NULL buffer to
7804 * tracepoint.c (fetch_traceframe_registers): Update comment.
7806 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7808 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7811 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7813 * server.h (decode_xfer_write): Change prototype.
7814 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7815 and don't extract the annex here.
7816 * server.c (decode_xfer_read): Remove `annex' parameter,
7817 and don't extract the annex here.
7819 (struct qxfer): New.
7820 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7821 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7822 (handle_qxfer_statictrace): New functions, abstracted out from
7823 handle_query, and made to use the struct qxfer interface.
7824 (handle_threads_qxfer_proper): Rename to ...
7825 (handle_qxfer_threads_proper): ... this.
7826 (handle_threads_qxfer): Rename to ...
7827 (handle_qxfer_threads): ... this. Adjust.
7828 (qxfer_packets): New array.
7829 (handle_qxfer): New function.
7830 (handle_query): Use handle_qxfer.
7832 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7834 * gdbreplay.c: Shorten lines of >= 80 columns.
7835 * linux-low.c: Ditto.
7836 * linux-ppc-low.c: Ditto.
7837 * linux-s390-low.c: Ditto.
7838 * linux-sparc-low.c: Ditto.
7839 * linux-x86-low.c: Ditto.
7840 * linux-xtensa-low.c: Ditto.
7841 * mem-break.c: Ditto.
7843 * regcache.h: Ditto.
7844 * remote-utils.c: Ditto.
7847 * thread-db.c: Ditto.
7848 * tracepoint.c: Ditto.
7850 * win32-low.h: Ditto.
7852 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7854 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7857 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7859 * server.c (gdbserver_version): Update copyright year in version
7861 * gdbreplay.c (gdbreplay_version): Ditto.
7863 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7865 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7866 * linux-bfin-low.c: New file.
7867 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7868 PT_DATA_ADDR for BFIN targets.
7869 * Makefile.in (SFILES): Add linux-bfin-low.c.
7870 (clean): Remove reg-bfin.c.
7871 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7872 * README: Mention supported Blackfin targets.
7874 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7876 * .gitignore: New file.
7878 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7880 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7882 2010-10-22 Jie Zhang <jie@codesourcery.com>
7884 * Makefile.in: Add FLAGS_TO_PASS variable.
7885 (install): Remove dependency of install-only and recursively
7886 invoke make for install-only.
7888 2010-10-04 Doug Evans <dje@google.com>
7890 * Makefile.in (uninstall): Use $(DESTDIR).
7892 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7896 * linux-x86-low.c (compat_siginfo_from_siginfo)
7897 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7898 si_code is < 0. Check for si_code == SI_TIMER before checking for
7901 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7903 * lynx-i386-low.c: New file.
7904 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7906 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7908 * lynx-low.c (ptrace_request_to_str): Remove handling for
7909 request values that have been removed in LynxOS 5.x.
7911 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7913 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7916 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7918 * configure.ac: Add --enable-inprocess-agent option.
7919 * configure: Rebuilt.
7921 2010-09-06 Yao Qi <yao@codesourcery.com>
7923 * linux-low.c (linux_kill): Remove unused variable.
7924 (linux_stabilize_threads): Likewise.
7925 * server.c (start_inferior): Likewise.
7926 (queue_stop_reply_callback): Likewise.
7927 * tracepoint.c (do_action_at_tracepoint): Likewise.
7929 2010-09-06 Yao Qi <yao@codesourcery.com>
7931 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7934 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7936 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7938 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7940 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7943 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7945 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7946 gdbserver/lynx-ppc-low.c: New files.
7947 * Makefile.in (lynx_low_h): New variable.
7948 (lynx-low.o, lynx-ppc-low.o): New rules.
7949 * configure.ac: On LynxOS, link with -lnetinet.
7950 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7951 * configure: regenerate.
7953 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7955 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7956 * configure.ac: Add check for vasprintf and vsnprintf.
7957 * configure, config.in: Regenerate.
7958 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7960 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7962 * gdbreplay.c: Move include of alloca.h up, next to include of
7964 * server.h: Add include of malloc.h.
7965 * mem-break.c: Remove include of malloc.h.
7966 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7968 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7970 * Makefile.in (memmem.o): Build with -Wno-error.
7972 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7974 * utils.c (xsnprintf): Make non-static.
7975 * server.h: Add xsnprintf declaration.
7976 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7977 replace calls to snprintf by calls to xsnprintf throughout.
7979 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7981 * configure.ac: Add configure check for alloca.
7982 * configure, config.in: Regenerate.
7983 * server.h: Include alloca.h if it exists.
7984 * gdbreplay.c: Include alloca.h if it exists.
7986 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7988 * linux-low.c (__SIGRTMIN): Define if not already defined.
7989 (linux_create_inferior): Check for __ANDROID__ rather than
7991 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7992 are already deferred.
7993 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7994 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7995 stopped and already has a pending signal to report.
7996 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7997 a pending signal to report or is moving out of a jump pad.
7998 (linux_init_signals): Check for __ANDROID__ rather than
8001 2010-08-28 Pedro Alves <pedro@codesourcery.com>
8003 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8004 debug_threads check. Avoid a linear search when not doing debug
8007 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8009 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8010 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8011 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8012 (process_event): Change local fd's type to gdb_fildes_t.
8013 (create_file_handler): Adjust prototype.
8014 (delete_file_handler): Adjust prototype.
8015 (handle_file_event): Adjust prototype. Use pfildes.
8016 (create_file_event): Adjsut prototype.
8017 * remote-utils.c (remote_desc, listen_desc): Change type to
8019 * server.h: New gdb_fildes_t typedef.
8020 [USE_WIN32API]: Include winsock2.h.
8021 (delete_file_handler, add_file_handler): Adjust prototypes.
8023 * utils.c (pfildes): New.
8025 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8027 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8028 * configure: Regenerate.
8030 2010-08-27 Pedro Alves <pedro@codesourcery.com>
8032 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8033 (linux_done_accessing_memory): ... this.
8034 (linux_target_ops): Adjust.
8035 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8036 * nto-low.c (nto_target_ops): Adjust comment.
8037 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8038 * spu-low.c (spu_target_ops): Adjust comment.
8039 * target.h (target_ops): Rename unprepare_to_access_memory field
8040 to done_accessing_memory.
8041 (unprepare_to_access_memory): Rename to ...
8042 (done_accessing_memory): ... this.
8044 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8046 * linux-low.c (linux_prepare_to_access_memory): New.
8047 (linux_unprepare_to_access_memory): New.
8048 (linux_target_ops): Install them.
8049 * server.c (read_memory): Rename to ...
8050 (gdb_read_memory): ... this. Use
8051 prepare_to_access_memory/prepare_to_access_memory.
8052 (write_memory): Rename to ...
8053 (gdb_write_memory): ... this. Use
8054 prepare_to_access_memory/prepare_to_access_memory.
8055 (handle_search_memory_1): Adjust.
8056 (process_serial_event): Adjust.
8057 * target.h (struct target_ops): New fields
8058 prepare_to_access_memory and unprepare_to_access_memory.
8059 (prepare_to_access_memory, unprepare_to_access_memory): New.
8060 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8061 prepare_to_access_memory/prepare_to_access_memory.
8062 * nto-low.c (nto_target_ops): Adjust.
8063 * spu-low.c (spu_target_ops): Adjust.
8064 * win32-low.c (win32_target_ops): Adjust.
8066 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8068 * Makefile.in (WARN_CFLAGS): Get it from configure.
8069 (WERROR_CFLAGS): New.
8070 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8071 * configure.ac: Introduce --enable-werror, which adds -Werror to
8072 the compiler command line. Enabled by default. Disable with
8073 --disable-werror. Add -Wdeclaration-after-statement
8074 Wpointer-arith and -Wformat-nonliteral to warning flags.
8075 * configure: Regenerate.
8077 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8079 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8081 2010-08-26 Pedro Alves <pedro@codesourcery.com>
8083 * gdbreplay.c (remote_error): New.
8085 (expect): Use gdbchar. Check for error reading from GDB.
8086 Clarify sync error output.
8087 (play): Check for errors writing to GDB.
8088 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8089 * remote-utils.c (getpkt): Check for errors writing to the remote
8092 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8094 * linux-low.c (linux_wait_1): Move non-debugging code out of
8095 `debug_threads' control.
8097 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8099 * linux-low.c (linux_wait_1): Don't set last_status here.
8100 * server.c (push_event, queue_stop_reply_callback): Assert we're
8101 not pushing a TARGET_WAITKIND_IGNORE event.
8102 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8103 (myresume, handle_target_event): Set the thread's last_resume_kind
8104 and last_status from the target returned status.
8106 2010-08-25 Pedro Alves <pedro@codesourcery.com>
8110 * linux-x86-low.c (update_debug_registers_callback): New.
8111 (i386_dr_low_set_addr): Use it.
8112 (i386_dr_low_get_addr): New.
8113 (i386_dr_low_set_control): Use update_debug_registers_callback.
8114 (i386_dr_low_get_control): New.
8115 (i386_dr_low_get_status): Adjust.
8116 * linux-low.c (linux_stop_lwp): New.
8117 * linux-low.h (linux_stop_lwp): Declare.
8119 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8120 argument instead of a i386_debug_reg_state.
8121 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8122 a i386_debug_reg_state.
8123 (i386_insert_aligned_watchpoint): Adjust.
8124 (i386_remove_aligned_watchpoint): Adjust.
8125 (i386_low_stopped_data_address): Read the debug registers from the
8126 inferior instead of from the mirrors.
8127 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8128 (i386_dr_low_get_addr): Declare.
8129 (i386_dr_low_get_control): Declare.
8130 (i386_dr_low_get_status): Change prototype.
8132 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8133 (i386_dr_low_get_addr): New.
8134 (i386_dr_low_get_control): New.
8135 (i386_dr_low_get_status): Adjust prototype. Return
8137 (i386_initial_stuff): Clear dr_status_mirror and
8139 (i386_get_thread_context): Adjust.
8140 (i386_set_thread_context): Adjust.
8141 (i386_thread_added): Adjust.
8143 2010-08-24 Pedro Alves <pedro@codesourcery.com>
8145 * linux-low.h (linux_thread_area): Delete declaration.
8147 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8149 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8150 after its termination.
8152 2010-08-09 Pedro Alves <pedro@codesourcery.com>
8154 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8155 (gdb_wants_all_stopped): Delete.
8156 (linux_wait_1): Don't call them.
8157 * server.c (handle_v_cont): Tag all threads as want-stopped.
8158 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8159 stopped as "client-wants-stopped".
8161 2010-07-31 Pedro Alves <pedro@codesourcery.com>
8163 * Makefile.in (signals_h): New.
8164 (server_h): Depend on it.
8165 (server.o): Don't depend on $(signals_def).
8166 (signals.o): Depend on $(signals_def).
8168 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8170 * Makefile.in (signals_def): New.
8171 (server_h): Append include/gdb/signals.h and signals_def.
8172 (server.o): Append signals_def.
8174 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8176 * server.c (handle_target_event): Use target_signal_to_host for
8177 resume_info.sig initialization.
8178 * target.h (struct thread_resume) <sig>: New comment.
8180 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8182 * server.c (handle_query): strcpy() the returned string from paddress()
8183 instead of sprintf().
8184 * utils.c (paddress): Return phex_nz().
8186 2010-07-07 Joel Brobecker <brobecker@adacore.com>
8188 * server.c (handle_v_cont): Call mourn_inferior if process
8190 (myresume): Likewise.
8192 2010-07-01 Pedro Alves <pedro@codesourcery.com>
8194 Static tracepoints, and integration with UST.
8196 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8197 * mem-break.c (uninsert_all_breakpoints)
8198 (reinsert_all_breakpoints): New.
8199 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8200 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8201 (gdb_agent_ust_loaded, helper_thread_id)
8202 (gdb_agent_helper_thread_id): New macros.
8203 (struct ipa_sym_addresses): Add addr_ust_loaded,
8204 addr_helper_thread_id, addr_cmd_buf.
8205 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8206 (in_process_agent_loaded_ust): New.
8207 (write_e_ust_not_loaded): New.
8208 (maybe_write_ipa_ust_not_loaded): New.
8209 (struct collect_static_trace_data_action): New.
8210 (enum tracepoint_type) <static_tracepoint>: New.
8211 (struct tracepoint) <handle>: Mention static tracepoints.
8212 (struct static_tracepoint_ctx): New.
8213 (CMD_BUF_SIZE): New.
8214 (add_tracepoint_action): Handle static tracepoint actions.
8215 (unprobe_marker_at): New.
8216 (clear_installed_tracepoints): Handle static tracepoints.
8217 (cmd_qtdp): Handle static tracepoints.
8218 (probe_marker_at): New.
8219 (cmd_qtstart): Handle static tracepoints.
8220 (response_tracepoint): Handle static tracepoints.
8221 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8222 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8223 (get_context_regcache): Handle static tracepoints.
8224 (do_action_at_tracepoint): Handle static tracepoint actions.
8225 (traceframe_find_block_type): Handle static trace data blocks.
8226 (traceframe_read_sdata): New.
8227 (download_tracepoints): Download static tracepoint actions.
8228 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8229 (GDB_PROBE_NAME): New.
8234 (ust_marker_to_static_tracepoint): New.
8236 (collect_ust_data_at_tracepoint): New.
8237 (gdb_ust_probe): New.
8238 (UNIX_PATH_MAX, SOCK_DIR): New.
8239 (gdb_ust_connect_sync_socket): New.
8240 (resume_thread, stop_thread): New.
8241 (run_inferior_command): New.
8242 (init_named_socket): New.
8243 (gdb_ust_socket_init): New.
8244 (cstr_to_hexstr): New.
8246 (first_marker, next_marker): New.
8247 (response_ust_marker): New.
8248 (cmd_qtfstm, cmd_qtsstm): New.
8249 (unprobe_marker_at, probe_marker_at): New.
8250 (cmd_qtstmat, gdb_ust_thread): New.
8251 (gdb_ust_init): New.
8252 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8253 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8255 (x86_64_st_collect_regmap): New.
8256 (X86_64_NUM_ST_COLLECT_GREGS): New.
8257 (AMD64_RIP_REGNUM): New.
8258 (supply_static_tracepoint_registers): New.
8259 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8261 (i386_st_collect_regmap): New.
8262 (i386_NUM_ST_COLLECT_GREGS): New.
8263 (supply_static_tracepoint_registers): New.
8264 * server.c (handle_query): Handle qXfer:statictrace:read.
8265 <qSupported>: Report support for StaticTracepoints, and
8266 qXfer:statictrace:read features.
8267 * server.h (traceframe_read_sdata)
8268 (supply_static_tracepoint_registers): Declare.
8269 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8270 (unpack_varlen_hex): Include in IPA build.
8271 * Makefile.in (ustlibs, ustinc): New.
8272 (IPA_OBJS): Add remote-utils-ipa.o.
8273 ($(IPA_LIB)): Link -ldl and -lpthread.
8275 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8276 * config.in, configure: Regenerate.
8278 2010-06-20 Ian Lance Taylor <iant@google.com>
8279 Pedro Alves <pedro@codesourcery.com>
8281 * linux-x86-low.c (always_true): Delete.
8282 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8283 trying to fool the compiler with always_true.
8285 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8287 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8288 conditions in gdbserver.
8290 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8292 * spu-low.c (spu_read_memory): Wrap around local store limit.
8293 (spu_write_memory): Likewise.
8295 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8297 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8298 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8300 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8302 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8303 uses with LONGEST uses.
8305 2010-06-14 Stan Shebs <stan@codesourcery.com>
8306 Pedro Alves <pedro@codesourcery.com>
8310 * linux-x86-low.c: Include limits.h.
8315 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8316 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8317 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8318 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8319 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8320 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8321 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8322 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8323 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8324 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8325 (amd64_emit_void_call_2): New.
8326 (amd64_emit_ops): New.
8327 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8328 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8329 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8330 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8331 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8332 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8333 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8334 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8335 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8336 (i386_emit_stack_adjust, i386_emit_int_call_1)
8337 (i386_emit_void_call_2): New.
8338 (i386_emit_ops): New.
8339 (x86_emit_ops): New.
8340 (the_low_target): Install x86_emit_ops.
8341 * server.h (struct emit_ops): New.
8342 (get_raw_reg_func_addr): Declare.
8343 (current_insn_ptr, emit_error): Declare.
8344 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8345 (set_trace_state_variable_value): New defines.
8346 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8347 addr_get_trace_state_variable_value and
8348 addr_set_trace_state_variable_value.
8349 (symbol_list): New fields for get_raw_reg,
8350 get_trace_state_variable_value and set_trace_state_variable_value.
8351 (condfn): New typedef.
8352 (struct tracepoint): New field `compiled_cond'.
8353 (do_action_at_tracepoint): Clear compiled_cond.
8354 (get_trace_state_variable_value, set_trace_state_variable_value):
8356 (condition_true_at_tracepoint): If there's a compiled condition,
8358 (current_insn_ptr, emit_error): New globals.
8359 (struct bytecode_address): New.
8360 (get_raw_reg_func_addr): New.
8361 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8362 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8363 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8364 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8365 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8366 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8367 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8368 (compile_tracepoint_condition, compile_bytecodes): New.
8369 * target.h (emit_ops): Forward declare.
8370 (struct target_ops): New field emit_ops.
8371 (target_emit_ops): New.
8372 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8373 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8374 * linux-low.c (linux_emit_ops): New.
8375 (linux_target_ops): Install it.
8376 * linux-low.h (struct linux_target_ops): New field emit_ops.
8378 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8380 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8381 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8383 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8384 Stan Shebs <stan@codesourcery.com>
8386 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8387 (all): Depend on $(extra_libraries).
8388 (install-only): Install the IPA.
8389 (IPA_OBJS, IPA_LIB): New.
8390 (clean): Remove the IPA lib.
8391 (IPAGENT_CFLAGS): New.
8392 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8393 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8394 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8395 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8396 * configure.ac: Check for atomic builtins support in the compiler.
8397 (IPA_DEPFILES, extra_libraries): Define.
8398 * configure.srv (ipa_obj): Add description.
8399 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8400 (i[34567]86-*-linux*): Set ipa_obj.
8401 (x86_64-*-linux*): Set ipa_obj.
8402 * linux-low.c (stabilizing_threads): New.
8403 (supports_fast_tracepoints): New.
8404 (linux_detach): Stabilize threads before detaching.
8405 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8406 the lwp is either not stabilizing, or is moving out of a jump pad.
8407 (linux_fast_tracepoint_collecting): New.
8408 (maybe_move_out_of_jump_pad): New.
8409 (enqueue_one_deferred_signal): New.
8410 (dequeue_one_deferred_signal): New.
8411 (linux_wait_for_event_1): If moving out of a jump pad, defer
8412 pending signals to later.
8413 (linux_stabilize_threads): New.
8414 (linux_wait_1): Check if threads need moving out of jump pads, and
8416 (stuck_in_jump_pad_callback): New.
8417 (move_out_of_jump_pad_callback): New.
8419 (linux_resume_one_lwp): Handle moving out of jump pads.
8420 (linux_set_resume_request): Dequeue deferred signals.
8421 (need_step_over_p): Also step over fast tracepoint jumps.
8422 (start_step_over): Also uninsert fast tracepoint jumps.
8423 (finish_step_over): Also reinsert fast tracepoint jumps.
8424 (linux_install_fast_tracepoint_jump): New.
8425 (linux_target_ops): Install linux_stabilize_threads and
8426 linux_install_fast_tracepoint_jump_pad.
8427 * linux-low.h (linux_target_ops) <get_thread_area,
8428 install_fast_tracepoint_jump_pad>: New fields.
8429 (struct lwp_info) <collecting_fast_tracepoint,
8430 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8431 (linux_get_thread_area): Declare.
8432 * linux-x86-low.c (jump_insn): New.
8433 (x86_get_thread_area): New.
8434 (append_insns): New.
8436 (amd64_install_fast_tracepoint_jump_pad): New.
8437 (i386_install_fast_tracepoint_jump_pad): New.
8438 (x86_install_fast_tracepoint_jump_pad): New.
8439 (the_low_target): Install x86_get_thread_area and
8440 x86_install_fast_tracepoint_jump_pad.
8441 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8442 (struct fast_tracepoint_jump): New.
8443 (fast_tracepoint_jump_insn): New.
8444 (fast_tracepoint_jump_shadow): New.
8445 (find_fast_tracepoint_jump_at): New.
8446 (fast_tracepoint_jump_here): New.
8447 (delete_fast_tracepoint_jump): New.
8448 (set_fast_tracepoint_jump): New.
8449 (uninsert_fast_tracepoint_jumps_at): New.
8450 (reinsert_fast_tracepoint_jumps_at): New.
8451 (set_breakpoint_at): Use write_inferior_memory.
8452 (uninsert_raw_breakpoint): Use write_inferior_memory.
8453 (check_mem_read): Mask out fast tracepoint jumps.
8454 (check_mem_write): Mask out fast tracepoint jumps.
8455 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8456 (set_fast_tracepoint_jump): Declare.
8457 (delete_fast_tracepoint_jump)
8458 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8459 (reinsert_fast_tracepoint_jumps_at): Declare.
8460 * regcache.c: Don't compile many functions when building the
8461 in-process agent library.
8462 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8463 the register buffer in the heap.
8464 (free_register_cache): If the register buffer isn't owned by the
8465 regcache, don't free it.
8466 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8467 pre-existing register caches.
8468 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8470 (convert_ascii_to_int): : Constify `from' parameter type.
8471 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8472 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8473 the needed buffer in-place.
8474 (relocate_instruction): New.
8475 * server.c (handle_query) <qSymbols>: If the target supports
8476 tracepoints, give it a chance of looking up symbols. Report
8477 support for fast tracepoints.
8478 (handle_status): Stabilize threads.
8479 (process_serial_event): Adjust.
8480 * server.h (struct fast_tracepoint_jump): Forward declare.
8481 (struct process_info) <fast_tracepoint_jumps>: New field.
8482 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8483 (decode_X_packet, decode_M_packet): Adjust.
8484 (relocate_instruction): Declare.
8485 (in_process_agent_loaded): Declare.
8486 (tracepoint_look_up_symbols): Declare.
8487 (struct fast_tpoint_collect_status): Declare.
8488 (fast_tracepoint_collecting): Declare.
8489 (force_unlock_trace_buffer): Declare.
8490 (handle_tracepoint_bkpts): Declare.
8491 (initialize_low_tracepoint)
8492 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8493 * target.h (struct target_ops) <stabilize_threads,
8494 install_fast_tracepoint_jump_pad>: New fields.
8495 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8496 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8497 [HAVE_STDINT_H]: Include stdint.h.
8498 (trace_debug_1): Rename to ...
8499 (trace_vdebug): ... this.
8500 (trace_debug): Rename to ...
8501 (trace_debug_1): ... this. Add `level' parameter.
8503 (ATTR_USED, ATTR_NOINLINE): New.
8504 (IP_AGENT_EXPORT): New.
8505 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8506 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8507 (about_to_request_buffer_space, trace_buffer_is_full)
8508 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8509 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8510 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8511 (traceframe_write_count, traceframes_created)
8512 (trace_state_variables)
8513 New renaming defines.
8514 (struct ipa_sym_addresses): New.
8515 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8517 (ipa_sym_addrs): New.
8518 (all_tracepoint_symbols_looked_up): New.
8519 (in_process_agent_loaded): New.
8520 (write_e_ipa_not_loaded): New.
8521 (maybe_write_ipa_not_loaded): New.
8522 (tracepoint_look_up_symbols): New.
8523 (debug_threads) [IN_PROCESS_AGENT]: New.
8524 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8525 (UNKNOWN_SIDE_EFFECTS): New.
8526 (stop_tracing): New.
8527 (flush_trace_buffer): New.
8528 (stop_tracing_bkpt): New.
8529 (flush_trace_buffer_bkpt): New.
8530 (read_inferior_integer): New.
8531 (read_inferior_uinteger): New.
8532 (read_inferior_data_pointer): New.
8533 (write_inferior_data_pointer): New.
8534 (write_inferior_integer): New.
8535 (write_inferior_uinteger): New.
8536 (struct collect_static_trace_data_action): Delete.
8537 (enum tracepoint_type): New.
8538 (struct tracepoint) <type>: New field `type'.
8539 <actions_str, step_actions, step_actions_str>: Only include in
8541 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8542 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8543 (tracepoints): Use IP_AGENT_EXPORT.
8544 (last_tracepoint): Don't include in the IPA.
8545 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8546 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8547 (alloced_trace_state_variables): New.
8548 (trace_state_variables): Use IP_AGENT_EXPORT.
8549 (traceframe_t): Delete unused variable.
8550 (circular_trace_buffer): Don't include in the IPA.
8551 (trace_buffer_start): Delete.
8552 (struct trace_buffer_control): New.
8553 (trace_buffer_free): Delete.
8554 (struct ipa_trace_buffer_control): New.
8555 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8556 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8558 (trace_buffer_ctrl): New.
8559 (TRACE_BUFFER_CTRL_CURR): New.
8560 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8561 Reimplement as macros.
8562 (trace_buffer_wrap): Delete.
8563 (traceframe_write_count, traceframe_read_count)
8564 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8565 (struct tracepoint_hit_ctx) <type>: New field.
8566 (struct fast_tracepoint_ctx): New.
8567 (memory_barrier): New.
8569 (record_tracepoint_error): Update atomically in the IPA.
8570 (clear_inferior_trace_buffer): New.
8571 (about_to_request_buffer_space): New.
8572 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8573 updating the same buffer.
8574 (add_tracepoint): Default the tracepoint's type to trap
8575 tracepoint, and orig_size to -1.
8576 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8578 (create_trace_state_variable): New parameter `gdb'. Handle it.
8579 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8580 (cmd_qtdp): Handle fast tracepoints.
8582 (max_jump_pad_size): New.
8583 (gdb_jump_pad_head): New.
8584 (get_jump_space_head): New.
8585 (claim_jump_space): New.
8586 (sort_tracepoints): New.
8587 (MAX_JUMP_SIZE): New.
8588 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8590 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8591 support. Upload fast traceframes, and delete internal IPA
8593 (stop_tracing_handler): New.
8594 (flush_trace_buffer_handler): New.
8595 (cmd_qtstop): Upload fast tracepoints.
8596 (response_tracepoint): Handle fast tracepoints.
8597 (tracepoint_finished_step): Upload fast traceframes. Set the
8598 tracepoint hit context's tracepoint type.
8599 (handle_tracepoint_bkpts): New.
8600 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8601 type. Add comment about fast tracepoints.
8602 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8603 non-existing action_str field.
8604 (get_context_regcache): Handle fast tracepoints.
8605 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8607 (fast_tracepoint_from_jump_pad_address): New.
8608 (fast_tracepoint_from_ipa_tpoint_address): New.
8609 (collecting_t): New.
8610 (force_unlock_trace_buffer): New.
8611 (fast_tracepoint_collecting): New.
8614 (write_inferior_data_ptr): New.
8615 (target_tp_heap): New.
8616 (target_malloc): New.
8617 (download_agent_expr): New.
8619 (download_tracepoints): New.
8620 (download_trace_state_variables): New.
8621 (upload_fast_traceframes): New.
8622 (IPA_FIRST_TRACEFRAME): New.
8623 (IPA_NEXT_TRACEFRAME_1): New.
8624 (IPA_NEXT_TRACEFRAME): New.
8625 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8626 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8627 (gdb_jump_pad_buffer_end): New.
8628 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8629 (initialize_tracepoint): Adjust.
8630 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8631 buffer. Initialize the low module.
8632 * utils.c (PREFIX, TOOLNAME): New.
8633 (malloc_failure): Use PREFIX.
8634 (error): In the IPA, an error causes an exit.
8635 (fatal, warning): Use PREFIX.
8636 (internal_error): Use TOOLNAME.
8637 (NUMCELLS): Increase to 10.
8638 * configure, config.in: Regenerate.
8640 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8642 * server.c (handle_query) <qSupported>: Do two passes over the
8643 qSupported string to avoid nesting strtok.
8645 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8647 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8649 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8651 * configure: Regenerate.
8652 * proc-service.list: New.
8654 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8656 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8659 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8661 * gdbreplay.c (remote_open): Check error return from socket() call by
8662 its equality to -1 not by it being negative.
8663 * remote-utils.c (remote_open): Likewise.
8665 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8667 * config.h: Regenerate.
8669 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8671 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8672 doesn't provide PTRACE_GET_THREAD_AREA.
8674 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8676 * linux-m68k-low.c: Include <asm/ptrace.h>
8677 (ps_get_thread_area): Implement.
8679 2010-05-03 Doug Evans <dje@google.com>
8681 * event-loop.c (struct callback_event): New struct.
8682 (callback_list): New global.
8683 (append_callback_event, delete_callback_event): New functions.
8684 (process_callback): New function.
8685 (start_event_loop): Call it.
8686 * remote-utils.c (NOT_SCHEDULED): Define.
8687 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8688 moved out of readchar.
8689 (readchar): Rewrite. Call reschedule before returning.
8690 (reset_readchar): New function.
8691 (remote_close): Call it.
8692 (process_remaining, reschedule): New functions.
8693 * server.h (callback_handler_func): New typedef.
8694 (append_callback_event, delete_callback_event): Declare.
8696 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8698 * proc-service.c (ps_pglobal_lookup): Use
8699 thread_db_look_up_one_symbol.
8700 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8701 parameter. Use it instead of all_symbols_looked_up.
8702 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8704 (all_symbols_looked_up): Don't declare.
8705 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8706 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8708 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8709 Set all_symbols_looked_up here.
8710 (thread_db_look_up_one_symbol): New.
8711 (thread_db_get_tls_address): Adjust.
8712 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8713 thread_db object on the heap, and tentatively set it in the
8715 (thread_db_init): Don't set all_symbols_looked_up here.
8716 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8718 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8720 * linux-low.c (linux_kill, linux_detach): Adjust.
8721 (status_pending_p_callback): Remove redundant statement. Check
8722 for !TARGET_WAITIKIND_IGNORE, instead of
8723 TARGET_WAITKIND_STOPPED.
8724 (handle_tracepoints): Make sure LWP is locked. Adjust.
8725 (linux_wait_for_event_1): Adjust.
8726 (linux_cancel_breakpoints): New.
8727 (unsuspend_one_lwp): New.
8728 (unsuspend_all_lwps): New.
8729 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8730 (send_sigstop_callback): Change return type to int, add new
8731 `except' parameter and handle it.
8732 (suspend_and_send_sigstop_callback): New.
8733 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8734 pass them down. If SUSPEND, also increment the lwp's suspend
8736 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8737 (need_step_over_p): Don't consider suspended LWPs.
8738 (start_step_over): Adjust.
8739 (proceed_one_lwp): Change return type to int, add new `except'
8740 parameter and handle it.
8741 (unsuspend_and_proceed_one_lwp): New.
8742 (proceed_all_lwps): Use find_inferior instead of
8744 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8745 also decrement the suspend count of LWPs. Pass `except' down,
8746 instead of hacking its suspend count.
8747 (linux_pause_all): Add `freeze' parameter. Adjust.
8748 (linux_unpause_all): New.
8749 (linux_target_ops): Install linux_unpause_all.
8750 * server.c (handle_status): Adjust.
8751 * target.h (struct target_ops): New fields `unpause_all' and
8752 `cancel_breakpoints'. Add new parameter to `pause_all'.
8753 (pause_all): Add new `freeze' parameter.
8755 (cancel_breakpoints): New.
8756 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8758 (cmd_qtstart): Pause threads.
8759 (stop_tracing): Pause threads, and cancel breakpoints.
8760 * win32-low.c (win32_target_ops): Adjust.
8762 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8764 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8765 the inferior right away from here...
8766 (linux_wait_1): ... to here, and adjust to check the thread's
8767 last_resume_kind instead of the lwp's step or stop_expected flags.
8769 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8771 * README: Use consistent `GDB' and `GDBserver' spellings.
8773 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8775 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8776 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8777 (linux_detach_one_lwp): Assume the lwp is stopped.
8778 (any_thread_of): Delete.
8779 (linux_detach): Stop all lwps here. Don't blindly delete all
8781 (delete_lwp_callback): New.
8782 (linux_mourn): Delete all lwps of the process that is gone.
8783 (linux_wait_1): Don't delete the last lwp of the process here.
8784 * mem-break.h (mark_breakpoints_out): Declare.
8785 * mem-break.c (mark_breakpoints_out): New.
8786 (free_all_breakpoints): Use it.
8787 * server.c (handle_target_event): If the process is gone, mark
8789 * thread-db.c (struct thread_db) <create_bp>: New field.
8790 (thread_db_enable_reporting): Fix prototype. Store a thread event
8791 breakpoint reference in the thread_db struct.
8792 (thread_db_load_search): Clear the thread_db object.
8793 (try_thread_db_load_1): Ditto.
8794 (switch_to_process): New.
8795 (disable_thread_event_reporting): Use it.
8796 (remove_thread_event_breakpoints): New.
8797 (thread_db_detach, thread_db_mourn): Use it.
8799 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8801 * linux-low.c (linux_enable_event_reporting): New.
8802 (linux_wait_for_event_1, handle_extended_wait): Use it.
8804 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8806 * linux-low.c (linux_kill_one_lwp, linux_kill)
8807 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8808 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8809 SIGSTOP even if the LWP is stopped.
8810 (send_sigstop_callback): New.
8811 (stop_all_lwps): Use send_sigstop_callback instead.
8812 (linux_resume_one_thread): Adjust.
8813 (proceed_one_lwp): Still proceed an LWP that the client has
8814 requested to stop, if we haven't reported it as stopped yet. Make
8815 sure that LWPs the client want stopped, have a pending SIGSTOP.
8817 2010-04-26 Doug Evans <dje@google.com>
8819 * server.c (handle_general_set): Make static.
8821 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8822 Print received char after testing for error/eof instead of before.
8823 (input_interrupt): Tweak comment.
8825 2010-04-23 Doug Evans <dje@google.com>
8827 * server.c (start_inferior): Print inferior argv if --debug.
8829 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8831 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8832 * nto-x86-low.c: Include server.h
8834 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8836 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8837 be consistent with other sources of this directory.
8838 (init_registers_amd64): Correct name of source file of this function
8841 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8843 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8846 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8848 * win32-i386-low.c: Add 64-bit support.
8849 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8850 (init_registers_amd64): Declare.
8851 (mappings): Add 64-bit version of array.
8852 (init_windows_x86): New function.
8853 (the_low_target): Change init_arch field to init_windows_x86.
8855 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8857 * win32-low.c: Adapt to support also 64-bit architecture.
8858 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8859 (get_image_name): Use SIZE_T type for local variable `done'.
8860 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8861 (toolhelp_get_dll_name): Idem.
8862 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8863 Use uintptr_t typecast to avoid warning.
8864 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8865 (handle_exception): Use phex_nz to avoid warning.
8866 (win32_wait): Remove unused local variable `process'.
8868 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8870 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8873 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8875 * configure.ac: Use `ws2_32' library for srv_mingw.
8876 * configure: Regenerate.
8877 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8878 * remote-utils.c: Likewise.
8880 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8882 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8883 if __x86_64__ is defined.
8885 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8887 * configure: Regenerate.
8889 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8891 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8892 * target.h (target_ops): New get_tib_address field.
8893 * win32-low.h (win32_thread_info): Add thread_local_base field.
8894 * win32-low.c (child_add_thread): Add tlb argument.
8895 Set thread_local_base field to TLB.
8896 (get_child_debug_event): Adapt to child_add_thread change.
8897 (win32_get_tib_address): New function.
8898 (win32_target_ops): Set get_tib_address field to
8899 win32_get_tib_address.
8900 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8902 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8904 * linux-low.c (linux_mourn): Also remove the process.
8905 * server.c (handle_target_event): Don't remove the process here.
8906 * nto-low.c (nto_mourn): New.
8907 (nto_target_ops): Install it.
8908 * spu-low.c (spu_mourn): New.
8909 (spu_target_ops): Install it.
8910 * win32-low.c (win32_mourn): New.
8911 (win32_target_ops): Install it.
8913 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8915 * server.h (buffer_xml_printf): Remove redundant `;'.
8917 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8919 * regcache.c (set_register_cache): Invalidate regcaches before
8920 changing the register cache layout.
8921 (regcache_invalidate_one): Allow a NULL regcache.
8922 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8923 regcaches before changing the register cache layout or the target
8926 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8928 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8929 variable warning on Linux/x86-64.
8931 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8933 GDBserver disconnected tracing support.
8935 * linux-low.c (linux_remove_process): Delete.
8936 (add_lwp): Don't set last_resume_kind here.
8937 (linux_kill): Use `mourn'.
8938 (linux_detach): Use `thread_db_detach', and `mourn'.
8940 (linux_attach_lwp_1): Adjust comment.
8941 (linux_attach): last_resume_kind moved the thread_info; adjust.
8942 (status_pending_p_callback): Adjust.
8943 (linux_wait_for_event_1): Adjust.
8944 (count_events_callback, select_singlestep_lwp_callback)
8945 (select_event_lwp_callback, cancel_breakpoints_callback)
8946 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8947 (proceed_one_lwp): Adjust.
8948 (linux_async): Add debug output.
8949 (linux_thread_stopped): New.
8950 (linux_pause_all): New.
8951 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8953 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8954 (thread_db_free): Delete declaration.
8955 (thread_db_detach, thread_db_mourn): Declare.
8956 * thread-db.c (thread_db_init): Use thread_db_mourn.
8957 (thread_db_free): Delete, split in two.
8958 (disable_thread_event_reporting): New.
8959 (thread_db_detach): New.
8960 (thread_db_mourn): New.
8962 * server.h (struct thread_info) <last_resume_kind>: New field.
8963 <attached>: Add comment.
8964 <gdb_detached>: New field.
8965 (handler_func): Change return type to int.
8966 (handle_serial_event, handle_target_event): Ditto.
8967 (gdb_connected): Declare.
8969 (disconnected_tracing): Declare.
8970 (stop_tracing): Declare.
8972 * server.c (handle_query) <qSupported>: Report support for
8973 disconnected tracing.
8974 (queue_stop_reply_callback): Account for running threads.
8975 (gdb_wants_thread_stopped): New.
8976 (gdb_wants_all_threads_stopped): New.
8977 (gdb_reattached_process): New.
8978 (handle_status): Clear the `gdb_detached' flag of all processes.
8979 In all-stop, stop all threads.
8980 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8981 (process_serial_event): If the remote connection breaks, or if an
8982 exit was forced with "monitor exit", force an event loop exit.
8983 Handle disconnected tracing on detach.
8984 (handle_serial_event): Adjust.
8985 (handle_target_event): If GDB isn't connected, forward events back
8986 to the inferior, unless the last process exited, in which case,
8987 exit gdbserver. Adjust interface.
8989 * remote-utils.c (remote_open): Don't block in accept. Instead
8990 register an event loop source on the listen socket file
8991 descriptor. Refactor bits into ...
8992 (listen_desc): ... this new global.
8993 (gdb_connected): ... this new function.
8994 (enable_async_notification): ... this new function.
8995 (handle_accept_event): ... this new function.
8996 (remote_close): Clear remote_desc.
8998 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9000 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9002 (mourn_inferior): Define.
9003 (target_process_qsupported): Avoid the dangling else problem.
9004 (thread_stopped): Define.
9005 (pause_all): Define.
9006 (target_waitstatus_to_string): Declare.
9007 * target.c (target_waitstatus_to_string): New.
9009 * tracepoint.c (tracing): Make extern.
9010 (disconnected_tracing): New.
9011 (stop_tracing): Make extern. Handle tracing stops due to GDB
9013 (cmd_qtdisconnected): New.
9014 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9015 (handle_tracepoint_general_set): Handle QTDisconnected.
9017 * event-loop.c (event_handler_func): Change return type to int.
9018 (process_event): Bail out if the event handler wants the event
9020 (handle_file_event): Ditto.
9021 (start_event_loop): Bail out if the event handler wants the event
9024 * nto-low.c (nto_target_ops): Adjust.
9025 * spu-low.c (spu_wait): Don't remove the process here.
9026 (spu_target_ops): Adjust.
9027 * win32-low.c (win32_wait): Don't remove the process here.
9028 (win32_target_ops): Adjust.
9030 2010-04-11 Pedro Alves <pedro@codesourcery.com>
9032 * regcache.c (realloc_register_cache): Invalidate inferior's
9033 regcache before recreating it.
9035 2010-04-09 Pedro Alves <pedro@codesourcery.com>
9037 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9039 2010-04-09 Stan Shebs <stan@codesourcery.com>
9040 Pedro Alves <pedro@codesourcery.com>
9042 * server.h (LONGEST): New.
9043 (struct thread_info) <while_stepping>: New field.
9044 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9046 (initialize_tracepoint, handle_tracepoint_general_set)
9047 (handle_tracepoint_query, tracepoint_finished_step)
9048 (tracepoint_was_hit, release_while_stepping_state_list):
9049 (current_traceframe): Declare.
9050 * server.c (handle_general_set): Handle tracepoint packets.
9052 (write_memory): New.
9053 (handle_search_memory_1): Use read_memory.
9054 (handle_query): Report support for conditional tracepoints, trace
9055 state variables, and tracepoint sources. Handle tracepoint
9057 (main): Initialize the tracepoints module.
9058 (process_serial_event): Handle traceframe reads/writes.
9060 * linux-low.c (handle_tracepoints): New.
9061 (linux_wait_1): Call it.
9062 (linux_resume_one_lwp): Handle while-stepping.
9063 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9064 (linux_target_ops): Install them.
9065 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9067 * linux-x86-low.c (x86_supports_tracepoints): New.
9068 (the_low_target). Install it.
9070 * mem-break.h (delete_breakpoint): Declare.
9071 * mem-break.c (delete_breakpoint): Make external.
9073 * target.h (struct target_ops): Add `supports_tracepoints',
9074 `read_pc', and `write_pc' fields.
9075 (target_supports_tracepoints): Define.
9076 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9079 * regcache.h (struct regcache) <registers_owned>: New field.
9080 (init_register_cache, regcache_cpy): Declare.
9081 (regcache_read_pc, regcache_write_pc): Declare.
9082 (register_cache_size): Declare.
9083 (supply_regblock): Declare.
9084 * regcache.c (init_register_cache): New.
9085 (new_register_cache): Use it.
9086 (regcache_cpy): New.
9087 (register_cache_size): New.
9088 (supply_regblock): New.
9089 (regcache_read_pc, regcache_write_pc): New.
9091 * tracepoint.c: New.
9093 * Makefile.in (OBS): Add tracepoint.o.
9094 (tracepoint.o): New rule.
9096 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9098 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9100 (i386-mmx.c): Likewise.
9101 (i386-mmx-linux.o): Likewise.
9102 (i386-mmx-linux.c): Likewise.
9104 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9105 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9106 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9107 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9109 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9110 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9111 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9113 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9115 * Makefile.in (clean): Updated.
9117 (i386-avx.c): Likewise.
9118 (i386-avx-linux.o): Likewise.
9119 (i386-avx-linux.c): Likewise.
9120 (amd64-avx.o): Likewise.
9121 (amd64-avx.c): Likewise.
9122 (amd64-avx-linux.o): Likewise.
9123 (amd64-avx-linux.c): Likewise.
9125 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9126 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9127 (srv_amd64_regobj): Add amd64-avx.o.
9128 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9129 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9130 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9131 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9132 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9133 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9134 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9136 * i387-fp.c: Include "i386-xstate.h".
9138 (i387_cache_to_xsave): Likewise.
9139 (i387_xsave_to_cache): Likewise.
9140 (x86_xcr0): Likewise.
9142 * i387-fp.h (i387_cache_to_xsave): Likewise.
9143 (i387_xsave_to_cache): Likewise.
9144 (x86_xcr0): Likewise.
9146 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9147 * linux-crisv32-low.c (target_regsets): Likewise.
9148 * linux-m68k-low.c (target_regsets): Likewise.
9149 * linux-mips-low.c (target_regsets): Likewise.
9150 * linux-ppc-low.c (target_regsets): Likewise.
9151 * linux-s390-low.c (target_regsets): Likewise.
9152 * linux-sh-low.c (target_regsets): Likewise.
9153 * linux-sparc-low.c (target_regsets): Likewise.
9154 * linux-xtensa-low.c (target_regsets): Likewise.
9156 * linux-low.c: Include <sys/uio.h>.
9157 (regsets_fetch_inferior_registers): Support nt_type.
9158 (regsets_store_inferior_registers): Likewise.
9159 (linux_process_qsupported): New.
9160 (linux_target_ops): Add linux_process_qsupported.
9162 * linux-low.h (regset_info): Add nt_type.
9163 (linux_target_ops): Add process_qsupported.
9165 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9167 (init_registers_i386_avx_linux): New.
9168 (init_registers_amd64_avx_linux): Likewise.
9169 (xmltarget_i386_linux_no_xml): Likewise.
9170 (xmltarget_amd64_linux_no_xml): Likewise.
9171 (PTRACE_GETREGSET): Likewise.
9172 (PTRACE_SETREGSET): Likewise.
9173 (x86_fill_xstateregset): Likewise.
9174 (x86_store_xstateregset): Likewise.
9175 (use_xml): Likewise.
9176 (x86_linux_update_xmltarget): Likewise.
9177 (x86_linux_process_qsupported): Likewise.
9178 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9179 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9180 init_registers_i386_linux here. Call
9181 x86_linux_update_xmltarget.
9182 (the_low_target): Add x86_linux_process_qsupported.
9184 * server.c (handle_query): Call target_process_qsupported.
9186 * target.h (target_ops): Add process_qsupported.
9187 (target_process_qsupported): New.
9189 2010-04-03 Pedro Alves <pedro@codesourcery.com>
9191 * inferiors.c (add_thread): Set last_status kind to
9192 TARGET_WAITKIND_IGNORE.
9193 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9194 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9195 (linux_wait_1): Move `thread' local definition to block that uses
9196 it. Don't NULL initialize `event_child'.
9197 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9198 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9199 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9201 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9203 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9204 an extended waitstatus, or by a watchpoint.
9205 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9206 thread was stepping or has been stopped by a watchpoint.
9208 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9210 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9211 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9212 of another, then delete the previous, and validate all
9214 (validate_inserted_breakpoint): New.
9215 (delete_disabled_breakpoints): New.
9216 (validate_breakpoints): New.
9217 (check_mem_read): Validate breakpoints before trusting their
9218 shadow. Delete disabled breakpoints.
9219 (check_mem_write): Validate breakpoints before trusting they
9220 should be inserted. Delete disabled breakpoints.
9221 * mem-break.h (validate_breakpoints):
9222 * server.c (handle_query): Validate breakpoints when we see a
9225 2010-04-01 Pedro Alves <pedro@codesourcery.com>
9227 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9228 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9229 if we could tell there's a GDB breakpoint at stop_pc.
9230 (need_step_over_p): Don't do a step over if we find a GDB
9231 breakpoint at the resume PC.
9233 * mem-break.c (struct raw_breakpoint): New.
9234 (enum bkpt_type): New type `gdb_breakpoint'.
9235 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9236 fields. New field `raw'.
9237 (find_raw_breakpoint_at): New.
9238 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9240 (set_breakpoint_at): Adjust.
9241 (delete_raw_breakpoint): New.
9242 (release_breakpoint): New.
9243 (delete_breakpoint): Rename to...
9244 (delete_breakpoint_1): ... this. Add proc parameter. Use
9245 release_breakpoint. Return ENOENT.
9246 (delete_breakpoint): Reimplement.
9247 (find_breakpoint_at): Delete.
9248 (find_gdb_breakpoint_at): New.
9249 (delete_breakpoint_at): Delete.
9250 (set_gdb_breakpoint_at): New.
9251 (delete_gdb_breakpoint_at): New.
9252 (gdb_breakpoint_here): New.
9253 (set_reinsert_breakpoint): Use release_breakpoint.
9254 (uninsert_breakpoint): Rename to ...
9255 (uninsert_raw_breakpoint): ... this.
9256 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9257 (reinsert_raw_breakpoint): Change parameter type to
9259 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9261 (check_breakpoints): Adjust. Use release_breakpoint.
9262 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9263 (breakpoint_inserted_here): Ditto.
9264 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9265 Don't trust the breakpoint's shadow if it is not inserted.
9266 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9267 (delete_all_breakpoints): Adjust.
9268 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9269 use delete_breakpoint_1.
9271 * mem-break.h (breakpoints_supported): Delete declaration.
9272 (set_gdb_breakpoint_at): Declare.
9273 (gdb_breakpoint_here): Declare.
9274 (delete_breakpoint_at): Delete.
9275 (delete_gdb_breakpoint_at): Declare.
9277 * server.h (struct raw_breakpoint): Forward declare.
9278 (struct process_info): New field `raw_breakpoints'.
9280 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9283 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9285 * linux-low.c (status_pending_p_callback): Fix comment.
9286 (linux_wait_for_event_1): Move most of the internal breakpoint
9287 handling from here...
9288 (linux_wait_1): ... to here.
9289 (count_events_callback): New.
9290 (select_singlestep_lwp_callback): New.
9291 (select_event_lwp_callback): New.
9292 (cancel_breakpoints_callback): New.
9293 (select_event_lwp): New.
9294 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9295 priority to all LWPs that have had events that should be reported
9296 to the client. Cancel breakpoints when about to reporting the
9297 event to the client, not while stopping lwps. No longer cancel
9298 finished single-steps here.
9299 (cancel_finished_single_step): Delete.
9300 (cancel_finished_single_steps): Delete.
9302 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9304 * mem-break.c (enum bkpt_type): New.
9305 (struct breakpoint): New field `type'.
9306 (set_breakpoint_at): Change return type to struct breakpoint
9307 pointer. Set type to `other_breakpoint' by default.
9308 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9309 in the breakpoint list.
9310 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9311 (reinsert_breakpoint): Rename to ...
9312 (reinsert_raw_breakpoint): ... this.
9313 (reinsert_breakpoints_at): Adjust.
9314 * mem-break.h (struct breakpoint): Declare.
9315 (set_breakpoint_at): Change return type to struct breakpoint
9318 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9320 * server.c (handle_query): Assign, not compare.
9322 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9324 Teach linux gdbserver to step-over-breakpoints.
9326 * linux-low.c (can_hardware_single_step): New.
9327 (supports_breakpoints): New.
9328 (handle_extended_wait): If stopping threads, read the stop pc of
9331 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9332 low target doesn't support retrieving the PC.
9333 (add_lwp): Set last_resume_kind to resume_continue.
9334 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9335 (linux_attach): Don't clear stop_expected. Set the lwp's
9336 last_resume_kind to resume_stop.
9337 (linux_detach_one_lwp): Don't check for removed breakpoints.
9338 (check_removed_breakpoint): Delete.
9339 (status_pending_p): Rename to ...
9340 (status_pending_p_callback): ... this. Don't check for removed
9341 breakpoints. Don't consider threads that are stopped from GDB's
9343 (linux_wait_for_lwp): Always read the stop_pc here.
9344 (cancel_breakpoint): New.
9345 (step_over_bkpt): New global.
9346 (linux_wait_for_event_1): Implement stepping over breakpoints.
9347 (gdb_wants_lwp_stopped): New.
9348 (gdb_wants_all_stopped): New.
9349 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9350 single-step traps here. Store the thread's last reported target
9352 (send_sigstop): Don't clear stop_expected. Always set it,
9354 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9355 (cancel_finished_single_step): New.
9356 (cancel_finished_single_steps): New.
9357 (wait_for_sigstop): Don't cancel finished single-step traps here.
9358 (linux_resume_one_lwp): Don't check for removed breakpoints.
9359 Don't set `step' on non-hardware step archs.
9360 (linux_set_resume_request): Ignore resume_stop requests if already
9361 stopping or stopped. Set the lwp's last_resume_kind.
9362 (resume_status_pending_p): Don't check for removed breakpoints.
9363 (need_step_over_p): New.
9364 (start_step_over): New.
9365 (finish_step_over): New.
9366 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9367 requests. Clear the thread's last reported target waitstatus.
9368 Don't use the `suspended' flag. Don't consider pending breakpoints.
9369 (linux_resume): Start a step-over if necessary.
9370 (proceed_one_lwp): New.
9371 (proceed_all_lwps): New.
9372 (unstop_all_lwps): New.
9373 * linux-low.h (struct lwp_info): Rewrite comment for the
9374 `suspended' flag. Add the `stop_pc' field. Delete the
9375 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9376 Add `'last_resume_kind' and `need_step_over' fields.
9377 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9378 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9379 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9380 (set_raw_breakpoint_at): New.
9381 (set_breakpoint_at): Rewrite to use it.
9382 (reinsert_breakpoint_handler): Delete.
9383 (set_reinsert_breakpoint): New.
9384 (reinsert_breakpoint_by_bp): Delete.
9385 (delete_reinsert_breakpoints): New.
9386 (uninsert_breakpoint): Rewrite.
9387 (uninsert_breakpoints_at): New.
9388 (reinsert_breakpoint): Rewrite.
9389 (reinsert_breakpoints_at): New.
9390 (check_breakpoints): Rewrite.
9391 (breakpoint_here): New.
9392 (breakpoint_inserted_here): New.
9393 (check_mem_read): Adjust.
9394 * mem-break.h (breakpoints_supported, breakpoint_here)
9395 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9396 (reinsert_breakpoint_by_bp): Delete declaration.
9397 (delete_reinsert_breakpoints): Declare.
9398 (reinsert_breakpoint): Delete declaration.
9399 (reinsert_breakpoints_at): Declare.
9400 (uninsert_breakpoint): Delete declaration.
9401 (uninsert_breakpoints_at): Declare.
9402 (check_breakpoints): Adjust prototype.
9403 * server.h: Adjust include order.
9404 (struct thread_info): Declare here. Add a `last_status' field.
9406 2010-03-23 Michael Snyder <msnyder@vmware.com>
9408 * server.c (crc32): New function.
9409 (handle_query): Add handling for 'qCRC:' request.
9411 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9413 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9414 lwp had been stopped by a watchpoint.
9416 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9418 * server.h (internal_error): Declare.
9419 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9420 * utils.c (internal_error): New function.
9422 2010-03-15 Andreas Schwab <schwab@redhat.com>
9424 * configure.srv: Fix typo setting srv_regobj.
9426 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9428 * linux-low.c (fetch_register): Avoid passing a non string literal
9430 (usr_store_inferior_registers): Ditto.
9432 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9434 * linux-low.c (linux_write_memory): Bail out early if peeking
9437 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9439 * linux-low.h (struct lwp_info): New fields
9440 `stopped_by_watchpoint' and `stopped_data_address'.
9441 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9442 here, and cache them in the lwp object.
9443 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9445 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9447 (linux_stopped_by_watchpoint): Rewrite.
9448 (linux_stopped_data_address): Rewrite.
9450 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9452 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9453 switching the current inferior, not before.
9455 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9457 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9458 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9459 i386-linux.c and amd64-linux.c.
9460 (reg-i386.o): Removed.
9461 (reg-i386.c): Likewise.
9462 (reg-i386-linux.o): Likewise.
9463 (reg-i386-linux.c): Likewise.
9464 (reg-x86-64.o): Likewise.
9465 (reg-x86-64.c): Likewise.
9466 (reg-x86-64-linux.o): Likewise.
9467 (reg-x86-64-linux.c): Likewise.
9470 (i386-linux.o): Likewise.
9471 (i386-linux.c): Likewise.
9472 (amd64.o): Likewise.
9473 (amd64.c): Likewise.
9474 (amd64-linux.o): Likewise.
9475 (amd64-linux.c): Likewise.
9477 * configure.srv (srv_i386_regobj): New.
9478 (srv_i386_linux_regobj): Likewise.
9479 (srv_amd64_regobj): Likewise.
9480 (srv_amd64_linux_regobj): Likewise.
9481 (srv_i386_32bit_xmlfiles): Likewise.
9482 (srv_i386_64bit_xmlfiles): Likewise.
9483 (srv_i386_xmlfiles): Likewise.
9484 (srv_amd64_xmlfiles): Likewise.
9485 (srv_i386_linux_xmlfiles): Likewise.
9486 (srv_amd64_linux_xmlfiles): Likewise.
9487 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9488 srv_xmlfiles to $srv_i386_xmlfiles.
9489 (i[34567]86-*-mingw32ce*): Likewise.
9490 (i[34567]86-*-mingw*): Likewise.
9491 (i[34567]86-*-nto*): Likewise.
9492 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9493 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9494 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9495 (x86_64-*-linux*): Likewise.
9497 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9498 (init_registers_amd64_linux): New.
9499 (x86_arch_setup): Replace init_registers_x86_64_linux with
9500 init_registers_amd64_linux.
9502 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9504 * configure.ac: Check for libdl. If it is not available link against
9505 static libthread_db.
9506 * configure: Regenerate.
9508 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9512 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9513 handing a read watchpoint.
9514 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9516 2010-02-12 Doug Evans <dje@google.com>
9518 * linux-low.c (linux_supports_tracefork_flag): Document.
9519 (linux_look_up_symbols): Add comment.
9521 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9523 * regcache.c (supply_register): Clear regcache if buf is NULL.
9525 2010-02-02 Nicolas Roche <roche@sourceware.org>
9526 Joel Brobecker <brobecker@adacore.com>
9528 * inferiors.c (find_inferior): Add function documentation.
9529 (unloaded_dll): Handle the case where the unloaded dll has not
9530 been previously registered in the dll list.
9532 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9534 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9535 (thumb2_breakpoint): New.
9536 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9538 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9540 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9541 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9544 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9546 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9548 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9550 * linux-s390-low.c (s390_collect_ptrace_register)
9551 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9553 2010-01-21 Doug Evans <dje@google.com>
9555 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9556 (PTRACE_ARG4_TYPE): New macro.
9557 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9558 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9559 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9560 (usr_store_inferior_registers): Ditto.
9561 (linux_read_memory, linux_write_memory): Ditto.
9562 (linux_test_for_tracefork): Ditto.
9564 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9565 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9567 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9569 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9572 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9574 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9575 prototype to take a regcache. Adjust.
9577 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9579 * regcache.h (struct thread_info): Forward declare.
9580 (struct regcache): New.
9581 (new_register_cache): Adjust prototype.
9582 (get_thread_regcache): Declare.
9583 (free_register_cache): Adjust prototype.
9584 (registers_to_string, registers_from_string): Ditto.
9585 (supply_register, supply_register_by_name, collect_register)
9586 (collect_register_as_string, collect_register_by_name): Ditto.
9587 * regcache.c (struct inferior_regcache_data): Delete.
9588 (get_regcache): Rename to ...
9589 (get_thread_regcache): ... this. Adjust. Switch inferior before
9591 (regcache_invalidate_one): Adjust.
9592 (regcache_invalidate): Fix prototype.
9593 (new_register_cache): Return the new register cache.
9594 (free_register_cache): Change prototype.
9595 (realloc_register_cache): Adjust.
9596 (registers_to_string): Change prototype to take a regcache. Adjust.
9597 (registers_from_string): Ditto.
9598 (register_data): Ditto.
9599 (supply_register): Ditto.
9600 (supply_register_by_name): Ditto.
9601 (collect_register): Ditto.
9602 (collect_register_as_string): Ditto.
9603 (collect_register_by_name): Ditto.
9604 * server.c (process_serial_event): Adjust.
9605 * linux-low.h (regset_fill_func, regset_store_func): Change
9607 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9609 * linux-low.c (get_stop_pc): Adjust.
9610 (check_removed_breakpoint): Adjust.
9611 (linux_wait_for_event): Adjust.
9612 (linux_resume_one_lwp): Adjust.
9613 (fetch_register): Add regcache parameter. Adjust.
9614 (usr_store_inferior_registers): Ditto.
9615 (regsets_fetch_inferior_registers): Ditto.
9616 (regsets_store_inferior_registers): Ditto.
9617 (linux_fetch_registers, linux_store_registers): Ditto.
9618 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9620 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9622 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9623 prototype to take a regcache.
9624 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9625 * remote-utils.c (convert_ascii_to_int, outreg)
9626 (prepare_resume_reply): Change prototype to take a regcache.
9628 * target.h (struct target_ops) <fetch_registers, store_registers>:
9629 Change prototype to take a regcache.
9630 (fetch_inferior_registers, store_inferior_registers): Change
9631 prototype to take a regcache. Adjust.
9632 * proc-service.c (ps_lgetregs): Adjust.
9633 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9634 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9635 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9636 take a regcache. Adjust.
9637 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9638 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9639 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9640 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9641 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9642 (cris_cannot_fetch_register):
9643 (cris_breakpoint_at): Change prototype to take a regcache.
9645 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9646 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9647 to take a regcache. Adjust.
9648 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9650 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9651 take a regcache. Adjust.
9652 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9653 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9654 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9655 * linux-mips-low.c (mips_get_pc):
9656 (mips_set_pc): Change prototype to take a regcache. Adjust.
9657 (mips_reinsert_addr): Adjust.
9658 (mips_collect_register): Change prototype to take a regcache.
9660 (mips_supply_register):
9661 (mips_collect_register_32bit, mips_supply_register_32bit)
9662 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9663 (mips_store_fpregset): Ditto.
9664 * linux-ppc-low.c (ppc_supply_ptrace_register)
9665 (ppc_supply_ptrace_register): Ditto.
9666 (parse_spufs_run): Adjust.
9667 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9668 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9669 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9670 take a regcache. Adjust.
9671 * linux-s390-low.c (s390_collect_ptrace_register)
9672 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9673 (s390_set_pc): Change prototype to take a regcache. Adjust.
9674 (s390_arch_setup): Adjust.
9675 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9676 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9677 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9678 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9679 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9681 (sparc_breakpoint_at): Adjust.
9682 * linux-xtensa-low.c (xtensa_fill_gregset):
9683 (xtensa_store_gregset):
9684 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9685 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9686 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9687 prototype to take a regcache. Adjust.
9688 * win32-arm-low.c (arm_fetch_inferior_register)
9689 (arm_store_inferior_register): Change prototype to take a
9691 * win32-i386-low.c (i386_fetch_inferior_register)
9692 (i386_store_inferior_register): Change prototype to take a
9694 * win32-low.c (child_fetch_inferior_registers)
9695 (child_store_inferior_registers): Change prototype to take a
9697 (win32_wait): Adjust.
9698 (win32_fetch_inferior_registers): Change prototype to take a
9700 (win32_store_inferior_registers): Adjust.
9701 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9702 store_inferior_register>: Change prototype to take a regcache.
9704 2010-01-20 Doug Evans <dje@google.com>
9706 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9708 (linux_wait_for_event1, linux_init_signals): Ditto.
9709 (W_STOPCODE): Provide definition if missing.
9711 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9713 * linux-low.c (linux_core_of_thread): New.
9714 (compare_ints, show_process, list_threads): New.
9715 (linux_qxfer_osdata): Report threads and cores.
9716 (linux_target_op): Register linux_core_of_thread.
9717 * remote-utils.c (prepare_resume_reply): Report the core.
9718 (buffer_xml_printf): Support %d specifier.
9719 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9721 (handle_query): Handle qXfer:threads. Announce availability
9723 * target.h (struct target_ops): New field core_of_thread.
9725 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9727 * Makefile.in (clean): Remove new generated files.
9728 (reg-s390.o, reg-s390.c): Remove rules.
9729 (reg-s390x.o, reg-s390x.c): Likewise.
9730 (s390-linux32.o, s390-linux32.c): Add rules.
9731 (s390-linux64.o, s390-linux64.c): Likewise.
9732 (s390x-linux64.o, s390x-linux64.c): Likewise.
9733 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9734 * linux-s390-low.c: Include <elf.h>.
9735 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9736 (init_registers_s390): Remove prototype.
9737 (init_registers_s390x): Likewise.
9738 (init_registers_s390_linux32): Add prototype.
9739 (init_registers_s390_linux64): Likewise.
9740 (init_registers_s390x_linux64): Likewise.
9741 (s390_num_regs_3264): New define.
9742 (s390_regmap_3264): New global variable.
9743 (s390_cannot_fetch_register): Remove obsolete check.
9744 (s390_cannot_store_register): Likewise.
9745 (s390_collect_ptrace_register): Handle upper/lower register halves.
9746 (s390_supply_ptrace_register): Likewise.
9747 (s390_fill_gregset): Update to register number changes.
9748 (s390_get_hwcap): New routine.
9749 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9750 Install appropriate regmap and register set.
9752 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9754 * server.c (gdbserver_version): Update copyright year to 2010.
9755 * gdbreplay.c (gdbreplay_version): Likewise.
9757 2009-12-28 Doug Evans <dje@google.com>
9759 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9760 elf/external.h. Include <elf.h> instead but only if necessary.
9762 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9764 * linux-low.c (linux_remove_process): Remove `detaching'
9765 parameter. Don't release/detach from thread_db here.
9766 (linux_kill): Release/detach from thread_db here, ...
9767 (linux_detach): ... and here, before actually detaching.
9768 (linux_wait_1): ... and here, when a process exits.
9769 * thread-db.c (any_thread_of): New.
9770 (thread_db_free): Switch the current inferior to a thread of the
9773 2009-12-21 Doug Evans <dje@google.com>
9775 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9777 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9778 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9779 warning ifndef __NR_tkill. Move setting of errno there too.
9780 Delete unnecessary resetting of errno after syscall.
9781 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9783 * configure.ac: Check for dladdr.
9784 * config.in: Regenerate.
9785 * configure: Regenerate.
9786 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9787 (try_thread_db_load): Update.
9789 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9791 2009-12-18 Doug Evans <dje@google.com>
9793 * event-loop.c: Include unistd.h if it exists.
9795 * linux-low.c (my_waitpid): Move definition away from being in
9796 between linux_tracefork_child/linux_test_for_tracefork.
9798 * gdb_proc_service.h (psaddr_t): Fix type.
9799 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9800 signature to match glibc.
9802 2009-12-16 Doug Evans <dje@google.com>
9804 * linux-low.c (linux_read_memory): Fix argument to read.
9806 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9808 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9809 events, don't leave current_inferior pointing at null.
9811 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9813 * win32-low.c (LOG): Delete.
9814 (OUTMSG): Output to stderr.
9815 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9816 on compile time LOG macro.
9817 (win32_wait): Fix debug output.
9819 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9821 * win32-low.c (win32_add_one_solib): If the dll name is
9822 "ntdll.dll", prepend the system directory to the dll path.
9824 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9826 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9828 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9829 Vladimir Prus <vladimir@codesourcery.com>
9831 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9832 * configure.ac: Check for __mcoldfire__ and set
9833 gdb_cv_m68k_is_coldfire.
9834 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9835 reg-cf.o and reg-m68k.o.
9836 * configure: Regenerated.
9838 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9840 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9841 Pass it to thread_db_free.
9842 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9843 proper `detaching' argument to linux_remove_process.
9844 * linux-low.h (thread_db_free): Add `detaching' parameter.
9845 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9847 (thread_db_free): Add `detaching' parameter. Only
9848 call td_ta_clear_event if detaching from process.
9850 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9852 * thread-db.c (thread_db_free): Fix typo.
9854 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9857 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9859 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9861 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9862 with an i686 compiler.
9863 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9865 * configure: Rebuilt.
9867 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9871 * server.c (handle_search_memory_1): Correct read_addr initialization
9872 in loop for searching subsequent chunks.
9874 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9876 * configure.ac: New --with-libthread-db option.
9877 * thread-db.c: Allow direct dependence on libthread_db.
9878 (thread_db_free): Adjust.
9879 * config.in: Regenerate.
9880 * configure: Likewise.
9882 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9885 * thread-db.c (attach_thread): New function.
9886 (maybe_attach_thread): Return success/failure.
9887 (find_new_threads_callback): Adjust.
9888 (thread_db_find_new_threads): Loop until no new threads.
9890 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9892 * proc-service.c (ps_lgetregs): Formatting.
9894 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9896 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9897 * configure.ac: Adjust.
9898 * linux-low.h (struct process_info_private): Move members to struct
9900 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9901 * linux-low.c (linux_remove_process): Adjust.
9902 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9903 * server.c (handle_query): Move code ...
9904 (handle_monitor_command): ... here. New function.
9905 * target.h (struct target_ops): New member.
9906 * thread-db.c (struct thread_db): New.
9907 (libthread_db_search_path): New variable.
9908 (thread_db_create_event, thread_db_enable_reporting)
9909 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9910 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9911 (try_thread_db_load_1, dladdr_to_soname): New functions.
9912 (try_thread_db_load, thread_db_load_search): New functions.
9913 (thread_db_init): Search for libthread_db.
9914 (thread_db_free): New function.
9915 (thread_db_handle_monitor_command): Likewise.
9916 * config.in: Regenerate.
9917 * configure: Regenerate.
9919 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9921 * spu-low.c (spu_kill): Wait for inferior to terminate.
9922 Call clear_inferiors.
9923 (spu_detach): Call clear_inferiors.
9925 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9927 * aclocal.m4: Regenerate.
9928 * config.in: Likewise.
9929 * configure: Likewise.
9931 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9933 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9934 (parse_spufs_run): New function.
9935 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9936 (ppc_breakpoint_at): Handle SPU breakpoints.
9938 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9940 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9941 (SPUFS_MAGIC): Define.
9942 (spu_enumerate_spu_ids): New function.
9943 (linux_qxfer_spu): New function.
9944 (linux_target_ops): Install linux_qxfer_spu.
9946 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9948 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9949 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9950 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9951 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9952 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9953 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9954 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9955 (init_registers_powerpc_cell32l): Add prototype.
9956 (init_registers_powerpc_cell64l): Likewise.
9957 (ppc_arch_setup): Detect Cell/B.E. architecture.
9959 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9961 * Makefile.in (datarootdir): New variable.
9963 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9965 * linux-low.c (linux_write_memory): Update debugging output.
9966 * Makefile.in (clean): Add new descriptions.
9967 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9968 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9969 * configure.srv: Add new files for arm*-*-linux*.
9970 * linux-arm-low.c: Add new declarations.
9971 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9972 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9973 (HWCAP_VFPv3D16): New.
9974 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9975 instead of __IWMMXT__.
9976 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9977 (arm_arch_setup): New.
9978 (target_regsets): Remove #ifdef. Add VFP regset.
9979 (the_low_target): Use arm_arch_setup.
9981 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9983 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9984 the main thread again.
9986 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9988 Adding Neutrino gdbserver.
9989 * configure: Regenerated.
9990 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9991 * configure.srv (i[34567]86-*-nto*): New target.
9992 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9993 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9994 (nto_comctrl) [__QNX__]: New function.
9995 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9997 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9999 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10002 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10003 Pedro Alves <pedro@codesourcery.com>
10005 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10006 don't support CONTEXT_EXTENDED_REGISTERS.
10007 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10008 (the_low_target): Install them.
10009 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10010 failing with ERROR_PIPE_NOT_CONNECTED.
10012 2009-06-30 Doug Evans <dje@google.com>
10013 Pierre Muller <muller@ics.u-strasbg.fr>
10015 Add h/w watchpoint support to x86-linux, win32-i386.
10016 * Makefile.in (SFILES): Add i386-low.c
10017 (i386_low_h): Define.
10018 (i386-low.o): Add dependencies.
10019 (linux-x86-low.o): Add i386-low.h dependency.
10020 (win32-i386-low.o): Ditto.
10021 * i386-low.c: New file.
10022 * i386-low.h: New file.
10023 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10024 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10025 * linux-low.c (linux_add_process): Initialize arch_private.
10026 (linux_remove_process): Free arch_private.
10027 (add_lwp): Initialize arch_private.
10028 (delete_lwp): Free arch_private.
10029 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10031 * linux-low.h (process_info_private): New member arch_private.
10032 (lwp_info): New member arch_private.
10033 (linux_target_ops): New members new_process, new_thread,
10035 (ptid_of): New macro.
10036 * linux-x86-low.c: Include stddef.h, i386-low.h.
10037 (arch_process_info): New struct.
10038 (arch_lwp_info): New struct.
10039 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10040 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10041 (i386_dr_low_get_status): New function.
10042 (x86_insert_point, x86_remove_point): New functions.
10043 (x86_stopped_by_watchpoint): New function.
10044 (x86_stopped_data_address): New function.
10045 (x86_linux_new_process, x86_linux_new_thread): New functions.
10046 (x86_linux_prepare_to_resume): New function.
10047 (the_low_target): Add entries for insert_point, remove_point,
10048 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10050 * server.c (debug_hw_points): New global.
10051 (monitor_show_help): Document set debug-hw-points.
10052 (handle_query): Process "set debug-hw-points".
10053 * server.h (debug_hw_points): Declare.
10054 (paddress): Declare.
10055 * utils.c (NUMCELLS, CELLSIZE): New macros.
10056 (get_sell, xsnprintf, paddress): New functions.
10057 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10058 remove_point, stopped_by_watchpoint, stopped_data_address.
10059 * win32-i386-low.c: Include i386-low.h.
10060 (debug_reg_state): Replaces dr.
10061 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10062 (i386_dr_low_get_status): New function.
10063 (i386_insert_point, i386_remove_point): New functions.
10064 (i386_stopped_by_watchpoint): New function.
10065 (i386_stopped_data_address): New function.
10066 (i386_initial_stuff): Update.
10067 (get_thread_context,set_thread_context,i386_thread_added): Update.
10068 (the_low_target): Add entries for insert_point,
10069 remove_point, stopped_by_watchpoint, stopped_data_address.
10070 * win32-low.c (win32_insert_watchpoint): New function.
10071 (win32_remove_watchpoint): New function.
10072 (win32_stopped_by_watchpoint): New function.
10073 (win32_stopped_data_address): New function.
10074 (win32_target_ops): Add entries for insert_watchpoint,
10075 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10076 * win32-low.h (win32_target_ops): New members insert_point,
10077 remove_point, stopped_by_watchpoint, stopped_data_address.
10079 2009-06-25 Pedro Alves <pedro@codesourcery.com>
10081 * server.c (process_serial_event): Re-return unsupported, not
10082 error, if the type isn't recognized. Re-allow supporting only
10083 insert or remove packets. Also call require_running for
10084 breakpoints. Add missing break statement to default case. Tidy.
10085 * target.h (struct target_ops): Rename insert_watchpoint to
10086 insert_point, and remove_watchpoint to remove_point.
10088 * linux-low.h (struct linux_target_ops): Likewise.
10089 * linux-low.c (linux_insert_watchpoint): Rename to ...
10090 (linux_insert_point): ... this. Adjust.
10091 (linux_remove_watchpoint): Rename to ...
10092 (linux_remove_point): ... this. Adjust.
10093 (linux_target_ops): Adjust.
10094 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10095 (cris_insert_point): ... this.
10096 (cris_remove_watchpoint): Rename to ...
10097 (cris_remove_point): ... this.
10098 (the_low_target): Adjust.
10100 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10102 * server.c (handle_v_kill): Pass signal_pid to
10103 kill_inferior if multi_process is zero.
10105 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10107 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10108 * target.h (target_ops): Comment for *_watchpoint to make it clear
10109 the functions can get types '0' and '1'.
10111 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10113 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10114 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10115 * regcache.c (get_regcache): Likewise.
10116 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10117 * win32-low.c (child_fetch_inferior_registers): Remove check for
10120 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10121 Pedro Alves <pedro@codesourcery.com>
10123 * target.h (struct target_ops) <supports_multi_process>: New
10125 (target_supports_multi_process): New.
10126 * server.c (handle_query): Even if GDB reports support, only
10127 enable multi-process if the target also supports it. Report
10128 multi-process support only if the target backend supports it.
10129 * linux-low.c (linux_supports_multi_process): New function.
10130 (linux_target_ops): Install it as target_supports_multi_process
10133 2009-05-24 Doug Evans <dje@google.com>
10135 Global renaming of find_thread_pid to find_thread_ptid.
10136 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10137 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10138 All callers updated.
10140 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10141 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10144 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10145 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10146 (linux_resume_one_lwp): Ditto.
10148 2009-05-23 Doug Evans <dje@google.com>
10150 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10151 from struct inferior_list_entry * to struct lwp_info *.
10152 All callers updated.
10154 2009-05-13 Doug Evans <dje@google.com>
10156 * linux-x86-low.c: Don't include assert.h.
10157 (x86_siginfo_fixup): Use fatal, not assert.
10158 (x86_arch_setup): Fix comment.
10160 2009-05-12 Doug Evans <dje@google.com>
10162 Biarch support for i386/amd64 gdbserver.
10163 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10164 Add linux-x86-low.c.
10165 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10166 (linux-x86-low.o): Add.
10167 * linux-x86-64-low.c: Delete.
10168 * linux-i386-low.c: Delete.
10169 * linux-x86-low.c: New file.
10170 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10172 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10174 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10175 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10176 (linux_child_pid_to_exec_file): New function.
10177 (elf_64_header_p, elf_64_file_p): New functions.
10178 (siginfo_fixup): New function.
10179 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10180 give target a chance to convert layout.
10181 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10182 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10184 2009-05-07 Doug Evans <dje@google.com>
10186 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10187 (regsets_store_inferior_registers): Ditto.
10189 2009-05-06 Pedro Alves <pedro@codesourcery.com>
10193 * linux-low.c (must_set_ptrace_flags): Delete.
10194 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10196 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10197 `lwp->must_set_ptrace_flags' instead.
10198 (linux_wait_for_event_1): Set ptrace options here.
10199 (linux_wait_1): ... not here.
10201 2009-04-30 Doug Evans <dje@google.com>
10203 * inferiors.c (started_inferior_callback): New function.
10204 (attached_inferior_callback): New function.
10205 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10206 * server.c (print_started_pid, print_attached_pid): New functions.
10207 (detach_or_kill_for_exit): New function.
10208 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10209 * server.h (have_started_inferiors_p): Declare.
10210 (have_attached_inferiors_p): Declare.
10212 * inferiors.c (remove_process): Fix memory leak, free process.
10213 * linux-low.c (linux_remove_process): New function.
10214 (linux_kill): Call it instead of remove_process.
10215 (linux_detach, linux_wait_1): Ditto.
10217 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10219 * configure.srv: Add x86 Windows CE target.
10221 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10223 * inferiors.c (get_thread_process): Make global.
10224 * server.h (get_thread_process): Add prototype.
10225 * thread-db.c (find_one_thread): Use get_thread_process
10226 instead of current_process.
10227 (thread_db_get_tls_address): Do not crash if called when
10228 thread layer is not yet initialized.
10230 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10232 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10233 * spu-low.c (current_tid): Rename to ...
10234 (current_ptid): ... this.
10235 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10236 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10237 ptid_get_lwp (current_ptid) instead of current_tid.
10238 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10239 instead of current_tid. Use find_process_pid to verify pid
10240 argument is valid. Pass proper argument to remove_process.
10241 (spu_thread_alive): Compare current_ptid instead of current_tid.
10242 (spu_resume): Likewise.
10244 2009-04-02 Pedro Alves <pedro@codesourcery.com>
10246 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10249 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10251 Implement the multiprocess extensions, and add linux multiprocess
10254 * server.h (ULONGEST): Declare.
10255 (struct ptid, ptid_t): New.
10256 (minus_one_ptid, null_ptid): Declare.
10257 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10258 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10259 (struct inferior_list_entry): Change `id' type from unsigned from
10261 (struct sym_cache, struct breakpoint, struct
10262 process_info_private): Forward declare.
10263 (struct process_info): Declare.
10264 (current_process): Declare.
10265 (all_processes): Declare.
10266 (initialize_inferiors): Declare.
10267 (add_thread): Adjust to use ptid_t.
10268 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10269 (add_process, remove_process, find_thread_pid): Declare.
10270 (find_inferior_id): Adjust to use ptid_t.
10271 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10272 (multi_process): Declare.
10273 (push_event): Adjust to use ptid_t.
10274 (read_ptid, write_ptid): Declare.
10275 (prepare_resume_reply): Adjust to use ptid_t.
10276 (clear_symbol_cache): Declare.
10277 * inferiors.c (all_processes): New.
10278 (null_ptid, minus_one_ptid): New.
10279 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10280 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10281 (add_thread): Change unsigned long to ptid. Remove gdb_id
10283 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10284 (gdb_id_to_thread): Rename to ...
10285 (find_thread_pid): ... this. Change unsigned long to ptid.
10286 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10287 (loaded_dll, pull_pid_from_list): Adjust.
10288 (add_process, remove_process, find_process_pid)
10289 (get_thread_process, current_process, initialize_inferiors): New.
10290 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10291 (struct target_waitstatus) <related_pid>: Ditto.
10292 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10293 return type to int.
10294 (struct target_ops) <join>: Add `pid' argument.
10295 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10296 (struct target_ops) <wait>: Add `ptid' field. Change return type
10298 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10299 (mywait): Add `ptid' argument. Change return type to ptid_t.
10300 (target_pid_to_str): Declare.
10301 * target.c (set_desired_inferior): Adjust to use ptids.
10302 (mywait): Add new `ptid' argument. Adjust.
10303 (target_pid_to_str): New.
10304 * mem-break.h (free_all_breakpoints): Declare.
10305 * mem-break.c (breakpoints): Delelete.
10306 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10307 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10308 to use per-process breakpoint list.
10309 (free_all_breakpoints): New.
10310 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10311 (symbol_cache, all_symbols_looked_up): Delete.
10313 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10315 (prepare_resume_reply): Change ptid argument's type from unsigned
10316 long to ptid_t. Adjust. Implement W;process and X;process.
10317 (free_sym_cache, clear_symbol_cache): New.
10318 (look_up_one_symbol): Adjust to per-process symbol cache. *
10319 * server.c (cont_thread, general_thread, step_thread): Change type
10321 (attached): Delete.
10322 (multi_process): New.
10323 (last_ptid): Change type to ptid_t.
10324 (struct vstop_notif) <ptid>: Change type to ptid_t.
10325 (queue_stop_reply, push_event): Change `ptid' argument's type to
10327 (discard_queued_stop_replies): Add `pid' argument.
10328 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10329 changes. Don't reference the `attached' global.
10330 (attach_inferior): Adjust to mywait interface changes.
10331 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10332 features. Handle and report "multiprocess+". Handle
10334 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10336 (handle_v_kill): New.
10337 (handle_v_stopped): Adjust to use target_pid_to_str.
10338 (handle_v_requests): Allow multiple attaches and runs when
10339 multiprocess extensions are in effect. Handle "vKill".
10340 (myresume): Adjust to use ptids.
10341 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10342 (handle_status): Adjust to discard_queued_stop_replies interface
10344 (first_thread_of, kill_inferior_callback)
10345 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10346 (main): Call initialize_inferiors. Adjust to use ptids, killing
10347 and detaching from all inferiors. Handle multiprocess packet
10349 * linux-low.h: Include gdb_proc_service.h.
10350 (struct process_info_private): New.
10351 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10352 <lwpid_of>: Use ptid_get_lwp.
10353 (get_lwp_thread): Adjust.
10354 (struct lwp_info): Add `dead' member.
10355 (find_lwp_pid): Declare.
10356 * linux-low.c (thread_db_active): Delete.
10357 (new_inferior): Adjust comment.
10358 (inferior_pid): Delete.
10359 (linux_add_process): New.
10360 (handle_extended_wait): Adjust.
10361 (add_lwp): Change unsigned long to ptid.
10362 (linux_create_inferior): Add process to processes table. Adjust
10363 to use ptids. Don't set new_inferior here.
10364 (linux_attach_lwp): Rename to ...
10365 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10366 it. Adjust to use ptids.
10367 (linux_attach_lwp): New.
10368 (linux_attach): Add process to processes table. Don't set
10370 (struct counter): New.
10371 (second_thread_of_pid_p, last_thread_of_process_p): New.
10372 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10373 multiple processes.
10374 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10375 processes. Remove process from process table.
10376 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10377 to multiple processes.
10378 (any_thread_of): New.
10379 (linux_detach): Add `pid' argument, and handle it. Remove process
10380 from processes table.
10381 (linux_join): Add `pid' argument. Handle it.
10382 (linux_thread_alive): Change unsighed long argument to ptid_t.
10383 Consider dead lwps as not being alive.
10384 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10385 threads we're not interested in.
10386 (same_lwp, find_lwp_pid): New.
10387 (linux_wait_for_lwp): Change `pid' argument's type from int to
10389 (linux_wait_for_event): Rename to ...
10390 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10391 from int to ptid_t. Adjust.
10392 (linux_wait_for_event): New.
10393 (linux_wait_1): Add `ptid' argument. Change return type to
10394 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10395 that exit from the process table.
10396 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10398 (mark_lwp_dead): New.
10399 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10400 stopping all threads, mark its main lwp as dead.
10401 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10403 (fetch_register, usr_store_inferior_registers)
10404 (regsets_fetch_inferior_registers)
10405 (regsets_store_inferior_registers, linux_read_memory)
10406 (linux_write_memory): Inline `inferior_pid'.
10407 (linux_look_up_symbols): Adjust to use per-process
10408 `thread_db_active'.
10409 (linux_request_interrupt): Adjust to use ptids.
10410 (linux_read_auxv): Inline `inferior_pid'.
10411 (initialize_low): Don't reference thread_db_active.
10412 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10413 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10414 (ps_getpid): Return the pid of the current inferior.
10415 * thread-db.c (proc_handle, thread_agent): Delete.
10416 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10418 (find_one_thread): Change argument type to ptid_t. Adjust to
10420 (maybe_attach_thread): Adjust to per-process data and ptids.
10421 (thread_db_find_new_threads): Ditto.
10422 (thread_db_init): Ditto.
10423 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10424 processes table. Adjust to use ptids.
10425 (spu_kill, spu_detach): Adjust interface. Remove process from
10427 (spu_join, spu_thread_alive): Adjust interface.
10428 (spu_wait): Adjust interface. Remove process from processes
10429 table. Adjust to use ptids.
10430 * win32-low.c (current_inferior_tid): Delete.
10431 (current_inferior_ptid): New.
10432 (debug_event_ptid): New.
10433 (thread_rec): Take a ptid. Adjust.
10434 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10435 (child_delete_thread): Ditto.
10436 (do_initial_child_stuff): Add `attached' argument. Add process to
10438 (child_fetch_inferior_registers, child_store_inferior_registers):
10440 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10441 (win32_attach): Pass 1 to do_initial_child_stuff.
10442 (win32_kill): Adjust interface. Remove process from processes
10444 (win32_detach): Ditto.
10445 (win32_join): Adjust interface.
10446 (win32_thread_alive): Take a ptid.
10447 (win32_resume): Adjust to use ptids.
10448 (get_child_debug_event): Ditto.
10449 (win32_wait): Adjust interface. Remove exiting process from
10452 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10454 Non-stop mode support.
10456 * server.h (non_stop): Declare.
10457 (gdb_client_data, handler_func): Declare.
10458 (delete_file_handler, add_file_handler, start_event_loop):
10460 (handle_serial_event, handle_target_event, push_event)
10461 (putpkt_notif): Declare.
10462 * target.h (enum resume_kind): New.
10463 (struct thread_resume): Replace `step' field by `kind' field.
10464 (TARGET_WNOHANG): Define.
10465 (struct target_ops) <wait>: Add `options' argument.
10466 <supports_non_stop, async, start_non_stop>: New fields.
10467 (target_supports_non_stop, target_async): New.
10468 (start_non_stop): Declare.
10469 (mywait): Add `options' argument.
10470 * target.c (mywait): Add `options' argument. Print child exit
10471 notifications here.
10472 (start_non_stop): New.
10473 * server.c (non_stop, own_buf, mem_buf): New globals.
10474 (struct vstop_notif): New.
10475 (notif_queue): New global.
10476 (queue_stop_reply, push_event, discard_queued_stop_replies)
10477 (send_next_stop_reply): New.
10478 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10480 (attach_inferior): In non-stop mode, don't wait for the target
10482 (handle_general_set): Handle QNonStop.
10483 (handle_query): When handling qC, return the current general
10484 thread, instead of the first thread of the list.
10485 (handle_query): If the backend supports non-stop mode, include
10486 QNonStop+ in the qSupported query response.
10487 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10489 (handle_v_attach, handle_v_run): Handle non-stop mode.
10490 (handle_v_stopped): New.
10491 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10492 (myresume): Adjust to use resume_kind. Handle non-stop.
10493 (queue_stop_reply_callback): New.
10494 (handle_status): Handle non-stop mode.
10495 (main): Clear non_stop flag on reconnection. Use the event-loop.
10496 Refactor serial protocol handling from here ...
10497 (process_serial_event): ... to this new function. When GDB
10498 selects any thread, select one here. In non-stop mode, wait until
10499 GDB acks all pending events before exiting.
10500 (handle_serial_event, handle_target_event): New.
10501 * remote-utils.c (remote_open): Install remote_desc in the event
10503 (remote_close): Remove remote_desc from the event loop.
10504 (putpkt_binary): Rename to...
10505 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10506 (putpkt_binary): New as wrapper around putpkt_binary_1.
10507 (putpkt_notif): New.
10508 (prepare_resume_reply): In non-stop mode, don't change the
10510 * event-loop.c: New.
10511 * Makefile.in (OBJ): Add event-loop.o.
10512 (event-loop.o): New rule.
10514 * linux-low.h (pid_of): Moved here.
10516 (get_lwp_thread): Use lwpid_of.
10517 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10518 * linux-low.c (pid_of): Delete.
10519 (inferior_pid): Use lwpid_of.
10520 (linux_event_pipe): New.
10521 (target_is_async_p): New.
10523 (handle_extended_wait): Use lwpid_of.
10524 (add_lwp): Don't set lwpid field.
10525 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10526 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10527 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10528 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10529 first. Adjust to linux_wait_for_event interface changes. Use
10531 (linux_detach): Don't delete the main lwp here.
10532 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10533 (status_pending_p): Don't consider explicitly suspended lwps.
10534 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10535 pointer. Add OPTIONS argument. Change return type to int. Use
10536 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10537 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10538 pointer. Add status pointer argument. Return a pid instead of a
10539 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10540 changes. In non-stop mode, don't switch to a random thread.
10541 (linux_wait): Rename to...
10542 (linux_wait_1): ... this. Add target_options argument, and handle
10543 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10544 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10545 clean exit and signal exit code. Don't stop all threads in
10546 non-stop mode. In all-stop mode, only stop all threads when
10547 reporting a stop to GDB. Handle explicit thread stop requests.
10548 (async_file_flush, async_file_mark): New.
10550 (send_sigstop): Use lwpid_of.
10551 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10552 interface changes. In non-stop mode, don't switch to a random
10554 (linux_resume_one_lwp): Use lwpid_of.
10555 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10556 (linux_resume_one_thread): ... this. Handle resume_stop. In
10557 non-stop mode, don't look for pending flag in all threads.
10558 (resume_status_pending_p): Don't consider explicitly suspended
10560 (my_waitpid): Reimplement. Emulate __WALL.
10561 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10563 (sigchld_handler, linux_supports_non_stop, linux_async)
10564 (linux_start_non_stop): New.
10565 (linux_target_ops): Register linux_supports_non_stop, linux_async
10566 and linux_start_non_stop.
10567 (initialize_low): Install SIGCHLD handler.
10568 * thread-db.c (thread_db_create_event, find_one_thread)
10569 (thread_db_get_tls_address): Use lwpid_of.
10570 * win32-low.c (win32_detach): Adjust to use resume_kind.
10571 (win32_wait): Add `options' argument.
10572 * spu-low.c (spu_resume): Adjust to use resume_kind.
10573 (spu_wait): Add `options' argument.
10575 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10577 Decouple target code from remote protocol.
10579 * target.h (enum target_waitkind): New.
10580 (struct target_waitstatus): New.
10581 (struct target_ops) <wait>: Return an unsigned long. Take a
10582 target_waitstatus pointer instead of a char pointer.
10583 (mywait): Likewise.
10584 * target.c (mywait): Change prototype to return an unsigned long.
10585 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10586 * server.h (thread_from_wait, old_thread_from_wait): Delete
10588 (prepare_resume_reply): Change prototype to take a
10590 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10591 (last_status, last_ptid): New.
10592 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10593 pid instead of a signal.
10594 (attach_inferior): Remove "status" and "signal" parameters.
10596 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10598 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10599 (handle_v_requests, myresume): Remove "status" and "signal"
10600 parameters. Adjust.
10601 (handle_status): New.
10602 (main): Delete local `status'. Adjust.
10603 * remote-utils.c: Include target.h.
10604 (prepare_resume_reply): Change prototype to take a
10605 target_waitstatus. Adjust.
10607 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10609 * spu-low.c (spu_wait): Adjust.
10610 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10612 (win32_wait): Adjust.
10614 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10616 * target.h (struct thread_resume): Delete leave_stopped member.
10617 (struct target_ops): Add a `n' argument to the `resume' callback.
10618 * server.c (start_inferior): Adjust.
10619 (handle_v_cont, myresume): Adjust.
10620 * linux-low.c (check_removed_breakpoint): Adjust to resume
10621 interface change, and to removed leave_stopped field.
10622 (resume_ptr): Delete.
10623 (struct thread_resume_array): New.
10624 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10625 resume interface change.
10626 (linux_continue_one_thread, linux_queue_one_thread)
10627 (resume_status_pending_p): Check if the resume field is NULL
10628 instead of checking the leave_stopped member.
10629 (linux_resume): Adjust to the target resume interface change.
10630 * spu-low.c (spu_resume): Adjust to the target resume interface
10632 * win32-low.c (win32_detach, win32_resume): Ditto.
10634 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10636 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10638 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10640 (linux_continue_one_thread): Only preserve the stepping flag if
10641 there's a pending breakpoint.
10643 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10645 * server.c (main): After the inferior having exited, call
10646 remote_close before exiting gdbserver.
10648 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10650 Fix size of FPSCR in Power 7 processors.
10651 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10652 (PPC_FEATURE_HAS_DFP): New #define.
10653 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10656 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10658 * server.c (handle_query) Whitespace and formatting.
10660 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10662 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10663 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10664 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10665 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10666 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10667 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10668 Makefile.in, configure.ac: Fix whitespace throughout.
10669 * configure: Regenerate.
10671 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10673 * inferiors.c (find_inferior): Make it safe for the callback
10674 function to delete the currently iterated inferior.
10676 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10678 * Makefile.in (linuw_low_h): Move higher.
10679 (thread-db.o): Depend on $(linux_low_h).
10681 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10683 Rename "process" to "lwp" throughout.
10685 * linux-low.c (all_processes): Rename to...
10686 (all_lwps): ... this.
10687 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10688 (add_process): Rename to ...
10689 (add_lwp): ... this. Adjust.
10690 (linux_create_inferior): Adjust.
10691 (linux_attach_lwp): Adjust.
10692 (linux_attach): Adjust.
10693 (linux_kill_one_process): Rename to ...
10694 (linux_kill_one_lwp): ... this. Adjust.
10695 (linux_kill): Adjust.
10696 (linux_detach_one_process): Rename to ...
10697 (linux_detach_one_lwp): ... this. Adjust.
10698 (linux_detach): Adjust.
10699 (check_removed_breakpoint): Adjust.
10700 (status_pending_p): Adjust.
10701 (linux_wait_for_process): Rename to ...
10702 (linux_wait_for_lwp): ... this. Adjust.
10703 (linux_wait_for_event): Adjust.
10704 (send_sigstop): Adjust.
10705 (wait_for_sigstop): Adjust.
10706 (stop_all_processes): Rename to ...
10707 (stop_all_lwps): ... this.
10708 (linux_resume_one_process): Rename to ...
10709 (linux_resume_one_lwp): ... this. Adjust.
10710 (linux_set_resume_request, linux_continue_one_thread)
10711 (linux_queue_one_thread, resume_status_pending_p)
10712 (usr_store_inferior_registers, regsets_store_inferior_registers)
10713 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10715 * linux-low.h (get_process): Rename to ...
10716 (get_lwp): ... this. Adjust.
10717 (get_thread_process): Rename to ...
10718 (get_thread_lwp): ... this. Adjust.
10719 (get_process_thread): Rename to ...
10720 (get_lwp_thread): ... this. Adjust.
10721 (struct process_info): Rename to ...
10722 (struct lwp_info): ... this.
10723 (all_processes): Rename to ...
10724 (all_lwps): ... this.
10725 * proc-service.c (ps_lgetregs): Adjust.
10726 * thread-db.c (thread_db_create_event, find_one_thread)
10727 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10729 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10731 * server.c (handle_query): Handle "qAttached".
10733 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10735 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10736 GPLv3, update license URL.
10738 2009-03-01 Doug Evans <dje@google.com>
10740 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10741 (server_h): Add gdb_signals.h.
10742 (signals.o): Update.
10743 * server.h (target_signal_from_host,target_signal_to_host_p)
10744 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10746 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10748 * remote-utils.c (getpkt): Also generate remote-debug
10749 information if noack_mode is set.
10751 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10753 * server.c (handle_query): Report qXfer:siginfo:read and
10754 qXfer:siginfo:write as supported and handle them.
10755 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10756 * linux-low.c (linux_xfer_siginfo): New.
10757 (linux_target_ops): Set it.
10759 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10761 * server.c (gdbserver_usage): Mention --remote-debug.
10762 (main): Accept '--remote-debug' switch.
10764 2009-01-18 Doug Evans <dje@google.com>
10766 * regcache.c (new_register_cache): No need to check result of xcalloc.
10767 * server.c (handle_search_memory): Back out calls to xmalloc,
10768 result is checked and error is returned to user upon failure.
10769 (handle_query): Ditto. Add more checks for result of malloc.
10770 (handle_v_cont): Check result of malloc, report error back to
10772 (handle_v_run): Ditto. Call freeargv.
10773 * server.h (freeargv): Declare.
10774 * utils.c (freeargv): New fn.
10776 2009-01-15 Doug Evans <dje@google.com>
10778 * gdbreplay.c (perror_with_name): Make arg const char *.
10779 * server.h (target_signal_to_name): Make return type const char *.
10780 * thread-db.c (thread_db_err_str): Make return type const char *.
10781 * utils.c (perror_with_name): Make arg const char *.
10783 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10785 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10786 when handling a EXIT_PROCESS_DEBUG_EVENT.
10788 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10790 * gdbreplay.c (gdbreplay_version): Update copyright year.
10791 * server.c (gdbserver_version): Likewise.
10793 2009-01-05 Doug Evans <dje@google.com>
10795 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10796 (handle_extended_wait): Improve comment.
10798 2008-12-13 Doug Evans <dje@google.com>
10800 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10801 * server.h (ATTR_MALLOC): New macro.
10802 (xmalloc,xcalloc,xstrdup): Declare.
10803 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10804 * inferiors.c: Ditto.
10805 * linux-low.c: Ditto.
10806 * mem-break.c: Ditto.
10807 * regcache.c: Ditto.
10808 * remote-utils.c: Ditto.
10811 * win32-low.c: Ditto.
10813 2008-12-12 Doug Evans <dje@google.com>
10815 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10816 in debugging printf.
10818 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10820 2008-12-09 Doug Evans <dje@google.com>
10822 * linux-low.h (struct process_info): Delete member tid, unused.
10823 * thread-db.c (find_one_thread): Update.
10824 (maybe_attach_thread): Update.
10826 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10828 * target.h (struct target_ops): Add qxfer_osdata member.
10829 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10831 (linux_qxfer_osdata): New functions.
10832 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10834 * server.c (handle_query): Handle "qXfer:osdata:read:".
10835 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10836 (buffer_xml_printf): New functions.
10837 * server.h (struct buffer): New.
10838 (buffer_grow_str, buffer_grow_str0): New macros.
10839 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10840 (buffer_xml_printf): Declare.
10842 2008-11-24 Doug Evans <dje@google.com>
10844 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10846 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10848 * server.c (handle_v_run): Always use the supplied argument list.
10850 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10852 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10853 (xtensa_regmap_table): Add entry for scompare1.
10855 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10857 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10858 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10859 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10860 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10861 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10862 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10863 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10864 XML target descriptions.
10865 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10866 when inferior is running on an ISA 2.05 or later processor. Add
10867 special case to return offset for full 64-bit slot of FPSCR when
10870 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10872 * Makefile.in (SFILES, clean): Added sparc64 files.
10873 (reg-sparc64.o, reg-sparc64.c): New.
10874 * configure.srv (sparc*-*-linux*): New configuration.
10875 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10876 syscall arguments for SPARC.
10877 (regsets_store_inferior_registers): Likewise.
10878 * linux-sparc-low.c: New file.
10880 2008-10-21 Doug Evans <dje@google.com>
10882 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10883 (READLINE_DIR,READLINE_DEP): Delete.
10884 (INTERNAL_CFLAGS): Update.
10885 (LINTFLAGS): Update.
10887 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10889 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10890 whole argv from the last run, not just argv[0].
10892 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10894 * regcache.c (new_register_cache): Return NULL if the register
10895 cache size isn't known yet.
10896 (free_register_cache): Avoid dereferencing a NULL regcache.
10898 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10900 * configure.srv: Merge MIPS and MIPS64.
10902 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10904 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10906 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10908 * Makefile.in: Add required vsx dependencies.
10910 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10911 Declare init_registers_powerpc_vsx32l.
10912 Declare init_registers_powerpc_vsx64l.
10913 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10914 (ppc_arch_setup): Check for VSX in hwcap.
10915 (ppc_fill_vsxregset): New function.
10916 (ppc_store_vsxregset): New function.
10917 Add new VSX entry in regset_info target_regsets.
10919 * configure.srv: Add new VSX dependencies.
10921 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10923 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10924 (remote_open): Set or clear transport_is_reliable.
10925 (putpkt_binary): Don't expect acks in noack mode.
10926 (getpkt): Don't send ack/nac in noack mode.
10927 * server.c (handle_general_set): Handle QStartNoAckMode.
10928 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10930 (main): Reset noack_mode on every connection.
10931 * server.h (noack_mode): Declare.
10933 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10935 * Makefile.in (GDBREPLAY_OBS): New variable.
10936 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10938 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10939 Daniel Jacobowitz <dan@codesourcery.com>
10941 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10942 (usr_store_inferior_registers): Likewise.
10943 (regsets_store_inferior_registers): Likewise.
10945 2008-07-31 Rolf Jansen <rj@surtec.com>
10946 Pedro Alves <pedro@codesourcery.com>
10948 * configure.ac: Check for memmem declaration.
10949 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10950 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10951 (disable_packet_qfThreadInfo): Unconditionally compile.
10952 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10953 * configure, config.in: Regenerate.
10955 2008-07-28 Doug Kwan <dougkwan@google.com>
10957 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10958 (linux_write_memory): Remove declaration of errno.
10960 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10962 * linux-low.c (handle_extended_wait): Do not use "status"
10963 variable uninitialized.
10965 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10967 * server.c (handle_v_attach): Inhibit reporting dll changes.
10969 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10971 * remote-utils.c (prepare_resume_reply): If requested, don't
10972 output "thread:TID" in the T stop reply.
10974 * server.c (disable_packet_vCont, disable_packet_Tthread)
10975 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10976 (handle_query): If requested, disable support for qC, qfThreadInfo
10978 (handle_v_requests): If requested, disable support for vCont.
10979 (gdbserver_show_disableable): New.
10980 (main): Handle --disable-packet and --disable-packet=LIST.
10982 * server.h (disable_packet_vCont, disable_packet_Tthread)
10983 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10985 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10987 * server.c (gdbserver_usage): Mention --version.
10989 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10991 * Makefile.in (gdbreplay.o): New rule.
10993 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10995 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10996 message, not gdbserver.
10998 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10999 Nathan Sidwell <nathan@codesourcery.com>
11000 Joseph Myers <joseph@codesourcery.com>
11002 * acinclude.m4: Include ../../config/acx.m4.
11003 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11004 * configure, config.in: Regenerate.
11005 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11006 * server.c (gdbserver_version): Print PKGVERSION.
11007 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11008 (main): Adjust gdbserver_usage calls.
11009 * gdbreplay.c (version, host_name): Add declarations.
11010 (gdbreplay_version, gdbreplay_usage): New.
11011 (main): Accept --version and --help options.
11013 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11015 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11016 (arm_breakpoint_at): Handle Thumb.
11017 (the_low_target): Add comment.
11019 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11021 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11023 2008-05-09 Doug Evans <dje@google.com>
11025 * server.h (decode_search_memory_packet): Declare.
11026 * remote-utils.c (decode_search_memory_packet): New fn.
11027 * server.c (handle_search_memory_1): New fn.
11028 (handle_search_memory): New fn.
11029 (handle_query): Process qSearch:memory packets.
11031 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11033 * regcache.c (registers_length): Remove.
11034 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11035 full register packet.
11036 * regcache.h (registers_length): Remove prototype.
11037 * server.h (PBUFSIZ): Define to 16384.
11039 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11041 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11042 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11043 powerpc-64l.o, and powerpc-altivec64l.o.
11044 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11045 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11046 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11047 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11048 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11051 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11052 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11053 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11054 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11055 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11056 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11057 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11058 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11059 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11060 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11063 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11064 (init_registers_powerpc_32l): ... this new prototype.
11065 (init_registers_powerpc_32): Remove, replace by ...
11066 (init_registers_powerpc_altivec32l): ... this new prototype.
11067 (init_registers_powerpc_e500): Remove, replace by ...
11068 (init_registers_powerpc_e500l): ... this new prototype.
11069 (init_registers_ppc64): Remove, replace by ...
11070 (init_registers_powerpc_64l): ... this new prototype.
11071 (init_registers_powerpc_64): Remove, replace by ...
11072 (init_registers_powerpc_altivec64l): ... this new prototype.
11073 (ppc_num_regs): Set to 73.
11074 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11075 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11076 (ppc_cannot_store_register): Handle orig_r3 and trap.
11077 (ppc_arch_setup): Update init_registers_... calls.
11078 (ppc_fill_gregset): Handle orig_r3 and trap.
11080 * inferiors.c (clear_inferiors): Reset current_inferior.
11082 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
11084 * acinclude.m4: Add override.m4.
11085 * configure: Regenerate.
11087 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11089 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11090 initial call to init_register_ppc64.
11092 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11094 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11095 single powerpc*-*-linux* case.
11096 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11098 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11100 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11101 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11103 * linux-ppc-low.c: Include <elf.h>.
11104 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11105 (ppc_hwcap): New global variable.
11106 (ppc_regmap): Remove __SPE__ #ifdef sections.
11107 (ppc_regmap_e500): New global variable.
11108 (ppc_cannot_store_register): Update __SPE__ special case.
11109 (ppc_get_hwcap): New function.
11110 (ppc_arch_setup): Use it to determine whether inferior supports
11111 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11112 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11113 Do not access registers if target does not support AltiVec.
11114 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11115 Do not access registers if target does not support SPE.
11116 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11118 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11120 * linux-low.c (disabled_regsets, num_regsets): New.
11121 (use_regsets_p): Delete.
11122 (linux_wait_for_process): Clear disabled_regsets.
11123 (regsets_fetch_inferior_registers): Check and set it.
11124 (regsets_store_inferior_registers): Likewise.
11125 (linux_fetch_registers, linux_store_registers): Do not use
11127 (initialize_low): Allocate disabled_regsets.
11129 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11131 * Makefile.in (LIBOBJS): New.
11132 (OBS): Use LIBOBJS.
11133 (memmem.o): New rule.
11134 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11135 * configure: Regenerated.
11137 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11139 * server.c (handle_query): Never return "unsupported" for
11140 qXfer:features:read queries.
11142 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11144 * server.c (get_features_xml): Fix inverted condition.
11145 (handle_query): Always support qXfer:feature:read.
11147 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11149 * server.c (wrapper_argv): New.
11150 (start_inferior): Handle wrapper_argv. If set, expect an extra
11152 (gdbserver_usage): Document --wrapper.
11153 (main): Parse --wrapper.
11155 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11157 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11158 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11159 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11160 (ppc_set_pc): Likewise.
11161 (ppc_arch_setup): New function.
11162 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11163 of collect_register.
11164 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11166 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11168 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11169 instead of linux-ppc64-low.o.
11170 * linux-ppc64-low.c: Remove file.
11171 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11172 (linux-ppc64-low.o): Remove rule.
11174 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11175 (init_registers_powerpc_64): Likewise.
11176 (ppc_regmap): Conditionally define depending on __powerpc64__.
11177 (ppc_cannot_store_register): Do not special-case "fpscr" when
11178 compiled on __powerpc64__.
11179 (ppc_collect_ptrace_register): New function.
11180 (ppc_supply_ptrace_register): New function.
11181 (ppc_breakpoint): Change type to "unsigned int".
11182 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11183 (the_low_target): Conditionally provide initializers for the
11184 arch_setup member depending on __powerpc64__. Install
11185 collect_ptrace_register and supply_ptrace_register members.
11187 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11189 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11190 * server.c (gdbserver_xmltarget): Define.
11191 (get_features_xml): Use it to replace "target.xml" and arch_string.
11193 * configure.srv: Remove srv_xmltarget. Add XML files that were
11194 mentioned there to srv_xmlfiles instead. Remove conditional tests
11195 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11196 srv_xmlfiles and srv_regobj to include all possible choices.
11197 * configure.ac (srv_xmltarget): Remove.
11198 (srv_xmlfiles): Do not add "target.xml".
11199 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11200 checks for supplementary target information.
11201 * configure: Regenerate.
11202 * Makefile.in (XML_TARGET): Remove.
11203 (target.xml): Remove rule.
11204 (clean): Do not clean up target.xml.
11205 (.PRECIOUS): Do not mention target.xml.
11207 * target.h (struct target_ops): Remove arch_string member.
11208 * linux-low.c (linux_arch_string): Remove.
11209 (linux_target_ops): Remove arch_string initializer.
11210 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11211 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11212 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11213 * spu-low.c (spu_arch_string): Remove.
11214 (spu_target_ops): Remove arch_string initializer.
11215 * win32-low.c (win32_arch_string): Remove.
11216 (win32_target_ops): Remove arch_string initializer.
11217 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11218 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11219 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11221 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11223 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11224 by collect_ptrace_register and supply_ptrace_register hooks.
11225 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11226 instead of checking for the_low_target.left_pad_xfer.
11227 (usr_store_inferior_registers): Use collect_ptrace_register callback
11228 instead of checking for the_low_target.left_pad_xfer.
11230 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11231 (s390_supply_ptrace_register): Likewise.
11232 (s390_fill_gregset): Call s390_collect_ptrace_register.
11233 (the_low_target): Update.
11235 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11236 (ppc_supply_ptrace_register): Likewise.
11237 (the_low_target): Update.
11239 * linux-i386-low.c (the_low_target): Update.
11240 * linux-x86-64-low.c (the_low_target): Update.
11242 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11244 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11245 reg-s390.o and reg-s390x.o.
11247 * linux-low.c (new_inferior): New global variable.
11248 (linux_create_inferior, linux_attach): Set it.
11249 (linux_wait_for_process): Call the_low_target.arch_setup after the
11250 target has stopped for the first time.
11251 (initialize_low): Do not call the_low_target.arch_setup.
11253 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11254 (s390_set_pc): Likewise.
11255 (s390_arch_setup): New function.
11256 (the_low_target): Use s390_arch_setup as arch_setup routine.
11258 * regcache.c (realloc_register_cache): New function.
11259 (set_register_cache): Call it for each existing regcache.
11261 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11263 * server.h (init_registers): Remove prototype.
11265 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11266 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11267 instead of init_registers ().
11268 * linux-arm-low.c (init_registers_arm): Add prototype.
11269 (init_registers_arm_with_iwmmxt): Likewise.
11270 (the_low_target): Add initializer for arch_setup field.
11271 * linux-cris-low.c (init_registers_cris): Add prototype.
11272 (the_low_target): Add initializer for arch_setup field.
11273 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11274 (the_low_target): Add initializer for arch_setup field.
11275 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11276 (the_low_target): Add initializer for arch_setup field.
11277 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11278 (the_low_target): Add initializer for arch_setup field.
11279 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11280 (the_low_target): Add initializer for arch_setup field.
11281 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11282 (the_low_target): Add initializer for arch_setup field.
11283 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11284 (init_registers_mips64_linux): Likewise.
11285 (the_low_target): Add initializer for arch_setup field.
11286 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11287 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11288 (the_low_target): Add initializer for arch_setup field.
11289 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11290 (init_registers_powerpc_64): Likewise.
11291 (the_low_target): Add initializer for arch_setup field.
11292 * linux-s390-low.c (init_registers_s390): Add prototype.
11293 (init_registers_s390x): Likewise.
11294 (the_low_target): Add initializer for arch_setup field.
11295 * linux-sh-low.c (init_registers_sh): Add prototype.
11296 (the_low_target): Add initializer for arch_setup field.
11297 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11298 (the_low_target): Add initializer for arch_setup field.
11299 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11300 (the_low_target): Add initializer for arch_setup field.
11302 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11303 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11304 instead of init_registers ().
11305 * win32-arm-low.c (init_registers_arm): Add prototype.
11306 (the_low_target): Add initializer for arch_setup field.
11307 * win32-i386-low.c (init_registers_i386): Add prototype.
11308 (the_low_target): Add initializer for arch_setup field.
11310 * spu-low.c (init_registers_spu): Add prototype.
11311 (initialize_low): Call initialie_registers_spu () instead of
11312 initialize_registers ().
11314 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11316 * server.c (handle_v_requests): When handling the vRun and vAttach
11317 packets, if already debugging a process, don't kill it. Return an
11320 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11322 * server.c (handle_query): Correct length check.
11324 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11326 * win32-low.c (do_initial_child_stuff): Add process handle
11327 parameter. Set current_process_handle and current_process_id from the
11328 parameters. Clear globals.
11329 (win32_create_inferior): Don't set current_process_handle and
11330 current_process_id here. Instead pass them on the call to
11331 do_initial_child_stuff.
11332 (win32_attach): Likewise.
11333 (win32_clear_inferiors): New.
11334 (win32_kill): Don't close the current process handle or the
11335 current thread handle here. Instead call win32_clear_inferiors.
11336 (win32_detach): Don't open a new handle to the process. Call
11337 win32_clear_inferiors.
11338 (win32_join): Don't rely on current_process_handle; open a new
11339 handle using the process id.
11340 (win32_wait): Call win32_clear_inferiors when the inferior process
11343 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11345 * server.c (monitor_show_help): Add "exit".
11347 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11349 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11350 (clean): Add reg-xtensa.c.
11351 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11352 * configure.srv (xtensa*-*-linux*) New target.
11353 * linux-xtensa-low.c: New.
11354 * xtensa-xtregs.c: New.
11356 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11358 * hostio.c: Don't include errno.h.
11359 (errno_to_fileio_errno): Move to hostio-errno.
11360 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11361 error number outputting to the target->hostio_last_error callback.
11362 (hostio_packet_error): Use FILEIO_EINVAL directly.
11363 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11364 calls to hostio_error.
11365 * hostio-errno.c: New.
11366 * server.h (hostio_last_error_from_errno): Declare.
11367 * target.h (target_ops): Add hostio_last_error member.
11368 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11369 as hostio_last_error handler.
11370 * spu-low.c (spu_target_ops): Likewise.
11371 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11372 (wince_hostio_last_error): New functions.
11373 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11374 as hostio_last_error handler.
11375 (win32_target_ops) [!_WIN32_WCE]: Register
11376 hostio_last_error_from_errno as hostio_last_error handler.
11377 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11378 (hostio-errno.o): New rule.
11379 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11380 * configure.srv (srv_hostio_err_objs): New variable. Default to
11382 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11383 * configure: Regenerate.
11385 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11387 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11388 (linux_kill, linux_detach): Clean up the process list.
11389 * remote-utils.c (remote_open): Improve port number parsing.
11390 (putpkt_binary, input_interrupt): Only send interrupts if the target
11392 * server.c (extended_protocol): Make static.
11393 (attached): Define earlier.
11394 (exit_requested, response_needed, program_argv): New variables.
11395 (target_running): New.
11396 (start_inferior): Clear attached here.
11397 (attach_inferior): Set attached here.
11398 (require_running): Define.
11399 (handle_query): Use require_running and target_running. Implement
11401 (handle_v_attach, handle_v_run): New.
11402 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11403 (gdbserver_usage): Update.
11404 (main): Redo argument parsing. Handle --debug and --multi. Handle
11405 --attach along with other options or after the port. Save
11406 program_argv. Support no initial program. Resynchronize
11407 communication with GDB after an error. Handle "monitor exit".
11408 Use require_running and target_running. Always allow the extended
11409 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11410 restart in extended mode.
11411 * README: Refer to the GDB manual. Update --attach usage.
11413 2007-12-20 Andreas Schwab <schwab@suse.de>
11415 * linux-low.c (STACK_SIZE): Define.
11416 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11417 (linux_test_for_tracefork): Likewise.
11419 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11421 * linux-low.c (linux_wait_for_event): Update messages. Do not
11422 reinsert auto-delete breakpoints.
11423 * mem-break.c (struct breakpoint): Change return type of handler to
11425 (set_breakpoint_at): Update handler type.
11426 (reinsert_breakpoint_handler): Return 1 instead of calling
11428 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11430 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11431 * mem-break.h (set_breakpoint_at): Update handler type.
11432 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11433 * win32-low.c (auto_delete_breakpoint): New.
11434 (get_child_debug_event): Use it.
11436 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11438 * configure.ac: Check for pread and pwrite.
11439 * hostio.c (handle_pread): Fall back to lseek and read.
11440 (handle_pwrite): Fall back to lseek and write.
11441 * config.in, configure: Regenerated.
11443 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11445 * server.c (myresume): Add own_buf argument.
11446 (main): Update calls.
11448 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11450 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11451 * remote-utils.c (remote_open): Do not call disable_async_io.
11452 (block_async_io): Delete.
11453 (unblock_async_io): Make static.
11454 (initialize_async_io): New.
11455 * server.c (handle_v_cont): Handle async I/O here.
11456 (myresume): Likewise. Move other common resume tasks here...
11457 (main): ... from here. Call initialize_async_io. Disable async
11458 I/O before the main loop.
11459 * server.h (initialize_async_io): Declare.
11460 (block_async_io, unblock_async_io): Delete prototypes.
11461 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11463 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11465 * remote-utils.c (readchar): Allow binary data in received messages.
11467 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11469 * win32-low.c (attaching): New global.
11470 (win32_create_inferior): Clear the `attaching' global.
11471 (win32_attach): Set the `attaching' global.
11472 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11473 attaching. Only set a breakpoint at the entry point if not
11476 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11478 * server.c (main): Don't report dll events on the initial
11479 connection on attaches.
11481 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11483 * server.c (main): Relax numerical bases supported for the pid of
11484 the --attach command line argument.
11486 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11488 * win32-low.c (win32_attach): Call OpenProcess before
11489 DebugActiveProcess, not after. Add last error output to error
11492 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11494 * win32-low.c (win32_get_thread_context)
11495 (win32_set_thread_context): New functions.
11496 (thread_rec): Use win32_get_thread_context.
11497 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11498 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11501 2007-12-03 Leo Zayas
11502 Pedro Alves <pedro_alves@portugalmail.pt>
11504 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11506 (child_add_thread): Minor cleanup.
11507 (child_continue): Resume artificially suspended threads before
11508 calling ContinueDebugEvent.
11509 (suspend_one_thread): New.
11510 (fake_breakpoint_event): New.
11511 (get_child_debug_event): Change return type to int. Check here if
11512 gdb sent an interrupt request. If a soft interrupt was requested,
11513 fake a breakpoint event. Return 0 if there is no event to handle,
11515 (win32_wait): Don't check here if gdb sent an interrupt request.
11516 Ensure there is a valid event to handle.
11517 (win32_request_interrupt): Add soft interruption method as last
11520 2007-12-03 Leo Zayas
11521 Pedro Alves <pedro_alves@portugalmail.pt>
11523 * win32-low.h (win32_thread_info): Add descriptions to the
11524 structure members. Replace `suspend_count' counter by a
11526 * win32-low.c (thread_rec): Update condition of when to get the
11527 context from the inferior. Rely on ContextFlags being set if it
11528 has already been retrieved. Only suspend the inferior thread if
11529 we haven't already. Warn if that fails.
11530 (continue_one_thread): s/suspend_count/suspended/. Only call
11531 ResumeThread once. Warn if that fails.
11533 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11535 * win32-low.c (win32_wait): Don't read from the inferior when it
11536 has already exited.
11538 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11540 * Makefile.in (win32_low_h): New variable.
11541 (win32-low.o): Add dependency on $(win32_low_h).
11542 (win32-arm-low.o, win32-i386-low.o): New rules.
11544 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11546 * hostio.c: Correct copyright year.
11548 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11550 * Makefile.in (OBS): Add hostio.o.
11551 (hostio.o): New rule.
11552 * server.h (handle_vFile): Declare.
11553 * hostio.c: New file.
11554 * server.c (handle_v_requests): Take packet_len and new_packet_len
11555 for binary packets. Call handle_vFile.
11556 (main): Update call to handle_v_requests.
11558 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11560 * linux-low.c: Include <sched.h>.
11562 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11564 * linux-low.c (linux_tracefork_grandchild): New.
11565 (linux_tracefork_child): Use clone.
11566 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11568 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11570 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11572 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11574 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11576 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11578 * inferiors.c (change_inferior_id): Delete.
11579 (add_pid_to_list, pull_pid_from_list): New.
11580 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11581 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11582 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11583 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11584 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11585 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11586 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11587 (using_threads): Always set to 1.
11588 (handle_extended_wait): New.
11589 (add_process): Do not set TID.
11590 (linux_create_inferior): Set must_set_ptrace_flags.
11591 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11592 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11593 (linux_thread_alive): Rename TID argument to LWPID.
11594 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11595 (linux_wait_for_event): Do not use TID or check using_threads. Update
11596 call to dead_thread_notify. Call handle_extended_wait.
11597 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11598 (send_sigstop): Delete sigstop_sent.
11599 (wait_for_sigstop): Avoid TID.
11600 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11601 (linux_test_for_tracefork): New.
11602 (linux_lookup_signals): Use thread_db_active and
11603 linux_supports_tracefork_flag.
11604 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11605 * linux-low.h (get_process_thread): Avoid TID.
11606 (struct process_ifo): Move thread_known and tid to the end. Remove
11608 (linux_attach_lwp, thread_db_init): Update prototypes.
11609 * server.h (change_inferior_id): Delete prototype.
11610 (add_pid_to_list, pull_pid_from_list): New prototypes.
11611 * thread-db.c (thread_db_use_events): New.
11612 (find_first_thread): Rename to...
11613 (find_one_thread): ...this. Update callers and messages. Do not
11614 call fatal. Check thread_db_use_events. Do not call
11615 change_inferior_id or new_thread_notify.
11616 (maybe_attach_thread): Update. Do not call new_thread_notify.
11617 (thread_db_init): Set thread_db_use_events. Check use_events.
11618 * utils.c (fatal, warning): Correct message prefix.
11620 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11622 * Makefile.in (clean): Remove new files.
11623 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11624 (powerpc-64.o, powerpc-64.c): New rules.
11625 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11626 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11628 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11630 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11631 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11632 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11633 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11634 (target_regsets): Add AltiVec and SPE register sets.
11635 * configure.ac: Check for AltiVec and SPE.
11636 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11637 (ppc_fill_vrregset, ppc_store_vrregset): New.
11638 (target_regsets): Add AltiVec register set.
11639 * configure: Regenerated.
11641 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11643 * linux-low.c (O_LARGEFILE): Define.
11644 (linux_read_memory): Use /proc/PID/mem.
11645 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11646 * configure, config.in: Regenerated.
11648 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11650 * linux-low.c (linux_wait_for_event): Do not pass signals while
11653 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11655 * win32-low.c (create_process): New.
11656 (win32_create_inferior): Use create_process instead of
11657 CreateProcess. If create_process failed retry appending an ".exe"
11658 suffix. Store the GetLastError result immediatelly after
11659 create_process calls and use it on the call to error.
11661 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11663 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11665 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11667 * configure.ac: Switch license to GPLv3.
11669 2007-08-01 Michael Snyder <msnyder@access-company.com>
11671 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11673 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11675 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11677 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11678 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11679 CloseToolhelp32Snapshot.
11680 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11681 CloseToolhelp32Snapshot.
11683 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11685 * server.c (main): Check for inferior exit before main loop.
11687 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11689 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11690 instead of on tmp_desc.
11692 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11693 Daniel Jacobowitz <dan@codesourcery.com>
11695 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11696 (add_thread): Minor cleanups.
11697 (clear_inferiors): Move lower in the file. Clear the DLL
11699 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11700 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11701 (xml_escape_text): New.
11702 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11704 (handle_v_cont): Report errors.
11705 (gdbserver_version): Update.
11706 (main): Correct size of own_buf. Do not report initial DLL events.
11707 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11708 (unloaded_dll, xml_escape_text): New.
11709 * win32-low.c (enum target_waitkind): Update comments.
11710 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11711 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11712 (win32_EnumProcessModules, win32_GetModuleInformation)
11713 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11714 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11715 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11716 (win32_Module32First, win32_Module32Next, load_toolhelp)
11717 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11718 (get_child_debug_event): Handle DLL events.
11719 (win32_wait): Likewise.
11721 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11723 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11724 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11726 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11728 * win32-low.c (handle_output_debug_string): Ignore event if not
11731 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11733 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11735 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11737 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11739 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11741 * inferiors.c (change_inferior_id): Add comment.
11742 * linux-low.c (check_removed_breakpoint): Add an early
11743 prototype. Improve debug output.
11744 (linux_attach): Doc update.
11745 (linux_detach_one_process, linux_detach): Clean up before releasing
11747 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11748 * linux-low.h (struct process_info): Doc improvement.
11749 * mem-break.c (delete_all_breakpoints): New.
11750 * mem-break.h (delete_all_breakpoints): New prototype.
11751 * thread-db.c (find_first_thread): New.
11752 (thread_db_create_event): Call it instead of
11753 thread_db_find_new_threads. Clean up unused variables.
11754 (maybe_attach_thread): Remove first thread handling.
11755 (thread_db_find_new_threads): Use find_first_thread.
11756 (thread_db_get_tls_address): Likewise.
11758 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11760 * thread-db.c (thread_db_find_new_threads): Add prototype.
11761 (thread_db_create_event): Check for the main thread before adding
11763 (maybe_attach_thread): Only enable event reporting if TID == 0.
11764 (thread_db_get_tls_address): Check for new threads.
11766 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11768 * linux-low.c (linux_create_inferior): Try execv before execvp.
11769 * spu-low.c (spu_create_inferior): Likewise.
11771 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11773 * linux-low.c (linux_create_inferior): Change execv to execvp.
11774 * spu-low.c (spu_create_inferior): Likewies.
11776 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11778 * Makefile.in (clean): Clean new files instead of deleted ones.
11779 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11780 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11782 * configure.srv: Specify XML files and new regformats for MIPS and
11784 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11785 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11786 an entry for the restart register.
11787 (mips_cannot_fetch_register, mips_cannot_store_register)
11788 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11789 register names to match the XML descriptions.
11790 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11791 restart register instead of $0.
11793 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11794 Markus Deuling <deuling@de.ibm.com>
11796 * remote-utils.c (decode_xfer_write): New function.
11797 * server.h (decode_xfer_write): Add prototype.
11798 * server.c (handle_query): Add PACKET_LEN argument. Support
11799 qXfer:spu:read and qXfer:spu:write packets.
11800 (main): Pass packet_len to handle_query.
11801 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11802 * target.h (target_ops): Add qxfer_spu.
11804 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11806 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11807 accessing non-seekable spufs files.
11809 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11811 * server.c (handle_query): Add reply for qC packet.
11813 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11814 Leo Zayas <lerele@champenstudios@com>
11816 * server.h (check_remote_input_interrupt_request): New function.
11817 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11818 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11819 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11820 (check_remote_input_interrupt_request): New function.
11821 * server.h (check_remote_input_interrupt_request): Declare.
11822 * win32-low.c (winapi_DebugBreakProcess,
11823 winapi_GenerateConsoleCtrlEvent): New typedefs.
11824 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11826 (win32_wait): Check for remote interrupt request
11827 with check_remote_input_interrupt_request.
11828 (win32_request_interrupt): New function.
11829 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11831 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11833 * win32-low.c (debug_registers_changed,
11834 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11835 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11836 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11837 (thread_rec): Get context using the low target.
11838 (child_add_thread): Call thread_added on the low target,
11839 which does the same thing.
11841 (do_initial_child_stuff): Remove debug registers references.
11842 Set context using the low target. Resume threads after
11843 setting the contexts.
11844 (child_continue): Remove dead variable. Remove debug
11845 registers references.
11846 (child_fetch_inferior_registers): Go through the low target.
11847 (do_child_store_inferior_registers): Remove.
11848 (child_store_inferior_registers): Go through the low target.
11849 (win32_resume): Remove debug registers references.
11850 Set context using the low target.
11851 (handle_exception): Change return type to void. Don't record
11852 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11853 first chance exception.
11854 (get_child_debug_event): Change return type to void. Remove
11855 goto loop. Always return after waiting for debug event.
11856 (win32_wait): Convert to switch statement. Handle spurious
11859 * win32-i386-low.c (debug_registers_changed,
11860 debug_registers_used): New.
11861 (initial_stuff): Rename to ...
11862 (i386_initial_stuff): ... this. Clear debug registers
11864 (store_debug_registers): Delete.
11865 (i386_get_thread_context): New.
11866 (load_debug_registers): Delete.
11867 (i386_set_thread_context): New.
11868 (i386_thread_added): New.
11869 (single_step): Rename to ...
11870 (i386_single_step): ... this.
11871 (do_fetch_inferior_registers): Rename to ...
11872 (i386_fetch_inferior_register): ... this.
11873 (i386_store_inferior_register): New.
11874 (the_low_target): Adapt to new interface.
11876 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11877 (arm_get_thread_context): New.
11878 (arm_set_thread_context): New.
11880 (do_fetch_inferior_registers): Rename to ...
11881 (arm_fetch_inferior_register): ... this.
11882 (arm_store_inferior_register): New.
11883 (arm_wince_breakpoint): Reimplement as unsigned long.
11884 (arm_wince_breakpoint_len): Define.
11885 (the_low_target): Adapt to new interface.
11887 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11888 load_debug_registers. Add get_thread_context, set_thread_context,
11889 thread_added and store_inferior_register. Rename
11890 fetch_inferior_registers to fetch_inferior_register.
11891 (regptr): Remove declaration.
11893 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11895 * linux-low.c (linux_detach): Change return type to int. Return 0.
11896 * spu-low.c (spu_detach): Likewise.
11898 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11900 * target.h (target_ops): Change return type of detach to int.
11902 (join_inferior): New.
11903 * server.c (main): Don't skip detach support on mingw32.
11904 If the inferior doesn't support detaching return error.
11905 Call join_inferior instead of using waitpid.
11906 * linux-low.c (linux_join): New.
11907 (linux_target_op): Add linux_join.
11908 * spu-low.c (spu_join): New.
11909 (spu_target_ops): Add spu_join.
11910 * win32-low.c (win32_detach): Adapt to new interface.
11911 Reopen current_process_handle before detaching. Issue a child
11912 resume before detaching.
11914 (win32_target_op): Add win32_join.
11916 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11918 * win32-low.c (win32-attach): Fix return value.
11919 * target.h (target_ops): Describe ATTACH return values.
11921 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11923 * win32-low.c (GETPROCADDRESS): Define.
11924 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11925 (winapi_DebugSetProcessKillOnExit): Likewise.
11926 (win32_create_inferior): Force usage of ansi CreateProcessA.
11927 (win32_attach): Use GETPROCADDRESS.
11928 (win32_detach): Likewise.
11930 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11932 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11934 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11936 * win32-low.c: Commit leftover changes from 2007-03-29.
11938 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11940 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11941 fields short instead of int. Add explicit padding.
11942 (i387_cache_to_fsave): Remove unnecessary casts.
11943 (i387_fsave_to_cache): Doc fix.
11944 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11946 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11948 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11949 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11951 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11953 * configure.srv (arm*-*-mingw32ce*): Move near the other
11956 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11958 * configure.ac: Add errno checking.
11959 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11960 sys/file.h and malloc.h.
11961 (AC_CHECK_DECLS): Add perror.
11962 (srv_mingwce): Handle.
11963 * configure.srv (i[34567]86-*-cygwin*): Add
11964 win32-i386-low.o to srv_tgtobj.
11965 (i[34567]86-*-mingw*): Likewise.
11966 (arm*-*-mingw32ce*): Add case.
11967 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11968 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11969 [__MINGW32CE__] (strerror): New function.
11970 [__MINGW32CE__] (errno): Define to GetLastError.
11971 [__MINGW32CE__] (COUNTOF): New macro.
11972 (remote_open): Remove extra close call.
11973 * mem-break.c (delete_breakpoint_at): New function.
11974 * mem-break.h (delete_breakpoint_at): Declare.
11975 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11976 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11977 [USE_WIN32API] (read, write): Add char* casts.
11978 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11979 * server.h: Include wincecompat.h on Windows CE.
11980 [HAVE_ERRNO_H]: Check.
11981 (perror): Declare if not declared.
11982 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11983 (perror_with_name): Remove errno declaration.
11984 * wincecompat.h: New.
11985 * wincecompat.c: New.
11986 * win32-low.h: New.
11987 * win32-arm-low.c: New.
11988 * win32-i386-low.c: New.
11989 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11990 (OUTMSG2): Make it safe.
11992 (COUNTOF): New macro.
11993 (NUM_REGS): Get it from the low target.
11994 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11995 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11996 (thread_rec): Let low target handle debug registers.
11997 (child_add_thread): Likewise.
11998 (child_init_thread_list): Likewise.
11999 (continue_one_thread): Likewise.
12001 (do_child_fetch_inferior_registers): Move to ...
12002 * win32-i386-low.c: ... here, and rename to ...
12003 (do_fetch_inferior_registers): ... this.
12004 * win32-low.c (child_fetch_inferior_registers):
12005 Go through the low target.
12006 (do_child_store_inferior_registers): Use regptr.
12007 (strwinerror): New function.
12008 (win32_create_inferior): Handle Windows CE.
12009 Use strwinerror instead of strerror on Windows error
12010 codes. Add program to the error output.
12011 Don't close the main thread handle on Windows CE.
12012 (win32_attach): Use coredll.dll on Windows CE.
12013 (win32_kill): Close current process and current
12015 (win32_detach): Use coredll.dll on Windows CE.
12016 (win32_resume): Let low target handle debug registers, and
12018 (handle_exception): Add/Remove initial breakpoint. Avoid
12019 non-existant WSTOPSIG on Windows CE.
12020 (win32_read_inferior_memory): Cast to remove warning.
12021 (win32_arch_string): Go through the low target.
12022 (initialize_low): Call set_breakpoint_data with the low
12023 target's breakpoint.
12024 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12025 FOP_REGNUM, mappings): Move to ...
12026 * win32-i386-low.c: ... here.
12027 * win32-low.c (win32_thread_info): Move to ...
12028 * win32-low.h: ... here.
12029 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12030 win32-arm-low.c and wincecompat.c.
12031 (all:): Add $EXEEXT.
12032 (install-only:): Likewise.
12033 (gdbserver:): Likewise.
12034 (gdbreplay:): Likewise.
12035 * config.in: Regenerate.
12036 * configure: Regenerate.
12038 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12040 * win32-low.c: Rename typedef thread_info to
12041 win32_thread_info throughout.
12043 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12045 * win32-i386-low.c: Rename to ...
12046 * win32-low.c: ... this.
12047 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12048 * Makefile.in: Likewise.
12050 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12052 * remote-utils.c (monitor_output): Constify msg parameter.
12053 * server.h (monitor_output): Likewise.
12054 * win32-i386-low.c (handle_output_debug_string): New.
12055 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12056 handle_output_debug_string.
12057 (get_child_debug_event): Likewise.
12059 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12061 * server.c (main): Correct strtoul check.
12063 2007-03-27 Jon Ringle <jon@ringle.org>
12065 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12067 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12069 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12071 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12073 * terminal.h: Check HAVE_SGTTY_H.
12075 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12077 * remote-utils.c (remote_open): Print out the assigned port number.
12079 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12081 * remote-utils.c (monitor_output): New function.
12082 * server.c (debug_threads): Define here.
12083 (monitor_show_help): New function.
12084 (handle_query): Handle qRcmd.
12085 (main): Do not handle 'd' packet.
12086 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12087 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12090 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12092 * Makefile.in (EXEEXT): New.
12093 (clean): Use $(EXEEXT).
12095 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12097 * target.h (target_ops): Rename send_signal to request_interrupt,
12098 and remove enum target_signal parameter.
12099 * linux-low.c (linux_request_interrupt): Rename from
12100 linux_send_signal, and always send SIGINT.
12101 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12102 and always send SIGINT.
12103 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12105 (input_interrupt): Likewise.
12107 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12109 * server.c (get_features_xml): Check if target implemented
12111 * win32-i386-low.c (win32_arch_string): New.
12112 (win32_target_ops): Add win32_arch_string as arch_string member.
12114 2007-02-22 Markus Deuling <deuling@de.ibm.com>
12116 * spu-low.c (spu_arch_string): New.
12117 (spu_target_ops): Add spu_arch_string.
12119 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12121 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12122 * configure.ac: Do not check for terminal.h.
12123 * configure, config.in: Regenerated.
12125 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12127 * Makefile.in (OBS): Add $(XML_BUILTIN).
12128 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12130 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12131 (arm-with-iwmmxt.c): New.
12132 * config.in, configure: Regenerate.
12133 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12134 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12135 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12136 (arm*-*-linux*): Add iWMMXt and regset support.
12137 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12138 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12139 (arm_store_wmmxregset, target_regsets): New.
12140 * server.c (get_features_xml): Take annex argument. Check builtin
12142 (handle_query): Handle multiple annexes.
12144 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12146 * remote-utils.c [USE_WIN32API] (read, write): Define.
12147 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12150 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12152 * linux-i386-low.c (the_low_target): Set arch_string.
12153 * linux-x86-64-low.c (the_low_target): Likewise.
12154 * linux-low.c (linux_arch_string): New.
12155 (linux_target_ops): Add it.
12156 * linux-low.h (struct linux_target_ops): Add arch_string.
12157 * server.c (write_qxfer_response): Use const void * for DATA.
12158 (get_features_xml): New.
12159 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12160 * target.h (struct target_ops): Add arch_string method.
12162 2007-01-03 Denis Pilat <denis.pilat@st.com>
12163 Daniel Jacobowitz <dan@codesourcery.com>
12165 * linux-low.c (linux_kill): Handle being called with no threads.
12166 * win32-i386-low.c (win32_kill): Likewise.
12167 (get_child_debug_event): Clear current_process_handle.
12169 2006-12-30 Denis PILAT <denis.pilat@st.com>
12170 Daniel Jacobowitz <dan@codesourcery.com>
12172 * remote-utils.c (remote_open): Check the type of specified
12173 serial port devices before opening them.
12174 * server.c (main): Kill the inferior if an error occurs during
12175 the first remote_open.
12177 2006-12-05 Markus Deuling <deuling@de.ibm.com>
12179 * README: Update supported targets.
12181 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12183 * Makefile.in (clean): Remove reg-mips64.c.
12184 (reg-mips64.c, reg-mips64.o): New rules.
12185 * configure.srv: Handle mips64. Include regset support for mips.
12186 * linux-mips-low.c (union mips_register): New.
12187 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12188 (mips_breakpoint, mips_breakpoint_at): Use int.
12189 (mips_collect_register, mips_supply_register)
12190 (mips_collect_register_32bit, mips_supply_register_32bit)
12191 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12192 (mips_store_fpregset, target_regsets): New.
12193 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12195 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12197 * configure.srv: Add target "spu*-*-*".
12198 * Makefile.in (clean): Remove reg-spu.c.
12199 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12200 * spu-low.c: New file.
12202 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12204 * configure.ac: Correct td_thr_tls_get_addr test.
12205 * configure: Regenerated.
12207 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12209 * linux-low.c (linux_wait_for_event): Reformat. Use the
12210 pass_signals array.
12211 * remote-utils.c (decode_address_to_semicolon): New.
12212 * server.c (pass_signals, handle_general_set): New.
12213 (handle_query): Mention QPassSignals for qSupported.
12214 (main): Call handle_general_set.
12215 * server.h (pass_signals, decode_address_to_semicolon): New.
12217 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12219 * server.c (handle_query): Correct error handling for read_auxv.
12221 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12223 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12224 and srv_linux_thread_db to yes.
12225 * linux-s390-low.c (s390_fill_gregset): New function.
12226 (target_regsets): Define data structure.
12228 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12230 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12231 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12232 * config.in, configure: Regenerated.
12233 * inferiors.c (gdb_id_to_thread): New function.
12234 (gdb_id_to_thread_id): Use it.
12235 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12236 * linux-low.h (struct process_info): Add th member.
12237 (thread_db_get_tls_address): New prototype.
12238 * remote-utils.c (decode_address): Make non-static.
12239 * server.c (handle_query): Handle qGetTLSAddr.
12240 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12241 * target.h (struct target_ops): Add get_tls_address.
12242 * thread-db.c (maybe_attach_thread): Save the thread handle.
12243 (thread_db_get_tls_address): New.
12245 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12247 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12248 (linux_resume_one_process): Take a siginfo_t *. Update all
12249 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12250 (struct pending_signals): Add a siginfo_t.
12251 (linux_wait_for_process): Always set last_status.
12252 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12253 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12254 * linux-low.h (struct process_info): Add last_status.
12256 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12258 * remote-utils.c (try_rle): New function.
12259 (putpkt_binary): Use it.
12261 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12263 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12264 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12265 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12266 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12267 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12270 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12272 * server.c (terminal_fd): New variable.
12273 (old_foreground_pgrp): Likewise.
12274 (restore_old_foreground_pgrp): New function.
12275 (start_inferior): Record the terminal file descriptor in terminal_fd
12276 and its original foreground group in old_foreground_pgrp. Register
12277 restore_old_foreground_pgrp with atexit().
12279 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12281 * server.c (handle_query): Correct qPart to qXfer.
12283 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12285 * configure.ac: Check for more headers which are missing on
12286 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12287 * configure.srv: Add Cygwin and mingw32.
12288 * remote-utils.c: Don't include headers unconditionally which
12289 are missing on mingw32. Include <winsock.h> for mingw32.
12290 (remote_open): Adjust for mingw32 support. Flush
12291 standard error after writing to it.
12292 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12293 (unblock_async_io, enable_async_io, disable_async_io)
12294 (readchar, getpkt): Update for Winsock support.
12295 (prepare_resume_reply): Expect a protocol signal number.
12296 * server.c: Disable <sys/wait.h> on mingw32.
12297 (start_inferior): Adjust for mingw32 support. Flush
12298 standard error after writing to it.
12299 (attach_inferior): Likewise. Use protocol signal
12301 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12303 * win32-i386-low.c: New file.
12304 * Makefile.in (XM_CLIBS): Set.
12305 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12306 (win32-i386-low.o): New dependency rule.
12307 * linux-low.c (linux_wait): Use target signal numbers.
12308 * target.h (struct target_ops): Doc fix.
12309 * server.h (target_signal_to_name): New prototype.
12310 * gdbreplay.c: Don't include headers unconditionally which
12311 are missing on mingw32. Include <winsock.h> for mingw32.
12312 (remote_close, remote_open): Adjust for Winsock support.
12313 * configure, config.in: Regenerated.
12315 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12317 * server.c (decode_xfer_read, write_qxfer_response): New.
12318 (handle_query): Take a packet length argument. Handle
12319 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12320 the qSupported response.
12321 (main): Update call to handle_query.
12323 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12325 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12326 (putpkt_binary): Renamed from putpkt and adjusted for binary
12328 (putpkt): New wrapper for putpkt_binary.
12329 (readchar): Don't mask off the high bit.
12330 (decode_X_packet): New function.
12331 * server.c (main): Call putpkt_binary if a handler sets the packet
12332 length. Save the length of the incoming packet. Handle 'X'.
12333 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12335 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12337 * server.c (handle_query): Handle qSupported.
12339 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12341 * remote-utils.c (all_symbols_looked_up): New variable.
12342 (look_up_one_symbol): Check it.
12343 * server.h (look_up_one_symbol): New declaration.
12344 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12346 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12348 * Makefile.in (linux-arm-low.o): Update dependencies.
12349 * linux-arm-low.c: Include "gdb_proc_service.h".
12350 (PTRACE_GET_THREAD_AREA): Define.
12351 (ps_get_thread_area): New function.
12353 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12355 * configure.srv (m68k*-*-uclinux*): New target.
12356 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12357 (linux_resume_one_process): Remove extraneous cast.
12358 (linux_read_offsets): New.
12359 (linux_target_op): Add linux_read_offsets on mmuless systems.
12360 * server.c (handle_query): Add qOffsets logic.
12361 * target.h (struct target_ops): Add read_offsets.
12363 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12365 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12366 (PTRACE_GET_THREAD_AREA): Define.
12367 (ps_get_thread_area): New function.
12368 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12369 (linux-x86-64-low.o): Update.
12371 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12373 * configure.ac: Remove checks for prfpregset_t.
12374 * gdb_proc_service.h: New file.
12375 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12376 new "gdb_proc_service.h".
12377 * proc-service.c: Likewise.
12378 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12379 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12380 * Makefile.in (gdb_proc_service_h): Updated.
12381 * configure, config.in: Regenerated.
12383 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12385 * remote-utils.c (prepare_resume_reply): Move declaration
12386 of gdb_id_from_wait to the top of the block.
12388 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12390 * linux-low.c (regsets_store_inferior_registers): Read the regset
12391 from the target before filling it.
12393 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12395 * server.c (attach_inferior): Return SIGTRAP for a successful
12398 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12400 * Makefile.in (OBS): Add version.o.
12401 (STAGESTUFF): Delete.
12402 (version.o): Add dependencies.
12403 (version.c): Replace rule.
12404 (clean): Remove version.c.
12405 * server.c (gdbserver_version): New.
12406 (gdbserver_usage): Use printf.
12407 (main): Handle --version and --help.
12408 * server.h (version, host_name): Add declarations.
12410 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12422 * linux-x86-64-low.c:
12424 * linux-s390-low.c:
12425 * linux-ppc64-low.c:
12427 * linux-mips-low.c:
12428 * linux-m68k-low.c:
12429 * linux-m32r-low.c:
12432 * linux-ia64-low.c:
12433 * linux-i386-low.c:
12434 * linux-crisv32-low.c:
12446 * gdbserver.1: Add (C) after Copyright. Update the FSF
12449 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12451 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12452 (arm_breakpoint_at): Recognize both breakpoints.
12453 (the_low_target): Use the correct breakpoint instruction.
12455 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12457 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12458 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12459 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12460 (the_low_target): Update.
12462 2005-10-25 Andreas Schwab <schwab@suse.de>
12464 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12466 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12467 (ia64_num_regs): Reduce to 462.
12469 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12471 * acinclude.m4: Correct quoting.
12472 * aclocal.m4: Regenerated.
12474 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12475 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12476 (thread_db_init): Call thread_db_err_str.
12477 * configure.ac: Check for TD_VERSION.
12478 * config.in, configure: Regenerated.
12480 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12482 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12484 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12486 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12487 is not available. Define HAVE_PTRACE_GETREGS if it is.
12488 * config.in, configure: Regenerated.
12489 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12490 * linux-i386-low.c, linux-m68k-low.c: Update to use
12491 HAVE_PTRACE_GETREGS.
12492 * linux-low.c (regsets_fetch_inferior_registers)
12493 (regsets_store_inferior_registers): Only return 0 if we processed
12495 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12496 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12498 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12500 * inferiors.c (struct thread_info): Add gdb_id.
12501 (add_thread): Add gdb_id argument.
12502 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12503 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12504 calls to add_thread.
12505 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12506 * server.c (handle_query): Use thread_to_gdb_id.
12507 (handle_v_cont, main): Use gdb_id_to_thread_id.
12508 * server.h (add_thread): Update prototype.
12509 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12512 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12514 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12515 left-padded registers.
12516 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12517 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12519 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12521 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12522 * configure: Regenerate.
12523 * config.in: Regenerate.
12524 * server.h (NEED_DECLARATION_STRERROR):
12525 Replace with !HAVE_DECL_STRERROR.
12527 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12529 * linux-low.c (linux_wait, linux_send_signal): Don't test
12530 an unsigned long variable for > 0 if it could be MAX_ULONG.
12531 * server.c (myresume): Likewise.
12532 * target.c (set_desired_inferior): Likewise.
12534 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12536 * configure.ac: Simplify and improve check for socklen_t.
12537 * configure, config.in: Regenerate.
12539 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12541 * acconfig.h: Remove.
12542 * configure.ac: Add a test for socklen_t. Use three-argument
12543 AC_DEFINE throughout.
12544 * config.in: Regenerated using autoheader 2.59.
12545 * configure: Regenerated.
12547 * gdbreplay.c (socklen_t): Provide a default.
12548 (remote_open): Use socklen_t.
12549 * remote-utils.c (socklen_t): Provide a default.
12550 (remote_open): Use socklen_t.
12551 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12554 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12556 * linux-low.c (linux_read_memory, linux_write_memory)
12557 (linux_read_auxv): Likewise.
12558 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12559 (check_mem_write): Likewise.
12560 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12562 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12563 (registers_from_string, register_data): Likewise.
12564 * server.c (handle_query, main): Likewise.
12565 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12566 (decode_M_packet): Likewise.
12567 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12568 * target.h (struct target_ops): Update read_memory, write_memory,
12570 (read_inferior_memory, write_inferior_memory): Update.
12571 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12572 to unsigned char *.
12573 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12574 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12575 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12576 linux-s390-low.c, linux-sh-low.c: Update for changes in
12577 read_inferior_memory and the_low_target->breakpoint.
12579 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12581 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12582 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12583 * configure.srv: Add powerpc64-*-linux*.
12584 * linux-ppc64-low.c: New file.
12586 2005-05-23 Orjan Friberg <orjanf@axis.com>
12588 * linux-cris-low.c: New file with support for CRIS.
12589 * linux-crisv32-low.c: Ditto for CRISv32.
12590 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12591 (clean): Add reg-cris.c and reg-crisv32.c.
12592 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12593 reg-crisv32.o, and reg-crisv32.c to make rules.
12594 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12595 recognized targets.
12597 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12599 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12600 of sizeof (PTRACE_XFER_TYPE).
12601 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12603 2005-05-12 Orjan Friberg <orjanf@axis.com>
12605 * target.h (struct target_ops): Add insert_watchpoint,
12606 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12607 pointers for hardware watchpoint support.
12608 * linux-low.h (struct linux_target_ops): Ditto.
12609 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12610 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12611 to linux_target_ops.
12612 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12614 * server.c (main): Recognize 'Z' and 'z' packets.
12616 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12618 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12619 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12620 (the_low_target): Add new members.
12622 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12624 * proc-service.c (ps_lgetregs): Search all_processes instead of
12627 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12629 * server.c (start_inferior): Change return type to int.
12630 (attach_inferior): Change sigptr to int *.
12631 (handle_v_cont, handle_v_requests): Change signal to int *.
12632 (main): Change signal to int.
12634 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12636 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12637 * configure.srv: Add m32r*-*-linux*.
12638 * linux-m32r-low.c: New file.
12640 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12642 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12644 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12646 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12647 Take unsigned long arguments for PIDs.
12648 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12649 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12650 (wait_for_sigstop, linux_resume_one_process)
12651 (regsets_fetch_inferior_registers, linux_send_signal)
12652 (linux_read_auxv): Likewise. Update the types of variables holding
12653 PIDs. Update format string specifiers.
12654 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12655 * remote-utils.c (prepare_resume_reply): Likewise.
12656 * server.c (cont_thread, general_thread, step_thread)
12657 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12659 (handle_query): Update format specifiers.
12660 (handle_v_cont, main): Use strtoul for thread IDs.
12661 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12662 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12663 (general_thread, step_thread, thread_from_wait)
12664 (old_thread_from_wait): Update.
12665 * target.h (struct thread_resume): Use unsigned long for THREAD.
12666 (struct target_ops): Use unsigned long for arguments to attach and
12669 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12671 * acinclude.m4: Include bfd/bfd.m4 directly.
12672 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12673 <agriffis@toolchain.org>.
12674 * aclocal.m4, configure: Regenerated.
12676 2005-01-07 Andrew Cagney <cagney@gnu.org>
12678 * configure.ac: Rename configure.in, require autoconf 2.59.
12679 * configure: Re-generate.
12681 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12683 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12684 LIBS when finished.
12685 * aclocal.m4: Regenerated.
12686 * configure: Regenerated.
12688 2004-11-21 Andreas Schwab <schwab@suse.de>
12690 * linux-m68k-low.c (m68k_num_gregs): Define.
12691 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12692 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12693 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12694 (m68k_breakpoint_at): New. Add to the_low_target.
12696 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12697 srv_linux_thread_db to yes.
12699 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12701 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12702 (ARCH_SET_FS): Likewise.
12703 (ARCH_GET_FS): Likewise.
12704 (ARCH_GET_GS): Likewise.
12706 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12708 * linux-i386-low.c (ps_get_thread_area): New.
12709 * linux-x86-64-low.c (ps_get_thread_area): New.
12710 * linux-low.c: Include <sys/syscall.h>.
12711 (linux_kill_one_process): Don't kill the first thread here.
12712 (linux_kill): Kill the first thread here.
12713 (kill_lwp): New function.
12714 (send_sigstop, linux_send_signal): Use it.
12715 * proc-service.c: Clean up #ifdefs.
12716 (fpregset_info): Delete.
12717 (ps_lgetregs): Update and enable implementation.
12718 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12720 * remote-utils.c (struct sym_cache, symbol_cache): New.
12721 (input_interrupt): Print a clearer message.
12722 (async_io_enabled): New variable.
12723 (enable_async_io, disable_async_io): Use it. Update comments.
12724 (look_up_one_symbol): Use the symbol cache.
12725 * thread-db.c (thread_db_look_up_symbols): New function.
12726 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12728 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12730 * configure.in: Test for -rdynamic.
12731 * configure: Regenerated.
12732 * Makefile (INTERNAL_LDFLAGS): New.
12733 (gdbserver, gdbreplay): Use it.
12735 2004-09-02 Andrew Cagney <cagney@gnu.org>
12737 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12739 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12741 * linux-low.c (linux_wait): Clear all_processes list also.
12743 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12745 * linux-low.c: Include <errno.h>. Remove extern declaration of
12748 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12750 * gdbreplay.c, server.h, utils.c: Update copyright years.
12752 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12754 * server.c (main): Print child status or termination signal from
12755 variable 'signal', not 'sig'.
12757 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12759 * linux-low.c (linux_read_memory): Change return type to
12760 int. Check for and return error from ptrace().
12761 * target.c (read_inferior_memory): Change return type to int. Pass
12762 back return status from the_target->read_memory().
12763 * target.h (struct target_ops): Adapt *read_memory() prototype.
12765 (read_inferior_memory): Adapt prototype.
12766 * server.c (main): Return an error packet if
12767 read_inferior_memory() returns an error.
12769 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12771 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12772 Unify with other clean targets.
12774 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12776 * server.c (handle_v_cont): Call set_desired_inferior.
12778 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12780 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12782 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12784 * linux-low.c (linux_wait): Unblock async I/O.
12785 (linux_resume): Block and enable async I/O.
12786 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12787 * server.h (block_async_io, unblock_async_io): Add prototypes.
12789 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12791 * remote-utils.c (remote_open): Print a status notice after
12792 opening a TCP port.
12793 * server.c (attach_inferior): Print a status notice after
12796 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12798 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12800 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12802 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12804 * server.c, target.h: Update copyright years.
12806 2004-02-25 Roland McGrath <roland@redhat.com>
12808 * target.h (struct target_ops): New member `read_auxv'.
12809 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12810 * linux-low.c (linux_read_auxv): New function.
12811 (linux_target_ops): Initialize `read_auxv' member to that.
12813 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12815 Committed by Jim Blandy <jimb@redhat.com>.
12817 * linux-s390-low.c (s390_num_regs): Update.
12818 (s390_regmap): Remove control registers. Use __s390x__ predefine
12819 instead of GPR_SIZE to distiguish s390 and s390x targets.
12821 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12823 * linux-low.c: Update copyright year.
12824 (check_removed_breakpoint): Clear pending_is_breakpoint.
12825 (linux_set_resume_request, linux_queue_one_thread)
12826 (resume_status_pending_p): New functions.
12827 (linux_continue_one_thread): Use process->resume.
12828 (linux_resume): Only resume threads if there are no pending events.
12829 * linux-low.h (struct process_info): Add resume request
12832 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12834 * regcache.c (new_register_cache): Clear the allocated register
12835 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12837 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12839 * linux-low.c (linux_resume): Take a struct thread_resume *
12841 (linux_wait): Update call.
12842 (resume_ptr): New static variable.
12843 (linux_continue_one_thread): Renamed from
12844 linux_continue_one_process. Use resume_ptr.
12845 (linux_resume): Use linux_continue_one_thread.
12846 * server.c (handle_v_cont, handle_v_requests): New functions.
12847 (myresume): New function.
12848 (main): Handle 'v' case.
12849 * target.h (struct thread_resume): New type.
12850 (struct target_ops): Change argument of "resume" to struct
12852 (myresume): Delete macro.
12854 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12856 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12857 (uninstall): Support DESTDIR.
12859 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12861 * configure.srv: Add xscale*linux copy of arm*linux entry.
12863 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12865 * linux-arm-low.c (arm_reinsert_addr): New function.
12866 (the_low_target): Add arm_reinsert_addr.
12868 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12870 * mem-break.c: Remove whitespace at end of file.
12872 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12874 * configure.in: Check whether we need to prototype strerror.
12875 * server.h: Optionally prototype strerror.
12876 * gdbreplay.c (perror_with_name): Use strerror.
12877 * linux-low.c (linux_attach_lwp): Use strerror.
12878 * utils.c (perror_with_name): Use strerror.
12879 * config.in, configure: Regenerated.
12881 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12883 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12884 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12886 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12888 * Makefile.in (SFILES): Update.
12889 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12890 low-sun3.c: Remove files.
12892 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12894 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12895 (linux_detach_one_process, linux_detach): New functions.
12896 (linux_target_ops): Add linux_detach.
12897 * server.c (main): Handle 'D' packet.
12898 * target.h (struct target_ops): Add "detach" member.
12899 (detach_inferior): Define.
12901 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12903 From Kelley Cook <kelleycook@wideopenwest.com>:
12904 * configure.srv: Accept i[34567]86 variants.
12906 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12908 * linux-low.c (linux_wait_for_event): Correct comment typos.
12909 (linux_resume_one_process): Call check_removed_breakpoint.
12910 (linux_send_signal): New function.
12911 (linux_target_ops): Add linux_send_signal.
12912 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12914 * target.h (struct target_ops): Add send_signal.
12916 2003-05-29 Jim Blandy <jimb@redhat.com>
12918 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12919 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12920 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12921 away part of the register's value.
12923 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12925 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12926 (linux_wait_for_event, linux_init_signals): Likewise.
12928 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12930 * configure.in: Check for stdlib.h.
12931 * configure: Regenerated.
12932 * config.in: Regenerated.
12934 2003-01-04 Andreas Schwab <schwab@suse.de>
12936 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12938 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12940 * Makefile.in: Remove obsolete code.
12942 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12944 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12945 defined(PT_FPR0_HI).
12947 2002-11-17 Stuart Hughes <seh@zee2.com>
12949 * linux-arm-low.c (arm_num_regs): Increase.
12950 (arm_regmap): Include status register.
12952 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12954 * linux-low.c (register_addr): Remove incorrect -1 check.
12956 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12958 * linux-low.c (linux_create_inferior): Call setpgid. Return
12960 (unstopped_p, linux_signal_pid): Remove.
12961 (linux_target_ops): Remove linux_signal_pid.
12962 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12963 global instead of target method.
12964 * target.h (struct target_ops): Remove signal_pid. Update comment
12965 for create_inferior.
12966 * server.c (signal_pid): New variable.
12967 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12968 gdbserver. Set the child to be the foreground process group.
12969 (attach_inferior): Set signal_pid.
12971 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12973 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12975 2002-08-20 Jim Blandy <jimb@redhat.com>
12977 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12980 2002-08-01 Andrew Cagney <cagney@redhat.com>
12982 * Makefile.in: Make chill references obsolete.
12984 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12986 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12987 * configure: Regenerate.
12988 * config.in: Regenerate.
12990 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12992 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12993 (perror_with_name, remote_close, remote_open, expect, play): Static.
12995 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12997 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12998 byte offsets instead of an array of indexes.
12999 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13001 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
13003 * regcache.c: Add comment.
13005 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
13007 * thread-db.c: New file.
13008 * proc-service.c: New file.
13009 * acinclude.m4: New file.
13010 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13011 proc-service.o, and thread-db.o.
13012 (linux-low.o): Add USE_THREAD_DB.
13013 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13014 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13015 * aclocal.m4: Regenerated.
13016 * config.in: Regenerated.
13017 * configure: Regenerated.
13018 * configure.in: Check for proc_service.h, sys/procfs.h,
13019 thread_db.h, and linux/elf.h headrs.
13020 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13021 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13022 Check for -lthread_db and thread support.
13023 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13024 PowerPC, and SuperH.
13025 * i387-fp.c: Constify arguments.
13026 * i387-fp.h: Likewise.
13027 * inferiors.c: (struct thread_info): Renamed from
13028 `struct inferior_info'. Remove PID member. Use generic inferior
13029 list header. All uses updated.
13030 (inferiors, signal_pid): Removed.
13031 (all_threads): New variable.
13032 (get_thread): Define.
13033 (add_inferior_to_list): New function.
13034 (for_each_inferior): New function.
13035 (change_inferior_id): New function.
13036 (add_inferior): Removed.
13037 (remove_inferior): New function.
13038 (add_thread): New function.
13039 (free_one_thread): New function.
13040 (remove_thread): New function.
13041 (clear_inferiors): Use for_each_inferior and free_one_thread.
13042 (find_inferior): New function.
13043 (find_inferior_id): New function.
13044 (inferior_target_data): Update argument type.
13045 (set_inferior_target_data): Likewise.
13046 (inferior_regcache_data): Likewise.
13047 (set_inferior_regcache_data): Likewise.
13048 * linux-low.c (linux_bp_reinsert): Remove.
13049 (all_processes, stopping_threads, using_thrads)
13050 (struct pending_signals, debug_threads, pid_of): New.
13051 (inferior_pid): Replace with macro.
13052 (struct inferior_linux_data): Remove.
13053 (get_stop_pc, add_process): New functions.
13054 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13055 Use add_process and add_thread.
13056 (linux_attach_lwp): New function, based on old linux_attach. Use
13057 add_process and add_thread. Set stop_expected for new threads.
13058 (linux_attach): New function.
13059 (linux_kill_one_process): New function.
13060 (linux_kill): Kill all LWPs.
13061 (linux_thread_alive): Use find_inferior_id.
13062 (check_removed_breakpoints, status_pending_p): New functions.
13063 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13064 Update. Use WNOHANG. Wait for cloned processes also. Update process
13065 struct for the found process.
13066 (linux_wait_for_event): New function.
13067 (linux_wait): Use it. Support LWPs.
13068 (send_sigstop, wait_for_sigstop, stop_all_processes)
13069 (linux_resume_one_process, linux_continue_one_process): New functions.
13070 (linux_resume): Support LWPs.
13071 (REGISTER_RAW_SIZE): Remove.
13072 (fetch_register): Use register_size instead. Call supply_register.
13073 (usr_store_inferior_registers): Likewise. Call collect_register.
13074 Fix recursive case.
13075 (regsets_fetch_inferior_registers): Improve error message.
13076 (regsets_store_inferior_registers): Add debugging.
13077 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13078 (unstopped_p, linux_signal_pid): New functions.
13079 (linux_target_ops): Add linux_signal_pid.
13080 (linux_init_signals): New function.
13081 (initialize_low): Call it. Initialize using_threads.
13082 * regcache.c (inferior_regcache_data): Add valid
13084 (get_regcache): Fetch registers lazily. Add fetch argument
13085 and update all callers.
13086 (regcache_invalidate_one, regcache_invalidate): New
13088 (new_register_cache): Renamed from create_register_cache.
13089 Return the new regcache.
13090 (free_register_cache): Change argument to a void *.
13091 (registers_to_string, registers_from_string): Call get_regcache
13092 with fetch flag set.
13093 (register_data): Make static. Pass fetch flag to get_regcache.
13094 (supply_register): Call get_regcache with fetch flag clear.
13095 (collect_register): Call get_regcache with fetch flag set.
13096 (collect_register_as_string): New function.
13097 * regcache.h: Update.
13098 * remote-utils.c (putpkt): Flush after debug output and use
13100 Handle input interrupts while waiting for an ACK.
13101 (input_interrupt): Use signal_pid method.
13102 (getpkt): Flush after debug output and use stderr.
13103 (outreg): Use collect_register_as_string.
13104 (new_thread_notify, dead_thread_notify): New functions.
13105 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13106 and general_thread.
13107 (look_up_one_symbol): Flush after debug output.
13108 * server.c (step_thread, server_waiting): New variables.
13109 (start_inferior): Don't use signal_pid. Update call to mywait.
13110 (attach_inferior): Update call to mywait.
13111 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13112 (main): Don't fetch/store registers explicitly. Use
13113 set_desired_inferior. Support proposed ``Hs'' packet. Update
13115 * server.h: Update.
13116 (struct inferior_list, struct_inferior_list_entry): New.
13117 * target.c (set_desired_inferior): New.
13118 (write_inferior_memory): Constify.
13119 (mywait): New function.
13120 * target.h: Update.
13121 (struct target_ops): New signal_pid method.
13122 (mywait): Removed macro, added prototype.
13124 * linux-low.h (regset_func): Removed.
13125 (regset_fill_func, regset_store_func): New.
13126 (enum regset_type): New.
13127 (struct regset_info): Add type field. Use new operation types.
13128 (struct linux_target_ops): stop_pc renamed to get_pc.
13129 Add decr_pc_after_break and breakpoint_at.
13130 (get_process, get_thread_proess, get_process_thread)
13131 (strut process_info, all_processes, linux_attach_lwp)
13132 (thread_db_init): New.
13134 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13135 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13136 (the_low_target): Add new members.
13137 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13138 (i386_store_fpxregset): Constify.
13139 (target_regsets): Add new kind identifier.
13140 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13141 (i386_set_pc): Add debugging.
13142 (i386_breakpoint_at): New function.
13143 (the_low_target): Add new members.
13144 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13145 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13146 (mips_breakpoint_at): New.
13147 (the_low_target): Add new members.
13148 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13149 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13150 (the_low_target): Add new members.
13151 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13152 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13153 (the_low_target): Add new members.
13154 * linux-x86-64-low.c (target_regsets): Add new kind
13157 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
13159 From Martin Pool <mbp@samba.org>:
13160 * server.c (gdbserver_usage): New function.
13163 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
13165 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13166 stop_at -> stop_pc.
13168 2002-05-04 Andrew Cagney <ac131313@redhat.com>
13170 * Makefile.in: Remove obsolete code.
13172 2002-04-24 Michal Ludvig <mludvig@suse.cz>
13174 * linux-low.c (regsets_fetch_inferior_registers),
13175 (regsets_store_inferior_registers): Removed cast to int from
13177 * regcache.h: Added declaration of struct inferior_info.
13179 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13181 * inferiors.c (struct inferior_info): Add regcache_data.
13182 (add_inferior): Call create_register_cache.
13183 (clear_inferiors): Call free_register_cache.
13184 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13185 * regcache.c (struct inferior_regcache_data): New.
13186 (registers): Remove.
13187 (get_regcache): New function.
13188 (create_register_cache, free_register_cache): New functions.
13189 (set_register_cache): Don't initialize the register cache here.
13190 (registers_to_string, registers_from_string, register_data): Call
13192 * regcache.h: Add prototypes.
13193 * server.h: Likewise.
13195 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
13197 * mem-break.c: New file.
13198 * mem-break.h: New file.
13199 * Makefile.in: Add mem-break.o rule; update server.h
13201 * inferiors.c (struct inferior_info): Add target_data
13203 (clear_inferiors): Free target_data member if set.
13204 (inferior_target_data, set_inferior_target_data): New functions.
13205 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13206 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13207 * linux-low.c (linux_bp_reinsert): New variable.
13208 (struct inferior_linux_data): New.
13209 (linux_create_inferior): Use set_inferior_target_data.
13210 (linux_attach): Likewise. Call add_inferior.
13211 (linux_wait_for_one_inferior): New function.
13212 (linux_wait): Call it.
13213 (linux_write_memory): Add const.
13214 (initialize_low): Call set_breakpoint_data.
13215 * linux-low.h (struct linux_target_ops): Add breakpoint
13217 * server.c (attach_inferior): Remove extra add_inferior
13219 * server.h: Include mem-break.h. Update inferior.c
13221 * target.c (read_inferior_memory)
13222 (write_inferior_memory): New functions.
13223 * target.h (read_inferior_memory)
13224 (write_inferior_memory): Change macros to prototypes.
13225 (struct target_ops): Update comments. Add const to write_memory
13228 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
13230 * linux-low.c (usr_store_inferior_registers): Support
13231 registers which are allowed to fail to store.
13232 * linux-low.h (linux_target_ops): Likewise.
13233 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13234 (ppc_cannot_store_register): FPSCR may not be storable.
13236 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13238 * server.h: Include <string.h> if HAVE_STRING_H.
13239 * ChangeLog: Correct paths in last ChangeLog entry.
13241 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13243 * linux-low.h: Remove obsolete prototypes.
13244 (struct linux_target_ops): New.
13245 (extern the_low_target): New.
13246 * linux-low.c (num_regs, regmap): Remove declarations.
13247 (register_addr): Use the_low_target explicitly.
13248 (fetch_register): Likewise.
13249 (usr_fetch_inferior_registers): Likewise.
13250 (usr_store_inferior_registers): Likewise.
13251 * linux-arm-low.c (num_regs): Remove.
13252 (arm_num_regs): Define.
13253 (arm_regmap): Renamed from regmap, made static.
13254 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13256 (arm_cannot_store_register): Renamed from cannot_store_register,
13258 (the_low_target): New.
13259 * linux-i386-low.c (num_regs): Remove.
13260 (i386_num_regs): Define.
13261 (i386_regmap): Renamed from regmap, made static.
13262 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13264 (i386_cannot_store_register): Renamed from cannot_store_register,
13266 (the_low_target): New.
13267 * linux-ia64-low.c (num_regs): Remove.
13268 (ia64_num_regs): Define.
13269 (ia64_regmap): Renamed from regmap, made static.
13270 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13272 (ia64_cannot_store_register): Renamed from cannot_store_register,
13274 (the_low_target): New.
13275 * linux-m68k-low.c (num_regs): Remove.
13276 (m68k_num_regs): Define.
13277 (m68k_regmap): Renamed from regmap, made static.
13278 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13280 (m68k_cannot_store_register): Renamed from cannot_store_register,
13282 (the_low_target): New.
13283 * linux-mips-low.c (num_regs): Remove.
13284 (mips_num_regs): Define.
13285 (mips_regmap): Renamed from regmap, made static.
13286 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13288 (mips_cannot_store_register): Renamed from cannot_store_register,
13290 (the_low_target): New.
13291 * linux-ppc-low.c (num_regs): Remove.
13292 (ppc_num_regs): Define.
13293 (ppc_regmap): Renamed from regmap, made static.
13294 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13296 (ppc_cannot_store_register): Renamed from cannot_store_register,
13298 (the_low_target): New.
13299 * linux-s390-low.c (num_regs): Remove.
13300 (s390_num_regs): Define.
13301 (s390_regmap): Renamed from regmap, made static.
13302 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13304 (s390_cannot_store_register): Renamed from cannot_store_register,
13306 (the_low_target): New.
13307 * linux-sh-low.c (num_regs): Remove.
13308 (sh_num_regs): Define.
13309 (sh_regmap): Renamed from regmap, made static.
13310 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13312 (sh_cannot_store_register): Renamed from cannot_store_register,
13314 (the_low_target): New.
13315 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13316 (the_low_target): New.
13318 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13320 * Makefile.in: Add stamp-h target.
13321 * configure.in: Create stamp-h.
13322 * configure: Regenerated.
13324 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13326 * inferiors.c: New file.
13327 * target.c: New file.
13328 * target.h: New file.
13329 * Makefile.in: Add target.o and inferiors.o. Update
13331 * linux-low.c (inferior_pid): New static variable,
13332 moved from server.c.
13333 (linux_create_inferior): Renamed from create_inferior.
13334 Call add_inferior. Return 0 on success instead of a PID.
13335 (linux_attach): Renamed from myattach.
13336 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13337 (linux_thread_alive): Renamed from mythread_alive.
13338 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13340 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13341 (regsets_store_inferior_registers): Correct error message.
13342 Add missing ``return 0''.
13343 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13344 (linux_store_registers): Renamed from store_inferior_registers.
13345 (linux_read_memory): Renamed from read_inferior_memory.
13346 (linux_write_memory): Renamed from write_inferior_memory.
13347 (linux_target_ops): New structure.
13348 (initialize_low): Call set_target_ops ().
13349 * remote-utils.c (unhexify): New function.
13350 (hexify): New function.
13351 (input_interrupt): Send signals to ``signal_pid''.
13352 * server.c (inferior_pid): Remove.
13353 (start_inferior): Update create_inferior call.
13354 (attach_inferior): Call add_inferior.
13355 (handle_query): New function.
13356 (main): Call handle_query for `q' packets.
13357 * server.h: Include "target.h". Remove obsolete prototypes.
13358 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13360 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13362 * Makefile.in: Add WARN_CFLAGS. Update configury
13364 * configure.in: Check for <string.h>
13365 * configure: Regenerate.
13366 * config.in: Regenerate.
13367 * gdbreplay.c: Include needed system headers.
13368 (remote_open): Remove strchr prototype.
13369 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13370 * regcache.c (supply_register): Change buf argument to const void *.
13371 (supply_register_by_name): Likewise.
13372 (collect_register): Change buf argument to void *.
13373 (collect_register_by_name): Likewise.
13374 * regcache.h: Add missing prototypes.
13375 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13376 * server.c (handle_query): New function.
13377 (attached): New static variable, moved out of main.
13378 (main): Quiet longjmp clobber warnings.
13379 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13380 * utils.c (error): Remove NORETURN.